text:
package org.jboss.narayana.compensations.api;

import javax.interceptor.InterceptorBinding;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * When applied at method level, states that the compensation-based transaction must cancel, if a RuntimeException
 * (or subclass of) is thrown from that particular method.
 * <p/>
 * When applied at class level, states that the compensation-based transaction must cancel, if a RuntimeException
 * (or subclass of) is thrown from any business method of the class.
 *
 * @author paul.robinson@redhat.com 25/04/2013
 */
@InterceptorBinding
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
public @interface CancelOnFailure {

}


text:
<!doctype html>

        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <title>RL Web Agency</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link href="https://fonts.googleapis.com/css?family=Cormorant+Garamond|Patrick+Hand" rel="stylesheet">
        <link rel="apple-touch-icon" href="apple-touch-icon.png">

        <link rel="shortcut icon" href="logomobile.png">
        <link rel="stylesheet" href="css/normalize.css">
        <link rel="stylesheet" href="css/main.css">

Accueil

Présentation Équipe

Présentation Produits

Contact

        Accueil
        Présentation Équipe
        Présentation Produits
        Contact

RL web agency

Design moderne et Responsive site and un haute niveau de referencement

Présentation Equipe

Yuran Ramos

J'appelle Ramos Yuran, je suis passionné par l'informatique, et je suhaité creer cette entreprise avec un ansien collegue de formation, je occupe actualement le post de formateur web et responsable development.

 Toujors passionné pour l'ordinateur

 Football.. c'est la passion

 Le côte amusant c'est la console

Florent Lequibain

Boujour à tous! Je suis Florent Lequibain, un jeune dev passionné de design. J'ai rejoint Yuran dans la creation de l'entreprise RL. j'occupe les postes de formateur et de responsable design.

 Fan de nouvelles technologies

 Joueur de guitare.. préparez les tomates!

 J'adore les vinyles! Les anciens sons sont les meilleurs!

Coordonnées

17, Carnaby Street

WR 43 287, London

+ 33 769 33 11 40

webagency@gmail.com

          Contacter-nous !

Parteners

Simplon Roubaix

Adep

BCA

Unitel t+

Accueil

Présentation Équipe

Présentation Produits

Pour suivre notre actualité suivez-nous sur les réseaux sociaux

Suivez nous !

Copyright (c) 2017 Yuran Ramös et Florent Lequibain

redpajama_set_name: RedPajamaGithub


text:
module Typhoeus
  class Response

    # This module contains logic about informations
    # on a response.
    module Informations

      # Return libcurls return value.
      #
      # @example Get return_code.
      #   response.return_code
      #
      # @return [ Symbol ] The return_code.
      def return_code
        options[:return_code]
      end

      # Returns a string describing the return.
      #
      # @example Get return_message.
      #   response.return_message
      #
      # @return [ String ] The return_message.
      #
      # @since 0.6.2
      def return_message
        Ethon::Curl.easy_strerror(return_code) if return_code
      end

      # Return the http response body.
      #
      # @example Get response_body.
      #   response.response_body
      #
      # @return [ String ] The response_body.
      def response_body
        options[:response_body] || options[:body]
      end
      alias :body :response_body

      # Return the http response headers.
      #
      # @example Get response_headers.
      #   response.response_headers
      #
      # @return [ String ] The response_headers.
      def response_headers
        return options[:response_headers] if options[:response_headers]
        if mock? && h = options[:headers]
            h.map{ |k,v| [k, v.respond_to?(:join) ? v.join : v] }.
              map{ |e| "#{e.first}: #{e.last}" }.
              join("\r\n")
        end
      end

      # Return the last received HTTP, FTP or SMTP response code.
      # The value will be zero if no server response code has
      # been received. Note that a proxy's CONNECT response should
      # be read with http_connect_code and not this.
      #
      # @example Get response_code.
      #   response.response_code
      #
      # @return [ Integer ] The response_code.
      def response_code
        (options[:response_code] || options[:code]).to_i
      end
      alias :code :response_code

      # Return the available http auth methods.
      # Bitmask indicating the authentication method(s)
      # available.
      #
      # @example Get httpauth_avail.
      #   response.httpauth_avail
      #
      # @return [ Integer ] The bitmask.
      def httpauth_avail
        options[:httpauth_avail]
      end

      # Return the total time in seconds for the previous
      # transfer, including name resolving, TCP connect etc.
      #
      # @example Get total_time.
      #   response.total_time
      #
      # @return [ Float ] The total_time.
      def total_time
        options[:total_time] || options[:time]
      end
      alias :time :total_time

      # Return the time, in seconds, it took from the start
      # until the first byte is received by libcurl. This
      # includes pretransfer time and also the time the
      # server needs to calculate the result.
      #
      # @example Get starttransfer_time.
      #   response.starttransfer_time
      #
      # @return [ Float ] The starttransfer_time.
      def starttransfer_time
        options[:starttransfer_time] || options[:start_transfer_time]
      end
      alias :start_transfer_time :starttransfer_time

      # Return the time, in seconds, it took from the start
      # until the SSL/SSH connect/handshake to the remote
      # host was completed. This time is most often very near
      # to the pre transfer time, except for cases such as HTTP
      # pippelining where the pretransfer time can be delayed
      # due to waits in line for the pipeline and more.
      #
      # @example Get appconnect_time.
      #   response.appconnect_time
      #
      # @return [ Float ] The appconnect_time.
      def appconnect_time
        options[:appconnect_time] || options[:app_connect_time]
      end
      alias :app_connect_time :appconnect_time

      # Return the time, in seconds, it took from the start
      # until the file transfer is just about to begin. This
      # includes all pre-transfer commands and negotiations
      # that are specific to the particular protocol(s) involved.
      # It does not involve the sending of the protocol-
      # specific request that triggers a transfer.
      #
      # @example Get pretransfer_time.
      #  response.pretransfer_time
      #
      # @return [ Float ] The pretransfer_time.
      def pretransfer_time
        options[:pretransfer_time]
      end

      # Return the time, in seconds, it took from the start
      # until the connect to the remote host (or proxy) was completed.
      #
      # @example Get connect_time.
      #   response.connect_time
      #
      # @return [ Float ] The connect_time.
      def connect_time
        options[:connect_time]
      end

      # Return the time, in seconds, it took from the
      # start until the name resolving was completed.
      #
      # @example Get namelookup_time.
      #   response.namelookup_time
      #
      # @return [ Float ] The namelookup_time.
      def namelookup_time
        options[:namelookup_time] || options[:name_lookup_time]
      end
      alias :name_lookup_time :namelookup_time

      # Return the last used effective url.
      #
      # @example Get effective_url.
      #   response.effective_url
      #
      # @return [ String ] The effective_url.
      def effective_url
        options[:effective_url]
      end

      # Return the string holding the IP address of the most recent
      # connection done with this curl handle. This string
      # may be IPv6 if that's enabled.
      #
      # @example Get primary_ip.
      #   response.primary_ip
      #
      # @return [ String ] The primary_ip.
      def primary_ip
        options[:primary_ip]
      end

      # Return the total number of redirections that were
      # actually followed
      #
      # @example Get redirect_count.
      #   response.redirect_count
      #
      # @return [ Integer ] The redirect_count.
      def redirect_count
        options[:redirect_count]
      end

      def debug_info
        options[:debug_info]
      end

      # Returns the response header.
      #
      # @example Return headers.
      #   response.headers
      #
      # @return [ Typhoeus::Header ] The response header.
      def headers
        return Header.new(options[:headers]) if mock? && options[:headers]
        return nil if response_headers.nil? && !defined?(@headers)
        @headers ||= Header.new(response_headers.split("\r\n\r\n").last)
      end
      alias :headers_hash :headers

      # Return all redirections in between as multiple
      # responses with header.
      #
      # @example Return redirections.
      #   response.redirections
      #
      # @return [ Array<Typhoeus::Response> ] The redirections
      def redirections
        return [] unless response_headers
        response_headers.split("\r\n\r\n")[0..-2].map{ |h| Response.new(:response_headers => h) }
      end
    end
  end
end


text:
import { ITable } from "./Table";
import { IDom } from "./Dom";

export class HtmlTableById implements ITable<HTMLTableElement> {
  private doc: IDom;
  private id: String;

  constructor(doc: IDom, id: String) {
    this.doc = doc;
    this.id = id;
  }

  public table(): HTMLTableElement {
    return <HTMLTableElement>this.doc.dom().getElementById(this.id.toString());
  }
}


text:
using Newtonsoft.Json;

namespace ESI.NET.Models.Skills
{
    public class Attributes
    {
        [JsonProperty("charisma")]
        public int Charisma { get; set; }

        [JsonProperty("intelligence")]
        public int Intelligence { get; set; }

        [JsonProperty("memory")]
        public int Memory { get; set; }

        [JsonProperty("perception")]
        public int Perception { get; set; }

        [JsonProperty("willpower")]
        public int Willpower { get; set; }

        [JsonProperty("bonus_remaps")]
        public int BonusRemaps { get; set; }

        [JsonProperty("last_remap_date")]
        public string LastRemapDate { get; set; }

        [JsonProperty("accrued_remap_cooldown_date")]
        public string AccruedRemapCooldownDate { get; set; }
    }
}


text:
package com.altova.text.edi;

public class DataValueValidator {

	public boolean isIncomplete() {
		return false;
	}

	public boolean hasValue(String value) {
		return true;
	}

	public String getCodeListValues() {
		return "";
	}

}


text:
Hey, thanks for contributing to Koel! To save time for both of us, please make sure these checkboxes are checked before submitting the issue:

