text:
<!DOCTYPE html>

<meta charset="UTF-8">

<title>class RDoc::Generator::Darkfish - RDoc Documentation</title>

<link href="../../css/fonts.css" rel="stylesheet">
<link href="../../css/rdoc.css" rel="stylesheet">

    Home

    Pages
    Classes
    Methods

  <form action="#" method="get" accept-charset="utf-8">

      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">

  </form>

Table of Contents

Author/s

Contributors

License

Attributions

Parent

Object

Included Modules

ERB::Util

Methods

::new

#assemble_template

#class_dir

#copy_static

#debug_msg

#file_dir

#gen_sub_directories

#generate

#generate_class

#generate_class_files

#generate_file_files

#generate_index

#generate_page

#generate_servlet_not_found

#generate_servlet_root

#generate_table_of_contents

#get_sorted_module_list

#get_svninfo

#render

#render_template

#setup

#template_for

#template_result

#time_delta_string

#write_style_sheet

    class RDoc::Generator::Darkfish

Darkfish RDoc
HTML Generator

$Id: darkfish.rb 52 2009-01-07 02:08:11Z deveiant $

Author/s¶ ↑

Michael Granger (ged@FaerieMUD.org)

Contributors¶ ↑

Mahlon E. Smith (mahlon@martini.nu)

Eric Hodel (drbrain@segment7.net)

License¶ ↑

Copyright © 2007, 2008, Michael Granger. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

Neither the name of the author/s, nor the names of the project's
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

Attributions¶ ↑

Darkfish uses the Silk Icons set by Mark
James.

Constants

DESCRIPTION

Description of this generator

GENERATOR_DIR

Path to this file's parent directory. Used to find templates and other
resources.

SVNID_PATTERN

%q$Id: darkfish.rb 52 2009-01-07 02:08:11Z deveiant $"

VERSION

Release Version

Attributes

          asset_rel_path[RW]

The relative path to style sheets and javascript.  By default this is set
the same as the rel_prefix.

          base_dir[R]

The path to generate files into, combined with --op from the
options for a full path.

          classes[R]

Classes and modules to be used by this generator, not necessarily
displayed.  See also modsort

          dry_run[RW]

No files will be written when #dry_run is true.

          file_output[RW]

When false the generate methods return a String instead of writing to a
file.  The default is true.

          files[R]

Files to be displayed by this generator

          json_index[R]

The JSON index generator for this Darkfish
generator

          methods[R]

Methods to be displayed by this generator

          modsort[R]

Sorted list of classes and modules to be displayed by this generator

          outputdir[R]

The output directory

          store[R]

The RDoc::Store that is the source of the
generated content

Public Class Methods

          new(store, options)

          click to toggle source

Initialize a few instance variables before we start

# File lib/rdoc/generator/darkfish.rb, line 157
def initialize store, options
  @store   = store
  @options = options

  @asset_rel_path = ''
  @base_dir       = Pathname.pwd.expand_path
  @dry_run        = @options.dry_run
  @file_output    = true
  @template_dir   = Pathname.new options.template_dir
  @template_cache = {}

  @classes = nil
  @context = nil
  @files   = nil
  @methods = nil
  @modsort = nil

  @json_index = RDoc::Generator::JsonIndex.new self, options
end

Public Instance Methods

          assemble_template(body_file)

          click to toggle source

Creates a template from its components and the body_file.

For backwards compatibility, if body_file contains "<html"
the body is used directly.

# File lib/rdoc/generator/darkfish.rb, line 646
  def assemble_template body_file
    body = body_file.read
    return body if body =~ /<html/

    head_file = @template_dir + '_head.rhtml'
    footer_file = @template_dir + '_footer.rhtml'

    <<-TEMPLATE
<!DOCTYPE html>

<html>
<head>
#{head_file.read}

#{body}

#{footer_file.read}
    TEMPLATE
  end

          class_dir()

          click to toggle source

Directory where generated class HTML files live relative to the output dir.

# File lib/rdoc/generator/darkfish.rb, line 189
def class_dir
  nil
end

          copy_static()

          click to toggle source

Copies static files from the static_path into the output directory

# File lib/rdoc/generator/darkfish.rb, line 263
def copy_static
  return if @options.static_path.empty?

  fu_options = { :verbose => $DEBUG_RDOC, :noop => @dry_run }

  @options.static_path.each do |path|
    unless File.directory? path then
      FileUtils.install path, @outputdir, fu_options.merge(:mode => 0644)
      next
    end

    Dir.chdir path do
      Dir[File.join('**', '*')].each do |entry|
        dest_file = @outputdir + entry

        if File.directory? entry then
          FileUtils.mkdir_p entry, fu_options
        else
          FileUtils.install entry, dest_file, fu_options.merge(:mode => 0644)
        end
      end
    end
  end
end

          debug_msg(*msg)

          click to toggle source

Output progress information if debugging is enabled

# File lib/rdoc/generator/darkfish.rb, line 180
def debug_msg *msg
  return unless $DEBUG_RDOC
  $stderr.puts(*msg)
end

          file_dir()

          click to toggle source

Directory where generated class HTML files live relative to the output dir.

# File lib/rdoc/generator/darkfish.rb, line 197
def file_dir
  nil
end

          gen_sub_directories()

          click to toggle source

Create the directories the generated docs will live in if they don't
already exist.

# File lib/rdoc/generator/darkfish.rb, line 205
def gen_sub_directories
  @outputdir.mkpath
end

          generate()

          click to toggle source

Build the initial indices and output objects based on an array of TopLevel
objects containing the extracted information.

# File lib/rdoc/generator/darkfish.rb, line 239
def generate
  setup

  write_style_sheet
  generate_index
  generate_class_files
  generate_file_files
  generate_table_of_contents
  @json_index.generate
  @json_index.generate_gzipped

  copy_static

rescue => e
  debug_msg "%s: %s\n  %s" % [
    e.class.name, e.message, e.backtrace.join("\n  ")
  ]

  raise
end

          generate_class(klass, template_file = nil)

          click to toggle source

Generates a class file for klass

# File lib/rdoc/generator/darkfish.rb, line 331
def generate_class klass, template_file = nil
  setup

  current = klass

  template_file ||= @template_dir + 'class.rhtml'

  debug_msg "  working on %s (%s)" % [klass.full_name, klass.path]
  out_file   = @outputdir + klass.path
  rel_prefix = @outputdir.relative_path_from out_file.dirname
  search_index_rel_prefix = rel_prefix
  search_index_rel_prefix += @asset_rel_path if @file_output

  # suppress 1.9.3 warning
  asset_rel_prefix = asset_rel_prefix = rel_prefix + @asset_rel_path
  svninfo          = svninfo          = get_svninfo(current)

  @title = "#{klass.type} #{klass.full_name} - #{@options.title}"

  debug_msg "  rendering #{out_file}"
  render_template template_file, out_file do |io| binding end
end

          generate_class_files()

          click to toggle source

Generate a documentation file for each class and module

# File lib/rdoc/generator/darkfish.rb, line 357
def generate_class_files
  setup

  template_file = @template_dir + 'class.rhtml'
  template_file = @template_dir + 'classpage.rhtml' unless
    template_file.exist?
  return unless template_file.exist?
  debug_msg "Generating class documentation in #{@outputdir}"

  current = nil

  @classes.each do |klass|
    current = klass

    generate_class klass, template_file
  end
rescue => e
  error = RDoc::Error.new        "error generating #{current.path}: #{e.message} (#{e.class})"
  error.set_backtrace e.backtrace

  raise error
end

          generate_file_files()

          click to toggle source

Generate a documentation file for each file

# File lib/rdoc/generator/darkfish.rb, line 384
def generate_file_files
  setup

  page_file     = @template_dir + 'page.rhtml'
  fileinfo_file = @template_dir + 'fileinfo.rhtml'

  # for legacy templates
  filepage_file = @template_dir + 'filepage.rhtml' unless
    page_file.exist? or fileinfo_file.exist?

  return unless
    page_file.exist? or fileinfo_file.exist? or filepage_file.exist?

  debug_msg "Generating file documentation in #{@outputdir}"

  out_file = nil
  current = nil

  @files.each do |file|
    current = file

    if file.text? and page_file.exist? then
      generate_page file
      next
    end

    template_file = nil
    out_file = @outputdir + file.path
    debug_msg "  working on %s (%s)" % [file.full_name, out_file]
    rel_prefix = @outputdir.relative_path_from out_file.dirname
    search_index_rel_prefix = rel_prefix
    search_index_rel_prefix += @asset_rel_path if @file_output

    # suppress 1.9.3 warning
    asset_rel_prefix = asset_rel_prefix = rel_prefix + @asset_rel_path

    unless filepage_file then
      if file.text? then
        next unless page_file.exist?
        template_file = page_file
        @title = file.page_name
      else
        next unless fileinfo_file.exist?
        template_file = fileinfo_file
        @title = "File: #{file.base_name}"
      end
    end

    @title += " - #{@options.title}"
    template_file ||= filepage_file

    render_template template_file, out_file do |io| binding end
  end
rescue => e
  error =
    RDoc::Error.new "error generating #{out_file}: #{e.message} (#{e.class})"
  error.set_backtrace e.backtrace

  raise error
end

          generate_index()

          click to toggle source

Generate an index page which lists all the classes which are documented.

# File lib/rdoc/generator/darkfish.rb, line 301
def generate_index
  setup

  template_file = @template_dir + 'index.rhtml'
  return unless template_file.exist?

  debug_msg "Rendering the index page..."

  out_file = @base_dir + @options.op_dir + 'index.html'
  rel_prefix = @outputdir.relative_path_from out_file.dirname
  search_index_rel_prefix = rel_prefix
  search_index_rel_prefix += @asset_rel_path if @file_output

  # suppress 1.9.3 warning
  asset_rel_prefix = asset_rel_prefix = rel_prefix + @asset_rel_path

  @title = @options.title

  render_template template_file, out_file do |io| binding end
