text:
package org.zalando.switchman.api;

import org.zalando.switchman.ItemId;
import org.zalando.switchman.Recipe;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;

import rx.Single;

public class CompleteItemProvider {

    private final Map<ItemId, Recipe> productById;

    public CompleteItemProvider() {
        productById = new HashMap<>();
        addNewRecipe("Pancakes", "https://cdn.pixabay.com/photo/2017/01/16/17/45/pancake-1984716_1280.jpg");
        addNewRecipe("Tiramisu", "https://cdn.pixabay.com/photo/2017/01/11/11/33/cake-1971552_1280.jpg");
        addNewRecipe("Cinnamon Rolls", "https://cdn.pixabay.com/photo/2016/05/26/16/27/baking-1417494_1280.jpg");
    }

    private void addNewRecipe(final String title, final String url) {
        ItemIdImpl itemId = new ItemIdImpl();
        Recipe recipe = new Recipe(itemId, title, url);
        productById.put(itemId, recipe);
    }

    Single<Recipe> getCompleteItem(ItemId id) {
        return Single.just(productById.get(id));
    }

    Single<List<Recipe>> getAllCompleteItems() {
        return Single.just(new ArrayList<>(productById.values()));
    }

    private static class ItemIdImpl implements ItemId {
        private final int id;

        private ItemIdImpl() {
            id = new Random().nextInt();
        }

        @Override
        public String toString() {
            return "ItemIdImpl{" +
                    "id=" + id +
                    '}';
        }
    }
}


text:
#ifndef GRAPHICSSTATEGUARDIANBASE_H
#define GRAPHICSSTATEGUARDIANBASE_H

#include "pandabase.h"

#include "typedWritableReferenceCount.h"
#include "nodeCachedReferenceCount.h"
#include "luse.h"
#include "lightMutex.h"

// A handful of forward references.

class Thread;
class RenderBuffer;
class GraphicsWindow;
class NodePath;
class GraphicsOutputBase;

class VertexBufferContext;
class IndexBufferContext;
class GeomContext;
class GeomNode;
class Geom;
class GeomPipelineReader;
class GeomVertexData;
class GeomVertexDataPipelineReader;
class GeomVertexArrayData;
class GeomPrimitive;
class GeomPrimitivePipelineReader;
class GeomTriangles;
class GeomTristrips;
class GeomTrifans;
class GeomLines;
class GeomLinestrips;
class GeomPoints;
class GeomMunger;

class SceneSetup;
class PreparedGraphicsObjects;
class GraphicsOutput;
class Texture;
class TextureContext;
class SamplerContext;
class SamplerState;
class Shader;
class ShaderContext;
class RenderState;
class TransformState;
class Material;

class ColorScaleAttrib;
class TexMatrixAttrib;
class ColorAttrib;
class TextureAttrib;
class LightAttrib;
class MaterialAttrib;
class RenderModeAttrib;
class AntialiasAttrib;
class RescaleNormalAttrib;
class ColorBlendAttrib;
class ColorWriteAttrib;
class AlphaTestAttrib;
class DepthTestAttrib;
class DepthWriteAttrib;
class TexGenAttrib;
class ShaderAttrib;
class CullFaceAttrib;
class ClipPlaneAttrib;
class ShadeModelAttrib;
class TransparencyAttrib;
class FogAttrib;
class DepthOffsetAttrib;

class PointLight;
class DirectionalLight;
class Spotlight;
class AmbientLight;
class LightLensNode;

class DisplayRegion;
class Lens;

/**
 * This is a base class for the GraphicsStateGuardian class, which is itself a
 * base class for the various GSG's for different platforms.  This class
 * contains all the function prototypes to support the double-dispatch of GSG
 * to geoms, transitions, etc.  It lives in a separate class in its own
 * package so we can avoid circular build dependency problems.
 *
 * GraphicsStateGuardians are not actually writable to bam files, of course,
 * but they may be passed as event parameters, so they inherit from
 * TypedWritableReferenceCount instead of TypedReferenceCount for that
 * convenience.
 */
class EXPCL_PANDA_GSGBASE GraphicsStateGuardianBase : public TypedWritableReferenceCount {
PUBLISHED:
  virtual bool get_incomplete_render() const=0;
  virtual bool get_effective_incomplete_render() const=0;

  virtual bool prefers_triangle_strips() const=0;
  virtual int get_max_vertices_per_array() const=0;
  virtual int get_max_vertices_per_primitive() const=0;

  virtual int get_max_texture_dimension() const=0;
  virtual bool get_supports_compressed_texture_format(int compression_mode) const=0;

  virtual bool get_supports_multisample() const=0;
  virtual int get_supported_geom_rendering() const=0;
  virtual bool get_supports_shadow_filter() const=0;

  virtual bool get_supports_texture_srgb() const=0;

  virtual bool get_supports_hlsl() const=0;

public:
  // These are some general interface functions; they're defined here mainly
  // to make it easy to call these from code in some directory that display
  // depends on.
  virtual SceneSetup *get_scene() const=0;

  virtual void clear_before_callback()=0;
  virtual void clear_state_and_transform()=0;

  virtual void remove_window(GraphicsOutputBase *window)=0;

#ifndef CPPPARSER
  // We hide this from interrogate, so that it will be properly exported from
  // the GraphicsStateGuardian class, later.
  virtual PreparedGraphicsObjects *get_prepared_objects()=0;
#endif

  virtual TextureContext *prepare_texture(Texture *tex, int view)=0;
  virtual bool update_texture(TextureContext *tc, bool force)=0;
  virtual void release_texture(TextureContext *tc)=0;
  virtual bool extract_texture_data(Texture *tex)=0;

  virtual SamplerContext *prepare_sampler(const SamplerState &sampler)=0;
  virtual void release_sampler(SamplerContext *sc)=0;

  virtual GeomContext *prepare_geom(Geom *geom)=0;
  virtual void release_geom(GeomContext *gc)=0;

  virtual ShaderContext *prepare_shader(Shader *shader)=0;
  virtual void release_shader(ShaderContext *sc)=0;

  virtual VertexBufferContext *prepare_vertex_buffer(GeomVertexArrayData *data)=0;
  virtual void release_vertex_buffer(VertexBufferContext *vbc)=0;

  virtual IndexBufferContext *prepare_index_buffer(GeomPrimitive *data)=0;
  virtual void release_index_buffer(IndexBufferContext *ibc)=0;

  virtual void dispatch_compute(int size_x, int size_y, int size_z)=0;

  virtual PT(GeomMunger) get_geom_munger(const RenderState *state,
                                         Thread *current_thread)=0;

  virtual void set_state_and_transform(const RenderState *state,
                                       const TransformState *transform)=0;

  // This function may only be called during a render traversal; it will
  // compute the distance to the indicated point, assumed to be in eye
  // coordinates, from the camera plane.  This is a virtual function because
  // different GSG's may define the eye coordinate space differently.
  virtual PN_stdfloat compute_distance_to(const LPoint3 &point) const=0;

  // These are used to implement decals.  If depth_offset_decals() returns
  // true, none of the remaining functions will be called, since depth offsets
  // can be used to implement decals fully (and usually faster).
  virtual bool depth_offset_decals()=0;
  virtual CPT(RenderState) begin_decal_base_first()=0;
  virtual CPT(RenderState) begin_decal_nested()=0;
  virtual CPT(RenderState) begin_decal_base_second()=0;
  virtual void finish_decal()=0;

  // Defined here are some internal interface functions for the
  // GraphicsStateGuardian.  These are here to support double-dispatching from
  // Geoms and NodeTransitions, and are intended to be invoked only directly
  // by the appropriate Geom and NodeTransition types.  They're public only
  // because it would be too inconvenient to declare each of those types to be
  // friends of this class.

  virtual bool begin_draw_primitives(const GeomPipelineReader *geom_reader,
                                     const GeomMunger *munger,
                                     const GeomVertexDataPipelineReader *data_reader,
                                     bool force)=0;
  virtual bool draw_triangles(const GeomPrimitivePipelineReader *reader, bool force)=0;
  virtual bool draw_tristrips(const GeomPrimitivePipelineReader *reader, bool force)=0;
  virtual bool draw_trifans(const GeomPrimitivePipelineReader *reader, bool force)=0;
  virtual bool draw_patches(const GeomPrimitivePipelineReader *reader, bool force)=0;
  virtual bool draw_lines(const GeomPrimitivePipelineReader *reader, bool force)=0;
  virtual bool draw_linestrips(const GeomPrimitivePipelineReader *reader, bool force)=0;
  virtual bool draw_points(const GeomPrimitivePipelineReader *reader, bool force)=0;
  virtual void end_draw_primitives()=0;

  virtual bool framebuffer_copy_to_texture
  (Texture *tex, int view, int z, const DisplayRegion *dr, const RenderBuffer &rb)=0;
  virtual bool framebuffer_copy_to_ram
  (Texture *tex, int view, int z, const DisplayRegion *dr, const RenderBuffer &rb)=0;

  virtual CoordinateSystem get_internal_coordinate_system() const=0;

  virtual void bind_light(PointLight *light_obj, const NodePath &light,
                          int light_id) { }
  virtual void bind_light(DirectionalLight *light_obj, const NodePath &light,
                          int light_id) { }
  virtual void bind_light(Spotlight *light_obj, const NodePath &light,
                          int light_id) { }

PUBLISHED:
  static GraphicsStateGuardianBase *get_default_gsg();
  static void set_default_gsg(GraphicsStateGuardianBase *default_gsg);

  static int get_num_gsgs();
  static GraphicsStateGuardianBase *get_gsg(int n);
  MAKE_SEQ(get_gsgs, get_num_gsgs, get_gsg);

public:
  static void add_gsg(GraphicsStateGuardianBase *gsg);
  static void remove_gsg(GraphicsStateGuardianBase *gsg);

private:
  typedef pvector<GraphicsStateGuardianBase *> GSGs;
  static GSGs _gsgs;
  static GraphicsStateGuardianBase *_default_gsg;
  static LightMutex _lock;

public:
  static TypeHandle get_class_type() {
    return _type_handle;
  }
  static void init_type() {
    TypedWritableReferenceCount::init_type();
    register_type(_type_handle, "GraphicsStateGuardianBase",
                  TypedWritableReferenceCount::get_class_type());
  }
  virtual TypeHandle get_type() const {
    return get_class_type();
  }
  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}

private:
  static TypeHandle _type_handle;
};

#endif

redpajama_set_name: RedPajamaGithub


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Mycologia 75(6): 971 (1983)

#### Original name
Xenokylindria

### Remarks
null


text:
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available

_import_structure = {
    "configuration_megatron_bert": ["MEGATRON_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP", "MegatronBertConfig"],
}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    _import_structure["modeling_megatron_bert"] = [
        "MEGATRON_BERT_PRETRAINED_MODEL_ARCHIVE_LIST",
        "MegatronBertForCausalLM",
        "MegatronBertForMaskedLM",
        "MegatronBertForMultipleChoice",
        "MegatronBertForNextSentencePrediction",
        "MegatronBertForPreTraining",
        "MegatronBertForQuestionAnswering",
        "MegatronBertForSequenceClassification",
        "MegatronBertForTokenClassification",
        "MegatronBertModel",
        "MegatronBertPreTrainedModel",
    ]

