text:
require 'erb'
require 'fileutils'
require 'json'

module Selenium
  module WebDriver
    module Support
      class CDPClientGenerator
        # Input JSON files are generated from PDL tasks.
        TEMPLATE_PATH = File.expand_path('cdp/domain.rb.erb', __dir__)

        RESERVED_KEYWORDS = %w[end].freeze

        def call(output_dir:, version:, browser_protocol_path: nil, js_protocol_path: nil, loader_path: nil, **)
          @template = ERB.new(File.read(TEMPLATE_PATH))
          @output_dir = output_dir
          @loader_path = loader_path || "#{@output_dir}.rb"
          @version = version

          browser_protocol_path ||= File.expand_path('cdp/browser_protocol.json', __dir__)
          js_protocol_path ||= File.expand_path('cdp/js_protocol.json', __dir__)

          browser_protocol = JSON.parse(File.read(browser_protocol_path), symbolize_names: true)
          js_protocol = JSON.parse(File.read(js_protocol_path), symbolize_names: true)

          FileUtils.mkdir_p(@output_dir)

          browser_protocol[:domains].each { |domain| process_domain(domain) }
          js_protocol[:domains].each { |domain| process_domain(domain) }
          require_file
        end

        def process_domain(domain)
          result = @template.result_with_hash(domain: domain, version: @version.upcase, h: self)
          filename = File.join(@output_dir, "#{snake_case(domain[:domain])}.rb")
          File.write(filename, remove_empty_lines(result))
        end

        def snake_case(string)
          name = string.gsub('JavaScript', 'Javascript')
                       .gsub(/([A-Z]+)([A-Z][a-z]{2,})/, '\1_\2')
                       .gsub(/([a-z\d])([A-Z])/, '\1_\2')
                       .downcase
          # Certain CDP parameters conflict with Ruby keywords
          # so we prefix the name with underscore.
          name = "_#{name}" if RESERVED_KEYWORDS.include?(name)

          name
        end

        def kwargs(parameters)
          parameters = parameters.map do |parameter|
            if parameter[:optional]
              "#{snake_case(parameter[:name])}: nil"
            else
              "#{snake_case(parameter[:name])}:"
            end
          end
          parameters.join(', ')
        end

        def remove_empty_lines(string)
          string.split("\n").grep_v(/^\s+$/).join("\n")
        end

        def require_file
          # rubocop:disable Lint/InterpolationCheck
          dynamic_location = '#{File.dirname(File.absolute_path(__FILE__))}'
          # rubocop:enable Lint/InterpolationCheck

          require_all = "Dir.glob(\"#{dynamic_location}/#{@version}/*\", &method(:require))"
          File.write(@loader_path, require_all)
        end
      end
    end
  end
end

if $PROGRAM_NAME == __FILE__
  browser_protocol_path, js_protocol_path, output_dir, loader_path, version = *ARGV

  Selenium::WebDriver::Support::CDPClientGenerator.new.call(
    browser_protocol_path: browser_protocol_path,
    js_protocol_path: js_protocol_path,
    output_dir: output_dir,
    loader_path: loader_path,
    version: version
  )
end


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Indian Phytopath. , Suppl. Issue 24(1): 212 (1971)

#### Original name
Pestalotia jodhpurensis Bilgrami & Purohit

### Remarks
null

redpajama_set_name: RedPajamaGithub


text:
;(function ($) {
    'use strict';
    var $body = $('html, body'),
        $main = $('#main'),
        options = {
            prefetch: false,
            pageCacheSize: 4,
            onStart: {
                duration: 0,
                render: function (url, $container) {
                    //$body.animate({
                    //    scrollTop: 0
                    //});
                    $main.addClass('is-exiting');
                    smoothState.restartCSSAnimations();
                    NProgress.start();
                }
            },
            onEnd: {
                duration: 0,
                render: function (url, $container, $content) {
                    $main.removeClass('is-exiting');
                    $main.html($content);
                    $body.css('cursor', 'auto');
                    $body.find('a').css('cursor', 'auto');
                  simpleCart.initialize();
                  NProgress.done();
                  if ($('#multizoom1').length)
                  {
                    $('#multizoom1').addimagezoom({ // multi-zoom: options same as for previous Featured Image Zoomer's addimagezoom unless noted as '- new'
                      //descArea: '#description', // description selector (optional - but required if descriptions are used) - new
                      speed: 0, // duration of fade in for new zoomable images (in milliseconds, optional) - new
                      //descpos: true, // if set to true - description position follows image position at a set distance, defaults to false (optional) - new
                      imagevertcenter: true, // zoomable image centers vertically in its container (optional) - new
                      magvertcenter: true, // magnified area centers vertically in relation to the zoomable image (optional) - new
                      zoomrange: [5, 10],
                      magnifiersize: [450,450],
                      magnifierpos: 'right',
                      cursorshadecolor: '#fdffd5',
                      cursorshade: true //<-- No comma after last option!
                    });

                  }
                  else {
                    $(".zoomtracker").remove();
                    $(".zoomstatus").remove();
                    $(".cursorshade").remove();
                    $(".magnifyarea").remove();
                  }

                  if ($('#lightbox').length) {
                    $('#lightbox a').slimbox();
                    console.log("slimbox initial");
                  }
                }
            }
        },
        smoothState = $main.smoothState(options).data('smoothState');
})(jQuery);


text:
title: MEU Lisbon 2019
slug: meu-lisbon-2019
conference: meu-lisbon
year: 2019
begin: 2019-10-15
end: 2019-10-20
mail: meulisbon@portugal.beta-europe.org
website: portugal.beta-europe.org
country: Portugal
town: Lisbon
participants: 100-125
geo: '38.71667,-9.13333'
excerpt: '- Election of the President of the European Commission'
---
MEU Lisbon is back for season 2! BETA Portugal is happy to announce that MEU Lisbon 2019 will take place from 15 to 20 OCTOBER in the beautiful capital of Portugal

Topics:

1. Election of the President of the European Commission
2.

3.


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

<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title></title>
<link rel="stylesheet" href="../fpdoc.css" type="text/css">

Create (TBCryptHash)

CreateHash (TBCryptHash)

Destroy (TBCryptHash)

HashGetInfo (TBCryptHash)

NeedsRehash (TBCryptHash)

VerifyHash (TBCryptHash)