rescue => e
  error = RDoc::Error.new        "error generating index.html: #{e.message} (#{e.class})"
  error.set_backtrace e.backtrace

  raise error
end

          generate_page(file)

          click to toggle source

Generate a page file for file

# File lib/rdoc/generator/darkfish.rb, line 448
def generate_page file
  setup

  template_file = @template_dir + 'page.rhtml'

  out_file = @outputdir + file.path
  debug_msg "  working on %s (%s)" % [file.full_name, out_file]
  rel_prefix = @outputdir.relative_path_from out_file.dirname
  search_index_rel_prefix = rel_prefix
  search_index_rel_prefix += @asset_rel_path if @file_output

  # suppress 1.9.3 warning
  current          = current          = file
  asset_rel_prefix = asset_rel_prefix = rel_prefix + @asset_rel_path

  @title = "#{file.page_name} - #{@options.title}"

  debug_msg "  rendering #{out_file}"
  render_template template_file, out_file do |io| binding end
end

          generate_servlet_not_found(message)

          click to toggle source

Generates the 404 page for the RDoc servlet

# File lib/rdoc/generator/darkfish.rb, line 472
def generate_servlet_not_found message
  setup

  template_file = @template_dir + 'servlet_not_found.rhtml'
  return unless template_file.exist?

  debug_msg "Rendering the servlet 404 Not Found page..."

  rel_prefix = rel_prefix = ''
  search_index_rel_prefix = rel_prefix
  search_index_rel_prefix += @asset_rel_path if @file_output

  # suppress 1.9.3 warning
  asset_rel_prefix = asset_rel_prefix = ''

  @title = 'Not Found'

  render_template template_file do |io| binding end
rescue => e
  error = RDoc::Error.new        "error generating servlet_not_found: #{e.message} (#{e.class})"
  error.set_backtrace e.backtrace

  raise error
end

          generate_servlet_root(installed)

          click to toggle source

Generates the servlet root page for the RDoc
servlet

# File lib/rdoc/generator/darkfish.rb, line 501
def generate_servlet_root installed
  setup

  template_file = @template_dir + 'servlet_root.rhtml'
  return unless template_file.exist?

  debug_msg 'Rendering the servlet root page...'

  rel_prefix = '.'
  asset_rel_prefix = rel_prefix
  search_index_rel_prefix = asset_rel_prefix
  search_index_rel_prefix += @asset_rel_path if @file_output

  @title = 'Local RDoc Documentation'

  render_template template_file do |io| binding end
rescue => e
  error = RDoc::Error.new        "error generating servlet_root: #{e.message} (#{e.class})"
  error.set_backtrace e.backtrace

  raise error
end

          generate_table_of_contents()

          click to toggle source

Generate an index page which lists all the classes which are documented.

# File lib/rdoc/generator/darkfish.rb, line 528
def generate_table_of_contents
  setup

  template_file = @template_dir + 'table_of_contents.rhtml'
  return unless template_file.exist?

  debug_msg "Rendering the Table of Contents..."

  out_file = @outputdir + 'table_of_contents.html'
  rel_prefix = @outputdir.relative_path_from out_file.dirname
  search_index_rel_prefix = rel_prefix
  search_index_rel_prefix += @asset_rel_path if @file_output

  # suppress 1.9.3 warning
  asset_rel_prefix = asset_rel_prefix = rel_prefix + @asset_rel_path

  @title = "Table of Contents - #{@options.title}"

  render_template template_file, out_file do |io| binding end
rescue => e
  error = RDoc::Error.new        "error generating table_of_contents.html: #{e.message} (#{e.class})"
  error.set_backtrace e.backtrace

  raise error
end

          get_sorted_module_list(classes)

          click to toggle source

Return a list of the documented modules sorted by salience first, then by
name.

# File lib/rdoc/generator/darkfish.rb, line 292
def get_sorted_module_list classes
  classes.select do |klass|
    klass.display?
  end.sort
end

          get_svninfo(klass)

          click to toggle source

Try to extract Subversion information out of the first constant whose value
looks like a subversion Id tag. If no matching constant is found, and empty
hash is returned.

# File lib/rdoc/generator/darkfish.rb, line 623
def get_svninfo klass
  constants = klass.constants or return {}

  constants.find { |c| c.value =~ SVNID_PATTERN } or return {}

  filename, rev, date, time, committer = $~.captures
  commitdate = Time.parse "#{date} #{time}"

  return {
    :filename    => filename,
    :rev         => Integer(rev),
    :commitdate  => commitdate,
    :commitdelta => time_delta_string(Time.now - commitdate),
    :committer   => committer,
  }
end

          render(file_name)

          click to toggle source

Renders the ERb contained in file_name relative to the
template directory and returns the result based on the current context.

# File lib/rdoc/generator/darkfish.rb, line 670
def render file_name
  template_file = @template_dir + file_name

  template = template_for template_file, false, RDoc::ERBPartial

  template.filename = template_file.to_s

  template.result @context
end

          render_template(template_file, out_file = nil) { |io| ... }

          click to toggle source

Load and render the erb template in the given template_file
and write it out to out_file.

Both template_file and out_file should be
Pathname-like objects.

An io will be yielded which must be captured by binding in the caller.

# File lib/rdoc/generator/darkfish.rb, line 688
def render_template template_file, out_file = nil # :yield: io
  io_output = out_file && !@dry_run && @file_output
  erb_klass = io_output ? RDoc::ERBIO : ERB

  template = template_for template_file, true, erb_klass

  if io_output then
    debug_msg "Outputting to %s" % [out_file.expand_path]

    out_file.dirname.mkpath
    out_file.open 'w', 0644 do |io|
      io.set_encoding @options.encoding if Object.const_defined? :Encoding

      @context = yield io

      template_result template, @context, template_file
    end
  else
    @context = yield nil

    output = template_result template, @context, template_file

    debug_msg "  would have written %d characters to %s" % [
      output.length, out_file.expand_path
    ] if @dry_run

    output
  end
end

          setup()

          click to toggle source

Prepares for generation of output from the current directory

# File lib/rdoc/generator/darkfish.rb, line 575
def setup
  return if instance_variable_defined? :@outputdir

  @outputdir = Pathname.new(@options.op_dir).expand_path @base_dir

  return unless @store

  @classes = @store.all_classes_and_modules.sort
  @files   = @store.all_files.sort
  @methods = @classes.map { |m| m.method_list }.flatten.sort
  @modsort = get_sorted_module_list @classes
end

          template_for(file, page = true, klass = ERB)

          click to toggle source

Retrieves a cache template for file, if present, or fills the
cache.

# File lib/rdoc/generator/darkfish.rb, line 735
def template_for file, page = true, klass = ERB
  template = @template_cache[file]

  return template if template

  if page then
    template = assemble_template file
    erbout = 'io'
  else
    template = file.read
    template = template.encode @options.encoding if
      Object.const_defined? :Encoding

    file_var = File.basename(file).sub(/\..*/, '')

    erbout = "_erbout_#{file_var}"
  end

  template = klass.new template, nil, '<>', erbout
  @template_cache[file] = template
  template
end

          template_result(template, context, template_file)

          click to toggle source

Creates the result for template with context.  If
an error is raised a Pathname template_file will indicate the
file where the error occurred.

# File lib/rdoc/generator/darkfish.rb, line 722
def template_result template, context, template_file
  template.filename = template_file.to_s
  template.result context
rescue NoMethodError => e
  raise RDoc::Error, "Error while evaluating %s: %s" % [
    template_file.expand_path,
    e.message,
  ], e.backtrace
end

          time_delta_string(seconds)

          click to toggle source

Return a string describing the amount of time in the given number of
seconds in terms a human can understand easily.

# File lib/rdoc/generator/darkfish.rb, line 592
def time_delta_string seconds
  return 'less than a minute'          if seconds < 60
  return "#{seconds / 60} minute#{seconds / 60 == 1 ? '' : 's'}" if
                                          seconds < 3000     # 50 minutes
  return 'about one hour'              if seconds < 5400     # 90 minutes
  return "#{seconds / 3600} hours"     if seconds < 64800    # 18 hours
  return 'one day'                     if seconds < 86400    #  1 day
  return 'about one day'               if seconds < 172800   #  2 days
  return "#{seconds / 86400} days"     if seconds < 604800   #  1 week
  return 'about one week'              if seconds < 1209600  #  2 week
  return "#{seconds / 604800} weeks"   if seconds < 7257600  #  3 months
  return "#{seconds / 2419200} months" if seconds < 31536000 #  1 year
  return "#{seconds / 31536000} years"
end

          write_style_sheet()

          click to toggle source

Copy over the stylesheet into the appropriate place in the output
directory.

# File lib/rdoc/generator/darkfish.rb, line 213
def write_style_sheet
  debug_msg "Copying static files"
  options = { :verbose => $DEBUG_RDOC, :noop => @dry_run }

  BUILTIN_STYLE_ITEMS.each do |item|
    install_rdoc_static_file @template_dir + item, "./#{item}", options
  end

  @options.template_stylesheets.each do |stylesheet|
    FileUtils.cp stylesheet, '.', options
  end

  Dir[(@template_dir + "{js,images}/**/*").to_s].each do |path|
    next if File.directory? path
    next if File.basename(path) =~ /^\./

    dst = Pathname.new(path).relative_path_from @template_dir

    install_rdoc_static_file @template_dir + path, dst, options
  end
end

Validate

Generated by RDoc 4.2.0.

Based on Darkfish by Michael Granger.


text:
package io.strimzi.operator.cluster.operator.assembly;