if TYPE_CHECKING:
    from .configuration_megatron_bert import MEGATRON_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, MegatronBertConfig

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_megatron_bert import (
            MEGATRON_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
            MegatronBertForCausalLM,
            MegatronBertForMaskedLM,
            MegatronBertForMultipleChoice,
            MegatronBertForNextSentencePrediction,
            MegatronBertForPreTraining,
            MegatronBertForQuestionAnswering,
            MegatronBertForSequenceClassification,
            MegatronBertForTokenClassification,
            MegatronBertModel,
            MegatronBertPreTrainedModel,
        )

else:
    import sys

    sys.modules[__name__] = _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)


text:
namespace viz {
class HostFrameSinkManager;
}

namespace ui {
class InProcessContextProvider;

class InProcessContextFactory : public ContextFactory {
 public:
  // Both |host_frame_sink_manager| and |frame_sink_manager| must outlive the
  // ContextFactory. The constructor without |use_skia_renderer| will use
  // SkiaRenderer if the feature is enabled.
  // TODO(crbug.com/657959): |frame_sink_manager| should go away and we should
  // use the LayerTreeFrameSink from the HostFrameSinkManager.
  InProcessContextFactory(viz::HostFrameSinkManager* host_frame_sink_manager,
                          viz::FrameSinkManagerImpl* frame_sink_manager);
  InProcessContextFactory(viz::HostFrameSinkManager* host_frame_sink_manager,
                          viz::FrameSinkManagerImpl* frame_sink_manager,
                          bool use_skia_renderer);

  InProcessContextFactory(const InProcessContextFactory&) = delete;
  InProcessContextFactory& operator=(const InProcessContextFactory&) = delete;

  ~InProcessContextFactory() override;

  viz::FrameSinkManagerImpl* GetFrameSinkManager() {
    return frame_sink_manager_;
  }

  // If true (the default) an OutputSurface is created that does not display
  // anything. Set to false if you want to see results on the screen.
  void set_use_test_surface(bool use_test_surface) {
    use_test_surface_ = use_test_surface;
  }

  // Set refresh rate will be set to 200 to spend less time waiting for
  // BeginFrame when used for tests.
  void SetUseFastRefreshRateForTests();

  // ContextFactory implementation.
  void CreateLayerTreeFrameSink(base::WeakPtr<Compositor> compositor) override;

  scoped_refptr<viz::ContextProvider> SharedMainThreadContextProvider()
      override;
  scoped_refptr<viz::RasterContextProvider>
  SharedMainThreadRasterContextProvider() override;

  void RemoveCompositor(Compositor* compositor) override;
  gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
  cc::TaskGraphRunner* GetTaskGraphRunner() override;
  viz::FrameSinkId AllocateFrameSinkId() override;
  viz::SubtreeCaptureId AllocateSubtreeCaptureId() override;
  viz::HostFrameSinkManager* GetHostFrameSinkManager() override;

  skia::Matrix44 GetOutputColorMatrix(Compositor* compositor) const;
  gfx::DisplayColorSpaces GetDisplayColorSpaces(Compositor* compositor) const;
  float GetSDRWhiteLevel(Compositor* compositor) const;
  base::TimeTicks GetDisplayVSyncTimeBase(Compositor* compositor) const;
  base::TimeDelta GetDisplayVSyncTimeInterval(Compositor* compositor) const;
  void ResetDisplayOutputParameters(Compositor* compositor);

 private:
  class PerCompositorData;

  PerCompositorData* CreatePerCompositorData(Compositor* compositor);

  scoped_refptr<InProcessContextProvider> shared_main_thread_contexts_;
  scoped_refptr<InProcessContextProvider> shared_worker_context_provider_;
  viz::TestSharedBitmapManager shared_bitmap_manager_;
  viz::TestGpuMemoryBufferManager gpu_memory_buffer_manager_;
  viz::TestImageFactory image_factory_;
  cc::TestTaskGraphRunner task_graph_runner_;
  viz::FrameSinkIdAllocator frame_sink_id_allocator_;
  viz::SubtreeCaptureIdAllocator subtree_capture_id_allocator_;
  bool use_test_surface_;
  bool disable_vsync_ = false;
  double refresh_rate_ = 60.0;
  const raw_ptr<viz::HostFrameSinkManager> host_frame_sink_manager_;
  const raw_ptr<viz::FrameSinkManagerImpl> frame_sink_manager_;

  viz::RendererSettings renderer_settings_;
  viz::DebugRendererSettings debug_settings_;
  using PerCompositorDataMap =
      std::unordered_map<Compositor*, std::unique_ptr<PerCompositorData>>;
  PerCompositorDataMap per_compositor_data_;
};

}  // namespace ui

#endif  // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_


text:
<?php
/**
 * Created by PhpStorm.
 * User: ha
 * Date: 1/5/16
 * Time: 11:02 PM
 */
namespace App\Models\Repository;

use Illuminate\Support\Facades\Facade;
/**
 *
 */
class PostFacade extends Facade
{
    protected static function getFacadeAccessor()
    {
        return 'App\Models\Repository\PostRepository';
    }

}


text:
require('../../../modules/es.string.code-point-at');
require('../../../modules/es.string.ends-with');
require('../../../modules/es.string.includes');
require('../../../modules/es.string.match');
require('../../../modules/es.string.match-all');
require('../../../modules/es.string.pad-end');
require('../../../modules/es.string.pad-start');
require('../../../modules/es.string.repeat');
require('../../../modules/es.string.replace');
require('../../../modules/es.string.search');
require('../../../modules/es.string.split');
require('../../../modules/es.string.starts-with');
require('../../../modules/es.string.trim');
require('../../../modules/es.string.trim-start');
require('../../../modules/es.string.trim-end');
require('../../../modules/es.string.iterator');
require('../../../modules/es.string.anchor');
require('../../../modules/es.string.big');
require('../../../modules/es.string.blink');
require('../../../modules/es.string.bold');
require('../../../modules/es.string.fixed');
require('../../../modules/es.string.fontcolor');
require('../../../modules/es.string.fontsize');
require('../../../modules/es.string.italics');
require('../../../modules/es.string.link');
require('../../../modules/es.string.small');
require('../../../modules/es.string.strike');
require('../../../modules/es.string.sub');
require('../../../modules/es.string.sup');
var entryVirtual = require('../../../internals/entry-virtual');

module.exports = entryVirtual('String');


text:
namespace CodeModel.Conventions
{
    public interface IConvention
    {
    }
}


text:
import SelectPatient from './SelectPatient';

export default SelectPatient;


text:
<?php

/**
 * This is a "CMS" model for folders.
 *
 * @author Stephanie
 */
class Folders extends MY_Model {

    //constructor
    function __construct() {
        parent::__construct('photos', 'id');
    }

    //retrun all folder names, alphabetically
    function all() {
        $this->db->order_by("foldername", "asc");
        $this->db->distinct();
        $this->db->select('foldername');
        $query = $this->db->get('photos');
        return $query->result_array();
    }
}


text:
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.14.1] - 2022-08-24

This version contains a minor bugfix.

### Fixed

- Fixes small awk issue causing annoying log message

## [0.14.0] - 2022-07-21