- [ ] You have read and followed closely the [Wiki](https://koel.phanan.net/docs), [Upgrade Guide](https://github.com/phanan/koel/releases), as well as [Troubleshooting](https://koel.phanan.net/docs/#/troubleshooting)
- [ ] The issue has not been reported before
- [ ] This is not a "how to install on Windows" or "why is my npm messed up" question
- [ ] You're a cool person

All checked? Now also make sure your issue

- [ ] Is associated with a version. Or better yet, a commit.
- [ ] Is as detailed as possible (ahem... OS, browser, steps to reproduce, maybe?)
- [ ] Includes the error output if it's a bug/error report ("Whoops!" is not very helpful, you know)
- [ ] Is in English, 因为我不说中文。


text:
class ZResolution {
public:
  ZResolution();

  inline double voxelSize() const {
    return m_voxelSize[0] * m_voxelSize[1] * m_voxelSize[2]; }
  inline double voxelSizeX() const { return m_voxelSize[0]; }
  inline double voxelSizeY() const { return m_voxelSize[1]; }
  inline double voxelSizeZ() const { return m_voxelSize[2]; }
  inline char unit() const { return m_unit; }

  inline const double& operator[] (int index) const {
    return m_voxelSize[index];
  }
  inline double& operator[] (int index) {
    return m_voxelSize[index];
  }

  inline void setVoxelSize(double x, double y, double z) {
    m_voxelSize[0] = x;
    m_voxelSize[1] = y;
    m_voxelSize[2] = z;
  }

  inline void setUnit(char unit) { m_unit = unit; }
  void setUnit(const std::string &unit);
  std::string getUnitName() const;

  void convertUnit(char unit);

private:
  double m_voxelSize[3];
  char m_unit; //'p' for pixel, 'u' for um, 'n' for nm
};

#endif // ZRESOLUTION_H


text:
'use strict';

// TODO:
// - Add pinch support for zooming

import throttle from 'lodash/throttle';
import Utils    from './utils';

/**
* Description.
*
* @class Oculo.WheelControl
* @constructor
* @param {string|Element} target - The target.
* @param {Object} [options] - An object of configuration options.
* @param {function} [options.onWheel] - The function to call every time the wheel event occurs.
* @param {array} [options.onWheelParams] - The parameters to pass to the callback.
* @param {object} [options.onWheelScope] - What 'this' refers to inside the callback.
*
* @example
* var myWheelControl = new Oculo.WheelControl('#camera', {
*   onWheel: function () {
*     console.log('wheeling');
*   }
* });
*/
class WheelControl {
    constructor (target, {
        onWheel = function () {},
        onWheelParams = [],
        onWheelScope = this
    } = {}) {
        /**
        * @property {object} - The configuration.
        */
        this.config = { onWheel, onWheelParams, onWheelScope };

        /**
        * @property {Element} - The target.
        * @readonly
        */
        this.target = Utils.DOM.parseView(target);

        /**
        * @property {WheelEvent} - The last wheel event that affected the instance.
        * @readonly
        */
        this.wheelEvent = {};

        /**
        * @property {WheelEvent} - The previous wheel event that affected the instance.
        * @readonly
        */
        this.previousWheelEvent = {};

        /**
        * @property {boolean} - Whether it is enabled or not.
        * @private
        */
        this._enabled = true;

        /**
        * The throttled wheel event handler.
        * @private
        */
        this._throttledOnWheel = throttle(function (event) {
            this.previousWheelEvent = this.wheelEvent;
            this.wheelEvent = event;
            this.config.onWheel.apply(this.config.onWheelScope, this.config.onWheelParams);
        }, Utils.Time.getFPSDuration(30, 'ms'));

        /**
        * The wheel event handler.
        * @private
        */
        this._onWheel = (event) => {
            event.preventDefault();
            event.stopPropagation();
            this._throttledOnWheel(event);
        };

        this.enable();
    }

    /**
    * @property {boolean} - Whether it is enabled or not.
    * @readonly
    * @default true
    */
    get enabled () {
        return this._enabled;
    }

    /**
    * Destroys the control and prepares it for garbage collection.
    *
    * @returns {this} self
    */
    destroy () {
        this.disable();
        this.config = {};
        this.target = null;

        return this;
    }

    /**
    * Disables the control.
    *
    * @returns {this} self
    */
    disable () {
        this.target.removeEventListener('wheel', this._onWheel);
        this._enabled = false;

        return this;
    }

    /**
    * Enables the control.
    *
    * @returns {this} self
    */
    enable () {
        this.target.addEventListener('wheel', this._onWheel);
        this._enabled = true;

        return this;
    }
}

export default WheelControl;


text:
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: "Arguments : (ArgumentList : ArgumentList, AssignmentExpression)"
es5id: 11.2.4_A1.4_T4
description: >
    Return an internal list whose length is one greater than the
    length of ArgumentList and whose items are the items of
    ArgumentList, in order,  followed at the end by
    GetValue(AssignmentExpression), which is the last item of  the new
    list
---*/

var x = function () { throw "x"; };
var y = function () { throw "y"; };

function f_arg() {
}

//CHECK#1
try {
  f_arg(x(),y());
  $ERROR('#1.1: var x = { valueOf: function () { throw "x"; } }; var y = { valueOf: function () { throw "y"; } }; function f_arg() {} f_arg(x(),y()) throw "x". Actual: ' + (f_arg(x(),y())));
}
catch (e) {
  if (e === "y") {
     $ERROR('#1.2: First argument is evaluated first, and then second argument');
   } else {
     if (e !== "x") {
       $ERROR('#1.3: var x = { valueOf: function () { throw "x"; } }; var y = { valueOf: function () { throw "y"; } }; function f_arg() {} f_arg(x(),y()) throw "x". Actual: ' + (e));
     }
   }
}


text:
package net.techreadiness.plugin.service;

import java.util.List;

import net.techreadiness.plugin.service.object.SnapshotWindow;
import net.techreadiness.service.ServiceContext;

public interface SnapshotWindowService {

	public SnapshotWindow addOrUpdate(ServiceContext context, SnapshotWindow snapshotWindow);

	public void delete(ServiceContext context, Long snapshotWindowId);

	List<SnapshotWindow> findUnexecutedSnapshots(ServiceContext context);

	public SnapshotWindow getByScopeIdAndName(ServiceContext context, Long scopeId, String snapshotWindowName);

	List<SnapshotWindow> findActiveSnapshots(ServiceContext context, Long scopeId);
}


text:
require 'active_support/core_ext/hash/reverse_merge'

module StrongRoutes
  module Rails
    class RouteMapper
      attr_reader :route_set

      def self.map(route_set)
        route_mapper = self.new(route_set)
        route_mapper.map
      end

      def initialize(route_set)
        @route_set = route_set
      end

      # Map the route set to a collection of the top level segments.
      def map
        map = matches.map { |match_data| match_data[:path] }
        map.compact!
        map.uniq!
        map
      end

    private

      # Convert the path strings into match data objects, capturing all segments
      # except optional ones (e.g. :format).
      def matches
        matches = paths.map { |path| path.match(/\A(?<path>[-:\w\/]+)\/*.*\Z/) }
        matches.compact!
        matches.uniq!
        matches
      end

      # Extract the route paths from the route objects so we have a simple
      # string to interact with.
      def paths
        paths = route_set.routes.map { |route| route.path.spec.to_s }
        paths.uniq!
        paths
      end
    end
  end
end


text:
module.exports = function(should, Assertion) {

  function addLink(name) {
    Object.defineProperty(Assertion.prototype, name, {
      get: function() {
        return this;
      }
    });
  }

  ['an', 'of', 'a', 'and', 'be', 'have', 'with', 'is', 'which'].forEach(addLink);
};


text:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.apache.sling</groupId>
        <artifactId>sling</artifactId>
        <version>30</version>
        <relativePath />
    </parent>

    <artifactId>org.apache.sling.jcr.resource</artifactId>
    <version>3.0.3-SNAPSHOT</version>
    <packaging>bundle</packaging>

    <name>Apache Sling JCR Resource Resolver</name>
    <description>
        This bundle provides the JCR based ResourceProvider.
    </description>

    <scm>
        <connection>
            scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/resource
        </connection>
        <developerConnection>
            scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/resource
        </developerConnection>
        <url>
            http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource
        </url>
    </scm>

    <properties>
        <site.jira.version.id>12314286</site.jira.version.id>
        <site.javadoc.exclude>**.internal.**</site.javadoc.exclude>
        <oak.version>1.5.15</oak.version>
        <jackrabbit.version>2.13.4</jackrabbit.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.sling</groupId>
                <artifactId>maven-sling-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-adapter-metadata</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>generate-adapter-metadata</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Import-Package>
                            org.apache.sling.scripting.api.*;resolution:=optional,
                            *
                        </Import-Package>

                        <!-- Include utility classes from Jackrabbit JCR Commons -->
                        <Embed-Dependency>
                            jackrabbit-jcr-commons;inline="org/apache/jackrabbit/util/ISO8601.*|org/apache/jackrabbit/util/ISO9075.*|org/apache/jackrabbit/name/QName.*|org/apache/jackrabbit/util/XMLChar.*|org/apache/jackrabbit/util/Text.*",
                        </Embed-Dependency>

                        <Sling-Namespaces>
                            sling=http://sling.apache.org/jcr/sling/1.0
                        </Sling-Namespaces>

                        <Sling-Nodetypes>
                            SLING-INF/nodetypes/folder.cnd,
                            SLING-INF/nodetypes/resource.cnd,
                            SLING-INF/nodetypes/vanitypath.cnd,
                            SLING-INF/nodetypes/redirect.cnd,
                            SLING-INF/nodetypes/mapping.cnd
                        </Sling-Nodetypes>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
    <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

    <!-- JCR -->
        <dependency>
            <groupId>javax.jcr</groupId>
            <artifactId>jcr</artifactId>
        </dependency>

    <!-- OSGi -->
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.service.component</artifactId>
            <version>1.3.0</version>
            <scope>provided</scope>
        </dependency>
    <!-- Jackrabbit / Oak -->
        <dependency>
            <groupId>org.apache.jackrabbit</groupId>
            <artifactId>jackrabbit-api</artifactId>
            <version>${jackrabbit.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.jackrabbit</groupId>
            <artifactId>oak-jcr</artifactId>
            <version>${oak.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.jackrabbit</groupId>
            <artifactId>oak-core</artifactId>
            <version>${oak.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.jackrabbit</groupId>
            <artifactId>jackrabbit-jcr-commons</artifactId>
            <version>${jackrabbit.version}</version>
            <scope>provided</scope>
        </dependency>

    <!-- Sling -->
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.jcr.api</artifactId>
            <version>2.2.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.api</artifactId>
            <version>2.16.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.scripting.api</artifactId>
            <version>2.1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.adapter</artifactId>
            <version>2.0.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.commons.osgi</artifactId>
            <version>2.2.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.auth.core</artifactId>
            <version>1.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.commons.classloader</artifactId>
            <version>1.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.2</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>adapter-annotations</artifactId>
            <version>1.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.serviceusermapper</artifactId>
            <version>1.1.0</version>
            <scope>provided</scope>
        </dependency>

        <!-- Findbugs annotations -->
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>3.0.0</version>
            <scope>provided</scope>
        </dependency>

        <!-- For the Console Plugin of the JcrResourceResolverFactoryImpl -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>

        <!-- Testing -->
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.commons.testing</artifactId>
            <version>2.0.24</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.9.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit-addons</groupId>
            <artifactId>junit-addons</artifactId>
            <version>1.4</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>


text:
    #pragma once
#endif

#include <boost/config.hpp>

#ifdef BOOST_NO_SFINAE
#else
#include <boost/utility/result_of.hpp>
#include <boost/pointee.hpp>
#endif // BOOST_NO_SFINAE

#include <boost/assert.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_void.hpp>
#include <functional>

namespace boost
{

    namespace ptr_container_detail
    {
        template <typename Type, typename Dummy>
        struct make_lazy
        {
            typedef typename Type::type type;
        };
    }

    template
    <
              class Fun
#ifdef BOOST_NO_SFINAE
            , class Result = bool
#endif
    >
    class indirect_fun
    {
        Fun fun;
    public:
        indirect_fun() : fun(Fun())
        { }

        indirect_fun( Fun f ) : fun(f)
        { }

        template< class T >
#ifdef BOOST_NO_SFINAE
        Result
#else
        typename boost::result_of< const Fun( typename pointee<T>::type& ) >::type
#endif
        operator()( const T& r ) const
        {
            return fun( *r );
        }

        template< class T, class U >
#ifdef BOOST_NO_SFINAE
        Result
#else
        typename boost::result_of< const Fun( typename pointee<T>::type&,
                                              typename pointee<U>::type& ) >::type
#endif
        operator()( const T& r, const U& r2 ) const
        {
            return fun( *r, *r2 );
        }
    };

    template< class Fun >
    inline indirect_fun<Fun> make_indirect_fun( Fun f )
    {
        return indirect_fun<Fun>( f );
    }

    template
    <
        class Fun,
        class Arg1,
        class Arg2 = Arg1
#ifdef BOOST_NO_SFINAE
      , class Result = bool
#endif
    >
    class void_ptr_indirect_fun
    {
        Fun fun;

    public:

        void_ptr_indirect_fun() : fun(Fun())
        { }

        void_ptr_indirect_fun( Fun f ) : fun(f)
        { }

        template< class Void >
#ifdef BOOST_NO_SFINAE
        Result
#else
        typename ptr_container_detail::make_lazy<
            boost::result_of<const Fun(const Arg1&)>, Void>::type
#endif
        operator()( const Void* r ) const
        {
            BOOST_STATIC_ASSERT(boost::is_void<Void>::value);
            BOOST_ASSERT( r != 0 );
            return fun( * static_cast<const Arg1*>( r ) );
        }

        template< class Void >
#ifdef BOOST_NO_SFINAE
        Result
#else
        typename ptr_container_detail::make_lazy<
            boost::result_of<const Fun(const Arg1&, const Arg2&)>, Void>::type
#endif
        operator()( const Void* l, const Void* r ) const
        {
            BOOST_STATIC_ASSERT(boost::is_void<Void>::value);
            BOOST_ASSERT( l != 0 && r != 0 );
            return fun( * static_cast<const Arg1*>( l ), * static_cast<const Arg2*>( r ) );
        }
    };

    template< class Arg, class Fun >
    inline void_ptr_indirect_fun<Fun,Arg> make_void_ptr_indirect_fun( Fun f )
    {
        return void_ptr_indirect_fun<Fun,Arg>( f );
    }

} // namespace 'boost'

#endif


text:
package org.springframework.boot.docs.web.servlet.springmvc;

class Customer {

}


text:
using MongoExample.Web.Services;
using System;
using System.Collections.Generic;
using System.Web.Http;

namespace MongoExample.Web.Controllers
{
    public class ProductsController : ApiController
    {
        private ProductService Service = new ProductService();

        public IEnumerable<Product> Get()
        {
            var products = Service.GetAllProducts();
			return products;
        }

        public Product Post(AddRequestViewModel request)
        {
			Product addedProduct = new Product();
			addedProduct.Id = Guid.NewGuid();
			addedProduct.Name = request.Name;
			Service.AddProduct(addedProduct);
			return addedProduct;
        }
    }
}


text:
package org.apache.tools.ant.taskdefs.optional.clearcase;

import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.taskdefs.condition.Os;

/**
 * Task to perform mkattr command to ClearCase.
 *

 * The following attributes are interpreted:
 *

 *

 *     Attribute
 *     Values
 *     Required
 *

 *

 *      viewpath
 *      Path to the ClearCase view file or directory that the command will operate on
 *      Yes
 *

 *

 *      replace
 *      Replace the value of the attribute if it already exists
 *      No
 *

 *

 *      recurse
 *      Process each subdirectory under viewpath
 *      No
 *

 *

 *      version
 *      Identify a specific version to attach the attribute to
 *      No
 *

 *

 *      typename
 *      Name of the attribute type
 *      Yes
 *

 *

 *      typevalue
 *      Value to attach to the attribute type
 *      Yes
 *

 *

 *      comment
 *      Specify a comment. Only one of comment or cfile may be used.
 *      No
 *

 *

 *      commentfile
 *      Specify a file containing a comment. Only one of comment or cfile may be used.
 *      No
 *

 *

 *      failonerr
 *      Throw an exception if the command fails. Default is true
 *      No
 *

 *

 *
 */
public class CCMkattr extends ClearCase {
    private boolean mReplace = false;
    private boolean mRecurse = false;
    private String mVersion = null;
    private String mTypeName = null;
    private String mTypeValue = null;
    private String mComment = null;
    private String mCfile = null;

    /**
     * Executes the task.
     *

     * Builds a command line to execute cleartool and then calls Exec's run method
     * to execute the command line.
     * @throws BuildException if the command fails and failonerr is set to true
     */
    public void execute() throws BuildException {
        Commandline commandLine = new Commandline();
        Project aProj = getProject();
        int result = 0;

        // Check for required attributes
        if (getTypeName() == null) {
            throw new BuildException("Required attribute TypeName not specified");
        }
        if (getTypeValue() == null) {
            throw new BuildException("Required attribute TypeValue not specified");
        }
        // Default the viewpath to basedir if it is not specified
        if (getViewPath() == null) {
            setViewPath(aProj.getBaseDir().getPath());
        }

        // build the command line from what we got. the format is
        // cleartool mkattr [options...] [viewpath ...]
        // as specified in the CLEARTOOL help
        commandLine.setExecutable(getClearToolCommand());
        commandLine.createArgument().setValue(COMMAND_MKATTR);

        checkOptions(commandLine);

        if (!getFailOnErr()) {
            getProject().log("Ignoring any errors that occur for: "
                    + getViewPathBasename(), Project.MSG_VERBOSE);
        }

        // For debugging
        // System.out.println(commandLine.toString());

        result = run(commandLine);
        if (Execute.isFailure(result) && getFailOnErr()) {
            String msg = "Failed executing: " + commandLine.toString();
            throw new BuildException(msg, getLocation());
        }
    }

    /**
     * Check the command line options.
     */
    private void checkOptions(Commandline cmd) {
        if (getReplace()) {
            // -replace
            cmd.createArgument().setValue(FLAG_REPLACE);
        }

        if (getRecurse()) {
            // -recurse
            cmd.createArgument().setValue(FLAG_RECURSE);
        }

        if (getVersion() != null) {
            // -version
            getVersionCommand(cmd);
        }

        if (getComment() != null) {
            // -c
            getCommentCommand(cmd);
        } else {
            if (getCommentFile() != null) {
                // -cfile
                getCommentFileCommand(cmd);
            } else {
                cmd.createArgument().setValue(FLAG_NOCOMMENT);
            }
        }

        if (getTypeName() != null) {
            // type
            getTypeCommand(cmd);
        }
        if (getTypeValue() != null) {
            // type value
            getTypeValueCommand(cmd);
        }
        // viewpath
        cmd.createArgument().setValue(getViewPath());
    }

    /**
     * Set the replace flag
     *
     * @param replace the status to set the flag to
     */
    public void setReplace(boolean replace) {
        mReplace = replace;
    }

    /**
     * Get replace flag status
     *
     * @return boolean containing status of replace flag
     */
    public boolean getReplace() {
        return mReplace;
    }

    /**
     * Set recurse flag
     *
     * @param recurse the status to set the flag to
     */
    public void setRecurse(boolean recurse) {
        mRecurse = recurse;
    }

    /**
     * Get recurse flag status
     *
     * @return boolean containing status of recurse flag
     */
    public boolean getRecurse() {
        return mRecurse;
    }

    /**
     * Set the version flag
     *
     * @param version the status to set the flag to
     */
    public void setVersion(String version) {
        mVersion = version;
    }

    /**
     * Get version flag status
     *
     * @return boolean containing status of version flag
     */
    public String getVersion() {
        return mVersion;
    }

    /**
     * Set comment string
     *
     * @param comment the comment string
     */
    public void setComment(String comment) {
        mComment = comment;
    }

    /**
     * Get comment string
     *
     * @return String containing the comment
     */
    public String getComment() {
        return mComment;
    }

    /**
     * Set comment file
     *
     * @param cfile the path to the comment file
     */
    public void setCommentFile(String cfile) {
        mCfile = cfile;
    }

    /**
     * Get comment file
     *
     * @return String containing the path to the comment file
     */
    public String getCommentFile() {
        return mCfile;
    }

    /**
     * Set the attribute type-name
     *
     * @param tn the type name
     */
    public void setTypeName(String tn) {
        mTypeName = tn;
    }

    /**
     * Get attribute type-name
     *
     * @return String containing type name
     */
    public String getTypeName() {
        return mTypeName;
    }

    /**
     * Set the attribute type-value
     *
     * @param tv the type value
     */
    public void setTypeValue(String tv) {
        mTypeValue = tv;
    }

    /**
     * Get the attribute type-value
     *
     * @return String containing type value
     */
    public String getTypeValue() {
        return mTypeValue;
    }

    /**
     * Get the 'version' command
     *
     * @param cmd CommandLine containing the command line string with or
     *                    without the version flag and string appended
     */
    private void getVersionCommand(Commandline cmd) {
        if (getVersion() != null) {
            /* Had to make two separate commands here because if a space is
               inserted between the flag and the value, it is treated as a
               Windows filename with a space and it is enclosed in double
               quotes ("). This breaks clearcase.
            */
            cmd.createArgument().setValue(FLAG_VERSION);
            cmd.createArgument().setValue(getVersion());
        }
    }

    /**
     * Get the 'comment' command
     *
     * @param cmd containing the command line string with or
     *        without the comment flag and string appended
     */
    private void getCommentCommand(Commandline cmd) {
        if (getComment() != null) {
            /* Had to make two separate commands here because if a space is
               inserted between the flag and the value, it is treated as a
               Windows filename with a space and it is enclosed in double
               quotes ("). This breaks clearcase.
            */
            cmd.createArgument().setValue(FLAG_COMMENT);
            cmd.createArgument().setValue(getComment());
        }
    }

    /**
     * Get the 'commentfile' command
     *
     * @param cmd         containing the command line string with or
     *                    without the commentfile flag and file appended
     */
    private void getCommentFileCommand(Commandline cmd) {
        if (getCommentFile() != null) {
            /* Had to make two separate commands here because if a space is
               inserted between the flag and the value, it is treated as a
               Windows filename with a space and it is enclosed in double
               quotes ("). This breaks clearcase.
            */
            cmd.createArgument().setValue(FLAG_COMMENTFILE);
            cmd.createArgument().setValue(getCommentFile());
        }
    }

    /**
     * Get the attribute type-name
     *
     * @param cmd containing the command line string with or
     *        without the type-name
     */
    private void getTypeCommand(Commandline cmd) {
        String typenm = getTypeName();

        if (typenm != null) {
            cmd.createArgument().setValue(typenm);
        }
    }

    /**
     * Get the attribute type-value
     *
     * @param cmd containing the command line string with or
     *        without the type-value
     */
    private void getTypeValueCommand(Commandline cmd) {
        String typevl = getTypeValue();

        if (typevl != null) {
            if (Os.isFamily("windows")) {
                typevl = "\\\"" + typevl + "\\\""; // Windows quoting of the value
            } else {
                typevl = "\"" + typevl + "\"";
            }
            cmd.createArgument().setValue(typevl);
        }
    }

    /**
     * -replace flag -- replace the existing value of the attribute
     */
    public static final String FLAG_REPLACE = "-replace";
    /**
     * -recurse flag -- process all subdirectories
     */
    public static final String FLAG_RECURSE = "-recurse";
    /**
     * -version flag -- attach attribute to specified version
     */
    public static final String FLAG_VERSION = "-version";
    /**
     * -c flag -- comment to attach to the element
     */
    public static final String FLAG_COMMENT = "-c";
    /**
     * -cfile flag -- file containing a comment to attach to the file
     */
    public static final String FLAG_COMMENTFILE = "-cfile";
    /**
     * -nc flag -- no comment is specified
     */
    public static final String FLAG_NOCOMMENT = "-nc";
}


text:
[![GitHub tag][gh-tag-img]][gh-link]

## 2017-08-06 - Release 3.0.1
- First run at using modulesync
- Stopped testing against Puppet 3
- Started testing against Puppet 5

## 2017-03-01 Release 3.0.0
- This change was brought to you by Jake Spain
- Introduced selectable versions of the Zabbix agent: now you can pick between
  2.4, 3.0, & 3.2 and the module will adjust accordingly.
- Changed SUSE repository to facilitate enabling newer versions of Zabbix
- Added a parameter for the name of the package to be installed
- Corrected and expanded compatibility with Debian and Ubuntu
- Updated the gems used for testing in Travis CI
- Updated the Vagrantfile to be more current.

## 2016-09-20 Release 2.6.0
- Added support for OpenSUSE Leap (thanks to Jake Spain)

## 2016-08-15 Release 2.5.0
- Added support for SUSE Enterprise (thanks to Jake Spain)

## 2015-07-14 Release 2.4.1
- Fixed copy/paste fail in .travis.yml

## 2015-07-14 Release 2.4.0
- Updates to support Puppet 4

## 2015-05-28 Release 2.3.0
- Updated default configuration directory on Windows to be 'C:/ProgramData/zabbix'
  as that is the default in the current Chocolatey package.
- Switched to the new official Chocolatey module

## 2015-03-02 Release 2.2.0
- Added the ability to define a require on the package resource

## 2015-02-27 Release 2.1.1
- Updated Gemfile to use rspec-puppet v2.0 instead of git master
- Added default value for PidFile due to Zabbix's default being /run

## 2015-02-12 Release 2.1.0
- Transitioned to a fully templated zabbix_agentd.conf
- Added code to fail compilation if depreciated variables exists
- Added more tests

## 2015-01-25 Release 2.0.7
- Fixed validation
- Added new tests for Servers and ServersActive settings

## 2015-01-25 Release 2.0.6
- Updated Vagrantfile
- Fixed rspec settings so that details are shown

## 2015-01-25 Release 2.0.5
- Added puppet_blacksmith for packaging

## 2015-01-25 Release 2.0.4
- Cleaned up formatting

## 2015-01-25 Release 2.0.3
- Moved exec's in preinstall.pp inside osfamily case statement

## 2015-01-19 Release 2.0.2
- Reformatted this file

## 2015-01-19 Release 2.0.1
- Fixed some spelling and a link in the README.md file

## 2015-01-17 Fork - Release 2.0.0
### Total Rework by genebean:
- Converted to use the install -> config -> service pattern
- Moved all parameters to `params.pp`
- Removed dependency on epel module
- Added Zabbix repo
- Added option to disable repo management per repo
- Changed Windows setup to utilize the official Zabbix package via Chocolatey
- Added .project file for Geppetto
- Added Vagrant config to facilitate testing and development
- Added several new parameters (see changes to README.md)

## 2014-07-15 Release 1.0.1
### Changes:
- Upgrade package format and fix deprecation warnings.

## 2013-02-18 Release 1.0.0
### Breaking Changes:
- Default hostname is now `$::fqdn` instead of `$::hostname`

### Changes:
- Added CentOS support (by @martijn)

### Bugfixes:
- Added restarting of the zabbix-agent service when a setting is changed (#3)
- Fix dependency issues between package, service, and ini_settings (#4)

## 2013-01-02 Release 0.1.0
### Changes:
- Use ini_setting module to only change necessary settings rather than use
the entire config file as a template. This will insulate us from changes in the
Zabbix configuration with new versions.
- Other fixes

[gh-tag-img]: https://img.shields.io/github/tag/genebean/genebean-zabbixagent.svg?label=newest%20tag
[gh-link]: https://github.com/genebean/genebean-zabbixagent


text:
.claro .dijitTreeNode {
  zoom: 1;

}
.claro .dijitTreeIsRoot {
  background-image: none;
}
.claro .dijitTreeRow, .claro .dijitTreeNode .dojoDndItemBefore, .claro .dijitTreeNode .dojoDndItemAfter {

  padding: 4px 1px 2px 0;
  margin: 0 1px;

  background-color: transparent;
  background-color: rgba(171, 214, 255, 0);
  background-image: url("images/commonHighlight.png");
  background-position: 0 0;
  background-repeat: repeat-x;
  border-color: rgba(118, 157, 192, 0);
  border-width: 0;
  -webkit-transition-property: background-color, border-color;
  -webkit-transition-duration: .25s ;
  -webkit-transition-timing-function: ease-out;
}
.dj_ie6 .claro .dijitTreeRow {
  background-image: none;
}
.claro .dijitTreeRowSelected {
  background-repeat: repeat-x;
  background-color: #cfe5fa;
  padding: 3px 0 1px;
  margin: 0;
  border: solid 1px #769dc0;
  color: #000000;
}
.claro .dijitTreeRowHover {
  background-color: #abd6ff;
  padding: 3px 0 1px;
  margin: 0;
  border: solid 1px #769dc0;
  color: #000000;
  -webkit-transition-duration: .25s ;
}
.claro .dijitTreeRowActive {
  background-color: #7dbefa;
  background-position: 0 -177px;
  padding: 3px 0 1px;
  margin-left: 0;
  border: solid 1px #769dc0;
  color: #000000;
}
.dj_ie6 .claro .dijitTreeRowActive {
  background-image: none;
}
.claro .dijitTreeRowFocused {
  background-repeat: repeat;
}
.claro .dijitTreeExpando {
  background-image: url('images/treeExpandImages.png');
  width: 16px;
  height: 16px;
  background-position: -35px 0;

}
.dj_ie6 .claro .dijitTreeExpando {
  background-image: url('images/treeExpandImages8bit.png');
}
.claro .dijitTreeRowHover .dijitTreeExpandoOpened {
  background-position: -53px 0;
}
.claro .dijitTreeExpandoClosed {
  background-position: 1px 0;
}
.claro .dijitTreeRowHover .dijitTreeExpandoClosed {
  background-position: -17px 0;
}
.claro .dijitTreeExpandoLeaf, .dj_ie6 .claro .dijitTreeExpandoLeaf {
  background-image: none;
}
.claro .dijitTreeExpandoLoading {
  background-image: url('images/loadingAnimation.gif');
}
.claro .dijitTreeNode .dojoDndItemBefore .dijitTreeContent {
  border-top: 2px solid #769dc0;
}
.claro .dijitTreeNode .dojoDndItemAfter .dijitTreeContent {
  border-bottom: 2px solid #769dc0;
}


text:
Cron Planner
=============

Cron planner is a web tool that provides a graphical visualization of a daily run of all your crontabs.
The purpose of the tool is to assist anyone who has a lot of crons running wild in the system, organizing them.

You can download the tool, or use it on line at https://goncaloqueiros.net/cron-planner/

Why
-----
The tool came out of the necessity to manage around 800 crons that were spread across 30 files, totaling 100 000 runs every day.
The idea is that you insert your crontabs in the textbox (you can include comments because they will be stripped out), hit `Go!`and inspect the plan latter.

Imagine that with your current crontabs you get this plan:
![Before](https://raw.githubusercontent.com/ghunti/cronPlanner/master/img/cron_planner_before.png)
You can identify that you have spikes every 15 minutes and lower, but still noticeable spikes every 5 minutes.

You then play with your crontabs, until you find what you think is best for you:
![After](https://raw.githubusercontent.com/ghunti/cronPlanner/master/img/cron_planner_after.png)
You can see that we spread the crontabs more evenly across all minutes of the day. We raise the amount of crons run every minute, but avoided the spikes from the previous setup.

Setup
-----

Download the project:
`git clone git@github.com:ghunti/cronPlanner.git`
Run composer inside the project folder:
`cd cronPlanner; composer install`
Serve the `index.php` file and enjoy :-)


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Revista Real Acad. Ci. Madrid 15: 684 (1917)

#### Original name
Phoma macrothecia Thüm.

### Remarks
null


text:
package net.geforcemods.securitycraft.util;

import java.util.ArrayList;
import java.util.List;

import net.geforcemods.securitycraft.api.IModuleInventory;
import net.geforcemods.securitycraft.api.IOwnable;
import net.geforcemods.securitycraft.items.ModuleItem;
import net.geforcemods.securitycraft.misc.ModuleType;
import net.minecraft.nbt.StringTag;
import net.minecraft.nbt.Tag;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.scores.PlayerTeam;

public class ModuleUtils {
	public static List<String> getPlayersFromModule(ItemStack stack) {
		List<String> list = new ArrayList<>();

		if (stack.getItem() instanceof ModuleItem && stack.hasTag()) {
			for (int i = 1; i <= ModuleItem.MAX_PLAYERS; i++) {
				if (stack.getTag().getString("Player" + i) != null && !stack.getTag().getString("Player" + i).isEmpty())
					list.add(stack.getTag().getString("Player" + i).toLowerCase());
			}
		}

		return list;
	}

	public static boolean isAllowed(IModuleInventory inv, Entity entity) {
		return isAllowed(inv, entity.getName().getString());
	}

	public static boolean isAllowed(IModuleInventory inv, String name) {
		if (!inv.isModuleEnabled(ModuleType.ALLOWLIST))
			return false;

		ItemStack stack = inv.getModule(ModuleType.ALLOWLIST);

		if (stack.hasTag() && stack.getTag().getBoolean("affectEveryone"))
			return true;

		//IModuleInventory#getModule returns ItemStack.EMPTY when the module does not exist, and getPlayersFromModule will then have an empty list
		return doesModuleHaveTeamOf(name, inv.getBlockEntity().getLevel(), stack) || getPlayersFromModule(stack).contains(name.toLowerCase());
	}

	public static boolean isDenied(IModuleInventory inv, Entity entity) {
		if (!inv.isModuleEnabled(ModuleType.DENYLIST))
			return false;

		ItemStack stack = inv.getModule(ModuleType.DENYLIST);

		if (stack.hasTag() && stack.getTag().getBoolean("affectEveryone")) {
			if (inv.getBlockEntity() instanceof IOwnable ownable) {
				//only deny players that are not the owner
				if (entity instanceof Player player) {
					//if the player IS the owner, fall back to the default handling (check if the name is on the list)
					if (!ownable.getOwner().isOwner(player))
						return true;
				}
				else
					return true;
			}
			else
				return true;
		}

		String name = entity.getName().getString();

		//IModuleInventory#getModule returns ItemStack.EMPTY when the module does not exist, and getPlayersFromModule will then have an empty list
		return doesModuleHaveTeamOf(name, inv.getBlockEntity().getLevel(), stack) || getPlayersFromModule(stack).contains(name.toLowerCase());
	}

	public static boolean doesModuleHaveTeamOf(String name, Level level, ItemStack module) {
		PlayerTeam team = level.getScoreboard().getPlayersTeam(name);

		//@formatter:off
		return team != null && module.getOrCreateTag().getList("ListedTeams", Tag.TAG_STRING)
				.stream()
				.filter(tag -> tag instanceof StringTag)
				.map(tag -> ((StringTag) tag).getAsString())
				.anyMatch(team.getName()::equals);
		//@formatter:on
	}
}


text:
package com.fsck.k9.mail.filter;

import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class EOLConvertingOutputStream extends FilterOutputStream {
    private static final int CR = '\r';
    private static final int LF = '\n';
    private int lastChar;
    private static final int IGNORE_LF = Integer.MIN_VALUE;

    public EOLConvertingOutputStream(OutputStream out) {
        super(out);
    }

    @Override
    public void write(int oneByte) throws IOException {
        if (oneByte == LF && lastChar == IGNORE_LF) {
            lastChar = LF;
            return;
        }
        if (oneByte == LF && lastChar != CR) {
            super.write(CR);
        } else if (oneByte != LF && lastChar == CR) {
            super.write(LF);
        }
        super.write(oneByte);
        lastChar = oneByte;
    }

    @Override
    public void flush() throws IOException {
        if (lastChar == CR) {
            super.write(LF);
            // We have to ignore the next character if it is <LF>. Otherwise it
            // will be expanded to an additional <CR><LF> sequence although it
            // belongs to the one just completed.
            lastChar = IGNORE_LF;
        }
        super.flush();
    }
}


text:
<?php

namespace Symfony\Component\Validator\Tests\Constraints;

use Symfony\Component\Validator\Constraints\AtLeastOneOf;
use Symfony\Component\Validator\Constraints\AtLeastOneOfValidator;
use Symfony\Component\Validator\Constraints\Choice;
use Symfony\Component\Validator\Constraints\Count;
use Symfony\Component\Validator\Constraints\Country;
use Symfony\Component\Validator\Constraints\DivisibleBy;
use Symfony\Component\Validator\Constraints\EqualTo;
use Symfony\Component\Validator\Constraints\Expression;
use Symfony\Component\Validator\Constraints\GreaterThan;
use Symfony\Component\Validator\Constraints\GreaterThanOrEqual;
use Symfony\Component\Validator\Constraints\IdenticalTo;
use Symfony\Component\Validator\Constraints\Language;
use Symfony\Component\Validator\Constraints\Length;
use Symfony\Component\Validator\Constraints\LessThan;
use Symfony\Component\Validator\Constraints\Negative;
use Symfony\Component\Validator\Constraints\NotNull;
use Symfony\Component\Validator\Constraints\Range;
use Symfony\Component\Validator\Constraints\Regex;
use Symfony\Component\Validator\Constraints\Unique;
use Symfony\Component\Validator\Constraints\Valid;
use Symfony\Component\Validator\ConstraintViolation;
use Symfony\Component\Validator\Mapping\ClassMetadata;
use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface;
use Symfony\Component\Validator\Mapping\MetadataInterface;
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
use Symfony\Component\Validator\Validation;

/**
 * @author Przemysław Bogusz <przemyslaw.bogusz@tubotax.pl>
 */
class AtLeastOneOfValidatorTest extends ConstraintValidatorTestCase
{
    protected function createValidator()
    {
        return new AtLeastOneOfValidator();
    }

    /**
     * @dataProvider getValidCombinations
     */
    public function testValidCombinations($value, $constraints)
    {
        $this->assertCount(0, Validation::createValidator()->validate($value, new AtLeastOneOf($constraints)));
    }

    public function getValidCombinations()
    {
        return [
            ['symfony', [
                new Length(['min' => 10]),
                new EqualTo(['value' => 'symfony']),
            ]],
            [150, [
                new Range(['min' => 10, 'max' => 20]),
                new GreaterThanOrEqual(['value' => 100]),
            ]],
            [7, [
                new LessThan(['value' => 5]),
                new IdenticalTo(['value' => 7]),
            ]],
            [-3, [
                new DivisibleBy(['value' => 4]),
                new Negative(),
            ]],
            ['FOO', [
                new Choice(['choices' => ['bar', 'BAR']]),
                new Regex(['pattern' => '/foo/i']),
            ]],
            ['fr', [
                new Country(),
                new Language(),
            ]],
            [[1, 3, 5], [
                new Count(['min' => 5]),
                new Unique(),
            ]],
        ];
    }

    /**
     * @dataProvider getInvalidCombinations
     */
    public function testInvalidCombinationsWithDefaultMessage($value, $constraints)
    {
        $atLeastOneOf = new AtLeastOneOf(['constraints' => $constraints]);
        $validator = Validation::createValidator();

        $message = [$atLeastOneOf->message];

        $i = 0;

        foreach ($constraints as $constraint) {
            $message[] = sprintf(' [%d] %s', ++$i, $validator->validate($value, $constraint)->get(0)->getMessage());
        }

        $violations = $validator->validate($value, $atLeastOneOf);

        $this->assertCount(1, $violations, sprintf('1 violation expected. Got %u.', \count($violations)));
        $this->assertEquals(new ConstraintViolation(implode('', $message), implode('', $message), [], $value, '', $value, null, AtLeastOneOf::AT_LEAST_ONE_OF_ERROR, $atLeastOneOf), $violations->get(0));
    }

    /**
     * @dataProvider getInvalidCombinations
     */
    public function testInvalidCombinationsWithCustomMessage($value, $constraints)
    {
        $atLeastOneOf = new AtLeastOneOf(['constraints' => $constraints, 'message' => 'foo', 'includeInternalMessages' => false]);

        $violations = Validation::createValidator()->validate($value, $atLeastOneOf);

        $this->assertCount(1, $violations, sprintf('1 violation expected. Got %u.', \count($violations)));
        $this->assertEquals(new ConstraintViolation('foo', 'foo', [], $value, '', $value, null, AtLeastOneOf::AT_LEAST_ONE_OF_ERROR, $atLeastOneOf), $violations->get(0));
    }

    public function getInvalidCombinations()
    {
        return [
            ['symphony', [
                new Length(['min' => 10]),
                new EqualTo(['value' => 'symfony']),
            ]],
            [70, [
                new Range(['min' => 10, 'max' => 20]),
                new GreaterThanOrEqual(['value' => 100]),
            ]],
            [8, [
                new LessThan(['value' => 5]),
                new IdenticalTo(['value' => 7]),
            ]],
            [3, [
                new DivisibleBy(['value' => 4]),
                new Negative(),
            ]],
            ['F_O_O', [
                new Choice(['choices' => ['bar', 'BAR']]),
                new Regex(['pattern' => '/foo/i']),
            ]],
            ['f_r', [
                new Country(),
                new Language(),
            ]],
            [[1, 3, 3], [
                new Count(['min' => 5]),
                new Unique(),
            ]],
        ];
    }

    public function testGroupsArePropagatedToNestedConstraints()
    {
        $validator = Validation::createValidator();

        $violations = $validator->validate(50, new AtLeastOneOf([
            'constraints' => [
                new Range([
                    'groups' => 'non_default_group',
                    'min' => 10,
                    'max' => 20,
                ]),
                new Range([
                    'groups' => 'non_default_group',
                    'min' => 30,
                    'max' => 40,
                ]),
            ],
            'groups' => 'non_default_group',
        ]), 'non_default_group');

        $this->assertCount(1, $violations);
    }

    public function testContextIsPropagatedToNestedConstraints()
    {
        $validator = Validation::createValidatorBuilder()
            ->setMetadataFactory(new class() implements MetadataFactoryInterface {
                public function getMetadataFor($classOrObject): MetadataInterface
                {
                    return (new ClassMetadata(ExpressionConstraintNested::class))
                        ->addPropertyConstraint('foo', new AtLeastOneOf([
                            new NotNull(),
                            new Expression('this.getFoobar() in ["bar", "baz"]'),
                        ]));
                }

                public function hasMetadataFor($classOrObject): bool
                {
                    return ExpressionConstraintNested::class === $classOrObject;
                }
            })
            ->getValidator()
        ;

        $violations = $validator->validate(new ExpressionConstraintNested(), new Valid());

        $this->assertCount(0, $violations);
    }

    public function testEmbeddedMessageTakenFromFailingConstraint()
    {
        $validator = Validation::createValidatorBuilder()
            ->setMetadataFactory(new class() implements MetadataFactoryInterface {
                public function getMetadataFor($classOrObject): MetadataInterface
                {
                    return (new ClassMetadata(Data::class))
                        ->addPropertyConstraint('foo', new NotNull(['message' => 'custom message foo']))
                        ->addPropertyConstraint('bar', new AtLeastOneOf([
                            new NotNull(['message' => 'custom message bar']),
                        ]))
                    ;
                }

                public function hasMetadataFor($classOrObject): bool
                {
                    return Data::class === $classOrObject;
                }
            })
            ->getValidator()
        ;

        $violations = $validator->validate(new Data(), new Valid());

        $this->assertCount(2, $violations);
        $this->assertSame('custom message foo', $violations->get(0)->getMessage());
        $this->assertSame('This value should satisfy at least one of the following constraints: [1] custom message bar', $violations->get(1)->getMessage());
    }

    public function testNestedConstraintsAreNotExecutedWhenGroupDoesNotMatch()
    {
        $validator = Validation::createValidator();

        $violations = $validator->validate(50, new AtLeastOneOf([
            'constraints' => [
                new Range([
                    'groups' => 'adult',
                    'min' => 18,
                    'max' => 55,
                ]),
                new GreaterThan([
                    'groups' => 'senior',
                    'value' => 55,
                ]),
            ],
            'groups' => ['adult', 'senior'],
        ]), 'senior');

        $this->assertCount(1, $violations);
    }
}

class ExpressionConstraintNested
{
    private $foo;

    public function getFoobar(): string
    {
        return 'bar';
    }
}

class Data
{
    public $foo;
    public $bar;
}


text:
package handlers

import (
	"fmt"
	"net/http"
	"octlink/rstore/api/v1"
	"octlink/rstore/utils"

	"github.com/gorilla/handlers"
	"github.com/gorilla/mux"
)

func apiHelp(w http.ResponseWriter, r *http.Request) {

	var data string
	module := mux.Vars(r)["module"]
	if module == "" {
		data = utils.JSON2String(v1.EndPoints)
	} else {
		data = utils.JSON2String(v1.RouteDescriptorsMap[module])
	}

	fmt.Fprint(w, data)
}

// appropriate handler for handling image manifest requests.
func helperManager(r *http.Request) http.Handler {

	mhandler := handlers.MethodHandler{
		"GET": http.HandlerFunc(apiHelp),
	}

	return mhandler
}


text:
Aside from [the obvious](http://c2.com/cgi/wiki?OpenGenera), I mean.

[Here's](http://www.clisp.org/clash.html) what I've been playing with for the past little while.

Those instructions still work surprisingly well, given that they were published all of 11 years ago. Here's what I did to replicate them

```
apt-get install clisp x-window-system
wget http://beta.quicklisp.org/quicklisp.lisp
echo "/usr/bin/clisp" >> /etc/shells
```

I then installed `quicklisp` and ran `(ql:add-to-init-file)`, then manually added the following to `.clisprc`:

```lisp
(ql:quickload (list :cl-fad :cl-ppcre :trivial-shell))
(defun startx () (execute "/usr/bin/X11/xinit"))
```

and the following to my .xinitrc

`clisp -x "(progn (ql:quickload (list :clx :cl-ppcre :stumpwm)) (funcall (intern \"STUMPWM\" :stumpwm)))"`

After poking around for a little while and making sure everything worked approximately correctly, I ran `chsh` and set my shell to `/usr/bin/clisp`.

Performance-wise, it's surprisingly snappy given

a) [what it's running on](http://www.pcmag.com/article2/0,2817,1625692,00.asp)
b) that there are at least 3 instances of `clisp` at work at any given time. It's a toy, but quite a quick and fun toy, actually.

Now, granted, the title is supposed to be taken with a grain of salt[^grain-of-salt], but this still feels like it's approaching the target. What I've got running is a fully open system[^except] that implements most of its components in Lisp (the shell is Clisp, the WM is Stump and the editor is Emacs). I suppose I could also throw in [Closure](http://common-lisp.net/project/closure/)[^an-aside] and [Climacs](http://common-lisp.net/project/climacs/) as well, but I'm done playing for today.

[^grain-of-salt]: Since I've never used an [actual LISP Machine](http://en.wikipedia.org/wiki/Lisp_machine) or even the [Open](http://www.advogato.org/person/johnw/diary/12.html) Genera [System](http://collison.ie/blog/2008/04/lisp-machines). Incidentally, these links are here to remind me to look into it when I have a spare moment, so I'm not sure how much longer I'll be able to say "never used 'em".

[^except]: Except that it uses b43-fwcutter for the wireless card.

[^an-aside]: As an aside, that meme-space is getting pretty crowded. To the point that I have to disambiguate in conversation. There's [Clojure](http://clojure.org/) (the language), [Clozure](http://ccl.clozure.com/) (the Common Lisp implementation) and Closure (the common-lisp based [browser](http://common-lisp.net/project/closure/)/[html-parser](http://www.cliki.net/closure-html))


text:
package ij.notebook.converter;

import org.scijava.convert.Converter;
import org.scijava.log.LogService;
import org.scijava.notebook.converter.NotebookConverters;
import org.scijava.notebook.converter.NotebookOutputConverter;
import org.scijava.notebook.converter.output.PNGImageNotebookOutput;
import org.scijava.plugin.Parameter;
import org.scijava.plugin.Plugin;

import ij.ImagePlus;

/**
 * Converts an {@link ImagePlus} to a PNG.
 *
 * @author Alison Walter
 */
@Plugin(type = Converter.class)
public class ImagePlusToPNGNotebookConverter extends
    NotebookOutputConverter<ImagePlus, PNGImageNotebookOutput>
{
    @Parameter
    private LogService log;

    @Override
    public Class<ImagePlus> getInputType() {
        return ImagePlus.class;
    }

    @Override
    public Class<PNGImageNotebookOutput> getOutputType() {
        return PNGImageNotebookOutput.class;
    }

    @Override
    public PNGImageNotebookOutput convert(final Object object) {
        final ImagePlus imgPlus = (ImagePlus) object;
        final String base64Image = NotebookConverters.toPNG(imgPlus.getBufferedImage());
        return new PNGImageNotebookOutput(base64Image);
    }
}


text:
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
 *  Main author:
 *     Christian Schulte <schulte@gecode.org>
 *
 *  Copyright:
 *     Christian Schulte, 2012
 *
 *  Last modified:
 *     $Date: 2013-02-18 21:53:58 +0100 (må, 18 feb 2013) $ by $Author: schulte $
 *     $Revision: 13310 $
 *
 *  This file is part of Gecode, the generic constraint
 *  development environment:
 *     http://www.gecode.org
 *
 *  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.
 *
 */

namespace Gecode {

  /**
   * \defgroup TaskBranchMerit Generic merit for branchers based on view and value selection
   *
   * \ingroup TaskBranchViewVal
   */
  //@{
  /**
   * \brief Base-class for merit class
   */
  template<class _View, class _Val>
  class MeritBase {
  public:
    /// View type
    typedef _View View;
    /// Type of merit
    typedef _Val Val;
    /// Constructor for initialization
    MeritBase(Space& home, const VarBranch& vb);
    /// Constructor for cloning
    MeritBase(Space& home, bool share, MeritBase& mb);
    /// Whether dispose must always be called (that is, notice is needed)
    bool notice(void) const;
    /// Delete view merit class
    void dispose(Space& home);
  };

  /**
   * \brief Merit class for user-defined merit function
   */
  template<class View>
  class MeritFunction : public MeritBase<View,double> {
  public:
    /// Corresponding variable type
    typedef typename View::VarType Var;
    /// Corresponding merit function type
    typedef typename BranchTraits<Var>::Merit Function;
  protected:
    /// The user-defined merit function
    Function f;
  public:
    /// Constructor for initialization
    MeritFunction(Space& home, const VarBranch& vb);
    /// Constructor for cloning
    MeritFunction(Space& home, bool shared, MeritFunction& mf);
    /// Return degree as merit for view \a x at position \a i
    double operator ()(const Space& home, View x, int i);
  };

  /**
   * \brief Merit class for degree
   */
  template<class View>
  class MeritDegree : public MeritBase<View,unsigned int> {
  public:
    /// Constructor for initialization
    MeritDegree(Space& home, const VarBranch& vb);
    /// Constructor for cloning
    MeritDegree(Space& home, bool shared, MeritDegree& md);
    /// Return degree as merit for view \a x at position \a i
    unsigned int operator ()(const Space& home, View x, int i);
  };

  /**
   * \brief Merit class for AFC
   */
  template<class View>
  class MeritAFC : public MeritBase<View,double> {
  protected:
    /// AFC information
    AFC afc;
  public:
    /// Constructor for initialization
    MeritAFC(Space& home, const VarBranch& vb);
    /// Constructor for cloning
    MeritAFC(Space& home, bool shared, MeritAFC& ma);
    /// Return AFC as merit for view \a x at position \a i
    double operator ()(const Space& home, View x, int i);
    /// Whether dispose must always be called (that is, notice is needed)
    bool notice(void) const;
    /// Dispose view selection
    void dispose(Space& home);
  };

  /**
   * \brief Merit class for activity
   */
  template<class View>
  class MeritActivity : public MeritBase<View,double> {
  protected:
    /// Activity information
    Activity activity;
  public:
    /// Constructor for initialization
    MeritActivity(Space& home, const VarBranch& vb);
    /// Constructor for cloning
    MeritActivity(Space& home, bool shared, MeritActivity& ma);
    /// Return activity as merit for view \a x at position \a i
    double operator ()(const Space& home, View x, int i);
    /// Whether dispose must always be called (that is, notice is needed)
    bool notice(void) const;
    /// Dispose view selection
    void dispose(Space& home);
  };
  //@}

  // Merit base class
  template<class View, class Val>
  forceinline
  MeritBase<View,Val>::MeritBase(Space&, const VarBranch&) {}
  template<class View, class Val>
  forceinline
  MeritBase<View,Val>::MeritBase(Space&, bool, MeritBase&) {}
  template<class View, class Val>
  forceinline bool
  MeritBase<View,Val>::notice(void) const {
    return false;
  }
  template<class View, class Val>
  forceinline void
  MeritBase<View,Val>::dispose(Space&) {}

  // User-defined function merit
  template<class View>
  forceinline
  MeritFunction<View>::MeritFunction(Space& home, const VarBranch& vb)
    : MeritBase<View,double>(home,vb),
      f(function_cast<Function>(vb.merit())) {}
  template<class View>
  forceinline
  MeritFunction<View>::MeritFunction(Space& home, bool shared,
                                     MeritFunction& mf)
    : MeritBase<View,double>(home,shared,mf), f(mf.f) {}
  template<class View>
  forceinline double
  MeritFunction<View>::operator ()(const Space& home, View x, int i) {
    typename View::VarType y(x.varimp());
    return f(home,y,i);
  }

  // Degree merit
  template<class View>
  forceinline
  MeritDegree<View>::MeritDegree(Space& home, const VarBranch& vb)
    : MeritBase<View,unsigned int>(home,vb) {}
  template<class View>
  forceinline
  MeritDegree<View>::MeritDegree(Space& home, bool shared,
                                 MeritDegree& md)
    : MeritBase<View,unsigned int>(home,shared,md) {}
  template<class View>
  forceinline unsigned int
  MeritDegree<View>::operator ()(const Space&, View x, int) {
    return x.degree();
  }

  // AFC merit
  template<class View>
  forceinline
  MeritAFC<View>::MeritAFC(Space& home, const VarBranch& vb)
    : MeritBase<View,double>(home,vb), afc(vb.afc()) {}
  template<class View>
  forceinline
  MeritAFC<View>::MeritAFC(Space& home, bool shared,
                           MeritAFC& ma)
    : MeritBase<View,double>(home,shared,ma) {
    afc.update(home,shared,ma.afc);
  }
  template<class View>
  forceinline double
  MeritAFC<View>::operator ()(const Space& home, View x, int) {
    return x.afc(home);
  }
  template<class View>
  forceinline bool
  MeritAFC<View>::notice(void) const {
    return true;
  }
  template<class View>
  forceinline void
  MeritAFC<View>::dispose(Space&) {
    afc.~AFC();
  }

  // Acitivity merit
  template<class View>
  forceinline
  MeritActivity<View>::MeritActivity(Space& home, const VarBranch& vb)
    : MeritBase<View,double>(home,vb), activity(vb.activity()) {}
  template<class View>
  forceinline
  MeritActivity<View>::MeritActivity(Space& home, bool shared,
                                     MeritActivity& ma)
    : MeritBase<View,double>(home,shared,ma) {
    activity.update(home, shared, ma.activity);
  }
  template<class View>
  forceinline double
  MeritActivity<View>::operator ()(const Space&, View, int i) {
    return activity[i];
  }
  template<class View>
  forceinline bool
  MeritActivity<View>::notice(void) const {
    return true;
  }
  template<class View>
  forceinline void
  MeritActivity<View>::dispose(Space&) {
    activity.~Activity();
  }

}

// STATISTICS: kernel-branch


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

<TITLE>
ConnectionPoolMonitor
</TITLE>

<META NAME="keywords" CONTENT="edu.psu.citeseerx.corecom.ConnectionPoolMonitor interface">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

edu.psu.citeseerx.corecom

Interface ConnectionPoolMonitor

public interface ConnectionPoolMonitor

Interface for listening to events in a connection pool.  Classes that
 implement this interface should *not* register or de-register themselves
 with the connection pool as part of the interface methods or a thread
 deadlock can occur.

Method Summary

 void
notifyFinalized(ConnectionPool cp)

 void
notifyShutdown(ConnectionPool cp)

Method Detail

notifyFinalized

void notifyFinalized(ConnectionPool cp)

notifyShutdown

void notifyShutdown(ConnectionPool cp)

      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
function CaesarCipher(str, delta) {

var splitStr = str.split('');
var newStr = [];
var k = delta % 26;

for(var i=0; i<splitStr.length; i++) {
  var ascii = splitStr[i].charCodeAt();

  // if uppercase
  if(ascii >= 65 && ascii <= 90) {
    ascii = ascii + k;
    //check if circling around is needed
    if(ascii > 90) {
      ascii = 64 + (ascii - 90);
    }
    newStr.push(String.fromCharCode(ascii));
  }
  // if lowercase
  else if(ascii >= 97 && ascii <= 122) {
    ascii = ascii + k;
    //check if circling around is needed
    if(ascii > 122) {
      ascii = 96 + (ascii - 122);
    }
    newStr.push(String.fromCharCode(ascii));
  }
  // if any other character
  else {
    newStr.push(String.fromCharCode(ascii));
  }
}

var encodedStr = newStr.join('');
console.log(encodedStr);
}

CaesarCipher('www', 87);


text:
if [ $# -ne 4 ]; then
	echo "Usage: $0 <REGION> <NetworkIn|NetworkOut> <START_TIMESTAMP> <END_TIMESTAMP>"
	echo -e "\tNote: Do not change the order of parameters."
	echo -e "\n\tExample: $0 ap-south-1 NetworkOut 2020-06-01T00:00:00.000Z 2020-06-30T23:59:59.000Z"
	exit 1
fi

REGION="$1"
METRIC="$2"
START_TIME="$3"
END_TIME="$4"

ADD_INSTANCES=""

INSTANCES="${ADD_INSTANCES} $(aws ec2 describe-instances --region ${REGION} --query Reservations[*].Instances[*].InstanceId --output text)" || { echo "Failed to run aws ec2 describe-instances commandline, exiting..."; exit 1; }

[ "${INSTANCES}x" == "x" ] && { echo "There are no instances found from the given region ${REGION}, exiting..."; exit 1; }

for _instance_id in ${INSTANCES}; do
	unset _value
	_value="$(aws cloudwatch get-metric-statistics --metric-name ${METRIC} --start-time ${START_TIME} --end-time ${END_TIME} --period 86400 --namespace AWS/EC2 --statistics Sum --dimensions Name=InstanceId,Value=${_instance_id} --region ${REGION} --output text)"
	[ "${_value}x" == "x" ] && { echo "Something went wrong while calculating the network usage of ${_instance_id}"; continue; }
	echo "${_instance_id}: $(echo "${_value}" | awk '{ sum += $2 } END {printf ("%f\n", sum/1024/1024/1024)}';) GiB";
done

echo -e "\nNote: If you think the values are inaccurate, please verify the input and modify if needed."


text:
import {Issue} from "../issue";
import {IRule, IRuleMetadata, RuleTag} from "./_irule";
import {IObject} from "../objects/_iobject";
import {IRegistry} from "../_iregistry";
import {Version} from "../version";
import {BasicRuleConfig} from "./_basic_rule_config";
import {DataDefinition} from "../objects";

export class CDSLegacyViewConf extends BasicRuleConfig {
}

export class CDSLegacyView implements IRule {
  private conf = new CDSLegacyViewConf();
  private reg: IRegistry;

  public getMetadata(): IRuleMetadata {
    return {
      key: "cds_legacy_view",
      title: "CDS Legacy View",
      shortDescription: `Identify CDS Legacy Views`,
      // eslint-disable-next-line max-len
      extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW

https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/

v755 and up`,
      tags: [RuleTag.SingleFile],
    };
  }

  public getConfig() {
    return this.conf;
  }

  public setConfig(conf: CDSLegacyViewConf) {
    this.conf = conf;
  }

  public initialize(reg: IRegistry): IRule {
    this.reg = reg;
    return this;
  }

  public run(o: IObject): Issue[] {
    const issues: Issue[] = [];

    if (this.reg.getConfig().getVersion() < Version.v755
        && this.reg.getConfig().getVersion() !== Version.Cloud) {
      return [];
    }

    if (o.getType() !== "DDLS") {
      return [];
    }

    if (o instanceof DataDefinition) {
      const tree = o.getTree();
      if (tree === undefined) {
        return []; // parser error
      }
      if (tree.findDirectTokenByText("ENTITY") === undefined) {
        const file = o.findSourceFile();
        if (file) {
          issues.push(Issue.atRow(file, 1, "CDS Legacy View", this.getMetadata().key, this.getConfig().severity));
        }
      }
    }

    return issues;
  }

}


text:
require File.expand_path('../models/items_order_index', __FILE__)

module RailsAdminOrderItems
  module Models
  end
end

ActiveRecord::Base.class_eval do

  #scope :ordered_items, proc {|direction, options| RailsAdminOrderItems::Models::ItemsOrderIndex.get_ordered_items self.model_name.constantize, (direction ||= 'ASC'), (options ||= {})}
  def self.ordered_items direction = 'ASC', options = {}
    RailsAdminOrderItems::Models::ItemsOrderIndex.get_ordered_items self.model_name.constantize, direction, options
  end

end


text:
/**
 * Off Canvas Navigation
 * All animations are done via CSS styling located in "assets/scss/components/_navigation.scss"
 */
(function($) {

	/**
	 * Variables
	 */
	var $container 				= $('.navigation-container'),
		$body 					= $('body'),
		$content 				= $('#content'),
		$trigger 				= $container.find('button.trigger'),
		$inner 					= $container.find('.navigation-inner'),
		containerActiveClass	= 'is-open',
		bodyActiveClass			= 'navigation-open',
		itemStart 				= 1,
		itemPrefix				= 'item-';

	/**
	 * Menu object
	 */
	var menu = {
		toggle: function() {
			if(!this._hasContainerClass()) {
				this.open();
			}
			else {
				this.close();
			}
		},
		open: function() {
			this._addContainerClass();
			this._addBodyClass();
		},
		close: function() {
			this._removeContainerClass();
			this._removeBodyClass();
		},
		_hasContainerClass: function() {
			return $container.hasClass(containerActiveClass);
		},
		_addContainerClass: function() {
			if(!this._hasContainerClass()) {
				$container.addClass(containerActiveClass);
			}
		},
		_removeContainerClass: function() {
			if(this._hasContainerClass()) {
				$container.removeClass(containerActiveClass);
			}
		},
		_hasBodyClass: function() {
			return $body.hasClass(bodyActiveClass);
		},
		_addBodyClass: function() {
			if(!this._hasBodyClass()) {
				$body.addClass(bodyActiveClass);
			}
		},
		_removeBodyClass: function() {
			if(this._hasBodyClass()) {
				$body.removeClass(bodyActiveClass);
			}
		},
	};

	/**
	 * What happens when the trigger is clicked
	 */
	$trigger.on('click', function() {
		menu.toggle();
	});

	/**
	 * When someone leaves the last item in the menu,
	 * we'll collapse the menu
	 */
	$inner.find('li a').last().on('keydown', function(e) {
		if (!e.shiftKey) {
			e.preventDefault();
			menu.close();
			$content.find('a').first().focus();
		}
	});

	/**
	 * When the user arrives at the first item (by focus)
	 * we'll expand the menu
	 */
	$inner.find('li a').first().on('focus', function(e) {
		if (!e.shiftKey) {
			e.preventDefault();
			menu.open();
		}
	});

	/**
	 * Add a class to each of the menu items
	 */
	$inner.find('li').each(function() {
		$(this).addClass(itemPrefix + itemStart);
		itemStart++;
	});

})(jQuery); // Fully reference jQuery after this point.


text:
#pragma once

#include <nano/boost/asio/thread_pool.hpp>
#include <nano/lib/utility.hpp>

#include <atomic>
#include <future>
#include <mutex>

namespace nano
{
class signature_check_set final
{
public:
	signature_check_set (size_t size, unsigned char const ** messages, size_t * message_lengths, unsigned char const ** pub_keys, unsigned char const ** signatures, int * verifications) :
	size (size), messages (messages), message_lengths (message_lengths), pub_keys (pub_keys), signatures (signatures), verifications (verifications)
	{
	}

	size_t size;
	unsigned char const ** messages;
	size_t * message_lengths;
	unsigned char const ** pub_keys;
	unsigned char const ** signatures;
	int * verifications;
};

/** Multi-threaded signature checker */
class signature_checker final
{
public:
	signature_checker (unsigned num_threads);
	~signature_checker ();
	void verify (signature_check_set &);
	void stop ();
	void flush ();

	static size_t constexpr batch_size = 256;

private:
	struct Task final
	{
		Task (nano::signature_check_set & check, size_t pending) :
		check (check), pending (pending)
		{
		}
		~Task ()
		{
			release_assert (pending == 0);
		}
		nano::signature_check_set & check;
		std::atomic<size_t> pending;
	};

	bool verify_batch (const nano::signature_check_set & check_a, size_t index, size_t size);
	void verify_async (nano::signature_check_set & check_a, size_t num_batches, std::promise<void> & promise);
	void set_thread_names (unsigned num_threads);
	boost::asio::thread_pool thread_pool;
	std::atomic<int> tasks_remaining{ 0 };
	const bool single_threaded;
	unsigned num_threads;
	std::atomic<bool> stopped{ false };
};
}


text:
Hi! You are probably here because you want to use PipeScript for some data analysis task. Let's get started!

It is highly recommended that you follow along with the tutorial and experiment using the try-it editor for PipeScript:

 PipeScript Online Editor

The page linked above also includes a list of transforms available in PipeScript.

## Datapoint

The data that PipeScript accepts consists of a stream of Datapoints, each of which has the following structure:

```
{
    "t": floating point timestamp (unix time in seconds),
    "d": the datapoint's data content.
}
```

## Starting Out

For the next few examples, we will use the following data:

```json
[{"t": 123, "d": 2},
{"t": 124, "d": "1"},
{"t": 124, "d": 0.1},
{"t": 124, "d": -50},
{"t": 124, "d": true}]
```

This isn't particularly realistic data, since the time stamp is weird, and there is this "true" in the dataset, but it will do for our purposes.

### Comparisons

To start out, let's see which datapoints have their data >= 1.

```
d >= 1
```

If you are familiar with programming, this is just a simple comparison statement. In PipeScript, `d` represents the data portion of a datapoint.

Running the above PipeScript returns:

```json
[{"t": 123, "d": true},
{"t": 124, "d": true},
{"t": 124, "d": false},
{"t": 124, "d": false},
{"t": 124, "d": true}]
```

#### So what happened here?

PipeScript is a stream processing language. This means that your script is executed in order for every datapoint individually. Using the built-in "d" transform, which is the identity (ie, it always just returns the datapoint it gets), we can get our result in the data section of a new stream of datapoints.

Also notice that the boolean was automatically converted to a number. In PipeScript, `false==0` and `true==1`.

### Logic

Logic operations (and/or/not) are built into PipeScript. This allows you to use them as you would in python:

```
d < 0 or not d < 1
```

```json
[{"t": 123, "d": true},
{"t": 124, "d": true},
{"t": 124, "d": false},
{"t": 124, "d": true},
{"t": 124, "d": true}]
```

### Algebra

PipeScript also supports basic algebra. In particular, `+-/*%^` are all built into the language, with `x^y` meaning `pow(x,y)`.

```
(d+5)/2
```

gives:

```json
[{"t": 123, "d": 3.5},
{"t": 124, "d": 3},
{"t": 124, "d": 2.55},
{"t": 124, "d": -22.5},
{"t": 124, "d": 3}]
```

As a side note, previous versions of ConnectorDB used $ instead of `d` for the data portion of the datapoint. The $ transform
is still included for backwards-compatibility, and because it is more visible in certain contexts:

```
($+5)/2
```

By itself, being able to compare and add things to datapoints isn't particularly enlightening, but it becomes useful when used for filtering data:

### Filtering Data

```
if d >= 1
```

In PipeScript, the `if` statement is really a filter. It permits only those datapoints to pass that have met the given condition. When run on our original dataset above, we get:

```json
[{"t": 123, "d": 2},
{"t": 124, "d": 1},
{"t": 124, "d": "true"}]
```

Another, probably more clear, way of writing this same transform is:
```
if(d>=1)
```
Transforms can be called using both a bash-like syntax `function arg1 arg2 arg3`, and a standard function-call syntax: `function(arg1,arg2,arg3)`. You can even put entire pipelines into arguments of a transform (more on that later).

## Using Transforms

To get you started, here are a couple particularly useful scripts that don't require knowledge of pipelines:

```
if last
```
Only returns the last datapoint

```json
[{"t": 124, "d": "true"}]
```

```
sum
```

```json
[{"t": 123, "d": 2},
{"t": 124, "d": 3},
{"t": 124, "d": 3.1},
{"t": 124, "d": -46.9},
{"t": 124, "d": -45.9}]
```

While already pretty useful, the real power of PipeScript comes from combining the transforms into pipelines.

Pipeline


text:
ACCEPTED

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

#### Published in
Can. J. Bot. 31: 628 (1953)

#### Original name
Coniothecium betulinum Corda, 1837

### Remarks
null