import io.fabric8.kubernetes.api.model.ConfigMap;
import io.fabric8.kubernetes.api.model.ContainerStateTerminated;
import io.fabric8.kubernetes.api.model.LocalObjectReference;
import io.fabric8.kubernetes.api.model.Pod;
import io.fabric8.kubernetes.api.model.apps.Deployment;
import io.fabric8.openshift.api.model.Build;
import io.strimzi.api.kafka.model.KafkaConnectResources;
import io.strimzi.operator.PlatformFeaturesAvailability;
import io.strimzi.operator.cluster.ClusterOperatorConfig;
import io.strimzi.operator.cluster.model.ImagePullPolicy;
import io.strimzi.operator.cluster.model.KafkaConnectBuild;
import io.strimzi.operator.cluster.model.KafkaConnectBuildUtils;
import io.strimzi.operator.cluster.model.KafkaConnectDockerfile;
import io.strimzi.operator.cluster.operator.resource.ResourceOperatorSupplier;
import io.strimzi.operator.common.Annotations;
import io.strimzi.operator.common.Reconciliation;
import io.strimzi.operator.common.ReconciliationLogger;
import io.strimzi.operator.common.Util;
import io.strimzi.operator.common.operator.resource.BuildConfigOperator;
import io.strimzi.operator.common.operator.resource.BuildOperator;
import io.strimzi.operator.common.operator.resource.ConfigMapOperator;
import io.strimzi.operator.common.operator.resource.DeploymentOperator;
import io.strimzi.operator.common.operator.resource.PodOperator;
import io.strimzi.operator.common.operator.resource.ServiceAccountOperator;
import io.vertx.core.Future;

import java.util.List;
import java.util.concurrent.atomic.AtomicReference;

public class ConnectBuildOperator {

    private static final ReconciliationLogger LOGGER = ReconciliationLogger.create(ConnectBuildOperator.class.getName());

    private final DeploymentOperator deploymentOperations;
    private final PodOperator podOperator;
    private final ConfigMapOperator configMapOperations;
    private final ServiceAccountOperator serviceAccountOperations;
    private final BuildConfigOperator buildConfigOperator;
    private final BuildOperator buildOperator;

    private final ImagePullPolicy imagePullPolicy;
    private final List<LocalObjectReference> imagePullSecrets;
    private final long connectBuildTimeoutMs;
    private final PlatformFeaturesAvailability pfa;

    public ConnectBuildOperator(PlatformFeaturesAvailability pfa, ResourceOperatorSupplier supplier, ClusterOperatorConfig config) {
        this.deploymentOperations = supplier.deploymentOperations;
        this.podOperator = supplier.podOperations;
        this.configMapOperations = supplier.configMapOperations;
        this.serviceAccountOperations = supplier.serviceAccountOperations;
        this.buildConfigOperator = supplier.buildConfigOperations;
        this.buildOperator = supplier.buildOperations;

        this.imagePullPolicy = config.getImagePullPolicy();
        this.imagePullSecrets = config.getImagePullSecrets();
        this.connectBuildTimeoutMs = config.getConnectBuildTimeoutMs();
        this.pfa = pfa;
    }

    /**
     * Asynchronously runs the KafkaConnectBuild (if present) and reconciles the related resources
     *
     * @param reconciliation    The reconciliation
     * @param namespace         Namespace of the Connect cluster
     * @param connectName       Name of the Connect cluster
     * @param connectBuild      KafkaConnectBuild object
     * @return                  Future for tracking the asynchronous result of the reconciliation steps
     */
    public Future<BuildInfo> reconcile(Reconciliation reconciliation, String namespace, String connectName, KafkaConnectBuild connectBuild) {
        if (connectBuild.getBuild() == null) {
            // Build is not configured => we should delete resources
            return configMapOperations.reconcile(reconciliation, namespace, KafkaConnectResources.dockerFileConfigMapName(connectBuild.getCluster()), null)
                    .compose(ignore -> podOperator.reconcile(reconciliation, namespace, KafkaConnectResources.buildPodName(connectBuild.getCluster()), null))
                    .compose(ignore -> serviceAccountOperations.reconcile(reconciliation, namespace, KafkaConnectResources.buildServiceAccountName(connectBuild.getCluster()), null))
                    .compose(ignore -> pfa.supportsS2I() ? buildConfigOperator.reconcile(reconciliation, namespace, KafkaConnectResources.buildConfigName(connectBuild.getCluster()), null) : Future.succeededFuture())
                    .map(i -> null);
        } else {
            // Build exists => let's build
            return deploymentOperations.getAsync(namespace, connectName)
                    .compose(deployment -> build(reconciliation, namespace, connectBuild, deployment));

        }
    }

    /**
     * Builds a new container image with connectors on Kubernetes using Kaniko or on OpenShift using BuildConfig
     *
     * @param reconciliation    The reconciliation
     * @param namespace         Namespace of the Connect cluster
     * @param connectBuild      KafkaConnectBuild object
     * @param deployment    The existing Connect deployment
     *
     * @return              Future for tracking the asynchronous result of the Kubernetes image build
     */
    private Future<BuildInfo> build(Reconciliation reconciliation, String namespace, KafkaConnectBuild connectBuild, Deployment deployment) {
        String currentBuildRevision = "";
        String currentImage = "";
        boolean forceRebuild = false;
        if (deployment != null) {
            // Extract information from the current deployment. This is used to figure out if new build needs to be run or not.
            currentBuildRevision = Annotations.stringAnnotation(deployment.getSpec().getTemplate(), Annotations.STRIMZI_IO_CONNECT_BUILD_REVISION, null);
            currentImage = deployment.getSpec().getTemplate().getSpec().getContainers().get(0).getImage();
            forceRebuild = Annotations.hasAnnotation(deployment, Annotations.STRIMZI_IO_CONNECT_FORCE_REBUILD);
        }

        KafkaConnectDockerfile dockerfile = connectBuild.generateDockerfile();
        String newBuildRevision = dockerfile.hashStub() + Util.hashStub(connectBuild.getBuild().getOutput().getImage());
        ConfigMap dockerFileConfigMap = connectBuild.generateDockerfileConfigMap(dockerfile);

        if (newBuildRevision.equals(currentBuildRevision)
                && !forceRebuild) {
            // The revision is the same and rebuild was not forced => nothing to do
            LOGGER.debugCr(reconciliation, "Build configuration did not change. Nothing new to build. Container image {} will be used.", currentImage);
            return Future.succeededFuture(new BuildInfo(currentImage, newBuildRevision));
        } else if (pfa.supportsS2I()) {
            // Revisions differ and we have S2I support => we are on OpenShift and should do a build
            return openShiftBuild(reconciliation, namespace, connectBuild, forceRebuild, dockerfile, newBuildRevision)
                    .compose(image -> Future.succeededFuture(new BuildInfo(image, newBuildRevision)));
        } else {
            // Revisions differ and no S2I support => we are on Kubernetes and should do a build
            return kubernetesBuild(reconciliation, namespace, connectBuild, forceRebuild, dockerFileConfigMap, newBuildRevision)
                    .compose(image -> Future.succeededFuture(new BuildInfo(image, newBuildRevision)));
        }
    }

    /**
     * Executes the Kafka Connect Build on Kubernetes. Run only if needed because of changes to the Dockerfile or when
     * triggered by annotation.
     *
     * @param reconciliation        The reconciliation
     * @param namespace             Namespace of the Connect cluster
     * @param connectBuild          KafkaConnectBuild object
     * @param forceRebuild          If true, force a new build even if one is already in progress
     * @param dockerFileConfigMap   ConfigMap with the generated Dockerfile
     * @param newBuildRevision      New build revision (hash of the Dockerfile)
     *
     * @return                      Future which completes with the built image when the build is finished (or fails if it fails)
     */
    private Future<String> kubernetesBuild(Reconciliation reconciliation, String namespace, KafkaConnectBuild connectBuild, boolean forceRebuild, ConfigMap dockerFileConfigMap, String newBuildRevision)  {
        final AtomicReference<String> buildImage = new AtomicReference<>();
        return podOperator.getAsync(namespace, KafkaConnectResources.buildPodName(connectBuild.getCluster()))
                .compose(pod -> {
                    if (pod != null)    {
                        String existingBuildRevision = Annotations.stringAnnotation(pod, Annotations.STRIMZI_IO_CONNECT_BUILD_REVISION, null);
                        if (newBuildRevision.equals(existingBuildRevision)
                                && !KafkaConnectBuildUtils.buildPodFailed(pod)
                                && !forceRebuild) {
                            // Builder pod exists, is not failed, and is building the same Dockerfile and we are not
                            // asked to force re-build by the annotation => we re-use the existing build
                            LOGGER.infoCr(reconciliation, "Previous build exists with the same Dockerfile and will be reused.");
                            return Future.succeededFuture();
                        } else {
                            // Pod exists, but it either failed or is for different Dockerfile => start new build
                            LOGGER.infoCr(reconciliation, "Previous build exists, but uses different Dockerfile or failed. New build will be started.");
                            return podOperator.reconcile(reconciliation, namespace, KafkaConnectResources.buildPodName(connectBuild.getCluster()), null)
                                    .compose(ignore -> kubernetesBuildStart(reconciliation, namespace, connectBuild, dockerFileConfigMap, newBuildRevision));
                        }
                    } else {
                        // Pod does not exist => Start new build
                        return kubernetesBuildStart(reconciliation, namespace, connectBuild, dockerFileConfigMap, newBuildRevision);
                    }
                })
                .compose(ignore -> kubernetesBuildWaitForFinish(reconciliation, namespace, connectBuild))
                .compose(image -> {
                    buildImage.set(image);
                    return podOperator.reconcile(reconciliation, namespace, KafkaConnectResources.buildPodName(connectBuild.getCluster()), null);
                })
                .compose(ignore -> pfa.supportsS2I() ? buildConfigOperator.reconcile(reconciliation, namespace, KafkaConnectResources.buildConfigName(connectBuild.getCluster()), null) : Future.succeededFuture())
                .map(ignore -> buildImage.get());
    }