A new maintainer has stepped forward!
Welcome, [Holger Stolzenberg](https://github.com/holgerstolzenberg)!

### Added

- Container images are now available for amd64 *and* arm64 architecture. Thanks a lot, ["odidev"](https://github.com/odidev)
  for the initial pull request to introduce this feature.
- A new parameter `additional_sonar_scanner_opts` is now available, which allows users to specifiy the
  `SONAR_SCANNER_OPTS` environment variable for elobarorated SonarQube scanner invocations.

### Changed

- Main development branch has been renamed from `master` to `main`.
- Fully-automated CI/CD builds that will create container images with tag `:latest` whenever changes to the
  `main` branch are pushed works again after some changes made by Docker Hub that broke the old CI/CD workflow.

### Fixed

- Setting argument `__debug=true` no longer breaks Maven-based builds. Thanks for the fix,[Roberto C. Salome](https://github.com/rcsalome)!

### Updated

- Sonar CLI, bundled Node.js version and all other dependencies in the container image(s) have been updated
  to their latest release versions.

## [0.13.2] - 2020-10-24

This version contains fixes provided by [Julien Syx](https://github.com/Seraf).
Thanks for helping out and making this release possible!

### Fixed

- Fix broken builds that occured when no `maven_settings_file` is set.
  ([#66](https://github.com/cathive/concourse-sonarqube-resource/issues/66), [#67](https://github.com/cathive/concourse-sonarqube-resource/issues/67))

- Pull request identification if `decorate_pr` is set to `true` has been fixed.

## [0.13.1] - 2020-09-30

### Fixed

- Wrong relative lookup of `maven_settings_file` has been fixed.
  ([#59](https://github.com/cathive/concourse-sonarqube-resource/issues/59), [#65](https://github.com/cathive/concourse-sonarqube-resource/issues/65))

## [0.13.0] - 2020-09-30

Thanks to [Chien Jon Soon](https://github.com/sooncj) and [Pruthvidhar Rao Nadunooru](https://github.com/pnedunuri) for their contributions to this release!

### Added

- Globbing syntax support (`shopt -s globstar`) has been added. ([#60](https://github.com/cathive/concourse-sonarqube-resource/issues/60))

### Fixed

- `sonar.branch.name` should now work correctly when performing pull-request analysis

### Updated

- Base docker image has been updaed to openjdk:11.0.8-slim.
- The bundled Sonar Scanner CLI has been updated to v4.4.0.2170.
- The bundled TypeScript version has been updated to v[3.9.7](https://github.com/microsoft/TypeScript/releases/tag/v3.9.7).

## [0.12.0] - 2020-06-12

Thanks to "[noelcat](https://github.com/noelcatt)" for the pull request to add support
for BitBucket pull request decorators.

### Added

- Support for BitBucket pull request decorations has been added.

### Updated

- Base docker image has been updaed to openjdk:11.0.7-slim.
- The bundled Sonar Scanner CLI has been updated to v4.3.0.2102.
- The bundled TypeScript version has been updated to v3.9.5.

## [0.11.4] - 2020-05-18

### Fixed

Thanks to [Nabil Abdelwahd](https://github.com/Labout) for the patch that made this
release possible.

- The `branch_name_file` parameter should now work as supposed to. ([#55](https://github.com/cathive/concourse-sonarqube-resource/issues/55))

## [0.11.3] - 2020-03-06

Thanks to [Samed Ozdemir](https://github.com/xsorifc28) who provided a patch to
enhance the functionality of this resource for this release.

### Added

- The parameters `branch_name_file` and `branch_target_file` have been added to
  allow for more sophisticated integration options with SonarQube's branch
  management feature. ([#52](https://github.com/cathive/concourse-sonarqube-resource/issues/52))

### Updated

- The bundled TypeScript version has been updated to v3.8.3.

### Fixed

- The environment variable `NODE_PATH` is now set correctly, which should fix
  issues with the sonar-typescript-plugin. ([#51](https://github.com/cathive/concourse-sonarqube-resource/issues/51))

## [0.11.2] - 2020-02-05

### Fixed

- JAVA_HOME was not correctly linked and rendered the `cli` variant of the sonar-scanner
  unusable. ([#50](https://github.com/cathive/concourse-sonarqube-resource/issues/50))

## [0.11.1] - 2020-01-24 [YANKED]

### Fixed

- Base container image has been downgraded to `openjdk:11.0.6-slim`
  SonarQube scanners as of now only support Java 8 and Java 11
  according to the [documentation](https://docs.sonarqube.org/latest/requirements/requirements/).
  Some plugins don't support newer Java runtimes which breaks all
  functionality of this resource.

## [0.11.0] - 2020-01-22 [YANKED]

### Updated

- Base container image has been updated to `openjdk:13.0.1-slim`
- The bundled sonar-scanner-cli has been updated to v4.2.0.1873.
- The bundled Maven command line has been updated to v3.6.3.
- The bundled sonar-maven-plugin has been updated to v3.7.0.1746.

### Fixed

- The TypeScript (`tsc`) command line has been removed in a prior version of the
  resource without proper notice. This breaks existing build pipelines that rely
  upon tsc's existence and therefore TypeScript has been re-added to the image
  and is now properly being version-managed. ([#48](https://github.com/cathive/concourse-sonarqube-resource/issues/48))

### Improved

- A container structure test has been added to the repository to make sure that
  the resource won't break as easily when updates are being made under the hood.
  ([#48](https://github.com/cathive/concourse-sonarqube-resource/issues/48), [#49](https://github.com/cathive/concourse-sonarqube-resource/issues/49))

## [0.10.0] - 2019-11-13

Thanks to [Fernando Torres](https://github.com/fftorres) for all the fixes and
enhancements that went into this release!

### Added

- Add support for Pull Request decorations.

### Fixed

- Fixed an issue when parsing the project status after analysis. ([#44](https://github.com/cathive/concourse-sonarqube-resource/issues/44))
- Fixed behavior of the defunct `autodetect_branch_name` flag.

## [0.9.1] - 2019-08-23

### Added

- Improved support for wildcard path arguments for properties
ending with `*reportPaths`.

### Updated
- Corrected some documentation.

## [0.9.0] - 2019-07-26

### Added

- New optional `out` step parameter: `project_key_file`.
  Thanks to [Guillaume Pouilloux](https://github.com/gpouilloux) for the patch.
- New optional `in` step parameter: `quality_gate`
  Thanks to [Ming Xu](https://github.com/SimonXming) for the patch.
- Support for Wildcard path arguments.
  Thanks to [Ming Xu](https://github.com/SimonXming) for the patch.
- The output now contains additional metadata about quality gate status conditions
  Thanks to [Ye Yang](https://github.com/mgsolid) for the patch.

### Updated

- The bundled sonar-scanner-cli has been updated to v4.0.0.1744.
- The bundled Maven command line has been updated to v3.6.1.

## [0.8.1] - 2019-01-29

### Fixed

- `params.maven_settings_file` should no longer be ignored.
  ([#36](https://github.com/cathive/concourse-sonarqube-resource/issues/36))

## [0.8.0] - 2019-01-25

### Added

- Error handling when fetching the compute engine status has been improved.
  Thanks to [Rekha Mittal](https://github.com/rekhamitt) for the provided
  patch. ([#33](https://github.com/cathive/concourse-sonarqube-resource/issues/33))
- A new flag (`additional_properties_file`) can be used to instrument the
  sonar-scanner. Thanks to [Horst Gutmanm](https://github.com/zerok) for the
  provided patch.

### Updated

- The bundled sonar-scanner-cli has been updated to v3.3.0.1492.
- The bundled sonar-maven-plugin has been updated to v3.6.0.1398.

### Fixed

- Fix issues when an auth-token (instead of username + password) is being used
  for authentication/authorization. Thanks to [Febin Rejoe](https://github.com/febinrejoe)
  for the provided fix. ([#31](https://github.com/cathive/concourse-sonarqube-resource/issues/31))

## [0.7.2] - 2018-12-09

### Added

- If the specified URL of the SonarQube server instance
  doesn't end in a slash, the missing slash will be appended
  automatically. ([#20](https://github.com/cathive/concourse-sonarqube-resource/issues/20))

## [0.7.1] - 2018-12-09

### Fixed

- scanner-report.txt could not be found if `scanner_type` was set to `maven` ([#24](https://github.com/cathive/concourse-sonarqube-resource/issues/24))
- Version 0.7.0 contained a bug where the bundled sonar-maven-plugin was *not* updated
  to version v3.5.0.1254 as originally announced. This version fixes this issue and
  makes sure that the desired version of he sonar-maven-plugin is being used.

## [0.7.0] - 2018-12-07

### Fixed

- Custom maven settings are used correctly when perfoming SonarQube analysis. Thanks to [Marek Urban](https://github.com/marek-urban) for the provided fix.
  ([#19](https://github.com/cathive/concourse-sonarqube-resource/issues/19))
- Docker builds should no longer fail because of corrupted sonar-scanner
  zip archive. ([#26](https://github.com/cathive/concourse-sonarqube-resource/issues/26))
- Anonymous access to SonarQube servers that don't require authentication
  should now be possible. ([#25](https://github.com/cathive/concourse-sonarqube-resource/issues/25))

### Added

- The integrity of the bundled Maven installation and the sonar-scanner
  distribution is now being checked agains sha512 checksums to ensure the contents of the downloads has not been altered.

### Updated

- The bundled Maven installation has been updated to v3.6.0.
- The bundled sonar-maven-plugin has been updated to v3.5.0.1254.

## [0.6.0] - 2018-05-30

### Removed

- The idea of using a project-local maven wrapper instance seemed nice but
  was not really usable / stable in practice. Therefore the feature had to
  be removed.

## [0.5.1] - 2018-05-30

### Fixed

- An issue with using the maven wrapper was introduced in 0.5.0.
  If a project uses the maven wrapper and the scanner_type is set to `maven`
  (or the scanner_type was automatically detected), such builds were broken,
  because the maven wrapper was not executed correctly.

## [0.5.0] - 2018-05-30

### Fixed

- Anonymous analysis without username/password or access token should now be possible.
  ([#13](https://github.com/cathive/concourse-sonarqube-resource/issues/13))

### Added

- A new configuration parameter (`source.__debug`) has been added that can be used
  to debug the resource itself when developing new features or fixing bugs.
  (This flag is *not* ment to be used in production environments, though!)

- The unit test framework has been enhanced and it should now be possible to write
  some real proper unit tests using the "bats" framework.

- If the scanner type has been set to `maven` (or if it has been automatically
  determined by the existence of a pom.xml file), the resource will now use the
  installed maven wrapper (if there is an executable `mvww` file in the project's
  root folder).

### Changed

- Starting with this release, the shell scripts will use BASH's double brackets
  syntax for all if-checks, because it's generally less error-prone and and offers
  fewer surprises when dealing with nasty things such as uninitialized variables.

## [0.4.0] - 2018-05-27

### Added

- `sonar.branch.name` can now be auto-detected if `params.autodetect_branch_name` has
  been set to `true`.
  ([#3](https://github.com/cathive/concourse-sonarqube-resource/issues/3))

### Changed

- Update sonar-scanner-cli to v3.2.0
- Update sonar-maven-plugin to v3.4.0

## [0.3.1] - 2018-05-16

### Fixed

- Multiple additional parameters work now as supposed to.
  ([#14](https://github.com/cathive/concourse-sonarqube-resource/issues/14))

## [0.3.0] - 2018-03-28

### Added

- Workaround for buggy certificate propagations in Alpine OpenJDK images.
  ([#16](https://github.com/cathive/concourse-sonarqube-resource/issues/16))

## [0.2.0] - 2018-02-07

### Fixed

- Parameters that contain whitespace characters no longer fail the `out` action.
  ([#6](https://github.com/cathive/concourse-sonarqube-resource/issues/6))

### Added

- Support for `params.tests`.
  ([#7](https://github.com/cathive/concourse-sonarqube-resource/issues/7))

- Support for `params.branch_name` and `params.branch_target`.
  Requires the [Branch Plugin](https://docs.sonarqube.org/display/PLUG/Branch+Plugin) or
  SonarCloud.

### Changed

- `params.sources` must now be specified as list instead of comma-separated strings

### Removed

- `params.branch` and `params.analysis_mode` are no longer supported.
  (New SonarQube versions handle short-lived branches in a different way)
  Use `params.branch_name` and `params.branch_target` instead if you use the
  Branch plugin.

## [0.0.32] - 2018-01-31

### Fixed

- Support old SonarQube servers that don't report the server version in report-task.txt (Just report "unknown" as server version) ([#11](https://github.com/cathive/concourse-sonarqube-resource/issues/11))

## [0.0.31] - 2018-01-23

### Fixed

- Support old SonarQube servers that don't report the server version in report-task.txt (under certain conditions, this fix will not work though) ([#11](https://github.com/cathive/concourse-sonarqube-resource/issues/11))

## [0.0.30] - 2018-01-18

### Added

- Support for any additional properties that might need to be passed to the sonar-scanner.

### Fixed

- Updated the documentation to make clear how a quality gate can be used to break the build.
  ([#9](https://github.com/cathive/concourse-sonarqube-resource/issues/9))

## [0.0.20] - 2018-01-04

### Added

- Support for SonarQube/SonarCloud organizations. ([#8](https://github.com/cathive/concourse-sonarqube-resource/issues/8))


text:
API Version: 2015-12-01
## Template format

To create a Microsoft.Batch/batchAccounts/applications/versions resource, add the following JSON to the resources section of your template.

```json
{
  "name": "string",
  "type": "Microsoft.Batch/batchAccounts/applications/versions",
  "apiVersion": "2015-12-01"
}
```
## Property values

The following tables describe the values you need to set in the schema.

<a id="Microsoft.Batch/batchAccounts/applications/versions" />
### Microsoft.Batch/batchAccounts/applications/versions object
|  Name | Type | Required | Value |
|  ---- | ---- | ---- | ---- |
|  name | string | Yes |  |
|  type | enum | Yes | Microsoft.Batch/batchAccounts/applications/versions |
|  apiVersion | enum | Yes | 2015-12-01 |


text:
class Fixture < Struct.new(:year, :date, :time, :home_team, :away_team)
  def name
    [home_team, away_team].join(" V ")
  end

  def datetime
    DateTime.strptime(datetime_string, "%H:%M %a %e %b %Y")
  end

  def self.find_all_by_team_slug(team_slug)
    team = Team.find_by_slug(team_slug)
    Rails.cache.fetch("teams/#{team.slug}/fixtures", expires_in: 12.hours) do
      response = Excon.get("http://www.bbc.co.uk/sport/football/teams/#{team.slug}/fixtures")
      html = Nokogiri::HTML(response.body)
      html.css("div.fixtures-table table.table-stats").collect do |month_table|
        year = month_table.at_css("caption").text.gsub(/\D/, "")
        month_table.css("tbody tr").collect do |fixture_row|
          year = year
          date = fixture_row.css("td.match-date").text.strip
          time = fixture_row.css("td.kickoff").text.strip
          teams = fixture_row.css("td.match-details").text.split(" V ")
          home_team = teams.first.strip
          away_team = teams.last.strip
          Fixture.new(year, date, time, home_team, away_team)
        end
      end.flatten.compact
    end
  end

  private
    def datetime_string
      [time, date, year].join(" ")
    end

end


text:
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using QuantConnect.Interfaces;
using QuantConnect.Lean.Engine.RealTime;
using QuantConnect.Lean.Engine.Results;
using QuantConnect.Lean.Engine.TransactionHandlers;
using QuantConnect.Packets;

namespace QuantConnect.Lean.Engine.Setup
{
    /// <summary>
    /// Interface to setup the algorithm. Pass in a raw algorithm, return one with portfolio, cash, etc already preset.
    /// </summary>
    [InheritedExport(typeof(ISetupHandler))]
    public interface ISetupHandler : IDisposable
    {
        /// <summary>
        /// Any errors from the initialization stored here:
        /// </summary>
        List<string> Errors
        {
            get;
            set;
        }

        /// <summary>
        /// Get the maximum runtime for this algorithm job.
        /// </summary>
        TimeSpan MaximumRuntime
        {
            get;
        }

        /// <summary>
        /// Algorithm starting capital for statistics calculations
        /// </summary>
        decimal StartingPortfolioValue
        {
            get;
        }

        /// <summary>
        /// Start date for analysis loops to search for data.
        /// </summary>
        DateTime StartingDate
        {
            get;
        }

        /// <summary>
        /// Maximum number of orders for the algorithm run -- applicable for backtests only.
        /// </summary>
        int MaxOrders
        {
            get;
        }

        /// <summary>
        /// Create a new instance of an algorithm from a physical dll path.
        /// </summary>
        /// <param name="assemblyPath">The path to the assembly's location</param>
        /// <param name="language">Language of the assembly.</param>
        /// <returns>A new instance of IAlgorithm, or throws an exception if there was an error</returns>
        IAlgorithm CreateAlgorithmInstance(string assemblyPath, Language language);

        /// <summary>
        /// Creates the brokerage as specified by the job packet
        /// </summary>
        /// <param name="algorithmNodePacket">Job packet</param>
        /// <param name="uninitializedAlgorithm">The algorithm instance before Initialize has been called</param>
        /// <param name="factory">The brokerage factory</param>
        /// <returns>The brokerage instance, or throws if error creating instance</returns>
        IBrokerage CreateBrokerage(AlgorithmNodePacket algorithmNodePacket, IAlgorithm uninitializedAlgorithm, out IBrokerageFactory factory);

        /// <summary>
        /// Primary entry point to setup a new algorithm
        /// </summary>
        /// <param name="algorithm">Algorithm instance</param>
        /// <param name="brokerage">New brokerage output instance</param>
        /// <param name="job">Algorithm job task</param>
        /// <param name="resultHandler">The configured result handler</param>
        /// <param name="transactionHandler">The configurated transaction handler</param>
        /// <param name="realTimeHandler">The configured real time handler</param>
        /// <returns>True on successfully setting up the algorithm state, or false on error.</returns>
        bool Setup(IAlgorithm algorithm, IBrokerage brokerage, AlgorithmNodePacket job, IResultHandler resultHandler, ITransactionHandler transactionHandler, IRealTimeHandler realTimeHandler);
    }
}


text:
#ifndef otbGeomMetadataSupplier_h
#define otbGeomMetadataSupplier_h

#include <boost/any.hpp>
#include <unordered_map>

#include "OTBMetadataExport.h"
#include "otbMetadataSupplierInterface.h"
#include "otbImageMetadata.h"

namespace otb
{

/** \class GeomMetadataSupplier
 *
 * \brief Class to access metadata information in a Geom file
 *
 * \ingroup OTBMetadata
 */
class OTBMetadata_EXPORT GeomMetadataSupplier
  : public MetadataSupplierInterface
{
public:
  using DictType = std::unordered_map<std::string, std::string>;

  GeomMetadataSupplier(const std::string & geomFile);
  GeomMetadataSupplier(const std::string & geomFile, const std::string & imageFile);
  GeomMetadataSupplier(const GeomMetadataSupplier &) = delete;
  GeomMetadataSupplier& operator=(const GeomMetadataSupplier&) = delete;
  ~GeomMetadataSupplier() = default;

  /**
   * @brief Get the metadata value corresponding to a given path
   *
   * @param path The path to look for
   * @param hasValue True if path is found
   * @param band not used
   * @return The value corresponding to path. Empty string if not found.
   */
  std::string GetMetadataValue(std::string const& path, bool& hasValue, int band=1) const override;

  std::string GetResourceFile(std::string const& s="") const override;
  std::vector<std::string> GetResourceFiles() const override;

  int GetNbBands() const override;

  /**
   * @brief Fill the ImageMetadata with the RPC model from the geom file
   *
   * @param imd The ImageMetadata to fill
   */
  bool FetchRPC(ImageMetadata & imd, const double lineOffset=0, const double sampleOffset=0);

  /**
   * @brief Fill the ImageMetadata with the GCP from the geom file
   *
   * @param imd The ImageMetadata to fill
   */
  bool FetchGCP(ImageMetadata & imd);

  /** Get the number of keys starting with path */
  unsigned int GetNumberOf(std::string const&) const override;

  /** If multiple keys have the same path, gives the position of the one with value value*/
  unsigned int GetAttributId(std::string const&, std::string const&) const override
  {
    otbLogMacro(Error, << "GetAttributId() not yet implemented in otbGeomMetadataSupplier");
    return 0;
  }

  /**
   * @brief Writes the content of the Geom file into a string
   *
   * @return A std::string
   */
  std::string PrintSelf() const;

protected:
  /**
  * @brief Parse a Geom file and fill the internal map
  */
  void ReadGeomFile();

private:
  /** List of resource files */
  std::unordered_map<std::string, std::string> m_FileNames;
  /** Dictionary containing the metadata */
  DictType m_MetadataDic;

};

} // end namespace otb

#endif


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Aster lucayanus Britton

### Remarks
null


text:
package com.orientechnologies.orient.server.network.protocol.http.command.delete;

import com.orientechnologies.orient.core.db.ODatabaseComplex;
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx;
import com.orientechnologies.orient.server.OServerMain;
import com.orientechnologies.orient.server.network.protocol.http.OHttpRequest;
import com.orientechnologies.orient.server.network.protocol.http.OHttpResponse;
import com.orientechnologies.orient.server.network.protocol.http.OHttpUtils;
import com.orientechnologies.orient.server.network.protocol.http.command.OServerCommandAuthenticatedServerAbstract;

public class OServerCommandDeleteDatabase extends OServerCommandAuthenticatedServerAbstract {
  private static final String[] NAMES = { "DELETE|database/*" };

  public OServerCommandDeleteDatabase() {
    super("database.drop");
  }

  @Override
  public boolean execute(final OHttpRequest iRequest, OHttpResponse iResponse) throws Exception {
    String[] urlParts = checkSyntax(iRequest.url, 2, "Syntax error: database/<database>");

    iRequest.data.commandInfo = "Drop database";
    iRequest.data.commandDetail = urlParts[1];

    ODatabaseDocumentTx db = null;

    try {
      final ODatabaseComplex<?> database = OServerMain.server().openDatabase("document", urlParts[1], serverUser, serverPassword);
      database.drop();

    } finally {
      if (db != null)
        db.close();
    }

    iResponse.send(OHttpUtils.STATUS_OK_NOCONTENT_CODE, OHttpUtils.STATUS_OK_NOCONTENT_DESCRIPTION, OHttpUtils.CONTENT_TEXT_PLAIN, null,
        null);
    return false;
  }

  @Override
  public String[] getNames() {
    return NAMES;
  }
}


text:
class CreateQaLocalAuthorityEntries < ActiveRecord::Migration[5.2]
  def change
    create_table :qa_local_authority_entries do |t|
      t.references :local_authority, foreign_key: { to_table: :qa_local_authorities }, index: true
      t.string :label
      t.string :uri

      t.timestamps
    end
    add_index :qa_local_authority_entries, :uri, unique: true
  end
end


text:
package io.github.asyncviridian.bioevosim;

public class ScreenInput {

	static int sizeX;
	static int sizeY;

	public static void initInput(int sizeX, int sizeY) {
		ScreenInput.sizeX = sizeX;
		ScreenInput.sizeY = sizeY;
		StdDraw.setPenColor();
		StdDraw.setCanvasSize(sizeX, sizeY);
		StdDraw.setPenRadius(0.005);
	}

	public static double[] reset(String prompt) {
		StdDraw.clear();
		// Prompt question
		StdDraw.text(((double) 1) / 2, ((double) 1) * 3 / 4, prompt);
		// Instructions
		StdDraw.textRight(1, ((double) 1) / 10, "Press - to clear");
		// Input box
		double inputCenterX = ((double) 1) / 2;
		double inputCenterXDim = ((double) 1) * 2 / 5;
		double inputCenterY = ((double) 1) / 2;
		double inputCenterYDim = ((double) 1) / 8;
		StdDraw.rectangle(inputCenterX, inputCenterY, inputCenterXDim, inputCenterYDim);
		// Submit button
		double submitCenterX = ((double) 1) / 2;
		double submitCenterXDim = ((double) 1) / 6;
		double submitCenterY = ((double) 1) / 4;
		double submitCenterYDim = ((double) 1) / 10;
		StdDraw.rectangle(submitCenterX, submitCenterY, submitCenterXDim, submitCenterYDim);
		StdDraw.text(submitCenterX, submitCenterY, "Submit");
		// returns coords of submit button corners and input center
		return new double[] { submitCenterX - submitCenterXDim, submitCenterX + submitCenterXDim,
				submitCenterY - submitCenterYDim, submitCenterY + submitCenterYDim, inputCenterX, inputCenterY };
	}

	public static void updateInput(double[] inputbox, int num) {
		StdDraw.text(inputbox[0], inputbox[1], "" + num);
	}

	public static int queryInt(String prompt, int defaultResult) throws InterruptedException {
		double[] coords = ScreenInput.reset(prompt);
		double[] submitcoords = { coords[0], coords[1], coords[2], coords[3] };
		double[] inputcoords = { coords[4], coords[5] };
		StdDraw.show();
		int result = defaultResult;
		ScreenInput.updateInput(inputcoords, result);
		while (!buttonPressed(submitcoords) && !enterKeyPressed()) {
			if (numberPressed()) {
				char number = StdDraw.nextKeyTyped();
				int intnumber = Character.getNumericValue(number);
				result = (result * 10) + intnumber;
				ScreenInput.reset(prompt);
				ScreenInput.updateInput(inputcoords, result);
			} else if (dashPressed()) {
				result = 0;
				ScreenInput.reset(prompt);
				ScreenInput.updateInput(inputcoords, result);
			}
			// Wait until mouse click or enter key to move on
			ScreenInput.clearKeys();
			Thread.sleep(100);
			StdDraw.show();
		}
		// Reset mouse status
		StdDraw.setMousePressed(false);
		return result;
	}

	public static int queryInt(String prompt) throws InterruptedException {
		return queryInt(prompt, 0);
	}

	public static boolean buttonPressed(double[] coords) {
		double coordX = StdDraw.mouseX();
		double coordY = StdDraw.mouseY();
		return StdDraw.mousePressed() && coordX >= coords[0] && coordX <= coords[1] && coordY >= coords[2]
				&& coordY <= coords[3];
	}

	public static boolean numberPressed() {
		// Does not remove key from keylist regardless of situation
		if (StdDraw.hasNextKeyTyped()) {
			char key = StdDraw.nextKeyTyped();
			StdDraw.addKeyTyped(key);
			if (key == '1' || key == '2' || key == '3' || key == '4' || key == '5' || key == '6' || key == '7'
					|| key == '8' || key == '9' || key == '0') {
				return true;
			}
		}
		return false;
	}

	public static boolean dashPressed() {
		if (StdDraw.hasNextKeyTyped()) {
			char key = StdDraw.nextKeyTyped();
			if (key == '-') {
				return true;
			}
			StdDraw.addKeyTyped(key);
		}
		return false;
	}

	public static boolean enterKeyPressed() {
		if (StdDraw.hasNextKeyTyped()) {
			char key = StdDraw.nextKeyTyped();
			if (key == '\n' || key == '\r') {
				return true;
			}
			// Replace the key that was tested
			StdDraw.addKeyTyped(key);
		}
		return false;
	}

	public static boolean spaceKeyPressed() {
		if (StdDraw.hasNextKeyTyped()) {
			char key = StdDraw.nextKeyTyped();
			if (key == ' ') {
				return true;
			}
			// Replace the key that was tested
			StdDraw.addKeyTyped(key);
		}
		return false;
	}

	public static void clearKeys() {
		// Clears all of StdDraw's saved keys
		while (StdDraw.hasNextKeyTyped()) {
			StdDraw.nextKeyTyped();
		}
	}

}


text:
/*jslint indent: 2, unparam: true*/
/*global $: false, document: false, togglbutton: false*/
'use strict';

togglbutton.render('.comments-number:not(.toggl)',  {observe: true}, function (elem) {

  var link, description;

  description = '#' + $('.issue-number').textContent + ' ' + $('.issue-title').textContent;

  link = togglbutton.createTimerLink({
    className: 'waffle-io',
    description: description
  });

  elem.appendChild(link);
});


text:
using System;

#if !NETFX_CORE
namespace HelixToolkit.Wpf.SharpDX
#else
#if CORE
namespace HelixToolkit.SharpDX.Core
#else
namespace HelixToolkit.UWP
#endif
#endif
{
    using System.IO;
    using Utilities;
    using Model;
    public interface ITextureResourceManager : IDisposable
    {
        int Count
        {
            get;
        }
        /// <summary>
        /// Registers the specified texture stream. This creates mipmaps automatically
        /// </summary>
        /// <param name="textureStream">The texture stream.</param>
        /// <returns></returns>
        ShaderResourceViewProxy Register(TextureModel textureStream);
        /// <summary>
        /// Registers the specified texture stream.
        /// </summary>
        /// <param name="textureStream">The texture stream.</param>
        /// <param name="enableAutoGenMipMap">if set to <c>false</c> [disable automatic gen mip map].</param>
        /// <returns></returns>
        ShaderResourceViewProxy Register(TextureModel textureStream, bool enableAutoGenMipMap);
    }
}


text:
package score

type Output struct {
	Pass     bool     `json:"pass"`
	Score    int64    `json:"score"`
	Suceess  int64    `json:"success"`
	Fail     int64    `json:"fail"`
	Messages []string `json:"messages"`
}


text:
<?php

/* bootstrap/partials/_navbar_dropdown.html.twig */
class __TwigTemplate_62a017686b8f1ccc2f1bb67437816cf09f7c4c3a37734af52dfb1ecb0af45127 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        echo "

    ";
        // line 2
        echo (isset($context["menu"]) ? $context["menu"] : null);
        echo "
    ";
        // line 3
        $this->loadTemplate("bootstrap/partials/_dropdown_items.html.twig", "bootstrap/partials/_navbar_dropdown.html.twig", 3)->display($context);
        // line 4
        echo "

";
    }

    public function getTemplateName()
    {
        return "bootstrap/partials/_navbar_dropdown.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  28 => 4,  26 => 3,  22 => 2,  19 => 1,);
    }

    public function getSource()
    {
        return "

    {{ menu }}
    {% include \"bootstrap/partials/_dropdown_items.html.twig\" %}

";
    }
}


text:
class OutputProtectionProxy;

namespace content {
class RenderFrameHost;
}

// Implements media::mojom::OutputProtection to check display links and
// their statuses. On all platforms we'll check the network links. On ChromeOS
// we'll also check the hardware links. Can only be used on the UI thread.
class OutputProtectionImpl final
    : public content::DocumentService<media::mojom::OutputProtection> {
 public:
  static void Create(
      content::RenderFrameHost* render_frame_host,
      mojo::PendingReceiver<media::mojom::OutputProtection> receiver);

  OutputProtectionImpl(
      content::RenderFrameHost* render_frame_host,
      mojo::PendingReceiver<media::mojom::OutputProtection> receiver);

  // media::mojom::OutputProtection implementation.
  void QueryStatus(QueryStatusCallback callback) final;
  void EnableProtection(uint32_t desired_protection_mask,
                        EnableProtectionCallback callback) final;

 private:
  // |this| can only be destructed as a DocumentService.
  ~OutputProtectionImpl() final;

  // Callbacks for QueryStatus and EnableProtection results.
  // Note: These are bound using weak pointers so that we won't fire |callback|
  // after the binding is destroyed.
  void OnQueryStatusResult(QueryStatusCallback callback,
                           bool success,
                           uint32_t link_mask,
                           uint32_t protection_mask);
  void OnEnableProtectionResult(EnableProtectionCallback callback,
                                bool success);

  // Helper function to lazily create the |proxy_| and return it.
  OutputProtectionProxy* GetProxy();

  // TODO(crbug.com/770958): Remove these IDs after OutputProtection PPAPI is
  // deprecated.
  const int render_process_id_;
  const int render_frame_id_;

  std::unique_ptr<OutputProtectionProxy> proxy_;

  base::WeakPtrFactory<OutputProtectionImpl> weak_factory_{this};
};

#endif  // CHROME_BROWSER_MEDIA_OUTPUT_PROTECTION_IMPL_H_


text:
local log               = require "hs.logger" .new "ViewerCB"

local canvas            = require "hs.canvas"
local geometry          = require "hs.geometry"
local pasteboard        = require "hs.pasteboard"
local timer             = require "hs.timer"

local just              = require "cp.just"
local prop              = require "cp.prop"
local tools             = require "cp.tools"
local axutils           = require "cp.ui.axutils"
local Button            = require "cp.ui.Button"
local Group             = require "cp.ui.Group"
local Image             = require "cp.ui.Image"
local StaticText        = require "cp.ui.StaticText"

local rightToLeft       = axutils.compareRightToLeft
local cache             = axutils.cache
local childFromBottom   = axutils.childFromBottom
local childFromRight    = axutils.childFromRight

local doAfter           = timer.doAfter
local doUntil           = just.doUntil
local find              = string.find
local ninjaMouseClick   = tools.ninjaMouseClick

local ControlBar = Group:subclass("cp.apple.finalcutpro.viewer.ControlBar")

--- cp.apple.finalcutpro.viewer.ControlBar.matches(element) -> boolean
--- Function
--- Checks if the element is a `ControlBar` instance.
---
--- Parameters:
--- * element       - The `axuielement` to check.
---
--- Returns:
--- * `true` if it matches the pattern for a `Viewer` `ControlBar`.
function ControlBar.static.matches(element)
    if Group.matches(element) and #element >= 4 then
        -- Note: sorting right-to-left
        local children = axutils.children(element, rightToLeft)
        return
            (
                -- Normal Control Bar:
                #children >= 5
                and Button.matches(children[1])
                and Button.matches(children[2])
                and StaticText.matches(children[3])
                and Button.matches(children[4])
                and Button.matches(children[5])
            )
            or
            (
                -- Timecode Entry Mode:
                #children >= 4
                and Button.matches(children[1])
                and Button.matches(children[2])
                and StaticText.matches(children[3])
                and Image.matches(children[4])
            )
    end
    return false
end

--- cp.apple.finalcutpro.viewer.ControlBar(viewer)
--- Constructor
--- Creates a new `ControlBar` instance.
---
--- Parameters:
---  * viewer       - The [Viewer](cp.apple.finalcutpro.viewer.Viewer.md) instance.
---
--- Returns:
---  * The new `ControlBar`.
function ControlBar:initialize(viewer)
    local uiFinder = viewer.UI:mutate(function(original)
        return cache(self, "_ui", function()
            return childFromBottom(original(), 1, ControlBar.matches)
        end, ControlBar.matches)
    end)

    Group.initialize(self, viewer, uiFinder)
end

--- cp.apple.finalcutpro.viewer.playFullScreen <cp.ui.Button>
--- Field
--- Play Full Screen Button.
function ControlBar.lazy.value:playFullScreen()
    return Button(self, self.UI:mutate(function(original)
        return childFromRight(original(), 1, Button.matches)
    end))
end

--- cp.apple.finalcutpro.viewer.audioMeters <cp.ui.Button>
--- Field
--- Audio Meters button.
function ControlBar.lazy.value:audioMeters()
    return Button(self, self.UI:mutate(function(original)
        return childFromRight(original(), 2, Button.matches)
    end))
end

--- cp.apple.finalcutpro.viewer.timecodeField <cp.ui.StaticText>
--- Field
--- Timecode Field
function ControlBar.lazy.value:timecodeField()
    return StaticText(self, self.UI:mutate(function(original)
        return childFromRight(original(), 1, StaticText.matches)
    end))
end

--- cp.apple.finalcutpro.viewer.ControlBar.timecode <cp.prop: string; live>
--- Field
--- The current timecode value, with the format "hh:mm:ss:ff". Setting also supports "hh:mm:ss;ff".
--- The property can be watched to get notifications of changes.
--- The prop will use the "Paste Timecode" shortcut to set the timecode value if a shortcut
--- key is associated, otherwise it will attempt to use GUI Scripting methods.
function ControlBar.lazy.prop:timecode()
    local tcField = self.timecodeField
    return tcField.value:mutate(
        function(original)
            return original()
        end,
        function(timecodeValue, original)
            --------------------------------------------------------------------------------
            -- Make sure there's a timecode value:
            --------------------------------------------------------------------------------
            if not timecodeValue then
                log.ef("cp.apple.finalcutpro.viewer.Viewer.timecode: Timecode value is invalid: %s.", timecodeValue)
                return
            end

            --------------------------------------------------------------------------------
            -- Check to see if we can use the "Paste Timecode" shortcut:
            --------------------------------------------------------------------------------
            local shortcuts = self:app():getCommandShortcuts("PasteTimecode")
            if shortcuts and #shortcuts > 0 then
                --------------------------------------------------------------------------------
                -- Use "Paste Timecode" method:
                --------------------------------------------------------------------------------
                if timecodeValue then
                    --------------------------------------------------------------------------------
                    -- Get current Pasteboard Contents:
                    --------------------------------------------------------------------------------
                    local originalPasteboard = pasteboard.getContents()

                    --------------------------------------------------------------------------------
                    -- Set Pasteboard Contents to timecode value we want to go to:
                    --------------------------------------------------------------------------------
                    pasteboard.setContents(timecodeValue)

                    --------------------------------------------------------------------------------
                    -- Wait until the timecode is on the pasteboard:
                    --------------------------------------------------------------------------------
                    local pasteboardReady = doUntil(function()
                        return pasteboard.getContents() == timecodeValue
                    end, 5)

                    if not pasteboardReady then
                        log.ef("cp.apple.finalcutpro.viewer.Viewer.timecode: Failed to add timecode to pasteboard.")
                        return
                    else
                        local app = self:app():application()
                        shortcuts[1]:trigger(app)
                    end

                    --------------------------------------------------------------------------------
                    -- Restore Original Pasteboard Contents:
                    --------------------------------------------------------------------------------
                    if originalPasteboard then
                        doAfter(0.1, function()
                            pasteboard.setContents(originalPasteboard)
                        end)
                    end
                end
            else
                --------------------------------------------------------------------------------
                -- Use GUI Scripting Method:
                --------------------------------------------------------------------------------
                log.wf("You are currently changing timecode using the GUI Scripting Method. You'll get better results if you set a shortcut key for 'Paste Timecode' within Final Cut Pro.")

                --------------------------------------------------------------------------------
                -- Make sure the timecode field is visible:
                --------------------------------------------------------------------------------
                if not tcField:isShowing() then
                    log.ef("cp.apple.finalcutpro.viewer.Viewer.timecode: Timecode text not showing.")
                    return
                end

                --------------------------------------------------------------------------------
                -- Get the timecode field UI position:
                --------------------------------------------------------------------------------
                local frame = tcField:frame()
                if not frame then
                    log.ef("cp.apple.finalcutpro.viewer.Viewer.timecode: Failed to find timecode frame.")
                    return
                end

                --------------------------------------------------------------------------------
                -- Make sure Final Cut Pro is frontmost:
                --------------------------------------------------------------------------------
                self:app():launch()
                local result = doUntil(function()
                    return self:app():isFrontmost()
                end)
                if not result then
                    log.ef("cp.apple.finalcutpro.viewer.Viewer.timecode: Failed to make Final Cut Pro frontmost.")
                    return
                end

                --------------------------------------------------------------------------------
                -- Double click the timecode value in the Viewer:
                --------------------------------------------------------------------------------
                local center = geometry(frame).center
                ninjaMouseClick(center)

                --------------------------------------------------------------------------------
                -- Wait until the click has been registered (give it 5 seconds):
                --------------------------------------------------------------------------------
                local toolbar = self:UI()
                local ready = doUntil(function()
                    return toolbar and #toolbar < 5 and find(original(), "00:00:00[:;]00") ~= nil
                end, 5)
                if not ready then
                    log.ef("cp.apple.finalcutpro.viewer.Viewer.timecode: The toolbar was never ready.")
                    return
                end

                --------------------------------------------------------------------------------
                -- Type the timecode value:
                --------------------------------------------------------------------------------
                local cleanedTimecodeValue = timecodeValue:gsub(";", ""):gsub(":", "")
                for character in cleanedTimecodeValue:gmatch(".") do
                    self:app():keyStroke({}, character)
                end
                self:app():keyStroke({}, 'return')
            end
        end
    )
end

--- cp.apple.finalcutpro.viewer.changePosition <cp.ui.Button>
--- Field
--- Change Position Button.
function ControlBar.lazy.value:changePosition()
    return Button(self, self.UI:mutate(function(original)
        return childFromRight(original(), 3, Button.matches)
    end))
end

--- cp.apple.finalcutpro.viewer.playButton <cp.ui.Button>
--- Field
--- Play Button.
function ControlBar.lazy.value:playButton()
    return Button(self, self.UI:mutate(function(original)
        return childFromRight(original(), 4, Button.matches)
    end))
end

--- cp.apple.finalcutpro.main.ControlBar.isPlaying <cp.prop: boolean>
--- Field
--- The 'playing' status of the viewer. If true, it is playing, if not it is paused.
--- This can be set via `viewer:isPlaying(true|false)`, or toggled via `viewer.isPlaying:toggle()`.
function ControlBar.lazy.prop:isPlaying()
    return prop(
        function()
            local element = self.playButton:UI()
            if element then
                local window = element:attributeValue("AXWindow")
                if window then
                    local hsWindow = window:asHSWindow()
                    local windowSnap = hsWindow and hsWindow:snapshot()

                    if not windowSnap then
                        log.ef("[cp.apple.finalcutpro.main.ControlBar.isPlaying] Snapshot could not be captured, so aborting.")
                        return
                    end

                    local windowFrame = window and window:attributeValue("AXFrame")
                    local shotSize = windowSnap and windowSnap:size()

                    local ratio = shotSize and windowFrame and shotSize.h/windowFrame.h
                    local elementFrame = element and element:attributeValue("AXFrame")

                    if not elementFrame then return end

                    local imageFrame = {
                        x = (windowFrame.x-elementFrame.x)*ratio,
                        y = (windowFrame.y-elementFrame.y)*ratio,
                        w = shotSize.w,
                        h = shotSize.h,
                    }

                    local c = canvas.new({w=elementFrame.w*ratio, h=elementFrame.h*ratio})
                    c[1] = {
                        type = "image",
                        image = windowSnap,
                        imageScaling = "none",
                        imageAlignment = "topLeft",
                        frame = imageFrame,
                    }

                    local elementSnap = c:imageFromCanvas()
                    c:delete()
                    c = nil -- luacheck: ignore

                    if elementSnap then
                        elementSnap:size({h=60,w=60})
                        local spot = elementSnap:colorAt({x=31,y=31})
                        return spot and spot.blue < 0.5
                    end
                end
            end
            return false
        end,
        function(newValue, owner, thisProp)
            local currentValue = thisProp:value()
            if newValue ~= currentValue then
                owner:playButton():press()
            end
        end
    )
end

--- cp.apple.finalcutpro.viewer.playButton <cp.ui.Image>
--- Field
--- Play Image.
function ControlBar.lazy.value:playImage()
    return Image(self, self.UI:mutate(function(original)
        return childFromRight(original(), 1, Image.matches)
    end))
end

return ControlBar


text:
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using Xunit;

namespace System.Linq.Expressions.Tests
{
    public static class NonLiftedComparisonGreaterThanNullableTests
    {
        #region Test methods

        [Fact]
        public static void CheckNonLiftedComparisonGreaterThanNullableByteTest()
        {
            byte?[] values = new byte?[] { null, 0, 1, byte.MaxValue };
            for (int i = 0; i < values.Length; i++)
            {
                for (int j = 0; j < values.Length; j++)
                {
                    VerifyComparisonGreaterThanNullableByte(values[i], values[j]);
                }
            }
        }

        [Fact]
        public static void CheckNonLiftedComparisonGreaterThanNullableCharTest()
        {
            char?[] values = new char?[] { null, '\0', '\b', 'A', '\uffff' };
            for (int i = 0; i < values.Length; i++)
            {
                for (int j = 0; j < values.Length; j++)
                {
                    VerifyComparisonGreaterThanNullableChar(values[i], values[j]);
                }
            }
        }

        [Fact]
        public static void CheckNonLiftedComparisonGreaterThanNullableDecimalTest()
        {
            decimal?[] values = new decimal?[] { null, decimal.Zero, decimal.One, decimal.MinusOne, decimal.MinValue, decimal.MaxValue };
            for (int i = 0; i < values.Length; i++)
            {
                for (int j = 0; j < values.Length; j++)
                {
                    VerifyComparisonGreaterThanNullableDecimal(values[i], values[j]);
                }
            }
        }

        [Fact]
        public static void CheckNonLiftedComparisonGreaterThanNullableDoubleTest()
        {
            double?[] values = new double?[] { null, 0, 1, -1, double.MinValue, double.MaxValue, double.Epsilon, double.NegativeInfinity, double.PositiveInfinity, double.NaN };
            for (int i = 0; i < values.Length; i++)
            {
                for (int j = 0; j < values.Length; j++)
                {
                    VerifyComparisonGreaterThanNullableDouble(values[i], values[j]);
                }
            }
        }

        [Fact]
        public static void CheckNonLiftedComparisonGreaterThanNullableFloatTest()
        {
            float?[] values = new float?[] { null, 0, 1, -1, float.MinValue, float.MaxValue, float.Epsilon, float.NegativeInfinity, float.PositiveInfinity, float.NaN };
            for (int i = 0; i < values.Length; i++)
            {
                for (int j = 0; j < values.Length; j++)
                {
                    VerifyComparisonGreaterThanNullableFloat(values[i], values[j]);
                }
            }
        }

        [Fact]
        public static void CheckNonLiftedComparisonGreaterThanNullableIntTest()
        {
            int?[] values = new int?[] { null, 0, 1, -1, int.MinValue, int.MaxValue };
            for (int i = 0; i < values.Length; i++)
            {
                for (int j = 0; j < values.Length; j++)
                {
                    VerifyComparisonGreaterThanNullableInt(values[i], values[j]);
                }
            }
        }

        [Fact]
        public static void CheckNonLiftedComparisonGreaterThanNullableLongTest()
        {
            long?[] values = new long?[] { null, 0, 1, -1, long.MinValue, long.MaxValue };
            for (int i = 0; i < values.Length; i++)
            {
                for (int j = 0; j < values.Length; j++)
                {
                    VerifyComparisonGreaterThanNullableLong(values[i], values[j]);
                }
            }
        }

        [Fact]
        public static void CheckNonLiftedComparisonGreaterThanNullableSByteTest()
        {
            sbyte?[] values = new sbyte?[] { null, 0, 1, -1, sbyte.MinValue, sbyte.MaxValue };
            for (int i = 0; i < values.Length; i++)
            {
                for (int j = 0; j < values.Length; j++)
                {
                    VerifyComparisonGreaterThanNullableSByte(values[i], values[j]);
                }
            }
        }

        [Fact]
        public static void CheckNonLiftedComparisonGreaterThanNullableShortTest()
        {
            short?[] values = new short?[] { null, 0, 1, -1, short.MinValue, short.MaxValue };
            for (int i = 0; i < values.Length; i++)
            {
                for (int j = 0; j < values.Length; j++)
                {
                    VerifyComparisonGreaterThanNullableShort(values[i], values[j]);
                }
            }
        }

        [Fact]
        public static void CheckNonLiftedComparisonGreaterThanNullableUIntTest()
        {
            uint?[] values = new uint?[] { null, 0, 1, uint.MaxValue };
            for (int i = 0; i < values.Length; i++)
            {
                for (int j = 0; j < values.Length; j++)
                {
                    VerifyComparisonGreaterThanNullableUInt(values[i], values[j]);
                }
            }
        }

        [Fact]
        public static void CheckNonLiftedComparisonGreaterThanNullableULongTest()
        {
            ulong?[] values = new ulong?[] { null, 0, 1, ulong.MaxValue };
            for (int i = 0; i < values.Length; i++)
            {
                for (int j = 0; j < values.Length; j++)
                {
                    VerifyComparisonGreaterThanNullableULong(values[i], values[j]);
                }
            }
        }

        [Fact]
        public static void CheckNonLiftedComparisonGreaterThanNullableUShortTest()
        {
            ushort?[] values = new ushort?[] { null, 0, 1, ushort.MaxValue };
            for (int i = 0; i < values.Length; i++)
            {
                for (int j = 0; j < values.Length; j++)
                {
                    VerifyComparisonGreaterThanNullableUShort(values[i], values[j]);
                }
            }
        }

        #endregion

        #region Test verifiers

        private static void VerifyComparisonGreaterThanNullableByte(byte? a, byte? b)
        {
            Expression<Func<bool>> e =
                Expression.Lambda<Func<bool>>(
                    Expression.GreaterThan(
                        Expression.Constant(a, typeof(byte?)),
                        Expression.Constant(b, typeof(byte?)),
                        false,
                        null));
            Func<bool> f = e.Compile();

            bool expected = a > b;
            bool result = f();
            Assert.Equal(expected, result);
        }

        private static void VerifyComparisonGreaterThanNullableChar(char? a, char? b)
        {
            Expression<Func<bool>> e =
                Expression.Lambda<Func<bool>>(
                    Expression.GreaterThan(
                        Expression.Constant(a, typeof(char?)),
                        Expression.Constant(b, typeof(char?)),
                        false,
                        null));
            Func<bool> f = e.Compile();

            bool expected = a > b;
            bool result = f();
            Assert.Equal(expected, result);
        }

        private static void VerifyComparisonGreaterThanNullableDecimal(decimal? a, decimal? b)
        {
            Expression<Func<bool>> e =
                Expression.Lambda<Func<bool>>(
                    Expression.GreaterThan(
                        Expression.Constant(a, typeof(decimal?)),
                        Expression.Constant(b, typeof(decimal?)),
                        false,
                        null));
            Func<bool> f = e.Compile();

            bool expected = a > b;
            bool result = f();
            Assert.Equal(expected, result);
        }

        private static void VerifyComparisonGreaterThanNullableDouble(double? a, double? b)
        {
            Expression<Func<bool>> e =
                Expression.Lambda<Func<bool>>(
                    Expression.GreaterThan(
                        Expression.Constant(a, typeof(double?)),
                        Expression.Constant(b, typeof(double?)),
                        false,
                        null));
            Func<bool> f = e.Compile();

            bool expected = a > b;
            bool result = f();
            Assert.Equal(expected, result);
        }

        private static void VerifyComparisonGreaterThanNullableFloat(float? a, float? b)
        {
            Expression<Func<bool>> e =
                Expression.Lambda<Func<bool>>(
                    Expression.GreaterThan(
                        Expression.Constant(a, typeof(float?)),
                        Expression.Constant(b, typeof(float?)),
                        false,
                        null));
            Func<bool> f = e.Compile();

            bool expected = a > b;
            bool result = f();
            Assert.Equal(expected, result);
        }

        private static void VerifyComparisonGreaterThanNullableInt(int? a, int? b)
        {
            Expression<Func<bool>> e =
                Expression.Lambda<Func<bool>>(
                    Expression.GreaterThan(
                        Expression.Constant(a, typeof(int?)),
                        Expression.Constant(b, typeof(int?)),
                        false,
                        null));
            Func<bool> f = e.Compile();

            bool expected = a > b;
            bool result = f();
            Assert.Equal(expected, result);
        }

        private static void VerifyComparisonGreaterThanNullableLong(long? a, long? b)
        {
            Expression<Func<bool>> e =
                Expression.Lambda<Func<bool>>(
                    Expression.GreaterThan(
                        Expression.Constant(a, typeof(long?)),
                        Expression.Constant(b, typeof(long?)),
                        false,
                        null));
            Func<bool> f = e.Compile();

            bool expected = a > b;
            bool result = f();
            Assert.Equal(expected, result);
        }

        private static void VerifyComparisonGreaterThanNullableSByte(sbyte? a, sbyte? b)
        {
            Expression<Func<bool>> e =
                Expression.Lambda<Func<bool>>(
                    Expression.GreaterThan(
                        Expression.Constant(a, typeof(sbyte?)),
                        Expression.Constant(b, typeof(sbyte?)),
                        false,
                        null));
            Func<bool> f = e.Compile();

            bool expected = a > b;
            bool result = f();
            Assert.Equal(expected, result);
        }

        private static void VerifyComparisonGreaterThanNullableShort(short? a, short? b)
        {
            Expression<Func<bool>> e =
                Expression.Lambda<Func<bool>>(
                    Expression.GreaterThan(
                        Expression.Constant(a, typeof(short?)),
                        Expression.Constant(b, typeof(short?)),
                        false,
                        null));
            Func<bool> f = e.Compile();

            bool expected = a > b;
            bool result = f();
            Assert.Equal(expected, result);
        }

        private static void VerifyComparisonGreaterThanNullableUInt(uint? a, uint? b)
        {
            Expression<Func<bool>> e =
                Expression.Lambda<Func<bool>>(
                    Expression.GreaterThan(
                        Expression.Constant(a, typeof(uint?)),
                        Expression.Constant(b, typeof(uint?)),
                        false,
                        null));
            Func<bool> f = e.Compile();

            bool expected = a > b;
            bool result = f();
            Assert.Equal(expected, result);
        }

        private static void VerifyComparisonGreaterThanNullableULong(ulong? a, ulong? b)
        {
            Expression<Func<bool>> e =
                Expression.Lambda<Func<bool>>(
                    Expression.GreaterThan(
                        Expression.Constant(a, typeof(ulong?)),
                        Expression.Constant(b, typeof(ulong?)),
                        false,
                        null));
            Func<bool> f = e.Compile();

            bool expected = a > b;
            bool result = f();
            Assert.Equal(expected, result);
        }

        private static void VerifyComparisonGreaterThanNullableUShort(ushort? a, ushort? b)
        {
            Expression<Func<bool>> e =
                Expression.Lambda<Func<bool>>(
                    Expression.GreaterThan(
                        Expression.Constant(a, typeof(ushort?)),
                        Expression.Constant(b, typeof(ushort?)),
                        false,
                        null));
            Func<bool> f = e.Compile();

            bool expected = a > b;
            bool result = f();
            Assert.Equal(expected, result);
        }

        #endregion
    }
}


text:
package org.myrobotlab.process;

public class GitHubContent {

  public String name;
  public String path;
  public String sha;
  public Integer size;
  public String url;
  public String html_url;
  public String git_url;
  public String type;

}


text:
'use strict';

chrome.browserAction.onClicked.addListener(function(tab) {
  chrome.tabs.sendMessage( tab.id, {}, function(msg) {} );
});


text:
package datadog

type Check struct {
	Check     *string  `json:"check,omitempty"`
	HostName  *string  `json:"host_name,omitempty"`
	Status    *Status  `json:"status,omitempty"`
	Timestamp *string  `json:"timestamp,omitempty"`
	Message   *string  `json:"message,omitempty"`
	Tags      []string `json:"tags,omitempty"`
}

type Status int

const (
	OK Status = iota
	WARNING
	CRITICAL
	UNKNOWN
)

// PostCheck posts the result of a check run to the server
func (client *Client) PostCheck(check Check) error {
	return client.doJsonRequest("POST", "/v1/check_run",
		check, nil)
}


text:
// Copyright 2020 Google LLC
//
// 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.google.firebase.installations;

/** Mock InstallationTokenResult */
public class InstallationTokenResult {
  private InstallationTokenResult() {}

  public static synchronized InstallationTokenResult getInstance() {
    return new InstallationTokenResult();
  }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2016 The Android Open Source Project

     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.
-->

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - This file contains all of the strings used throughout Sunshine. They can be accessed       -
  - through calls to Context#getString. This strings are organized by where they are used in   -
  - Sunshine.                                                                                -
  -                                                                                -
  - Throughout this file, you will see <xliff:g> tags. These help any potential translators    -
  - properly translate your strings and also give developers that are looking at your strings  -
  - an idea of exactly how they are used.                                                      -
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<resources xmlns:xliff="http://schemas.android.com/apk/res-auto">

    <!-- - - - - - - - - - - - - -
      - Used throughout Sunshine -
      - - - - - - - - - - - - - -->

    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Used in Action Bar and in AndroidManifest to tell the device the name of this app. It's  -
      - good practice to keep this short, so if your app's name was "The Greatest Weather App    -
      - In the History of Mankind", your launcher icon isn't displayed with "The greatest Wea"   -
      - or something similar.                                                                    -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
    <string name="app_name">Sunshine</string>

    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - By convention, "action" denotes that this String will be used as the label for an        -
      - Action, typically from the action bar.  The ActionBar is limited real estate, so         -
      - shorter is better.                                                                       -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
    <string name="action_map">Map Location</string>
    <!-- Used to share the weather forecast on a given day from the DetailActivity -->
    <string name="action_share">Share</string>

    <!-- Used to open Settings Menu from MainActivity and DetailActivity -->
    <string name="action_settings">Settings</string>

    <!--Used in overflow menu to refresh weather data-->
    <string name="action_refresh">Refresh</string>

    <!-- Title of the DetailActivity -->
    <string name="title_activity_detail">Details</string>
    <!-- Title of the SettingsActivity -->
    <string name="title_activity_settings">Settings</string>

    <string name="content_authority">com.example.android.sunshine</string>

    <!-- - - - - - - - - - - - - - - -
      - Used by SunshinePreferences  -
      - - - - - - - - - - - - - - - -->

    <!-- Label for the location preference -->
    <string name="pref_location_label">Location</string>

    <!-- Key name for storing location in SharedPreferences -->
    <string name="pref_location_key" translatable="false">location</string>

    <!-- Default postal code for location preference -->
    <string name="pref_location_default" translatable="false">Mountain View, CA 94043</string>

    <!-- Label for the temperature units preference -->
    <string name="pref_units_label">Temperature Units</string>

    <!-- Label for metric option in temperature unit preference -->
    <string name="pref_units_label_metric">Metric</string>

    <!-- Label for imperial option in temperature unit preference -->
    <string name="pref_units_label_imperial">Imperial</string>

    <!-- Key name for temperature unit preference in SharedPreferences -->
    <string name="pref_units_key" translatable="false">units</string>

    <!-- Value in SharedPreferences for metric temperature unit option -->
    <string name="pref_units_metric" translatable="false">metric</string>

    <!-- Value in SharedPreferences for imperial temperature unit option -->
    <string name="pref_units_imperial" translatable="false">imperial</string>

    <!-- Strings related to Notification Enabled preference -->
    <string name="pref_enable_notifications_key" translatable="false">enable_notifications</string>
    <string name="pref_enable_notifications_label">Weather Notifications</string>

    <string name="pref_enable_notifications_true">Enabled</string>
    <string name="pref_enable_notifications_false">Not Enabled</string>

    <string name="pref_last_notification">last_notification</string>

    <!-- - - - - - - - - - - - - - -
      - Used by SunshineDateUtils  -
      - - - - - - - - - - - - - - -->

    <!-- For labelling today's forecast -->
    <string name="today">Today</string>

    <!-- For labelling tomorrow's forecast -->
    <string name="tomorrow">Tomorrow</string>

    <!-- Date format -->
    <string name="format_full_friendly_date">
        <xliff:g id="month">%1$s</xliff:g>, <xliff:g id="day">%2$s</xliff:g>
    </string>

    <!-- - - - - - - - - - - - - - - - -
      - Used by SunshineWeatherUtils   -
      - - - - - - - - - - - - - - - - -->

    <!-- Temperature format -->
    <string name="format_temperature">
        <xliff:g id="temp">%1.0f</xliff:g>\u00B0
    </string>

    <string name="wind_label">Wind</string>
    <!-- Wind in kph -->
    <string name="format_wind_kmh">
        <xliff:g id="speed">%1$1.0f</xliff:g> km/h
        <xliff:g id="direction">%2$s</xliff:g>
    </string>

    <!-- Wind in mph -->
    <string name="format_wind_mph">
        <xliff:g id="speed">%1$1.0f</xliff:g> mph
        <xliff:g id="direction">%2$s</xliff:g>
    </string>

    <string name="pressure_label">Pressure</string>
    <!-- Pressure format -->
    <string name="format_pressure">
        <xliff:g id="pressure">%1.0f</xliff:g> hPa
    </string>

    <string name="humidity_label">Humidity</string>
    <!-- Humidity format -->
    <string name="format_humidity">
        <xliff:g id="humidity">%1.0f</xliff:g> %%
    </string>

    <!-- Weather Conditions (From OpenWeatherMap) -->
    <string name="condition_2xx">Storm</string>
    <string name="condition_3xx">Drizzle</string>
    <string name="condition_500">Light Rain</string>
    <string name="condition_501">Moderate Rain</string>
    <string name="condition_502">Heavy Rain</string>
    <string name="condition_503">Intense Rain</string>
    <string name="condition_504">Extreme Rain</string>
    <string name="condition_511">Freezing Rain</string>
    <string name="condition_520">Light Shower</string>
    <string name="condition_521">Shower</string>
    <string name="condition_522">Heavy Shower</string>
    <string name="condition_531">Ragged Shower</string>
    <string name="condition_600">Light Snow</string>
    <string name="condition_601">Snow</string>
    <string name="condition_602">Heavy Snow</string>
    <string name="condition_611">Sleet</string>
    <string name="condition_612">Shower Sleet</string>
    <string name="condition_615">Rain and Snow</string>
    <string name="condition_616">Rain and Snow</string>
    <string name="condition_620">Shower Snow</string>
    <string name="condition_621">Shower Snow</string>
    <string name="condition_622">Shower Snow</string>
    <string name="condition_701">Mist</string>
    <string name="condition_711">Smoke</string>
    <string name="condition_721">Haze</string>
    <string name="condition_731">Sand, Dust</string>
    <string name="condition_741">Fog</string>
    <string name="condition_751">Sand</string>
    <string name="condition_761">Dust</string>
    <string name="condition_762">Volcanic Ash</string>
    <string name="condition_771">Squalls</string>
    <string name="condition_781">Tornado</string>
    <string name="condition_800">Clear</string>
    <string name="condition_801">Mostly Clear</string>
    <string name="condition_802">Scattered Clouds</string>
    <string name="condition_803">Broken Clouds</string>
    <string name="condition_804">Overcast Clouds</string>
    <string name="condition_900">Tornado</string>
    <string name="condition_901">Tropical Storm</string>
    <string name="condition_902">Hurricane</string>
    <string name="condition_903">Cold</string>
    <string name="condition_904">Hot</string>
    <string name="condition_905">Windy</string>
    <string name="condition_906">Hail</string>
    <string name="condition_951">Calm</string>
    <string name="condition_952">Light Breeze</string>
    <string name="condition_953">Gentle Breeze</string>
    <string name="condition_954">Breeze</string>
    <string name="condition_955">Fresh Breeze</string>
    <string name="condition_956">Strong Breeze</string>
    <string name="condition_957">High Wind</string>
    <string name="condition_958">Gale</string>
    <string name="condition_959">Severe Gale</string>
    <string name="condition_960">Storm</string>
    <string name="condition_961">Violent Storm</string>
    <string name="condition_962">Hurricane</string>

    <string name="condition_unknown">Unknown (<xliff:g id="conditionId">%1$d</xliff:g>)</string>

    <!-- Used by NotificationUtils -->

    <!-- The format of the notification we show when the weather is updated -->
    <string name="format_notification">
        Forecast:<xliff:g id="condition">%1$s</xliff:g> -
        High:<xliff:g id="high">%2$s</xliff:g>
        Low:<xliff:g id="low">%3$s</xliff:g>
    </string>

</resources>


text:
package com.granule;

/**
 *
 * @author Jonathan Walsh
 *
 */
import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.io.StringWriter;
import java.io.Writer;

public class CSSFastMin {
	private static final int EOF = -1;

	// States
	private static final int REGULAR = 0;
	private static final int SLASH = 1;
	private static final int STARTED_COMMENT = 2;
	private static final int STAR_IN_COMMENT = 3;
	private static final int OK_SKIP_SPACE = 4;

	public void minimize(final Reader in, final Writer out) throws IOException {
		int state = OK_SKIP_SPACE;
        int outCommentState=OK_SKIP_SPACE;
		int c;
		while ((c = in.read()) != EOF) {

		    if (c=='\n'||c=='\r')
			  c=' ';
		    else if (c < ' ') {
				continue;
			}

			switch (state) {
			case OK_SKIP_SPACE:
				if (c ==' ') {
					continue;
				}
			case REGULAR:
				if (c == '/') {
					state = SLASH;
					continue;
				} else if (c==' ' || c=='{' || c==',' || c==';' || c==':' || c=='}') {
					state = OK_SKIP_SPACE;
					outCommentState=OK_SKIP_SPACE;
				}
				else {
					state = REGULAR;
					outCommentState=REGULAR;
				}
				out.write(c);
				break;

			case STAR_IN_COMMENT:
				if (c == '/')
					state = outCommentState;
				else if (c == '*')
                    state = STAR_IN_COMMENT;
				else
				    state=STARTED_COMMENT;
				continue;

			case SLASH:
				if (c == '*') {
					state = STARTED_COMMENT;
					continue;
				} else {
					out.write('/');
					out.write(c);
					state = outCommentState;
				}
				break;

			case STARTED_COMMENT:
				if (c == '*')
					state = STAR_IN_COMMENT;
				continue;

			}
		}
		out.flush();
	}

	public String minimize(String s) {
		Reader in = new StringReader(s);
		Writer out = new StringWriter(s.length());
		try {
			minimize(in, out);
		} catch (IOException e) {
			// Having IO exception when reading String would be strange
			throw new RuntimeException(e);
		}
		return out.toString();
	}
}


text:
layout: component
title: Flexbox
component: layout/flexbox.js
namespace: layout

example-html: |
  <svg id="layout-test"
     style="width: 90%; height: 350px; margin: 10px; background: yellow"
     layout-style="paddingLeft: 10">
    <g layout-style="height: 30; justifyContent: center; flexDirection: row;">
    </g>
    <g layout-style="flex: 1; flexDirection: row;">
      <g layout-style="flex: 1; flexDirection: row; justifyContent: flex-end;">
        <g layout-style="width: 100; height: 100; margin: 10"></g>
      </g>
      <g layout-style="width: 50;"></g>
      <g layout-style="width: 30; justifyContent: center;"></g>
    </g>
    <g layout-style="height: 30; flexDirection: row">
      <g layout-style="flex: 1; marginRight: 80;"></g>
    </g>
    <g layout-style="height: 30; flexDirection: row"></g>
  </svg>

example-code: |
  // apply the flexbox layout
  d3.select('#layout-test').layout();

  // This code simply creates some coloured rectangles so that you can
  // see the layout without reaching for your developer tools!
  var c10 = d3.scale.category10();
  d3.selectAll("g").filter(function(d) {
      return this.childElementCount === 0;
    })
    .append('rect')
    .attr('stroke', function(d, i) { return c10(i); })
    .attr('fill', function(d, i) { return c10(i); })
    .attr('width', function() {
      return d3.select(this.parentNode).layout('width');
    })
    .attr('height', function() {
      return d3.select(this.parentNode).layout('height')}
    );
---

The flexbox layout functionality allows you to structure your SVG using CSS Flexbox. This removes much of the manual layout calculations that are typically required for D3 charts, [as described in this blog post](http://blog.scottlogic.com/2015/02/02/svg-layout-flexbox.html).

In order to use this layout approach, add the `layout-style` attribute to the elements within your `SVG` container (note the camel-cased property names). This component uses Facebook's css-layout project, which re-implements flexbox in JavaScript, [refer to their project page](https://github.com/facebook/css-layout) for supported properties.

Here's an example SVG with group elements that have a layout suitable for chart construction (axes, legend, etc ...):

```html
{{{example-html}}}
```

The following code performs the required layout:

```js
{{{example-code}}}
```

Nodes are positioned and sized appropriately using a combination of `x`, `y`, `width`, `height` and `transform` attributes depending on the whether the node is an `svg`, `rect` or other. Additionally `layout-width`, `layout-height`, `layout-x` and `layout-y` attributes are added which can be accessed using e.g. `selection.layout('width')`.

The above code produces the following:

{{{example-html}}}
<script type="text/javascript">
(function() {
    {{{example-code}}}
}());
</script>

To construct a chart, just select the required group elements and populate with your content.

You can also use the layout component programmatically by using the layout component to add the flexbox styles:

```js
svg.append('g')
  .layout({
      'height': 30,
      'justifyContent': 'center',
      'flexDirection': 'row'
  });
```

When building high performance charts e.g. when targeting 60fps, `selection.layout()` can be a source of performance problems. So in order to get the best performance, it's worth taking the time to understand some of its internals.

At a high level, when a node is laid-out -

* if it has not previously been laid-out it, its inner dimensions are measured. These are then collected, along with its `layout-style` and those of its descendants. After running these through the `css-layout` algorithm, the results are then applied node-by-node to the subtree.

* if it has previously been laid-out, its inner dimensions are not measured. Instead the `layout-width`, `layout-height`, `layout-x` and `layout-y` attributes, set on it when one of its ancestors was laid-out, will be used as the basis for the algorithm. These are combined with the `layout-style` attributes of the node and its descendants then applied to the subtree as above.

Once a descendant node has been laid-out, to avoid triggering further browser reflows, dimensions should be read from the `layout-width` and `layout-height` attributes. As described above `selection.layout('width')` and `selection.layout('height')` provide a convenient way of accessing these values.

It should be noted that `layout-width` and `layout-height` attributes are explicitly **not** set on the node which is being laid-out (typically the top level SVG node). By doing so the layout ensures that it will measure the top level node's inner dimensions on every call and is thus able to respond to resizing etc..

For optimal performance, it is therefore best to first layout the root node of your chart and then call layout as required on its descendants. This technique allows for optimal rendering by preventing the interlacing of reflow-triggering DOM reads and writes.

Whilst this will ensure that layout runs as fast as possible, it still has a non-zero cost, so when possible it is best to avoid running it completely. Helpfully layout is generally only required in a handful of cases e.g. when a chart is first rendered, when resizing or when panels are added or removed. It is therefore possible to programmatically suspend the work done by all `selection.layout()` operations within an SVG by using `selection.layoutSuspended(true)`. Subsequent calls to `selection.layout()` will be no-ops until `selection.layoutSuspended(false)` is invoked.