text:
function setParameters(tr, type, k, p)
% SETPARAMETERS  Set the parameters.
% setParameters(tr, type, k, p)
% Set parameters of the :mat:func:`Transport` instance.
% Not defined for all transport types.
%
% :param tr:
%     Instance of class :mat:func:`Transport` (or another
%     object derived from Transport)
% :param type:
% :param k:
% :param p:
%

v = trans_get(tr.id, 31, type, k, p);


text:
package org.onedatashare.server.controller;

import org.onedatashare.server.model.core.Job;
import org.onedatashare.server.model.core.JobDetails;
import org.onedatashare.server.model.jobaction.JobRequest;
import org.onedatashare.server.model.jobaction.SearchRequest;
import org.onedatashare.server.service.JobService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.util.List;
import java.util.UUID;

/**
 * Controller for handling GET requests from queue page
 */
@RestController
@RequestMapping("/api/stork/q")
public class QueueController {

    @Autowired
    private JobService jobService;

    /**
     * Handler for queue GET requests
     * @param jobDetails - Request data needed for fetching Jobs
     * @return Mono\<JobDetails\>
     */
    @PostMapping("/user-jobs")
    public Mono<JobDetails> getJobsForUser(@RequestBody JobRequest jobDetails){
        return jobService.getJobsForUser(jobDetails);
    }

    /**
     * Handler for queue GET requests
     * @param jobDetails - Request data needed for fetching Jobs
     * @return Mono\<JobDetails\>
     */
    @PostMapping("/admin-jobs")
    @PreAuthorize("hasAuthority('ADMIN')")
    public Mono<JobDetails> getJobsForAdmin(@RequestBody JobRequest jobDetails){
        return jobService.getJobForAdmin(jobDetails);
    }

    /**
     * Handler for queue GET requests
     * @param jobDetails - Request data needed for fetching Jobs as per search
     * @return Mono\<JobDetails\>
     */
    @PostMapping("/search-jobs")
    @PreAuthorize("hasAuthority('ADMIN')")
    public Mono<JobDetails> getSearchJobs(@RequestBody SearchRequest jobDetails){
        return jobService.getSearchJobs(jobDetails);
    }

    //TODO: change the function to use query instead of using filter (might make it faster)
    @PostMapping("/update-user-jobs")
    public Mono<List<Job>> updateJobsForUser(@RequestBody List<UUID> jobIds) {
        return jobService.getUpdatesForUser(jobIds);
    }

    @PostMapping("/update-admin-jobs")
    @PreAuthorize("hasAuthority('ADMIN')")
    public Flux<Job> updateJobsForAdmin(@RequestBody List<UUID> jobIds) {
        return jobService.getUpdatesForAdmin(jobIds);
    }

}


text:
static void * reachabilityObserving = &reachabilityObserving;

@interface KVOListener : UIView
@end

@implementation KVOListener

- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
    if (context == reachabilityObserving) {
        TFFReachabilityKVO *reachability = object;
        [self observedReachabilityStatus:reachability.reachabilityStatus];
    } else {
        [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
    }
}

- (void)observedReachabilityStatus:(TFFReachabilityStatus)status {
    self.layer.borderColor = status == TFFReachabilityStatusReachable ? [UIColor colorWithRed:0 green:0.8 blue:0 alpha:1].CGColor : [UIColor redColor].CGColor;

    CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"borderWidth"];
    animation.repeatCount = 3;
    animation.autoreverses = YES;
    animation.fromValue = @(0);
    animation.toValue = @(6);
    [self.layer addAnimation:animation forKey:@"borderWidth"];
}

@end

#pragma mark -

@interface TFFKVOViewController ()
@property (nonatomic, weak) IBOutlet KVOListener *observingView1;
@property (nonatomic, weak) IBOutlet KVOListener *observingView2;
@property (nonatomic, weak) IBOutlet KVOListener *observingView3;
@property (nonatomic) TFFReachabilityKVO *reachability;
@end

@implementation TFFKVOViewController

- (void)viewDidLoad
{
    [super viewDidLoad];

    self.reachability = [[TFFReachabilityKVO alloc] init];

    [self.reachability addObserver:self.observingView1
                        forKeyPath:@"reachabilityStatus"
                           options:NSKeyValueObservingOptionOld|NSKeyValueObservingOptionNew
                           context:reachabilityObserving];
    [self.reachability addObserver:self.observingView2
                        forKeyPath:@"reachabilityStatus"
                           options:NSKeyValueObservingOptionOld|NSKeyValueObservingOptionNew
                           context:reachabilityObserving];
    [self.reachability addObserver:self.observingView3
                        forKeyPath:@"reachabilityStatus"
                           options:NSKeyValueObservingOptionOld|NSKeyValueObservingOptionNew
                           context:reachabilityObserving];
}

- (void)dealloc {
    [self.reachability removeObserver:self.observingView1 forKeyPath:@"reachabilityStatus"];
    [self.reachability removeObserver:self.observingView2 forKeyPath:@"reachabilityStatus"];
    [self.reachability removeObserver:self.observingView3 forKeyPath:@"reachabilityStatus"];
    [self.reachability stopMonitoring];
}

- (IBAction)startMonitoring:(id)sender {
    [self.reachability startMonitoring];
}

@end


text:
Highly WIP

Should build on Windows and Linux