    /**
     * Starts the Kafka Connect Build on Kubernetes by creating the ConfigMap with the Dockerfile and starting the
     * builder Pod.
     *
     * @param reconciliation        The reconciliation
     * @param namespace             Namespace of the Connect cluster
     * @param connectBuild          KafkaConnectBuild object
     * @param dockerFileConfigMap   ConfigMap with the generated Dockerfile
     * @param newBuildRevision      New build revision (hash of the Dockerfile)
     *
     * @return                      Future which completes when the build is finished (or fails if it fails)
     */
    private Future<Void> kubernetesBuildStart(Reconciliation reconciliation, String namespace, KafkaConnectBuild connectBuild, ConfigMap dockerFileConfigMap, String newBuildRevision)  {
        return configMapOperations.reconcile(reconciliation, namespace, KafkaConnectResources.dockerFileConfigMapName(connectBuild.getCluster()), dockerFileConfigMap)
                .compose(ignore -> serviceAccountOperations.reconcile(reconciliation, namespace, KafkaConnectResources.buildServiceAccountName(connectBuild.getCluster()), connectBuild.generateServiceAccount()))
                .compose(ignore -> podOperator.reconcile(reconciliation, namespace, KafkaConnectResources.buildPodName(connectBuild.getCluster()), connectBuild.generateBuilderPod(pfa.isOpenshift(), imagePullPolicy, imagePullSecrets, newBuildRevision)))
                .mapEmpty();
    }

    /**
     * Checks if the builder Pod finished the build
     *
     @param namespace               Namespace of the Connect cluster
     * @param podName               The name of the Pod which should be checked whether it finished
     *
     * @return                      True if the build already finished, false if it is still building
     */
    private boolean kubernetesBuildPodFinished(String namespace, String podName)   {
        Pod buildPod = podOperator.get(namespace, podName);
        return KafkaConnectBuildUtils.buildPodComplete(buildPod);
    }

    /**
     * Waits for the Kafka Connect build to finish and collects the results from it
     *
     * @param reconciliation        The reconciliation
     * @param namespace             Namespace of the Connect cluster
     * @param connectBuild          KafkaConnectBuild object
     *
     * @return                      Future which completes with the built image when the build is finished (or fails if it fails)
     */
    private Future<String> kubernetesBuildWaitForFinish(Reconciliation reconciliation, String namespace, KafkaConnectBuild connectBuild)  {
        return podOperator.waitFor(reconciliation, namespace, KafkaConnectResources.buildPodName(connectBuild.getCluster()), "complete", 1_000, connectBuildTimeoutMs, (ignore1, ignore2) -> kubernetesBuildPodFinished(namespace, KafkaConnectResources.buildPodName(connectBuild.getCluster())))
                .compose(ignore -> podOperator.getAsync(namespace, KafkaConnectResources.buildPodName(connectBuild.getCluster())))
                .compose(pod -> {
                    if (KafkaConnectBuildUtils.buildPodSucceeded(pod)) {
                        ContainerStateTerminated state = pod.getStatus().getContainerStatuses().get(0).getState().getTerminated();
                        String image = state.getMessage().trim();
                        LOGGER.infoCr(reconciliation, "Build completed successfully. New image is {}.", image);
                        return Future.succeededFuture(image);
                    } else {
                        ContainerStateTerminated state = pod.getStatus().getContainerStatuses().get(0).getState().getTerminated();
                        LOGGER.warnCr(reconciliation, "Build failed with code {}: {}", state.getExitCode(), state.getMessage());
                        return Future.failedFuture("The Kafka Connect build failed");
                    }
                });
    }

    /**
     * Executes the Kafka Connect Build on OpenShift. Run only if needed because of changes to the Dockerfile or when
     * triggered by annotation.
     *
     * @param reconciliation        The reconciliation
     * @param namespace             Namespace of the Connect cluster
     * @param connectBuild          KafkaConnectBuild object
     * @param forceRebuild          If true, force a new build even if one is already in progress
     * @param dockerfile            The generated Dockerfile
     * @param newBuildRevision      New build revision (hash of the Dockerfile)
     *
     * @return                      Future which completes with the built image when the build is finished (or fails if it fails)
     */
    private Future<String> openShiftBuild(Reconciliation reconciliation, String namespace, KafkaConnectBuild connectBuild, boolean forceRebuild, KafkaConnectDockerfile dockerfile, String newBuildRevision)   {
        final AtomicReference<String> buildImage = new AtomicReference<>();
        return buildConfigOperator.getAsync(namespace, KafkaConnectResources.buildConfigName(connectBuild.getCluster()))
                .compose(buildConfig -> {
                    if (buildConfig != null
                            && buildConfig.getStatus() != null
                            && buildConfig.getStatus().getLastVersion() != null) {
                        Long lastVersion = buildConfig.getStatus().getLastVersion();
                        return buildOperator.getAsync(namespace, KafkaConnectResources.buildName(connectBuild.getCluster(), lastVersion));
                    } else {
                        return Future.succeededFuture();
                    }
                })
                .compose(build -> {
                    if (build != null)  {
                        String existingBuildRevision = Annotations.stringAnnotation(build, Annotations.STRIMZI_IO_CONNECT_BUILD_REVISION, null);
                        if (newBuildRevision.equals(existingBuildRevision)
                                && !KafkaConnectBuildUtils.buildFailed(build)
                                && !forceRebuild) {
                            // Build exists, is not failed, and is building the same Dockerfile and we are not
                            // asked to force re-build by the annotation => we re-use the existing build
                            LOGGER.infoCr(reconciliation, "Previous build exists with the same Dockerfile and will be reused.");
                            return Future.succeededFuture(build.getMetadata().getName());
                        } else {
                            // Build exists, but it either failed or is for different Dockerfile => start new build
                            return openShiftBuildStart(reconciliation, namespace, connectBuild, dockerfile, newBuildRevision);
                        }
                    } else {
                        return openShiftBuildStart(reconciliation, namespace, connectBuild, dockerfile, newBuildRevision);
                    }
                })
                .compose(buildName -> openShiftBuildWaitForFinish(reconciliation, namespace, buildName))
                .compose(image -> {
                    buildImage.set(image);
                    return podOperator.reconcile(reconciliation, namespace, KafkaConnectResources.buildPodName(connectBuild.getCluster()), null);
                }).map(ignore -> buildImage.get());
    }

    /**
     * Starts the Kafka Connect Build on OpenShift.
     *
     * @param reconciliation        The reconciliation
     * @param namespace             Namespace of the Connect cluster
     * @param connectBuild          KafkaConnectBuild object
     * @param dockerfile            The generated Dockerfile
     * @param newBuildRevision      New build revision (hash of the Dockerfile)
     *
     * @return                      Future which completes with the build name when the build is finished (or fails if it fails)
     */
    private Future<String> openShiftBuildStart(Reconciliation reconciliation, String namespace, KafkaConnectBuild connectBuild, KafkaConnectDockerfile dockerfile, String newBuildRevision)   {
        return configMapOperations.reconcile(reconciliation, namespace, KafkaConnectResources.dockerFileConfigMapName(connectBuild.getCluster()), null)
                .compose(ignore -> buildConfigOperator.reconcile(reconciliation, namespace, KafkaConnectResources.buildConfigName(connectBuild.getCluster()), connectBuild.generateBuildConfig(dockerfile)))
                .compose(ignore -> buildConfigOperator.startBuild(namespace, KafkaConnectResources.buildConfigName(connectBuild.getCluster()), connectBuild.generateBuildRequest(newBuildRevision)))
                .map(build -> build.getMetadata().getName());
    }

    /**
     * Checks if the Build finished
     *
     * @param namespace             Namespace of the Connect cluster
     * @param buildName             Name of the Build which should be checked
     *
     * @return                      True if the Build already finished, false if it is still building
     */
    private boolean openShiftBuildFinished(String namespace, String buildName) {
        Build runningBuild = buildOperator.get(namespace, buildName);
        return KafkaConnectBuildUtils.buildComplete(runningBuild);
    }

    /**
     * Waits for the Kafka Connect build to finish and collects the results from it
     *
     * @param reconciliation        The reconciliation
     * @param namespace             Namespace of the Connect cluster
     * @param buildName             Name of the KafkaConnectBuild
     *
     * @return                      Future which completes with the built image when the build is finished (or fails if it fails)
     */
    private Future<String> openShiftBuildWaitForFinish(Reconciliation reconciliation, String namespace, String buildName)   {
        return buildOperator.waitFor(reconciliation, namespace, buildName, "complete", 1_000, connectBuildTimeoutMs, (ignore1, ignore2) -> openShiftBuildFinished(namespace, buildName))
                .compose(ignore -> buildOperator.getAsync(namespace, buildName))
                .compose(build -> {
                    if (KafkaConnectBuildUtils.buildSucceeded(build))   {
                        // Build completed successfully. Lets extract the new image
                        if (build.getStatus().getOutputDockerImageReference() != null
                                && build.getStatus().getOutput() != null
                                && build.getStatus().getOutput().getTo() != null
                                && build.getStatus().getOutput().getTo().getImageDigest() != null) {
                            String digest = "@" + build.getStatus().getOutput().getTo().getImageDigest();
                            String image = build.getStatus().getOutputDockerImageReference();
                            String tag = image.substring(image.lastIndexOf(":"));

                            String imageWithDigest = image.replace(tag, digest);

                            LOGGER.infoCr(reconciliation, "Build {} completed successfully. New image is {}.", buildName, imageWithDigest);
                            return Future.succeededFuture(imageWithDigest);
                        } else {
                            LOGGER.warnCr(reconciliation, "Build {} completed successfully. But the new container image was not found.", buildName);
                            return Future.failedFuture("The Kafka Connect build completed, but the new container image was not found.");
                        }
                    } else {
                        // Build failed. If the Status exists, we try to provide more detailed information
                        if (build.getStatus() != null) {
                            LOGGER.infoCr(reconciliation, "Build {} failed with code {}: {}", buildName, build.getStatus().getPhase(), build.getStatus().getLogSnippet());
                        } else {
                            LOGGER.warnCr(reconciliation, "Build {} failed for unknown reason", buildName);
                        }

                        return Future.failedFuture("The Kafka Connect build failed.");
                    }
                });
    }

    /**
     * Utility class to return the information about the Kafka Connect Build.
     */
    static class BuildInfo {
        private final String image;
        private final String buildRevision;

        public BuildInfo(String image, String buildRevision) {
            this.image = image;
            this.buildRevision = buildRevision;
        }

        public String getImage() {
            return image;
        }

        public String getBuildRevision() {
            return buildRevision;
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
const Event = require('./05-event.js');

class Radio extends Event {
  constructor(station) {
    super();
    this.#station = station;
  }

  #open = setTimeout(() => {
    this.emit('open', this.#station);
    clearTimeout(this.#open);
  }, 0);

  #stop = setTimeout(() => {
    this.emit('stop', this.#station);
    clearTimeout(this.#stop);
  }, 5000);

  #station;
}

module.exports = Radio;


text:
{% extends "layouts/base.html" %}
{% from "macros/links.html" import omim_links %}
{% from "macros/gt_calls.html" import gt_call %}
{% from "macros/compounds.html" import compounds_table %}
{% from "macros/transcripts.html" import vep_transcripts %}
{% from "macros/genes.html" import gene_table %}
{% import "macros/comments.html" as comments_mod %}

{% block nav_left %}

    {{ case_id }}

    Variants

{% endblock %}

{% block container %}
  {# Overview #}

          {{ variant.index }}
          Ranking

        {% if variant.rank_score %}

            {{ variant.rank_score }}
            Rank score

        {% endif %}

        {% if variant.cadd_score %}

              {{ variant.cadd_score }}

            CADD score

        {% endif %}

        {% if variant.most_severe_consequence %}

            {{ variant.most_severe_consequence }}
            Most severe consequence

        {% endif %}

          {% set variant_id = variant.variant_id|string %}
          {% if variant_id in case.suspect_dict %}
            <form action="{{ url_for('variants.delete_suspect', suspect_id=case.suspect_dict[variant_id].id) }}" method="POST">
              <button type="submit" class="btn btn-default btn-sm">
                Remove as suspect
              </button>
            </form>
          {% else %}
            <form action="{{ url_for('variants.suspects', case_id=case_id, variant_id=variant.variant_id) }}" method="POST">
              <button type="submit" class="btn btn-default btn-sm">
                Pin as suspect
              </button>
            </form>
          {% endif %}

          Position

              {{ variant.CHROM }}:{{ variant.POS }}

            | {{ variant.REF }}

            {{ variant.ALT }}

        {% if variant.genes %}

            Genes (OMIM)

{{ omim_links(variant.genes) }}

        {% endif %}

  {# Genotype and frequency #}

Frequencies

          {% for frequency in variant.frequencies %}

                {% if frequency.value %}
                  {{ frequency.value|round(4) }}
                {% else %}
                  —
                {% endif %}

              {{ frequency.label }}

          {% else %}

No frequencies.

          {% endfor %}

{{ gt_call(case_id, variant.individuals) }}

Inheritance models

          {% for model in variant.genetic_models %}

              {{ model }}

          {% else %}

N/A

          {% endfor %}

  {# External links #}

External links

            Ensembl

            UCSC

            SolveBio

            {% if variant.ID %}
              SNPedia
            {% endif %}

            SPANR

      {{ comments_mod.comments(case_id, comments, variant_id=variant.md5) }}

  {% if variant.genes %}

{{ gene_table(variant.genes) }}

  {% endif %}

  {% if variant.transcripts %}

{{ vep_transcripts(variant.transcripts) }}

  {% endif %}

  {% if variant.compounds %}

{{ compounds_table(variant.compounds, case_id) }}

  {% endif %}
{% endblock %}

{% block js_bottom %}
  {{ super() }}

{% endblock %}


text:
flint-sender-sdk-web
====================

Flint Sender SDK for Web App


text:
<?php

namespace ETAP\EmpruntBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Besoin
 */
class Besoin
{
    /**
     * @var \DateTime
     */
    private $datebesoin;

    /**
     * @var string
     */
    private $description;

    /**
     * @var string
     */
    private $nom;

    /**
     * @var integer
     */
    private $valeur;

    /**
     * @var integer
     */
    private $id;

    /**
     * @var \Doctrine\Common\Collections\Collection
     */
    private $codeconcession;

    /**
     * Constructor
     */
    public function __construct()
    {
        $this->codeconcession = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Set datebesoin
     *
     * @param \DateTime $datebesoin
     * @return Besoin
     */
    public function setDatebesoin($datebesoin)
    {
        $this->datebesoin = $datebesoin;

        return $this;
    }

    /**
     * Get datebesoin
     *
     * @return \DateTime
     */
    public function getDatebesoin()
    {
        return $this->datebesoin;
    }

    /**
     * Set description
     *
     * @param string $description
     * @return Besoin
     */
    public function setDescription($description)
    {
        $this->description = $description;

        return $this;
    }

    /**
     * Get description
     *
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Set nom
     *
     * @param string $nom
     * @return Besoin
     */
    public function setNom($nom)
    {
        $this->nom = $nom;

        return $this;
    }

    /**
     * Get nom
     *
     * @return string
     */
    public function getNom()
    {
        return $this->nom;
    }

    /**
     * Set valeur
     *
     * @param integer $valeur
     * @return Besoin
     */
    public function setValeur($valeur)
    {
        $this->valeur = $valeur;

        return $this;
    }

    /**
     * Get valeur
     *
     * @return integer
     */
    public function getValeur()
    {
        return $this->valeur;
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Add codeconcession
     *
     * @param \ETAP\EmpruntBundle\Entity\Concession $codeconcession
     * @return Besoin
     */
    public function addCodeconcession(\ETAP\EmpruntBundle\Entity\Concession $codeconcession)
    {
        $this->codeconcession[] = $codeconcession;

        return $this;
    }

    /**
     * Remove codeconcession
     *
     * @param \ETAP\EmpruntBundle\Entity\Concession $codeconcession
     */
    public function removeCodeconcession(\ETAP\EmpruntBundle\Entity\Concession $codeconcession)
    {
        $this->codeconcession->removeElement($codeconcession);
    }

    /**
     * Get codeconcession
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getCodeconcession()
    {
        return $this->codeconcession;
    }
}


text:
angular.module('bettingApp')
    .directive('betFailure', function () {
    return {
    	templateUrl: 'partials/betFailure/index.html',
        restrict: 'E',
        replace: true,
    };
});


text:
import React, { PropTypes } from "react";
import ImmutablePropTypes from "react-immutable-proptypes";
import pluralize from "pluralize";
import { IndexLink } from "react-router";
import { IconMenu, Menu, MenuItem } from "react-toolbox/lib/menu";
import Avatar from "react-toolbox/lib/avatar";
import AppBar from "react-toolbox/lib/app_bar";
import FontIcon from "react-toolbox/lib/font_icon";
import FindBar from "../FindBar/FindBar";
import { stringToRGB } from "../../lib/textHelper";
import styles from "./AppHeader.css";

export default class AppHeader extends React.Component {

  static propTypes = {
    user: ImmutablePropTypes.map.isRequired,
    collections: ImmutablePropTypes.orderedMap.isRequired,
    runCommand: PropTypes.func.isRequired,
    toggleDrawer: PropTypes.func.isRequired,
    onCreateEntryClick: PropTypes.func.isRequired,
    onLogoutClick: PropTypes.func.isRequired,
  };

  state = {
    createMenuActive: false,
    userMenuActive: false,
  };

  handleCreatePostClick = (collectionName) => {
    const { onCreateEntryClick } = this.props;
    if (onCreateEntryClick) {
      onCreateEntryClick(collectionName);
    }
  };

  handleCreateButtonClick = () => {
    this.setState({
      createMenuActive: true,
    });
  };

  handleCreateMenuHide = () => {
    this.setState({
      createMenuActive: false,
    });
  };

  render() {
    const {
      user,
      collections,
      runCommand,
      toggleDrawer,
      onLogoutClick,
    } = this.props;

    const avatarStyle = {
      backgroundColor: `#${ stringToRGB(user.get("name")) }`,
    };

    return (
      <AppBar
        fixed
        theme={styles}
        leftIcon="menu"
        onLeftIconClick={toggleDrawer}
        onRightIconClick={this.handleRightIconClick}
      >
        <IndexLink to="/" className={styles.homeLink}>
          <FontIcon value="home" className={styles.icon} />
        </IndexLink>
        <IconMenu
          theme={styles}
          icon="add"
          onClick={this.handleCreateButtonClick}
          onHide={this.handleCreateMenuHide}
        >
          {
            collections.filter(collection => collection.get('create')).valueSeq().map(collection =>
              <MenuItem
                key={collection.get("name")}
                value={collection.get("name")}
                onClick={this.handleCreatePostClick.bind(this, collection.get('name'))} // eslint-disable-line
                caption={pluralize(collection.get("label"), 1)}
              />
            )
          }
        </IconMenu>
        <FindBar runCommand={runCommand} />
        <Avatar style={avatarStyle} title={user.get("name")} image={user.get("avatar_url")} />
        <IconMenu icon="settings" position="topRight" theme={styles}>
          <MenuItem onClick={onLogoutClick} value="log out" caption="Log Out" />
        </IconMenu>
      </AppBar>
    );
  }
}


text:
import dynamic from 'next/dynamic'

const Hello = dynamic(() => import('../components/hello'), { ssr: true })

export default () => {
  // make sure we handle this syntax correctly
  const { hi } = process.env
  console.log(hi)
  return (
    <>

hi there 👋

      <Hello />
    </>
  )
}


text:
.class final synthetic Lcom/android/server/wm/-$Lambda$eBBEuGZ8VbEXJy0r5EYYbvnl-8w$10;
.super Ljava/lang/Object;

# interfaces
.implements Ljava/util/function/Consumer;

# instance fields
.field private final synthetic -$f0:Z

# direct methods
.method private final synthetic $m$0(Ljava/lang/Object;)V
    .locals 1

    iget-boolean v0, p0, Lcom/android/server/wm/-$Lambda$eBBEuGZ8VbEXJy0r5EYYbvnl-8w$10;->-$f0:Z

    check-cast p1, Lcom/android/server/wm/WindowState;

    invoke-static {v0, p1}, Lcom/android/server/wm/WindowManagerService;->lambda$-com_android_server_wm_WindowManagerService_365189(ZLcom/android/server/wm/WindowState;)V

    return-void
.end method

.method public synthetic constructor <init>(Z)V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-boolean p1, p0, Lcom/android/server/wm/-$Lambda$eBBEuGZ8VbEXJy0r5EYYbvnl-8w$10;->-$f0:Z

    return-void
.end method

# virtual methods
.method public final accept(Ljava/lang/Object;)V
    .locals 0

    invoke-direct {p0, p1}, Lcom/android/server/wm/-$Lambda$eBBEuGZ8VbEXJy0r5EYYbvnl-8w$10;->$m$0(Ljava/lang/Object;)V

    return-void
.end method


text:
<!DOCTYPE html>

    <title>React Developer Tools</title>
    <meta charset="utf8" />

Waiting for React to connect…

React Native

            Open the in-app developer menu to connect.

React DOM

            Add one of the following:

            to the top of the page you want to debug,

            before importing React DOM.

Starting the server…


text:
package org.kie.dmn.model.v1_1;

public class ImportedValues extends Import {

    private String importedElement;
    private String expressionLanguage;

    public String getImportedElement() {
        return importedElement;
    }

    public void setImportedElement( final String value ) {
        this.importedElement = value;
    }

    public String getExpressionLanguage() {
        return expressionLanguage;
    }

    public void setExpressionLanguage( final String value ) {
        this.expressionLanguage = value;
    }

}


text:
import { Component, OnInit } from '@angular/core';
import { OrderService } from '../../services/order.service';
import { NotificationService } from '../../services/notification.service';
import { Order } from '../../models/order';

@Component({
  selector: 'app-user-order-list',
  templateUrl: './user-order-list.component.html',
  styleUrls: ['./user-order-list.component.css']
})
export class UserOrderListComponent implements OnInit {

  public pageTitle: string;
  public orders: Order[];

  constructor(
    private orderService: OrderService,
    private notificationService: NotificationService
  ) {
    this.pageTitle = 'My orders';
  }

  ngOnInit() {
    this.orderService.getUserOrders().subscribe(response => {
      this.orders = response.map(object => new Order(object)).reverse();
    }, response => this.notificationService.showError(response));
  }
}


text:
BSLS_IDENT("$Id: $")

//@PURPOSE: Provide a container for managed attributes.
//
//@CLASSES:
//  ball::PredicateSet: a container for managed predicates
//
//@DEPRECATED: Use 'ball_managedattributeset' instead.
//
//@SEE_ALSO:
//
//@DESCRIPTION: This deprecated component defines 'ball::PredicateSet', a
// compatibility type alias to 'ball::ManagedAttributeSet'.

#include <balscm_version.h>

#include <ball_managedattributeset.h>

namespace BloombergLP {
namespace ball {

typedef ManagedAttributeSet PredicateSet;
    // !DEPRECATED!: Use 'ball::ManagedAttributeSet' instead.

}  // close package namespace
}  // close enterprise namespace

#endif

// ----------------------------------------------------------------------------
// Copyright 2020 Bloomberg Finance L.P.
//
// 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.
// ----------------------------- END-OF-FILE ----------------------------------


text:
package cn.fuyoushuo.fqbb.commonlib.utils;

import java.io.Serializable;

/**
 * 用于计算页面会话的时间
 * Created by QA on 2016/12/15.
 */

public class PageSession implements Serializable {

    //业务类型
    private int bizCode;

    private Long beginTime;

    private Long endTime;

    public boolean isUseable(){
        if(bizCode != 0 && beginTime != null && endTime != null && endTime > beginTime){
            return true;
        }else{
            return false;
        }
    }

    public PageSession(int bizCode) {
        this.bizCode = bizCode;
    }

    public Long getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Long beginTime) {
        this.beginTime = beginTime;
    }

    public Long getEndTime() {
        return endTime;
    }

    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }

    public int getBizCode() {
        return bizCode;
    }

    public void setBizCode(int bizCode) {
        this.bizCode = bizCode;
    }

    @Override
    public String toString() {
        return "PageSession{" +
                "beginTime=" + beginTime +
                ", bizCode=" + bizCode +
                ", endTime=" + endTime +
                '}';
    }
}


text:
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { Book } from '../book';
import { BookService } from '../book.service';

@Component({
    selector: 'book-create',
    templateUrl: 'book.create.component.html'
})

export class BookCreateComponent implements OnInit {

    constructor(private router: Router) {}

    ngOnInit(): void {
    }

    addBook() {

        this.router.navigate(['/book']);
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>

<!--

 Copyright 2003 - 2016 The eFaps Team

 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.

-->

<ui-command xmlns="http://www.efaps.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.efaps.org/xsd http://www.efaps.org/xsd/eFaps_1.0.xsd">
    <uuid>2b115d53-ad18-4888-abf1-17c77e4874b5</uuid>
    <file-application>eFapsApp-Sales</file-application>
    <definition>
        <version-expression>(version==latest)</version-expression>
        <name>Sales_DeliveryNoteMyDesk_Menu_Action_CreateFromDoc</name>
        <access>
            <role>Sales_Delivery</role>
            <role>Sales_Admin</role>
        </access>
        <target>
            <form>Sales_DeliveryNote_SelectDocForm</form>
            <trigger program="org.efaps.esjp.admin.access.AccessCheck4UI"
                method="configCheck"
                name="Sales_DeliveryNoteMyDesk_Menu_Action_CreateFromDoc.UI_ACCESSCHECK"
                event="UI_ACCESSCHECK">
                <!-- Sales-Configuration -->
                <property name="SystemConfig">c9a1cbc3-fd35-4463-80d2-412422a3802f</property>
                <property name="AttributeExists">org.efaps.sales.DeliveryNote.CreateFromReceiptAutoComplete</property>
                <property name="AttributeExists01">org.efaps.sales.DeliveryNote.CreateFromInvoiceAutoComplete</property>
           </trigger>
           <command>Sales_DeliveryNoteMyDesk_Menu_Action_CreateFromDoc2</command>
        </target>
        <property name="Target">modal</property>
        <property name="TargetMode">create</property>
        <property name="WindowHeight">660</property>
        <property name="WindowWidth">1200</property>
        <property name="TargetDefaultMenu">none</property>
        <property name="TargetCmdRevise">true</property>
    </definition>
</ui-command>


text:
balanced-citadel
================

Balanced-specific settings for the citadel cookbook


text:
@extends('layouts.jobs')
@section('content')

                {{-- <form class="form-signin" method="POST" action="/auth/login"> --}}
                <form class="form-signin" method="POST" action="/login">
                    {!! csrf_field() !!}

Please sign in

                    Email address
                    <input name="email" type="email" id="inputEmail" value="{{ old('email') }}" class="form-control" placeholder="Email address" required autofocus>
                    Password
                    <input name="password" type="password" id="inputPassword" class="form-control" placeholder="Password" required>

                            <input type="checkbox" name="remember" value="true"> Remember me

                        Forgot Password?

                    <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>

                </form>
               {{--  @if (count($errors) > 0)

                        Whoops! There were some problems with your input.

                            @foreach ($errors->all() as $error)

{{ $error }}

                            @endforeach

                @endif --}}

@endsection


text:
/**
 * @NAME: results.js
 * @DESCRIPTION: This script is used to retrieve our search results from our generated json file. This file along with
 * search.js, and set-query.js are used to give the site searching functionality.
 */
$(function(Query) {

	var query = new Query();
	var site = location.protocol + "//" + location.hostname;

	query
	.setFromURL('query')
	.getJSON('/posts.json')
	.done(function(data) {

		var searchIndex,
		results,
		$resultsCount = $('.search-results-count'),
		$results = $('.search-results'), // Div class where results will appear (in search.html)
		totalScore = 0,
		percentOfTotal;

		searchIndex = lunr(function() {
			// this.field('title');
			this.field('blurb');
			this.field('category');
			this.field('tags');
			this.field('content');
			this.ref('url');
			this.field('date');
		});

		// Add each item from posts.json to the index
		$.each(data, function(i, item){
			searchIndex.add(item);
		});

		// Search for the query and store the results as an array
		results = searchIndex.search(query.get());
		// console.log("Query results:");
		// console.log(results);

		// Add the fields of each post into each result (not standard in lunr.js)
		for(var result in results) {
			results[result].title = data.filter(function(post){
				return post.url === results[result].ref;
			})[0].title;

			results[result].category = data.filter(function(post){
				return post.url === results[result].ref;
			})[0].category;

			results[result].tags = data.filter(function(post){
				return post.url === results[result].ref;
			})[0].tags;

			results[result].date = data.filter(function(post){
				return post.url === results[result].ref;
			})[0].date;

			results[result].blurb = data.filter(function(post){
				return post.url === results[result].ref;
			})[0].blurb;
		}

		// Show how many results there were, in the DOM
		$resultsCount.append( results.length + (results.length === 1 ? ' result' : ' results') + ' for "' + query.get() + '"');

		if (results.length == 0) {
			// TODO: Will need to set this relative to what is availabe (ex. categories.)
			$results.append('

Hmm...no results found. How about searching through our How-to or Strategies categories instead?

');
		}
		else {
			// Get the total score of all items, so that we can divide each result into it, giving us a percentage.
			$.each(results, function(i, result){
				totalScore += result.score;
			});

			// Append each result link, with a border that corresponds to a color with a strength equal to its percentage of the total score
			$.each(results, function(i, result){
				percentOfTotal = result.score/totalScore;

				var title = result.title,
				blurb = result.blurb,
				category = result.category,
				tags = result.tags,
				url = result.ref,
				date = result.date;
				tagLinks = "";

				// Go through all tags associated with post
					for (var i = 0; i < tags.length; i++) {
						if ( i == tags.length - 1) {
							tagLinks += '' + tags[i] + '';
						}
						else {
							tagLinks += '' + tags[i] + ',';
						}
					}

				if (category === "How-to") {
					$results.append('

' + title + '

' + blurb + '

' + category + '

' + tagLinks + '

');
				}
				else if (category === 'Strategies') {
					$results.append('

' + title + '

' + blurb + '

' + category + '

' + tagLinks + '

');
				}
				else {
					$results.append('

' + title + '

' + blurb + '

' + category + '

' + tagLinks + '

');
				}
			});
		}
	});

}(Query));


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Revision du Genre Russula Persoon en Afrique Centrale (Gent), <b>II</b> Partie descriptive [partim a] 306 (1989)

#### Original name
Russula roseovelata Buyck

### Remarks
null


text:
To update some endpoint, you need to:

- modify the server side of API in [yProx](https://github.com/Yproximite/yProx);
- modify the client side (see an example [here](./creating_endpoint.md));
- update all projects using this client depending on case.

### What projects use the client?

![Data flow](./images/dependency_map.png)


text:
package com.cilogi.cart;

import java.util.List;

public interface IStoreDAO {
    List<ISku> getSkus();
    List<ISku> getSkus(Category category);
    ISku getSku(String id);
}


text:
<?php

namespace Heise\Shariff;

use Zend\Cache\Storage\Adapter\FilesystemOptions;
use Zend\Cache\Storage\ClearExpiredInterface;
use Zend\Cache\Storage\StorageInterface;
use Zend\Cache\StorageFactory;

/**
 * Implement ZendCache.
 */
class ZendCache implements CacheInterface
{
    /**
     * @var StorageInterface
     */
    protected $cache;

    /**
     * @param array $configuration
     *
     * @throws \Zend\Cache\Exception\InvalidArgumentException
     * @throws \Zend\Cache\Exception\RuntimeException
     */
    public function __construct(array $configuration)
    {
        if (!isset($configuration['adapter'])) {
            $configuration['adapter'] = 'Filesystem';
        }

        if (!isset($configuration['adapterOptions'])) {
            $configuration['adapterOptions'] = [];
        }

        $cache = StorageFactory::factory([
            'adapter' => [
                'name' => $configuration['adapter'],
                'options' => $configuration['adapterOptions'],
            ],
        ]);

        $options = $cache->getOptions();
        $options->setNamespace('Shariff');
        $options->setTtl($configuration['ttl']);

        if ($options instanceof FilesystemOptions) {
            $options->setCacheDir(isset($configuration['cacheDir']) ? $configuration['cacheDir'] : sys_get_temp_dir());
        }

        if ($cache instanceof ClearExpiredInterface) {
            $cache->clearExpired();
        }

        $this->cache = $cache;
    }

    /**
     * {@inheritdoc}
     */
    public function setItem($key, $content)
    {
        $this->cache->setItem($key, $content);
    }

    /**
     * {@inheritdoc}
     */
    public function getItem($key)
    {
        return $this->cache->getItem($key);
    }

    /**
     * {@inheritdoc}
     */
    public function hasItem($key)
    {
        return $this->cache->hasItem($key);
    }
}


text:
package org.ovirt.engine.core.bll;

import org.ovirt.engine.core.common.queries.*;

// not in use
public class GetTemplateMessagesQuery<P extends GetTemplateMessagesParameters> extends QueriesCommandBase<P> {
    public GetTemplateMessagesQuery(P parameters) {
        super(parameters);
    }

    @Override
    protected void executeQueryCommand() {
        // QueryReturnValue.ReturnValue =
        // ResourceManager.Instance.GetTemplateMessages((Parameters as
        // GetTemplateMessagesParameters).Id);
    }
}


text:
package com.jf.djplayer.bean;

import java.io.Serializable;

/**
 * Created by Kingfar on 2017/10/18.
 * 本地音乐-"文件夹"对象
 */

public class Folder implements Serializable{

    private String name;    // 名字
    private int songNumber; // 对应的歌曲数量

    public Folder(){

    }

    public Folder(String name, int songNumber) {
        this.name = name;
        this.songNumber = songNumber;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSongNumber() {
        return songNumber;
    }

    public void setSongNumber(int songNumber) {
        this.songNumber = songNumber;
    }
}


text:
/**
 * @author Alexander T. Simbirtsev
 */
package javax.swing;

import java.awt.event.ActionEvent;
import javax.accessibility.AccessibleRole;
import javax.swing.JToggleButton.ToggleButtonModel;

public class JRadioButtonMenuItemTest extends JMenuItemTest {
    @Override
    protected void setUp() throws Exception {
        super.setUp();
        menuItem = new JRadioButtonMenuItem();
        button = menuItem;
    }

    @Override
    protected void tearDown() throws Exception {
        super.tearDown();
    }

    /*
     * Test method for 'javax.swing.JRadioButtonMenuItem.JRadioButtonMenuItem()'
     */
    public void testJRadioButtonMenuItem() {
        assertFalse(menuItem.isSelected());
        assertTrue("default buttonModel ", button.getModel() instanceof ToggleButtonModel);
        assertNull("icon ", button.getIcon());
        assertEquals("text ", "", button.getText());
        assertFalse("default FocusPainted", menuItem.isFocusPainted());
        assertEquals(SwingConstants.LEADING, button.getHorizontalAlignment());
        assertEquals(SwingConstants.TRAILING, button.getHorizontalTextPosition());
        assertEquals(SwingConstants.CENTER, button.getVerticalAlignment());
        assertEquals(SwingConstants.CENTER, button.getVerticalTextPosition());
    }

    /*
     * Test method for 'javax.swing.JRadioButtonMenuItem.JRadioButtonMenuItem(Icon)'
     */
    public void testJRadioButtonMenuItemIcon() {
        Icon icon = createNewIcon();
        menuItem = new JRadioButtonMenuItem(icon);
        assertTrue("default buttonModel ", button.getModel() instanceof ToggleButtonModel);
        assertEquals("icon ", icon, menuItem.getIcon());
        assertEquals("text ", "", menuItem.getText());
        assertFalse("default FocusPainted", menuItem.isFocusPainted());
        assertEquals(SwingConstants.LEADING, button.getHorizontalAlignment());
        assertEquals(SwingConstants.TRAILING, button.getHorizontalTextPosition());
        assertEquals(SwingConstants.CENTER, button.getVerticalAlignment());
        assertEquals(SwingConstants.CENTER, button.getVerticalTextPosition());
    }

    /*
     * Test method for 'javax.swing.JRadioButtonMenuItem.JRadioButtonMenuItem(String)'
     */
    public void testJRadioButtonMenuItemString() {
        String text = "texttext";
        menuItem = new JRadioButtonMenuItem(text);
        assertFalse(menuItem.isSelected());
        assertTrue("default buttonModel ", button.getModel() instanceof ToggleButtonModel);
        assertNull("icon ", menuItem.getIcon());
        assertEquals("text ", text, menuItem.getText());
        assertEquals(SwingConstants.LEADING, button.getHorizontalAlignment());
        assertEquals(SwingConstants.TRAILING, button.getHorizontalTextPosition());
        assertEquals(SwingConstants.CENTER, button.getVerticalAlignment());
        assertEquals(SwingConstants.CENTER, button.getVerticalTextPosition());
    }

    /*
     * Test method for 'javax.swing.JRadioButtonMenuItem.JRadioButtonMenuItem(String, Icon)'
     */
    public void testJRadioButtonMenuItemStringIcon() {
        Icon icon = createNewIcon();
        String text = "texttext";
        menuItem = new JRadioButtonMenuItem(text, icon);
        assertFalse(menuItem.isSelected());
        assertTrue("default buttonModel ", button.getModel() instanceof ToggleButtonModel);
        assertEquals("icon ", icon, menuItem.getIcon());
        assertEquals("text ", text, menuItem.getText());
        assertFalse("default FocusPainted", menuItem.isFocusPainted());
        assertEquals(SwingConstants.LEADING, button.getHorizontalAlignment());
        assertEquals(SwingConstants.TRAILING, button.getHorizontalTextPosition());
        assertEquals(SwingConstants.CENTER, button.getVerticalAlignment());
        assertEquals(SwingConstants.CENTER, button.getVerticalTextPosition());
    }

    /*
     * Test method for 'javax.swing.JRadioButtonMenuItem.JRadioButtonMenuItem(Action)'
     */
    public void testJRadioButtonMenuItemAction() {
        final String command = "dnammoc";
        final KeyStroke accelerator = KeyStroke.getKeyStroke('a');
        class MyAction extends AbstractAction {
            private static final long serialVersionUID = 1L;

            public MyAction(final String text, final Icon icon) {
                super(text, icon);
                putValue(Action.ACTION_COMMAND_KEY, command);
                putValue(Action.ACCELERATOR_KEY, accelerator);
            }

            public void actionPerformed(final ActionEvent e) {
            }
        }
        ;
        Icon icon = createNewIcon();
        String text = "texttext";
        MyAction action = new MyAction(text, icon);
        menuItem = new JRadioButtonMenuItem(action);
        assertFalse(menuItem.isSelected());
        assertEquals("icon ", icon, menuItem.getIcon());
        assertEquals("text ", text, menuItem.getText());
        assertEquals("action", action, menuItem.getAction());
        assertEquals("command ", command, menuItem.getActionCommand());
        assertFalse("selected ", menuItem.isSelected());
        assertTrue("enabled ", menuItem.isEnabled());
        assertEquals("accelerator ", accelerator, menuItem.getAccelerator());
        action.setEnabled(false);
        menuItem = new JRadioButtonMenuItem(action);
        assertEquals("icon ", icon, menuItem.getIcon());
        assertEquals("text ", text, menuItem.getText());
        assertEquals("action", action, menuItem.getAction());
        assertEquals("command ", command, menuItem.getActionCommand());
        assertFalse("selected ", menuItem.isSelected());
        assertFalse("enabled ", menuItem.isEnabled());
        assertFalse("default FocusPainted", menuItem.isFocusPainted());
        menuItem = new JRadioButtonMenuItem((Action) null);
        assertNull("icon ", menuItem.getIcon());
        assertNull("text ", menuItem.getText());
        assertNull("action", menuItem.getAction());
        assertNull("command ", menuItem.getActionCommand());
        assertFalse("selected ", menuItem.isSelected());
        assertTrue("enabled ", menuItem.isEnabled());
        assertTrue("default buttonModel ", button.getModel() instanceof ToggleButtonModel);
        assertEquals(SwingConstants.LEADING, button.getHorizontalAlignment());
        assertEquals(SwingConstants.TRAILING, button.getHorizontalTextPosition());
        assertEquals(SwingConstants.CENTER, button.getVerticalAlignment());
        assertEquals(SwingConstants.CENTER, button.getVerticalTextPosition());
    }

    /*
     * Test method for 'javax.swing.JRadioButtonMenuItem.JRadioButtonMenuItem(Icon, boolean)'
     */
    public void testJRadioButtonMenuItemIconBoolean() {
        Icon icon = createNewIcon();
        menuItem = new JRadioButtonMenuItem(icon, true);
        assertTrue("default buttonModel ", button.getModel() instanceof ToggleButtonModel);
        assertEquals("icon ", icon, menuItem.getIcon());
        assertEquals("text ", "", menuItem.getText());
        assertFalse("default FocusPainted", menuItem.isFocusPainted());
        assertTrue(menuItem.isSelected());
        assertEquals(SwingConstants.LEADING, button.getHorizontalAlignment());
        assertEquals(SwingConstants.TRAILING, button.getHorizontalTextPosition());
        assertEquals(SwingConstants.CENTER, button.getVerticalAlignment());
        assertEquals(SwingConstants.CENTER, button.getVerticalTextPosition());
        menuItem = new JRadioButtonMenuItem(icon, false);
        assertFalse(menuItem.isSelected());
    }

    /*
     * Test method for 'javax.swing.JRadioButtonMenuItem.JRadioButtonMenuItem(String, Icon, boolean)'
     */
    public void testJRadioButtonMenuItemStringIconBoolean() {
        Icon icon = createNewIcon();
        String text = "texttext";
        menuItem = new JRadioButtonMenuItem(text, icon, true);
        assertTrue("default buttonModel ", button.getModel() instanceof ToggleButtonModel);
        assertEquals("icon ", icon, menuItem.getIcon());
        assertEquals("text ", text, menuItem.getText());
        assertFalse("default FocusPainted", menuItem.isFocusPainted());
        assertTrue(menuItem.isSelected());
        assertEquals(SwingConstants.LEADING, button.getHorizontalAlignment());
        assertEquals(SwingConstants.TRAILING, button.getHorizontalTextPosition());
        assertEquals(SwingConstants.CENTER, button.getVerticalAlignment());
        assertEquals(SwingConstants.CENTER, button.getVerticalTextPosition());
        menuItem = new JRadioButtonMenuItem(text, icon, false);
        assertFalse(menuItem.isSelected());
    }

    /*
     * Test method for 'javax.swing.JRadioButtonMenuItem.getAccessibleContext()'
     */
    @Override
    public void testGetAccessibleContext() {
        boolean assertedValue = (menuItem.getAccessibleContext() != null && menuItem
                .getAccessibleContext().getClass().getName().equals(
                        "javax.swing.JRadioButtonMenuItem$AccessibleJRadioButtonMenuItem"));
        assertTrue("AccessibleContext created properly ", assertedValue);
        assertEquals("AccessibleRole", AccessibleRole.RADIO_BUTTON, menuItem
                .getAccessibleContext().getAccessibleRole());
    }

    /*
     * Test method for 'javax.swing.JRadioButtonMenuItem.getUIClassID()'
     */
    @Override
    public void testGetUIClassID() {
        assertEquals("RadioButtonMenuItemUI", menuItem.getUIClassID());
    }
}


text:
<?php
namespace Christiaan\ZohoCRMClient\Response;

use Christiaan\ZohoCRMClient\ZohoError;
use DateTime;

/**
 * MutationResult the result of either a insert or update
 */
class MutationResult
{
    /** @var ZohoError */
    private $error;
    /** @var int */
    private $index;
    /** @var string */
    private $code;
    /** @var int */
    private $id;
    /** @var DateTime */
    private $createdTime;
    /** @var DateTime */
    private $modifiedTime;
    /** @var string */
    private $createdBy;
    /** @var string */
    private $modifiedBy;

    /**
     * @param int $index
     * @param string $code
     */
    public function __construct($index, $code)
    {
        $this->index = $index;
        $this->code = $code;
    }

    /**
     * @return int
     */
    public function getIndex()
    {
        return $this->index;
    }

    /**
     * @return string
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * @return bool
     */
    public function isInserted()
    {
        return $this->code == '2000';
    }

    /**
     * @return bool
     */
    public function isUpdated()
    {
        return $this->code == '2001';
    }

    /**
     * @return bool
     */
    public function isDuplicate()
    {
        return $this->code == '2002';
    }

    /**
     * @param ZohoError $error
     * @return MutationResult
     */
    public function setError(ZohoError $error)
    {
        $this->error = $error;
        return $this;
    }

    /**
     * @return ZohoError|void
     */
    public function getError()
    {
        return $this->error;
    }

    /**
     * @return bool
     */
    public function isError()
    {
        return $this->error instanceof ZohoError;
    }

    /**
     * @param int $id
     * @return MutationResult self
     */
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * @param \DateTime $createdTime
     * @return MutationResult self
     */
    public function setCreatedTime($createdTime)
    {
        $this->createdTime = $createdTime;
        return $this;
    }

    /**
     * @return \DateTime
     */
    public function getCreatedTime()
    {
        return $this->createdTime;
    }

    /**
     * @param \DateTime $modifiedTime
     * @return MutationResult self
     */
    public function setModifiedTime($modifiedTime)
    {
        $this->modifiedTime = $modifiedTime;
        return $this;
    }

    /**
     * @return \DateTime
     */
    public function getModifiedTime()
    {
        return $this->modifiedTime;
    }

    /**
     * @param string $createdBy
     * @return MutationResult self
     */
    public function setCreatedBy($createdBy)
    {
        $this->createdBy = $createdBy;
        return $this;
    }

    /**
     * @return string
     */
    public function getCreatedBy()
    {
        return $this->createdBy;
    }

    /**
     * @param string $modifiedBy
     * @return MutationResult self
     */
    public function setModifiedBy($modifiedBy)
    {
        $this->modifiedBy = $modifiedBy;
        return $this;
    }

    /**
     * @return string
     */
    public function getModifiedBy()
    {
        return $this->modifiedBy;
    }
}


text:
package de.naoth.rc.dialogsFx.multiagentconfiguration.ui;

import de.naoth.rc.dialogsFx.multiagentconfiguration.Parameter;
import javafx.scene.control.TextField;
import javafx.scene.control.cell.TextFieldTreeTableCell;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.util.converter.DefaultStringConverter;

/**
 *
 * @author Philipp Strobel <philippstrobel@posteo.de>
 */
public class ParameterTreeTableCell extends TextFieldTreeTableCell<Parameter, String>
{
    public ParameterTreeTableCell() {
        setConverter(new DefaultStringConverter());
    }

    @Override
    public void startEdit() {
        if(tableRowProperty().getValue().getTreeItem().isLeaf()) {
            super.startEdit();
            installTabKeyHandler();
        }
    }

    /**
     * Installs a key listener on the textfield of the editing cell.
     * The key listener handles the tab key and jumps to the next/previous cell in editing state.
     */
    private void installTabKeyHandler() {
        if(getGraphic() instanceof TextField) {
            TextField f = (TextField) getGraphic();
            f.setOnKeyPressed((event) -> {
                if(event.getCode() == KeyCode.TAB) {
                    // commit value
                    commitEdit(f.getText());
                    // go to next/previous cell
                    if(event.isShiftDown()) {
                        getTreeTableView().getSelectionModel().selectAboveCell();
                    } else {
                        getTreeTableView().getSelectionModel().selectBelowCell();
                    }
                    // got into editing state
                    getTreeTableView().edit(getTreeTableView().getSelectionModel().getSelectedCells().get(0).getRow(), getTableColumn());
                    // consume tab key event
                    event.consume();
                }
            });
        }
    }
}


text:
package com.jmb.springfactory.dao.group;

import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import com.jmb.springfactory.model.entity.WorkGroup;

@Repository
public interface GroupRepository extends JpaRepository<WorkGroup, Integer> {

}