Stolen from the 64drive [Support Page](http://64drive.retroactive.be/support.php)


text:
/*
 * $Id: ExcC14NParameterSpec.java,v 1.7 2005/05/13 18:45:42 mullan Exp $
 */
package javax.xml.crypto.dsig.spec;

import javax.xml.crypto.dsig.CanonicalizationMethod;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * Parameters for the W3C Recommendation:
 *
 * Exclusive XML Canonicalization (C14N) algorithm. The
 * parameters include an optional inclusive namespace prefix list. The XML
 * Schema Definition of the Exclusive XML Canonicalization parameters is
 * defined as:
 *

 * <schema xmlns="http://www.w3.org/2001/XMLSchema"
 *         xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"
 *         targetNamespace="http://www.w3.org/2001/10/xml-exc-c14n#"
 *         version="0.1" elementFormDefault="qualified">
 *
 * <element name="InclusiveNamespaces" type="ec:InclusiveNamespaces"/>
 * <complexType name="InclusiveNamespaces">
 *   <attribute name="PrefixList" type="xsd:string"/>
 * </complexType>
 * </schema>
 *

 *
 * @author Sean Mullan
 * @author JSR 105 Expert Group
 * @since 1.6
 * @see CanonicalizationMethod
 */
public final class ExcC14NParameterSpec implements C14NMethodParameterSpec {

    private List<String> preList;

    /**
     * Indicates the default namespace ("#default").
     */
    public static final String DEFAULT = "#default";

    /**
     * Creates a ExcC14NParameterSpec with an empty prefix
     * list.
     */
    public ExcC14NParameterSpec() {
        preList = Collections.emptyList();
    }

    /**
     * Creates a ExcC14NParameterSpec with the specified list
     * of prefixes. The list is copied to protect against subsequent
     * modification.
     *
     * @param prefixList the inclusive namespace prefix list. Each entry in
     *    the list is a String that represents a namespace prefix.
     * @throws NullPointerException if prefixList is
     *    null
     * @throws ClassCastException if any of the entries in the list are not
     *    of type String
     */
    @SuppressWarnings("rawtypes")
    public ExcC14NParameterSpec(List prefixList) {
        if (prefixList == null) {
            throw new NullPointerException("prefixList cannot be null");
        }
        List<?> copy = new ArrayList<>((List<?>)prefixList);
        for (int i = 0, size = copy.size(); i < size; i++) {
            if (!(copy.get(i) instanceof String)) {
                throw new ClassCastException("not a String");
            }
        }

        @SuppressWarnings("unchecked")
        List<String> temp = (List<String>)copy;

        preList = Collections.unmodifiableList(temp);
    }

    /**
     * Returns the inclusive namespace prefix list. Each entry in the list
     * is a String that represents a namespace prefix.
     *
     *
This implementation returns an {@link
     * java.util.Collections#unmodifiableList unmodifiable list}.
     *
     * @return the inclusive namespace prefix list (may be empty but never
     *    null)
     */
    @SuppressWarnings("rawtypes")
    public List getPrefixList() {
        return preList;
    }
}


text: No questions found in selected topics


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Infestation
{
    class Queen : Unit
    {
        public Queen(string name)
            : base(name, UnitClassification.Psionic, 30, 1, 1)
        {
        }

        protected override bool CanAttackUnit(UnitInfo unit)
        {
            bool attackUnit = false;
            if (this.Id != unit.Id)
            {
                attackUnit = true;
            }
            return attackUnit;
        }

        public override Interaction DecideInteraction(IEnumerable<UnitInfo> units)
        {
            IEnumerable<UnitInfo> attackableUnits = units.Where((unit) => this.CanAttackUnit(unit));

            UnitInfo optimalAttackableUnit = GetOptimalAttackableUnit(attackableUnits);

            if (optimalAttackableUnit.Id != null)
            {
                return new Interaction(new UnitInfo(this), optimalAttackableUnit, InteractionType.Infest);
            }

            return Interaction.PassiveInteraction;
        }

        public override void AddSupplement(ISupplement newSupplement)
        {
            base.AddSupplement(newSupplement);
        }

        protected override UnitInfo GetOptimalAttackableUnit(IEnumerable<UnitInfo> attackableUnits)
        {
            var res = attackableUnits.OrderBy(x => x.Health).LastOrDefault<UnitInfo>();
            return res;
        }
    }
}


text:
require "cosvon"
require "tapp"
RSpec.configure do |config|
end


text:
from flask import current_app
from flask_appbuilder import ModelView, IndexView
from flask_appbuilder.models.sqla.interface import SQLAInterface

from .models import Contact, ContactGroup, Gender

def fill_gender():
    try:
        current_app.appbuilder.session.add(Gender(name="Male"))
        current_app.appbuilder.session.add(Gender(name="Female"))
        current_app.appbuilder.session.commit()
    except Exception:
        current_app.appbuilder.session.rollback()

class ContactModelView(ModelView):
    datamodel = SQLAInterface(Contact)

    label_columns = {"contact_group": "Contacts Group"}
    list_columns = ["name", "personal_celphone", "birthday", "contact_group.name"]

    base_order = ("name", "asc")

    show_fieldsets = [
        ("Summary", {"fields": ["name", "gender", "contact_group"]}),
        (
            "Personal Info",
            {
                "fields": [
                    "address",
                    "birthday",
                    "personal_phone",
                    "personal_celphone",
                ],
                "expanded": False,
            },
        ),
    ]

    add_fieldsets = [
        ("Summary", {"fields": ["name", "gender", "contact_group"]}),
        (
            "Personal Info",
            {
                "fields": [
                    "address",
                    "birthday",
                    "personal_phone",
                    "personal_celphone",
                ],
                "expanded": False,
            },
        ),
    ]

    edit_fieldsets = [
        ("Summary", {"fields": ["name", "gender", "contact_group"]}),
        (
            "Personal Info",
            {
                "fields": [
                    "address",
                    "birthday",
                    "personal_phone",
                    "personal_celphone",
                ],
                "expanded": False,
            },
        ),
    ]

class GroupModelView(ModelView):
    datamodel = SQLAInterface(ContactGroup)
    related_views = [ContactModelView]

class MyIndexView(IndexView):
    index_template = "my_index.html"


text:
Pique
---
prototype of an application that allows users to ask questions to each other with realtime results using Socket.IO


text:
class PoBoxOption < ActiveRecord::Base
end


text:
/* The following macros should be provided by the including file:

   DEFHOOK(NAME, DOC, TYPE, PARAMS, INIT): Define a function-valued hook.
   DEFHOOKPOD(NAME, DOC, TYPE, INIT): Define a piece-of-data 'hook'.  */

/* Defaults for optional macros:
   DEFHOOKPODX(NAME, TYPE, INIT): Like DEFHOOKPOD, but share documentation
   with the previous 'hook'.  */
#ifndef DEFHOOKPODX
#define DEFHOOKPODX(NAME, TYPE, INIT) DEFHOOKPOD (NAME, 0, TYPE, INIT)
#endif

/* HOOKSTRUCT(FRAGMENT): Declarator fragments to encapsulate all the
   members into a struct gcc_target, which in turn contains several
   sub-structs.  */
#ifndef HOOKSTRUCT
#define HOOKSTRUCT(FRAGMENT)
#endif
/* HOOK_VECTOR: Start a struct declaration, which then gets its own initializer.
   HOOK_VECTOR_END: Close a struct declaration, providing a member declarator
                    name for nested use.  */
#ifndef HOOK_VECTOR_1
#define HOOK_VECTOR_1(NAME, FRAGMENT) HOOKSTRUCT (FRAGMENT)
#endif
#define HOOK_VECTOR(INIT_NAME, SNAME) HOOK_VECTOR_1 (INIT_NAME, struct SNAME {)
#define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)

/* FIXME: For pre-existing hooks, we can't place the documentation in the
   documentation field here till we get permission from the FSF to include
   it in GPLed software - the target hook documentation is so far only
   available under the GFDL.  */

/* A hook should generally be documented by a string in the DOC parameter,
   which should contain texinfo markup.  If the documentation is only available
   under the GPL, but not under the GFDL, put it in a comment above the hook
   definition.  If the function declaration is available both under GPL and
   GFDL, but the documentation is only available under the GFDL, put the
   documentaton in tm.texi.in, heading with @hook <hookname> and closing
   the paragraph with @end deftypefn / deftypevr as appropriate, and marking
   the next autogenerated hook with @hook <hookname>.
   In both these cases, leave the DOC string empty, i.e. "".
   Sometimes, for some historic reason the function declaration
   has to be documented differently
   than what it is.  In that case, use DEFHOOK_UNDOC to suppress auto-generation
   of documentation.  DEFHOOK_UNDOC takes a DOC string which it ignores, so
   you can put GPLed documentation string there if you have hopes that you
   can clear the declaration & documentation for GFDL distribution later,
   in which case you can then simply change the DEFHOOK_UNDOC to DEFHOOK
   to turn on the autogeneration of the documentation.

    A documentation string of "*" means not to emit any documentation at all,
   and is mainly used internally for DEFHOOK_UNDOC.  It should generally not
   be used otherwise, but it has its use for exceptional cases where automatic
   documentation is not wanted, and the real documentation is elsewere, like
   for TARGET_ASM_{,UN}ALIGNED_INT_OP, which are hooks only for implementation
   purposes; they refer to structs, the components of which are documented as
   separate hooks TARGET_ASM_{,UN}ALIGNED_[HSDT]I_OP.
   A DOC string of 0 is for internal use of DEFHOOKPODX and special table
   entries only.  */

/* Empty macro arguments are undefined in C90, so use an empty macro
   to close top-level hook structures.  */
#define C90_EMPTY_HACK


text:
module Capistrano
  module MB
    module DSL

      # Invoke the given task. If a task with that name is not defined,
      # silently skip it.
      #
      def invoke_if_defined(task)
        invoke(task) if Rake::Task.task_defined?(task)
      end

      # Used internally by capistrano-mb to register tasks such that
      # those tasks are executed conditionally based on the presence of the
      # recipe name in fetch(:mb_recipes).
      #
      #   mb_recipe :aptitude do
      #     during :provision, %w(task1 task2 ...)
      #   end
      #
      def mb_recipe(recipe_name, &block)
        Recipe.new(recipe_name).instance_exec(&block)
      end

      def compatibility_warning(warning)
        warning = "WARNING: #{warning}"
        warning = warning.colorize(:red) if $stderr.tty?
        $stderr.puts(warning)
      end

      # Helper for calling fetch(:application) and making the value safe for
      # using in filenames, usernames, etc. Replaces non-word characters with
      # underscores.
      #
      def application_basename
        fetch(:application).to_s.gsub(/[^a-zA-Z0-9_]/, "_")
      end

      # Prints a question and returns truthy if the user answers "y" or "yes".
      def agree(yes_or_no_question)
        $stdout.print(yes_or_no_question)
        $stdin.gets.to_s =~ /^y(es)?/i
      end

      # Like capistrano's built-in on(), but connects to the server as root.
      # To use a user other than root, set :mb_privileged_user or
      # specify :privileged_user as a server property.
      #
      #   task :reboot do
      #     privileged_on roles(:all) do
      #       execute :shutdown, "-r", "now"
      #     end
      #   end
      #
      def privileged_on(*args, &block)
        on(*args) do |host|
          if host.nil?
            instance_exec(nil, nil, &block)
          else
            original_user = host.user

            begin
              host.user = host.properties.privileged_user ||
                          fetch(:mb_privileged_user)
              instance_exec(host, original_user, &block)
            ensure
              host.user = original_user
            end
          end
        end
      end

      # Uploads the given string or file-like object to the current host
      # context. Intended to be used within an on() or privileged_on() block.
      # Accepts :owner and :mode options that affect the permissions of the
      # remote file.
      #
      def put(string_or_io, remote_path, opts={})
        sudo_exec = ->(*cmd) {
          cmd = [:sudo] + cmd if opts[:sudo]
          execute *cmd
        }

        tmp_path = "/tmp/#{SecureRandom.uuid}"

        owner = opts[:owner]
        mode = opts[:mode]

        source = if string_or_io.respond_to?(:read)
          string_or_io
        else
          StringIO.new(string_or_io.to_s)
        end

        sudo_exec.call :mkdir, "-p", File.dirname(remote_path)

        upload!(source, tmp_path)

        sudo_exec.call(:mv, "-f", tmp_path, remote_path)
        sudo_exec.call(:chown, owner, remote_path) if owner
        sudo_exec.call(:chmod, mode, remote_path) if mode
      end

      # Read the specified file from the local system, interpret it as ERb,
      # and upload it to the current host context. Intended to be used with an
      # on() or privileged_on() block. Accepts :owner, :mode, and :binding
      # options.
      #
      # Templates with relative paths are first searched for in
      # lib/capistrano/mb/templates in the current project. This gives
      # applications a chance to override. If an override is not found, the
      # default template within the capistrano-mb gem is used.
      #
      #   task :create_database_yml do
      #     on roles(:app, :db) do
      #       within(shared_path) do
      #         template fetch(:database_yml_template_path),
      #                  "config/database.yml",
      #                  :mode => "600"
      #       end
      #     end
      #   end
      #
      def template(local_path, remote_path, opts={})
        binding = opts[:binding] || binding

        unless local_path.start_with?("/")
          override_path = File.join("lib/capistrano/mb/templates", local_path)

          unless File.exist?(override_path)
            override_path = File.join(
              "lib/capistrano/fiftyfive/templates",
              local_path
            )
            if File.exist?(override_path)
              compatibility_warning(
                "Please move #{override_path} from lib/capistrano/fiftyfive "\
                "to lib/capistrano/mb to ensure future compatibility with "\
                "capistrano-mb."
              )
            end
          end

          local_path = if File.exist?(override_path)
            override_path
          else
            File.expand_path(File.join("../templates", local_path), __FILE__)
          end
        end

        erb = File.read(local_path)
        rendered_template = ERB.new(erb).result(binding)

        put(rendered_template, remote_path, opts)
      end
    end
  end
end

require "capistrano/dsl/env"

module Capistrano
  module DSL
    module Env
      # Overrides capistrano's default `set` to assist developers that are
      # migrating from the `fiftyfive_*` to `mb_*` variable names. This will
      # be removed in a future version of capistrano-mb.
      alias_method :_orig_capistrano_set, :set
      def set(name, *args, &block)
        if name.to_s =~ /^fiftyfive_/
          mb_name = name.to_s.gsub(/^fiftyfive_/, "mb_")
          compatibility_warning(
            "Use `set :#{mb_name}` instead of `set :#{name}` to ensure "\
            "compatibility with future versions of capistrano-mb. The "\
            "fiftyfive_* names have been deprecated."
          )
          name = mb_name.intern
        end
        _orig_capistrano_set(name, *args, &block)
      end

      # Overrides capistrano's default `fetch` to assist developers that are
      # migrating from the `fiftyfive_*` to `mb_*` variable names. This will
      # be removed in a future version of capistrano-mb.
      alias_method :_orig_capistrano_fetch, :fetch
      def fetch(name, *args, &block)
        if name.to_s =~ /^fiftyfive_/
          mb_name = name.to_s.gsub(/^fiftyfive_/, "mb_")
          compatibility_warning(
            "Use `fetch :#{mb_name}` instead of `fetch :#{name}` to ensure "\
            "compatibility with future versions of capistrano-mb. The "\
            "fiftyfive_* names have been deprecated."
          )
          name = mb_name.intern
        end
        _orig_capistrano_fetch(name, *args, &block)
      end
    end
  end
end


text:
SYNONYM

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

#### Published in
Not. Sällsk. Fauna et Fl. Fenn. Förh. 11: 222 (1871)

#### Original name
Hypochnus mustialaensis P. Karst., 1871

### Remarks
null


text:
package org.openapitools.server.model

/**
 * @param `class`  for example: ''null''
*/
final case class Label1 (
  `class`: Option[String] = None
)


text:
package com.github.robozonky.internal.jobs;

public interface TenantJob extends Job {

    /**
     * The task to run.
     *
     * @return never null
     */
    TenantPayload payload();
}


text:
<?php

namespace Drupal\views\Plugin\views\join;

/**
 * Represents a join and creates the SQL necessary to implement the join.
 *
 * Extensions of this class can be used to create more interesting joins.
 */
interface JoinPluginInterface {

  /**
   * Builds the SQL for the join this object represents.
   *
   * When possible, try to use table alias instead of table names.
   *
   * @param $select_query
   *   A select query object.
   * @param $table
   *   The base table to join.
   * @param \Drupal\views\Plugin\views\query\QueryPluginBase $view_query
   *   The source views query.
   */
  public function buildJoin($select_query, $table, $view_query);

}


text:
namespace gpopt
{
	using namespace gpos;

	//---------------------------------------------------------------------------
	//	@class:
	//		CDistributionSpec
	//
	//	@doc:
	//		Base class for representing distribution specification.
	//
	//---------------------------------------------------------------------------
	class CDistributionSpec : public CPropSpec
	{
		public:

			enum EDistributionType
			{
				EdtHashed,			// data is hashed across all segments
				EdtHashedNoOp,		// same as hashed, used to force multiple slices for parallel union all. The motions always mirror the underlying distributions.
				EdtStrictHashed,	// same as hashed, used to force multiple slices for parallel union all. The motions mirror the distribution of the output columns.
				EdtReplicated,		// data is replicated across all segments
				EdtAny,				// data can be anywhere on the segments (required only)
				EdtSingleton,		// data is on a single segment or the master
				EdtStrictSingleton,	// data is on a single segment or the master (derived only, only compatible with other singleton distributions)
				EdtRandom,			// data is randomly distributed across all segments
				EdtStrictRandom,	// same as random, used to force multiple slices for parallel union all.
				EdtRouted,			// data is routed to a segment explicitly specified in the tuple,
				EdtUniversal,		// data is available everywhere (derived only)
				EdtNonSingleton,	// data can have any distribution except singleton (required only)
				EdtExternal,		// data is stored on external storage (derived only)

				EdtSentinel
			};

			// description of distribution spec in terms of partitioning data across segments
			enum EDistributionPartitioningType
			{
				EdptPartitioned,	// data partitioned on multiple segments, e.g., hashed/random distribution
				EdptNonPartitioned,	// data on a single segment, or replicated to all segments
				EdptUnknown,		// unknown behavior

				EdptSentinel
			};

		private:

			// private copy ctor
			CDistributionSpec(const CDistributionSpec &);

		public:

			// ctor
			CDistributionSpec()
			{}

			// dtor
			virtual
			~CDistributionSpec()
			{};

			// distribution type accessor
			virtual
			EDistributionType Edt() const = 0;

			// does this distribution satisfy the given one
			virtual
			BOOL FSatisfies(const CDistributionSpec *pds) const = 0;

			// default hash function for distribution spec
			virtual
			ULONG HashValue() const
			{
				ULONG ulEdt = (ULONG) Edt();
				return gpos::HashValue<ULONG>(&ulEdt);
			}

			// extract columns used by the distribution spec
			virtual
			CColRefSet *PcrsUsed
				(
				CMemoryPool *mp
				)
				const
			{
				// by default, return an empty set
				return GPOS_NEW(mp) CColRefSet(mp);
			}

			// property type
			virtual
			EPropSpecType Epst() const
			{
				return EpstDistribution;
			}

			// return true if distribution spec can be required
			virtual
			BOOL FRequirable() const
			{
				return true;
			}

			// return true if distribution spec can be derived
			virtual
			BOOL FDerivable() const
			{
				return true;
			}

			// default match function for distribution specs
			virtual
			BOOL Matches(const CDistributionSpec *pds) const
			{
				return Edt() == pds->Edt();
			}

			// default implementation for all the classes inheriting from
			// CDistributionSpec, if any class requires special Equals
			// handling, they should override it.
			virtual
			BOOL Equals(const CDistributionSpec *pds) const
			{
				return Matches(pds);
			}

			// return a copy of the distribution spec with remapped columns
			virtual
			CDistributionSpec *PdsCopyWithRemappedColumns
								(
								CMemoryPool *, //mp,
								UlongToColRefMap *, //colref_mapping,
								BOOL //must_exist
								)
			{
				this->AddRef();
				return this;
			}

			// print
			virtual
			IOstream &OsPrint(IOstream &os) const = 0;

			// return distribution partitioning type
			virtual
			EDistributionPartitioningType Edpt() const = 0;

			// check if the distribution spec is either a singleton or a strict singleton distribution
			BOOL
			FSingletonOrStrictSingleton() const
			{
				return CDistributionSpec::EdtSingleton == Edt() || CDistributionSpec::EdtStrictSingleton == Edt();
			}
	}; // class CDistributionSpec

	// arrays of distribution spec
	typedef CDynamicPtrArray<CDistributionSpec, CleanupRelease> CDistributionSpecArray;
}

#endif // !GPOPT_IDistributionSpec_H

// EOF


text:
"use strict";

const Clapp  = require('../../modules/clapp-discord/index');
const cfg    = require('../../../config');
const db     = require('../../modules/dbhandler/index').config;

module.exports = new Clapp.Command({
	name: "remove-admin",
	desc: "Removes an user from the admin list.",
	fn: (argv, context, cb) => {
		if (context.botAdmins.length > 1) {
			var id = argv.args.user.match(/<@([0-9]+)>/)[1];
			context.summaryHandler.bot.fetchUser(id).then(user => {
				db.admins.remove(user).then(removed => {
					if (removed) {
						context.botAdmins.splice(
							context.botAdmins.indexOf(user.id), 1
						);
						cb("The user was removed from the admins list successfully", context);
					} else {
						cb("The user is not an admin")
					}
				}).catch(err => {
					console.error(err);
					cb("Sorry, an internal error occurred. Please talk to my author.");
				});
			}).catch(err => {
				if (err.status === 404) {
					cb("Error: the specified user doesn't exist.");
				} else {
					console.error(err);
					cb("Sorry, an internal error occurred. Please talk to my author.");
				}
			});
		} else {
			cb("Sorry, you can't remove the only admin that there is. Add another admin first.");
		}
	},
	args: [
		require("./shared/arg_user.js")
	],
	async: true
});


text:
import fetchLatest from 'actions/home'

import {RECEIVE_LATEST} from 'actions/home'

const initState = {}

export default (state = initState, action) => {

  switch (action.type) {
    case RECEIVE_LATEST:
      return {
        ...state,
        ...action.data
      }
    default:
      return state
  }
}


text:
#region License

// Distributed under the MIT License
// ============================================================
// Copyright (c) 2019 Hotcakes Commerce, LLC
// Copyright (c) 2020 Upendo Ventures, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
// and associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute,
// sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using Hotcakes.Commerce.Data;
using Hotcakes.Commerce.Data.EF;

namespace Hotcakes.Commerce.Membership
{
    public class UserQuestionRepository : HccSimpleRepoBase<hcc_UserQuestions, UserQuestion>
    {
        public UserQuestionRepository(HccRequestContext c)
            : base(c)
        {
        }

        protected override void CopyDataToModel(hcc_UserQuestions data, UserQuestion model)
        {
            model.Bvin = data.bvin;
            model.StoreId = data.StoreId;
            model.LastUpdated = data.LastUpdated;
            model.Name = data.QuestionName;
            model.Order = data.Order;
            model.Type = (UserQuestionType) data.QuestionType;
            model.ReadValuesFromXml(data.Values);
        }

        protected override void CopyModelToData(hcc_UserQuestions data, UserQuestion model)
        {
            data.bvin = model.Bvin;
            data.StoreId = model.StoreId;
            data.LastUpdated = model.LastUpdated;
            data.QuestionName = model.Name;
            data.Order = model.Order;
            data.QuestionType = (int) model.Type;
            data.Values = model.WriteValuesToXml();
        }

        public UserQuestion Find(string bvin)
        {
            return FindFirstPoco(y => y.bvin == bvin);
        }

        public UserQuestion FindForAllStores(string bvin)
        {
            return FindFirstPoco(y => y.bvin == bvin);
        }

        public override bool Create(UserQuestion item)
        {
            if (item.Bvin == string.Empty)
            {
                item.Bvin = Guid.NewGuid().ToString();
            }
            item.StoreId = Context.CurrentStore.Id;
            item.LastUpdated = DateTime.UtcNow;
            return base.Create(item);
        }

        public bool Update(UserQuestion c)
        {
            if (c.StoreId != Context.CurrentStore.Id)
            {
                return false;
            }
            c.LastUpdated = DateTime.UtcNow;
            return Update(c, y => y.bvin == c.Bvin);
        }

        public bool Delete(string bvin)
        {
            var storeId = Context.CurrentStore.Id;
            return DeleteForStore(bvin, storeId);
        }

        internal bool DeleteForStore(string bvin, long storeId)
        {
            return Delete(y => y.bvin == bvin && y.StoreId == storeId);
        }

        public List<UserQuestion> FindAll()
        {
            var totalCount = 0;
            return FindAllPaged(1, int.MaxValue, ref totalCount);
        }

        public List<UserQuestion> FindAllPaged(int pageNumber, int pageSize, ref int totalCount)
        {
            var storeId = Context.CurrentStore.Id;
            using (var s = CreateStrategy())
            {
                var query = s.GetQuery().Where(y => y.StoreId == storeId)
                    .OrderBy(y => y.Order);

                totalCount = query.Count();

                var items = GetPagedItems(query, pageNumber, pageSize);
                return ListPoco(items);
            }
        }

        public bool MoveUp(string bvin)
        {
            var questions = FindAll();
            for (var i = 0; i <= questions.Count - 1; i++)
            {
                if (questions[i].Bvin == bvin)
                {
                    if (i != questions.Count - 1)
                    {
                        questions[i].Order += 1;
                        questions[i + 1].Order -= 1;
                        Update(questions[i]);
                        Update(questions[i + 1]);
                    }
                }
            }
            return true;
        }

        public bool MoveDown(string bvin)
        {
            var questions = FindAll();
            for (var i = 0; i <= questions.Count - 1; i++)
            {
                if (questions[i].Bvin == bvin)
                {
                    if (i > 0)
                    {
                        questions[i].Order -= 1;
                        questions[i - 1].Order += 1;
                        Update(questions[i]);
                        Update(questions[i - 1]);
                    }
                }
            }
            return true;
        }

        internal void DestroyAllForStore(long storeId)
        {
            Delete(y => y.StoreId == storeId);
        }
    }
}


text:
description: Compare any two builds of a pipeline and see changes
keywords: GoCD pipeline, builds, build changes, pipeline compare, pipeline history
title: Compare Builds
---

# Compare Builds

GoCD allows you to compare any two builds of a pipeline and see exactly what changes happened between those two instances. The information in this view will include:

- Code checkins
- Upstream pipelines
- Story/defect numbers (when linked to a tracking tool)

## Accessing Pipeline Compare

There are several locations from where the Pipeline Compare feature can be invoked. These include:

- Pipelines Dashboard page (the "Compare" link in each pipeline)
- Environments page
- Stage Details page
- Stage History widget within the Stage Details page

## Understanding the Pipeline Compare Screen

The Pipeline Compare screen lets you compare any two instances of a pipeline. Every pipeline instance is associated with a set of changes; be it a source control modification or an upstream pipeline. Performing a compare lets you easily identify exactly what these changes were.

![PipelineCompare_Changes](../images/compare_changes.png)

1. **To/from search box:** You can search for the appropriate pipeline instance using any of the following - pipeline label, check-in comment, person who checked in, upstream pipeline label and revision.
2. **Upstream dependency changes:** All the changes to upstream pipelines within the search range.
3. **Changes to version control systems:** All check-ins that went into dependent VCS materials within the search range.
4. **Tracking tool integration:** If you've configured a [tracking tool integration](../integration/index.html#integration-with-bug-tracking-and-story-management-tools) for this pipeline or any upstream pipelines, check-in comments containing story/defect/ticket numbers would be hyperlinked to the appropriate tracking tool.

## Using Pipeline History

You can also select a pipeline by browsing the pipeline history.

![PipelineCompare-Timeline](../images/compare_timeline.png)

Steps to select a particular instance from the history:

1. Click on the "Browse the timeline" link below either of the search box
2. Browse the history and select a pipeline

## Understanding Non-sequential Material Revision

Sometimes the following error message will be present on the comparison page:

```text
This pipeline instance was triggered with a non-sequential material revision.
```

This means that the instance in-question was triggered with an older revision or an older run of the upstream pipeline. This occurs when the `Trigger with options` flow is chosen on the Dashboard UI to schedule a pipeline.

Let's consider a pipeline `P` with material `M`.

 - a commit `c1` trigger an instance `P1` with a `natural_order` of 1
 - a commit `c2` trigger an instance `P2` with a `natural_order` of 2
 - a commit `c3` trigger an instance `P3` with a `natural_order` of 3

Now a user using trigger with options triggers an instance `P4` with commit `c2`. Now, in all manners `P2` and `P4` are similar.
Since instance `P4` was triggered with a commit earlier than `c3`, it was assigned with a `natural_order` of 2.5. It is recommended to compare only pipelines with integer `natural_order`. Hence, the warning.


text:
<?php
/**
 * Last Change: 2014 Apr 24, 00:41
 */

namespace eq\web\route;

class RouteRulePath
{

    use \eq\base\TObject;

    protected $fname;
    protected $lnum;

    protected $prefix;

    protected $controller_name;
    protected $action_name;

    protected $dynamic_controller = false;
    protected $dynamic_action = false;

    public function __construct($path, $fname = null, $lnum = null, $prefix = "")
    {
        $this->fname = $fname;
        $this->lnum = $lnum;
        $this->prefix = $prefix;
        $this->parse($path);
    }

    public function getControllerName()
    {
        return $this->controller_name;
    }

    public function getActionName()
    {
        return $this->action_name;
    }

    public function getDynamicController()
    {
        return $this->dynamic_controller;
    }

    public function getDynamicAction()
    {
        return $this->dynamic_action;
    }

    public function getDynamic()
    {
        return $this->dynamic_controller || $this->dynamic_action;
    }

    public function parse($path)
    {
        $this->preprocess($path);
    }

    public function validateVariables($vars)
    {
        $path = $this->controller_name.".".$this->action_name;
        preg_match_all("/\{([^\{\}]*)\}/", $path, $matches);
        foreach($matches[1] as $var) {
            if(!isset($vars[$var]))
                $this->except("Undefined variable in path: $var");
        }
    }

    protected function preprocess($path)
    {
        $parts = array_diff(explode(".", $path), [""]);
        if(count($parts) < 2)
            $this->except("Invalid path: $path");
        $parts = array_merge(array_diff(explode(".", $this->prefix), [""]), $parts);
        $this->action_name = array_pop($parts);
        $this->controller_name = implode(".", $parts);
        $this->dynamic_controller = (bool) preg_match("/\{[^\{\}]*\}/",
            $this->controller_name);
        $this->dynamic_action = (bool) preg_match("/\{[^\{\}]*\}/", $this->action_name);
    }

    protected function except($message)
    {
        throw new RouteSyntaxException($message, $this->fname, $this->lnum);
    }

}


text:
require 'spec_helper'
require 'cgi'
require 'webmock/rspec'

module AChecker

  describe Api do

    describe "#check" do

      let(:id) { "12345678" }
      let(:url) { CGI::escape("http://example.com/some-resource/") }
      let(:xml) { <<-eos
          <?xml version="1.0" encoding="ISO-8859-1"?>
          <resultset>
            <summary>
              <NumOfErrors>30</NumOfErrors>
            </summary>
          </resultset>
        eos
      }

      context "when achecker url is not provided" do
        it "should check url" do
          stub_request(:get, "https://achecker.ca/checkacc.php")
            .with(:query => {"uri" => url, "id" => id, "output" => "rest"})
            .to_return(:body => xml)

          api = Api.new(id)

          result = api.check(url)

          expect(result.url).to eq(url)
          expect(result.num_errors).to eq(30)
        end
      end

      context "when achecker url is provided" do
        it "should check url" do
          stub_request(:get, "https://some.url/checkacc.php")
            .with(:query => {"uri" => url, "id" => id, "output" => "rest"})
            .to_return(:body => xml)

          api = Api.new(id, "https://some.url/checkacc.php")

          result = api.check(url)

          expect(result.url).to eq(url)
          expect(result.num_errors).to eq(30)
        end
      end
    end

  end

end


text:
<?php

if ( ! function_exists('admin_asset') )
{
    function admin_asset($path, $root = false)
    {
        if (substr($path, 0, 7) == 'http://' || substr($path, 0, 8) == 'https://')
            return $path;

        return asset(($root == false ? Admin::getAdminAssetsPath() : '') . '/' . trim($path, '/'));
    }
}

if ( ! function_exists('isActiveController') )
{
    function isActiveController($controller, $text = null)
    {
        return \Gogol\Admin\Helpers\Helper::isActive($controller, $text);
    }
}

if ( ! function_exists('admin') ) {
    function admin()
    {
        $guard = auth()->guard('web');

        //Check if is student logged
        if( ! $guard->check() )
            return false;

        return $guard->user();
    }
}

if ( ! function_exists('trim_end') ) {
    function trim_end($string, $trim)
    {
        while (substr($string, -strlen($trim)) == $trim) {
            $string = substr($string, 0, -strlen($trim));
        }

        return $string;
    }
}
?>


text:
hs.window.animationDuration = 0

local TRIGGER_RESIZE = {"cmd", "ctrl"}
local TRIGGER_MOVE = {"cmd", "ctrl", "alt"}

hs.hotkey.bind(TRIGGER_RESIZE, "c", function()
  local win = hs.window.focusedWindow()
  local f = win:frame()
  local screen = win:screen():frame()

  win:setFullscreen(false)

  f.x = screen.x
  f.y = screen.y
  f.w = screen.w
  f.h = screen.h
  win:setFrame(f)
end)

hs.hotkey.bind(TRIGGER_RESIZE, "r", function()
    local win = hs.window.focusedWindow()
    local f = win:frame()
    local screen = win:screen():frame()

    win:setFullscreen(false)

    f.x = screen.x + screen.w/4
    f.y = screen.y
    f.w = screen.w - screen.w/2
    f.h = screen.h
    win:setFrame(f)
  end)

hs.hotkey.bind(TRIGGER_MOVE, "c", function()
  local win = hs.window.focusedWindow()
  local f = win:frame()
  local screen = win:screen():frame()

  win:setFullscreen(false)

  f.x = screen.x + screen.w / 6
  f.y = screen.y + screen.h / 6
  f.w = screen.w - screen.w / 3
  f.h = screen.h - screen.h / 3
  win:setFrame(f)
end)

hs.hotkey.bind(TRIGGER_RESIZE, "Left", function()
  local win = hs.window.focusedWindow()
  local f = win:frame()
  local screen = win:screen():frame()

  win:setFullscreen(false)

  f.x = screen.x
  f.y = screen.y
  f.w = screen.w / 2
  f.h = screen.h
  win:setFrame(f)
end)

hs.hotkey.bind(TRIGGER_RESIZE, "Right", function()
  local win = hs.window.focusedWindow()
  local f = win:frame()
  local screen = win:screen():frame()

  win:setFullscreen(false)

  f.x = screen.x + screen.w / 2
  f.y = screen.y
  f.w = screen.w / 2
  f.h = screen.h
  win:setFrame(f)
end)

hs.hotkey.bind(TRIGGER_RESIZE, "Up", function()
  local win = hs.window.focusedWindow()
  local f = win:frame()
  local screen = win:screen():frame()

  win:setFullscreen(false)

  f.x = screen.x
  f.y = screen.y
  f.w = screen.w
  f.h = screen.h / 2
  win:setFrame(f)
end)

hs.hotkey.bind(TRIGGER_RESIZE, "Down", function()
  local win = hs.window.focusedWindow()
  local f = win:frame()
  local screen = win:screen():frame()

  win:setFullscreen(false)

  f.x = screen.x
  f.y = screen.y + screen.h / 2
  f.w = screen.w
  f.h = screen.h / 2
  win:setFrame(f)
end)

hs.hotkey.bind(TRIGGER_MOVE, "Left", function()
  local win = hs.window.focusedWindow()
  win:setFullscreen(false)
  win:moveOneScreenWest(false, true)
end)

hs.hotkey.bind(TRIGGER_MOVE, "Right", function()
  local win = hs.window.focusedWindow()
  win:setFullscreen(false)
  win:moveOneScreenEast(false, true)
end)


text:
<?php

namespace Oro\Bundle\EntityConfigBundle\Tests\Unit\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference;

use Oro\Bundle\EntityConfigBundle\DependencyInjection\Compiler\AttributeBlockTypeMapperPass;

class AttributeBlockTypeMapperPassTest extends \PHPUnit_Framework_TestCase
{
    public function testProcess()
    {
        $registry = $this->getMockBuilder(Definition::class)->getMock();

        /** @var ContainerBuilder|\PHPUnit_Framework_MockObject_MockObject $container */
        $container = $this->getMockBuilder(ContainerBuilder::class)->getMock();
        $container->expects($this->once())
            ->method('getDefinition')
            ->with(AttributeBlockTypeMapperPass::CHAIN_SERVICE)
            ->willReturn($registry);

        $container->expects($this->once())
            ->method('findTaggedServiceIds')
            ->with(AttributeBlockTypeMapperPass::TAG)
            ->willReturn(['service1' => [['priority' => 20]], 'service2' => [['priority' => 10]]]);

        $registry->expects($this->exactly(2))
            ->method('addMethodCall')
            ->willReturnMap([
                ['addMapper', [new Reference('service2')], $registry],
                ['addMapper', [new Reference('service1')], $registry],
            ]);

        $compilerPass = new AttributeBlockTypeMapperPass();
        $compilerPass->process($container);
    }

    public function testProcessSkip()
    {
        /** @var ContainerBuilder|\PHPUnit_Framework_MockObject_MockObject $container */
        $container = $this->getMockBuilder(ContainerBuilder::class)->getMock();
        $container->expects($this->once())
            ->method('findTaggedServiceIds')
            ->with(AttributeBlockTypeMapperPass::TAG)
            ->willReturn([]);

        $container->expects($this->never())
            ->method('getDefinition');

        $compilerPass = new AttributeBlockTypeMapperPass();
        $compilerPass->process($container);
    }
}