text:
/*
 * Swaggy Jenkins
 * Jenkins API clients generated from Swagger / Open API specification
 *
 * The version of the OpenAPI document: 1.5.1-pre.0
 * Contact: blah@cliffano.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package org.openapitools.model;

import java.util.Objects;
import java.util.Arrays;
import org.openapitools.model.GithubRepositories;
import org.openapitools.model.GithubRespositoryContainerlinks;
import com.fasterxml.jackson.annotation.*;

import javax.validation.constraints.*;
import javax.validation.Valid;
import io.micronaut.core.annotation.*;
import javax.annotation.Generated;

/**
 * GithubRespositoryContainer
 */
@JsonPropertyOrder({
  GithubRespositoryContainer.JSON_PROPERTY_PROPERTY_CLASS,
  GithubRespositoryContainer.JSON_PROPERTY_LINKS,
  GithubRespositoryContainer.JSON_PROPERTY_REPOSITORIES
})
@JsonTypeName("GithubRespositoryContainer")
@Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen", date="2022-06-04T08:08:17.621469Z[Etc/UTC]")
@Introspected
public class GithubRespositoryContainer {
    public static final String JSON_PROPERTY_PROPERTY_CLASS = "_class";
    private String propertyClass;

    public static final String JSON_PROPERTY_LINKS = "_links";
    private GithubRespositoryContainerlinks links;

    public static final String JSON_PROPERTY_REPOSITORIES = "repositories";
    private GithubRepositories repositories;

    public GithubRespositoryContainer() {
    }

    public GithubRespositoryContainer propertyClass(String propertyClass) {
        this.propertyClass = propertyClass;
        return this;
    }

    /**
     * Get propertyClass
     * @return propertyClass
     **/
    @Nullable
    @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getPropertyClass() {
        return propertyClass;
    }

    @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setPropertyClass(String propertyClass) {
        this.propertyClass = propertyClass;
    }

    public GithubRespositoryContainer links(GithubRespositoryContainerlinks links) {
        this.links = links;
        return this;
    }

    /**
     * Get links
     * @return links
     **/
    @Valid
    @Nullable
    @JsonProperty(JSON_PROPERTY_LINKS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public GithubRespositoryContainerlinks getLinks() {
        return links;
    }

    @JsonProperty(JSON_PROPERTY_LINKS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setLinks(GithubRespositoryContainerlinks links) {
        this.links = links;
    }

    public GithubRespositoryContainer repositories(GithubRepositories repositories) {
        this.repositories = repositories;
        return this;
    }

    /**
     * Get repositories
     * @return repositories
     **/
    @Valid
    @Nullable
    @JsonProperty(JSON_PROPERTY_REPOSITORIES)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public GithubRepositories getRepositories() {
        return repositories;
    }

    @JsonProperty(JSON_PROPERTY_REPOSITORIES)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setRepositories(GithubRepositories repositories) {
        this.repositories = repositories;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GithubRespositoryContainer githubRespositoryContainer = (GithubRespositoryContainer) o;
        return Objects.equals(this.propertyClass, githubRespositoryContainer.propertyClass) &&
            Objects.equals(this.links, githubRespositoryContainer.links) &&
            Objects.equals(this.repositories, githubRespositoryContainer.repositories);
    }

    @Override
    public int hashCode() {
        return Objects.hash(propertyClass, links, repositories);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class GithubRespositoryContainer {\n");
        sb.append("    propertyClass: ").append(toIndentedString(propertyClass)).append("\n");
        sb.append("    links: ").append(toIndentedString(links)).append("\n");
        sb.append("    repositories: ").append(toIndentedString(repositories)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    /**
     * Convert the given object to string with each line indented by 4 spaces
     * (except the first line).
     */
    private String toIndentedString(Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }

}


text:
[![Build Status](https://travis-ci.org/less/less.js.png?branch=master)](https://travis-ci.org/less/less.js)
 [![Dependencies](https://david-dm.org/less/less.js.png)](https://david-dm.org/less/less.js) [![devDependency Status](https://david-dm.org/less/less.js/dev-status.png)](https://david-dm.org/less/less.js#info=devDependencies) [![optionalDependency Status](https://david-dm.org/less/less.js/optional-status.png)](https://david-dm.org/less/less.js#info=optionalDependencies)

# [Less.js v1.7.4](http://lesscss.org)

> The **dynamic** stylesheet language. [http://lesscss.org](http://lesscss.org).

This is the JavaScript, official, stable version of Less.

## Getting Started

Options for adding Less.js to your project:

* Install with [NPM](https://npmjs.org/): `npm install less`
* [Download the latest release][download]
* Clone the repo: `git clone git://github.com/less/less.js.git`

## More information

For general information on the language, configuration options or usage visit [lesscss.org](http://lesscss.org).

Here are other resources for using Less.js:

* [stackoverflow.com][so] is a great place to get answers about Less.
* [Less.js Issues][issues] for reporting bugs

## Contributing
Please read [CONTRIBUTING.md](./CONTRIBUTING.md). Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

### Reporting Issues

Before opening any issue, please search for existing issues and read the [Issue Guidelines](https://github.com/necolas/issue-guidelines), written by [Nicolas Gallagher](https://github.com/necolas/). After that if you find a bug or would like to make feature request, [please open a new issue][issues].

Please report documentation issues in [the documentation project](https://github.com/less/less-docs).

### Development

Read [Developing Less](http://lesscss.org/usage/#developing-less).

## Release History
See the [changelog](CHANGELOG.md)

## [License](LICENSE)

Copyright (c) 2009-2014 [Alexis Sellier](http://cloudhead.io/) & The Core Less Team
Licensed under the [Apache License](LICENSE).

[so]: http://stackoverflow.com/questions/tagged/twitter-bootstrap+less "StackOverflow.com"
[issues]: https://github.com/less/less.js/issues "GitHub Issues for Less.js"
[download]: https://github.com/less/less.js/zipball/master "Download Less.js"

redpajama_set_name: RedPajamaGithub


text:
package containers

import (
	"context"
	"time"

	"github.com/gogo/protobuf/types"
)

// Container represents the set of data pinned by a container. Unless otherwise
// noted, the resources here are considered in use by the container.
//
// The resources specified in this object are used to create tasks from the container.
type Container struct {
	// ID uniquely identifies the container in a nameapace.
	//
	// This property is required and cannot be changed after creation.
	ID string

	// Labels provide metadata extension for a contaienr.
	//
	// These are optional and fully mutable.
	Labels map[string]string

	// Image specifies the image reference used for a container.
	//
	// This property is optional but immutable.
	Image string

	// Runtime specifies which runtime should be used when launching container
	// tasks.
	//
	// This property is required and immutable.
	Runtime RuntimeInfo

	// Spec should carry the the runtime specification used to implement the
	// container.
	//
	// This field is required but mutable.
	Spec *types.Any

	// SnapshotKey specifies the snapshot key to use for the container's root
	// filesystem. When starting a task from this container, a caller should
	// look up the mounts from the snapshot service and include those on the
	// task create request.
	//
	// This field is not required but immutable.
	SnapshotKey string

	// Snapshotter specifies the snapshotter name used for rootfs
	//
	// This field is not required but immutable.
	Snapshotter string

	// CreatedAt is the time at which the container was created.
	CreatedAt time.Time

	// UpdatedAt is the time at which the container was updated.
	UpdatedAt time.Time

	// Extensions stores client-specified metadata
	Extensions map[string]types.Any
}

// RuntimeInfo holds runtime specific information
type RuntimeInfo struct {
	Name    string
	Options *types.Any
}

// Store interacts with the underlying container storage
type Store interface {
	Get(ctx context.Context, id string) (Container, error)

	// List returns containers that match one or more of the provided filters.
	List(ctx context.Context, filters ...string) ([]Container, error)

	// Create a container in the store from the provided container.
	Create(ctx context.Context, container Container) (Container, error)

	// Update the container with the provided container object. ID must be set.
	//
	// If one or more fieldpaths are provided, only the field corresponding to
	// the fieldpaths will be mutated.
	Update(ctx context.Context, container Container, fieldpaths ...string) (Container, error)

	// Delete a container using the id.
	//
	// nil will be returned on success. If the container is not known to the
	// store, ErrNotFound will be returned.
	Delete(ctx context.Context, id string) error
}


text:
// Page specific js code

/*global
    msos: false,
    jQuery: false
*/

msos.provide("demo.bstrap.button");
msos.require("bootstrap.button");
msos.require("bootstrap.navigation");

msos.onload_functions.push(
    function () {
        "use strict";

        msos.console.info('Page: button.html loaded!');

        // Button state demo
        jQuery('#fat-btn').click(
            function () {
                var btn = $(this);
                btn.button('loading');
                setTimeout(
                    function () {
                        btn.button('reset')
                    },
                    3000
                );
            }
        );
    }
);


text:
package com.linkedin.databus2.core.container.monitoring.mbean;

import java.util.List;

/**
 * MBean interface for the Container for all monitoring mbeans
 */
public interface ContainerStatisticsCollectorMBean
{

  // ************** GETTERS *********************

  /**
   * Obtains the mbean used to collect statistics about the total traffic originating from
   * remote clients.
   */
  ContainerTrafficTotalStatsMBean getOutboundTrafficTotalStats();

  /**
   * Obtains the mbean used to collect statistics about the total traffic originating from the
   * container.
   */
  ContainerTrafficTotalStatsMBean getInboundTrafficTotalStats();

  /** Checks if the stats collector is enabled */
  boolean isEnabled();

  /** Obtains the list of client ids for which there are stats accumulated */
  List<String> getOutboundClients();

  /** Obtains the stats monitoring bean for a given client id */
  ContainerTrafficTotalStats getOutboundClientStats(String client);

  // ****************** MUTATORS *********************

  /** Resets the statistics. */
  void reset();

  /**
   * Enables/disables the stats collector
   * @param enabled        true to enable, false to disable
   */
  void setEnabled(boolean enabled);
}


text:
package nl.armatiek.xslweb.saxon.functions.security;

import java.beans.BeanInfo;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.io.IOException;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.fasterxml.jackson.dataformat.xml.XmlMapper;

import net.sf.saxon.Configuration;
import net.sf.saxon.event.PipelineConfiguration;
import net.sf.saxon.event.Receiver;
import net.sf.saxon.event.StreamWriterToReceiver;
import net.sf.saxon.expr.XPathContext;
import net.sf.saxon.lib.ExtensionFunctionDefinition;
import net.sf.saxon.lib.ParseOptions;
import net.sf.saxon.lib.SerializerFactory;
import net.sf.saxon.om.Item;
import net.sf.saxon.om.Sequence;
import net.sf.saxon.om.StructuredQName;
import net.sf.saxon.om.ZeroOrOne;
import net.sf.saxon.serialize.SerializationProperties;
import net.sf.saxon.trans.XPathException;
import net.sf.saxon.tree.tiny.TinyBuilder;
import net.sf.saxon.value.SequenceType;
import net.sf.saxon.value.StringValue;
import nl.armatiek.xslweb.configuration.Definitions;
import nl.armatiek.xslweb.saxon.functions.ExtensionFunctionCall;

/**
 *
 *
 * @author Maarten Kroon
 */
public class Principal extends ExtensionFunctionDefinition {

  private static final Logger logger = LoggerFactory.getLogger(Principal.class);

  private static final StructuredQName qName = new StructuredQName("", Definitions.NAMESPACEURI_XSLWEB_FX_SECURITY, "principal");

  @Override
  public StructuredQName getFunctionQName() {
    return qName;
  }

  @Override
  public int getMinimumNumberOfArguments() {
    return 0;
  }

  @Override
  public int getMaximumNumberOfArguments() {
    return 2;
  }

  @Override
  public SequenceType[] getArgumentTypes() {
    return new SequenceType[] { SequenceType.OPTIONAL_STRING, SequenceType.SINGLE_STRING };
  }

  @Override
  public SequenceType getResultType(SequenceType[] suppliedArgumentTypes) {
    return SequenceType.OPTIONAL_ITEM;
  }

  @Override
  public boolean hasSideEffects() {
    return true;
  }

  @Override
  public ExtensionFunctionCall makeCallExpression() {
    return new PrincipalCall();
  }

  private static class PrincipalCall extends SecurityExtensionFunctionCall {

    @SuppressWarnings({ "unchecked" })
    private Object getPrincipalFromClassName(Subject subject, String type) {
      Object principal = null;
      try {
        Class cls = Class.forName(type);
        principal = subject.getPrincipals().oneByType(cls);
      } catch (ClassNotFoundException e) {
        if (logger.isErrorEnabled()) {
          logger.error("Unable to find class for type [" + type + "]");
        }
      }
      return principal;
    }

    private String getPrincipalProperty(Object principal, String property) throws XPathException {
      String strValue = null;
      try {
        BeanInfo bi = Introspector.getBeanInfo(principal.getClass());

        // Loop through the properties to get the string value of the specified property
        boolean foundProperty = false;
        for (PropertyDescriptor pd : bi.getPropertyDescriptors()) {
          if (pd.getName().equals(property)) {
            Object value = pd.getReadMethod().invoke(principal, (Object[]) null);
            strValue = String.valueOf(value);
            foundProperty = true;
            break;
          }
        }

        if (!foundProperty) {
          final String message = "Property [" + property + "] not found in principal of type [" + principal.getClass().getName() + "]";
          if (logger.isErrorEnabled()) {
            logger.error(message);
          }
          throw new XPathException(message);
        }

      } catch (Exception e) {
        final String message = "Error reading property [" + property + "] from principal of type [" + principal.getClass().getName() + "]";
        if (logger.isErrorEnabled()) {
          logger.error(message, e);
        }
        throw new XPathException(message, e);
      }

      return strValue;
    }

    @Override
    public ZeroOrOne<Item> call(XPathContext context, Sequence[] arguments) throws XPathException {
      if (!isSecurityContextAvailable(context)) {
        return ZeroOrOne.empty();
      }
      Subject subject = SecurityUtils.getSubject();
      if (subject == null) {
        return ZeroOrOne.empty();
      }
      Object value = null;
      Object principal;
      if (arguments.length == 0 || arguments[0].head() == null) {
        principal = subject.getPrincipal();
      } else {
        String type = ((StringValue) arguments[0].head()).getStringValue();
        principal = getPrincipalFromClassName(subject, type);
      }
      if (principal != null) {
        if (arguments.length < 2) {
          value = principal;
        } else {
          String property = ((StringValue) arguments[1].head()).getStringValue();
          value = getPrincipalProperty(principal, property);
        }
      }
      if (value == null) {
        return new ZeroOrOne<Item>(null);
      } else if (value instanceof String) {
        return new ZeroOrOne<Item>(new StringValue((String) value));
      } else {
        try {
          Configuration config = context.getConfiguration();
          PipelineConfiguration pipe = config.makePipelineConfiguration();
          pipe.getParseOptions().getParserFeatures().remove("http://apache.org/xml/features/xinclude");
          TinyBuilder builder = new TinyBuilder(pipe);
          SerializerFactory sf = config.getSerializerFactory();
          Receiver receiver = sf.getReceiver(builder, new SerializationProperties());
          ParseOptions options = pipe.getParseOptions();
          options.setContinueAfterValidationErrors(true);
          XmlMapper xmlMapper = new XmlMapper();
          xmlMapper.writeValue(new StreamWriterToReceiver(receiver), value);
          return new ZeroOrOne<Item>(builder.getCurrentRoot());
        } catch (IOException ioe) {
          throw new XPathException("Error serializing Principal", ioe);
        }
      }

    }

  }

}


text:
require 'spec_helper'

describe 'stack remove' do
  after(:each) do
    run 'kontena stack rm --force simple'
  end

  it "removes a stack" do
    with_fixture_dir("stack/simple") do
      run! 'kontena stack install --no-deploy'
    end
    run! "kontena stack rm --force simple"
    k = run "kontena stack show simple"
    expect(k.code).not_to eq(0)
  end

  it "removes multiple stacks" do
    with_fixture_dir("stack/simple") do
      run! 'kontena stack install --no-deploy'
      run! 'kontena stack install --no-deploy --name simple2'
    end
    run! "kontena stack rm --force simple simple2"
    k = run "kontena stack show simple2"
    expect(k.code).not_to eq(0)
  end

  it "prompts without --force" do
    with_fixture_dir("stack/simple") do
      run! 'kontena stack install --no-deploy'
    end
    k = kommando 'kontena stack rm simple', timeout: 5
    k.out.on "To proceed, type" do
      sleep 0.5
      k.in << "simple\r"
    end
    k.run
    expect(k.code).to eq(0)
  end

  context "for a stack that has dependencies" do
    before do
      with_fixture_dir("stack/depends") do
        run! 'kontena stack install'
      end
    end

    after do
      run 'kontena stack rm --force twemproxy'
      run 'kontena stack rm --force twemproxy-redis_from_yml'
      run 'kontena stack rm --force twemproxy-twemproxy-redis_from_registry'
    end

    it 'removes all the dependencies' do
      k = run! 'kontena stack ls -q'
      expect(k.out.split(/[\r\n]/)).to match array_including(
        'twemproxy-redis_from_registry',
        'twemproxy-redis_from_yml',
        'twemproxy'
      )

      run! 'kontena stack rm --force twemproxy'

      k = run! 'kontena stack ls -q'
      expect(k.out).not_to match /twemproxy-redis_from_registry/
      expect(k.out).not_to match /twemproxy-redis_from_yml/
      expect(k.out).not_to match /twemproxy/
    end
  end
end


text:
package org.aperte.lp.movies;

import org.aperte.lp.ConfigValidator;
import org.aperte.lp.ParseException;
import org.aperte.lp.model.ValidateConfigResponse;
import org.junit.Assert;
import org.junit.Test;

import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

/**
 * Tests configuration validation for the opening movies publication.
 */
public class OpeningConfigValidatorTest {

    private ConfigValidator v;

    public OpeningConfigValidatorTest() {
        Set<String> countries = new HashSet<String>(2);
        countries.add("ca");
        v = new OpeningConfigValidator(countries);
    }

    @Test
    public void testNullConfig() throws Exception {
        validateError(v.validateConfig(null));
    }

    @Test
    public void testEmptyConfig() throws Exception {
        validateError(v.validateConfig(""));
    }

    @Test
    public void testNoAttributes() throws Exception {
        validateError(v.validateConfig("{}"));
    }

    @Test(expected = ParseException.class)
    public void testInvalidJson() throws Exception {
        v.validateConfig("{\"country\"X}");
    }

    @Test
    public void testEmptyCountry() throws Exception {
        validateError(v.validateConfig("{\"country\":\"\"}"));
    }

    @Test
    public void testInvalidCountry() throws Exception {
        validateError(v.validateConfig("{\"country\":\"UNKNOWN\"}"));
    }

    @Test
    public void testValidCountry() throws Exception {
        validateSuccess(v.validateConfig("{\"country\":\"ca\"}"));
    }

    private void validateSuccess(ValidateConfigResponse response) {
        Assert.assertNotNull(response);
        Assert.assertTrue(response.isValid());
    }

    private void validateError(ValidateConfigResponse response) {
        Assert.assertNotNull(response);
        Assert.assertFalse(response.isValid());
        Assert.assertEquals(Collections
                .singletonList(OpeningConfigValidator.SELECT_COUNTRY_ERROR),
                response.getErrors());
    }

}


text:
// Copyright Douglas Gregor 2001-2004. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

// For more information, see http://www.boost.org/libs/signals

#ifndef BOOST_SIGNAL_HPP
#define BOOST_SIGNAL_HPP

#define BOOST_SIGNALS_MAX_ARGS 10

#include <boost/config.hpp>
#include <boost/type_traits/function_traits.hpp>
#include <boost/signals/signal0.hpp>
#include <boost/signals/signal1.hpp>
#include <boost/signals/signal2.hpp>
#include <boost/signals/signal3.hpp>
#include <boost/signals/signal4.hpp>
#include <boost/signals/signal5.hpp>
#include <boost/signals/signal6.hpp>
#include <boost/signals/signal7.hpp>
#include <boost/signals/signal8.hpp>
#include <boost/signals/signal9.hpp>
#include <boost/signals/signal10.hpp>
#include <boost/function.hpp>

#ifdef BOOST_HAS_ABI_HEADERS
#  include BOOST_ABI_PREFIX
#endif

namespace boost {
#ifndef BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX
  namespace BOOST_SIGNALS_NAMESPACE {
    namespace detail {
      template<int Arity,
               typename Signature,
               typename Combiner,
               typename Group,
               typename GroupCompare,
               typename SlotFunction>
      class real_get_signal_impl;

      template<typename Signature,
               typename Combiner,
               typename Group,
               typename GroupCompare,
               typename SlotFunction>
      class real_get_signal_impl<0, Signature, Combiner, Group, GroupCompare,
                                 SlotFunction>
      {
        typedef function_traits<Signature> traits;

      public:
        typedef signal0<typename traits::result_type,
                        Combiner,
                        Group,
                        GroupCompare,
                        SlotFunction> type;
      };

      template<typename Signature,
               typename Combiner,
               typename Group,
               typename GroupCompare,
               typename SlotFunction>
      class real_get_signal_impl<1, Signature, Combiner, Group, GroupCompare,
                                 SlotFunction>
      {
        typedef function_traits<Signature> traits;

      public:
        typedef signal1<typename traits::result_type,
                        typename traits::arg1_type,
                        Combiner,
                        Group,
                        GroupCompare,
                        SlotFunction> type;
      };

      template<typename Signature,
               typename Combiner,
               typename Group,
               typename GroupCompare,
               typename SlotFunction>
      class real_get_signal_impl<2, Signature, Combiner, Group, GroupCompare,
                                 SlotFunction>
      {
        typedef function_traits<Signature> traits;

      public:
        typedef signal2<typename traits::result_type,
                        typename traits::arg1_type,
                        typename traits::arg2_type,
                        Combiner,
                        Group,
                        GroupCompare,
                        SlotFunction> type;
      };

      template<typename Signature,
               typename Combiner,
               typename Group,
               typename GroupCompare,
               typename SlotFunction>
      class real_get_signal_impl<3, Signature, Combiner, Group, GroupCompare,
                                 SlotFunction>
      {
        typedef function_traits<Signature> traits;

      public:
        typedef signal3<typename traits::result_type,
                        typename traits::arg1_type,
                        typename traits::arg2_type,
                        typename traits::arg3_type,
                        Combiner,
                        Group,
                        GroupCompare,
                        SlotFunction> type;
      };

      template<typename Signature,
               typename Combiner,
               typename Group,
               typename GroupCompare,
               typename SlotFunction>
      class real_get_signal_impl<4, Signature, Combiner, Group, GroupCompare,
                                 SlotFunction>
      {
        typedef function_traits<Signature> traits;

      public:
        typedef signal4<typename traits::result_type,
                        typename traits::arg1_type,
                        typename traits::arg2_type,
                        typename traits::arg3_type,
                        typename traits::arg4_type,
                        Combiner,
                        Group,
                        GroupCompare,
                        SlotFunction> type;
      };

      template<typename Signature,
               typename Combiner,
               typename Group,
               typename GroupCompare,
               typename SlotFunction>
      class real_get_signal_impl<5, Signature, Combiner, Group, GroupCompare,
                                 SlotFunction>
      {
        typedef function_traits<Signature> traits;

      public:
        typedef signal5<typename traits::result_type,
                        typename traits::arg1_type,
                        typename traits::arg2_type,
                        typename traits::arg3_type,
                        typename traits::arg4_type,
                        typename traits::arg5_type,
                        Combiner,
                        Group,
                        GroupCompare,
                        SlotFunction> type;
      };

      template<typename Signature,
               typename Combiner,
               typename Group,
               typename GroupCompare,
               typename SlotFunction>
      class real_get_signal_impl<6, Signature, Combiner, Group, GroupCompare,
                                 SlotFunction>
      {
        typedef function_traits<Signature> traits;

      public:
        typedef signal6<typename traits::result_type,
                        typename traits::arg1_type,
                        typename traits::arg2_type,
                        typename traits::arg3_type,
                        typename traits::arg4_type,
                        typename traits::arg5_type,
                        typename traits::arg6_type,
                        Combiner,
                        Group,
                        GroupCompare,
                        SlotFunction> type;
      };

      template<typename Signature,
               typename Combiner,
               typename Group,
               typename GroupCompare,
               typename SlotFunction>
      class real_get_signal_impl<7, Signature, Combiner, Group, GroupCompare,
                                 SlotFunction>
      {
        typedef function_traits<Signature> traits;

      public:
        typedef signal7<typename traits::result_type,
                        typename traits::arg1_type,
                        typename traits::arg2_type,
                        typename traits::arg3_type,
                        typename traits::arg4_type,
                        typename traits::arg5_type,
                        typename traits::arg6_type,
                        typename traits::arg7_type,
                        Combiner,
                        Group,
                        GroupCompare,
                        SlotFunction> type;
      };

      template<typename Signature,
               typename Combiner,
               typename Group,
               typename GroupCompare,
               typename SlotFunction>
      class real_get_signal_impl<8, Signature, Combiner, Group, GroupCompare,
                                 SlotFunction>
      {
        typedef function_traits<Signature> traits;

      public:
        typedef signal8<typename traits::result_type,
                        typename traits::arg1_type,
                        typename traits::arg2_type,
                        typename traits::arg3_type,
                        typename traits::arg4_type,
                        typename traits::arg5_type,
                        typename traits::arg6_type,
                        typename traits::arg7_type,
                        typename traits::arg8_type,
                        Combiner,
                        Group,
                        GroupCompare,
                        SlotFunction> type;
      };

      template<typename Signature,
               typename Combiner,
               typename Group,
               typename GroupCompare,
               typename SlotFunction>
      class real_get_signal_impl<9, Signature, Combiner, Group, GroupCompare,
                                 SlotFunction>
      {
        typedef function_traits<Signature> traits;

      public:
        typedef signal9<typename traits::result_type,
                        typename traits::arg1_type,
                        typename traits::arg2_type,
                        typename traits::arg3_type,
                        typename traits::arg4_type,
                        typename traits::arg5_type,
                        typename traits::arg6_type,
                        typename traits::arg7_type,
                        typename traits::arg8_type,
                        typename traits::arg9_type,
                        Combiner,
                        Group,
                        GroupCompare,
                        SlotFunction> type;
      };

      template<typename Signature,
               typename Combiner,
               typename Group,
               typename GroupCompare,
               typename SlotFunction>
      class real_get_signal_impl<10, Signature, Combiner, Group, GroupCompare,
                                 SlotFunction>
      {
        typedef function_traits<Signature> traits;

      public:
        typedef signal10<typename traits::result_type,
                         typename traits::arg1_type,
                         typename traits::arg2_type,
                         typename traits::arg3_type,
                         typename traits::arg4_type,
                         typename traits::arg5_type,
                         typename traits::arg6_type,
                         typename traits::arg7_type,
                         typename traits::arg8_type,
                         typename traits::arg9_type,
                         typename traits::arg10_type,
                         Combiner,
                         Group,
                         GroupCompare,
                         SlotFunction> type;
      };

      template<typename Signature,
               typename Combiner,
               typename Group,
               typename GroupCompare,
               typename SlotFunction>
      struct get_signal_impl :
        public real_get_signal_impl<(function_traits<Signature>::arity),
                                    Signature,
                                    Combiner,
                                    Group,
                                    GroupCompare,
                                    SlotFunction>
      {
      };

    } // end namespace detail
  } // end namespace BOOST_SIGNALS_NAMESPACE

  // Very lightweight wrapper around the signalN classes that allows signals to
  // be created where the number of arguments does not need to be part of the
  // class name.
  template<
    typename Signature, // function type R (T1, T2, ..., TN)
    typename Combiner = last_value<typename function_traits<Signature>::result_type>,
    typename Group = int,
    typename GroupCompare = std::less<Group>,
    typename SlotFunction = function<Signature>
  >
  class signal :
    public BOOST_SIGNALS_NAMESPACE::detail::get_signal_impl<Signature,
                                                            Combiner,
                                                            Group,
                                                            GroupCompare,
                                                            SlotFunction>::type
  {
    typedef typename BOOST_SIGNALS_NAMESPACE::detail::get_signal_impl<
                       Signature,
                       Combiner,
                       Group,
                       GroupCompare,
                       SlotFunction>::type base_type;

  public:
    explicit signal(const Combiner& combiner = Combiner(),
                    const GroupCompare& group_compare = GroupCompare()) :
      base_type(combiner, group_compare)
    {
    }
  };
#endif // ndef BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX

} // end namespace boost

#ifdef BOOST_HAS_ABI_HEADERS
#  include BOOST_ABI_SUFFIX
#endif

#endif // BOOST_SIGNAL_HPP


text:
package com.dremio.services.fabric.simple;

import com.google.protobuf.MessageLite;

/**
 * An abstract implementation of receiver handler that manage the default response and request fields.
 *
 * @param <REQUEST>
 * @param <RESPONSE>
 */
public abstract class AbstractReceiveHandler<REQUEST extends MessageLite, RESPONSE extends MessageLite> implements ReceiveHandler<REQUEST, RESPONSE> {

  private final REQUEST defaultRequest;
  private final RESPONSE defaultResponse;

  protected AbstractReceiveHandler(REQUEST defaultRequest, RESPONSE defaultResponse) {
    this.defaultRequest = defaultRequest;
    this.defaultResponse = defaultResponse;
  }

  @Override
  public RESPONSE getDefaultResponse() {
    return defaultResponse;
  }

  @Override
  public REQUEST getDefaultRequest() {
    return defaultRequest;
  }

}


text:
/* Classes to manage lookup of static names in a table. */

#ifndef nsStaticNameTable_h___
#define nsStaticNameTable_h___

#include "pldhash.h"
/* This class supports case insensitive lookup.
 *
 * It differs from atom tables:
 * - It supports case insensitive lookup.
 * - It has minimal footprint by not copying the string table.
 * - It does no locking.
 * - It returns zero based indexes and const nsCString& as required by its
 *   callers in the parser.
 * - It is not an xpcom interface - meant for fast lookup in static tables.
 *
 * ***REQUIREMENTS***
 * - It *requires* that all entries in the table be lowercase only.
 * - It *requires* that the table of strings be in memory that lives at least
 *    as long as this table object - typically a static string array.
 */

class NS_COM nsStaticCaseInsensitiveNameTable
{
public:
  enum { NOT_FOUND = -1 };

  PRBool           Init(const char* const aNames[], PRInt32 Count);
  PRInt32          Lookup(const nsACString& aName);
  PRInt32          Lookup(const nsAString& aName);
  const nsAFlatCString& GetStringValue(PRInt32 index);

  nsStaticCaseInsensitiveNameTable();
  ~nsStaticCaseInsensitiveNameTable();

private:
  nsDependentCString*   mNameArray;
  PLDHashTable mNameTable;
  nsDependentCString    mNullStr;
};

#endif /* nsStaticNameTable_h___ */


text:
SphereSystem::SphereSystem(ParticleMesh& pm)
	:pm(pm)
	,su(particle_bb)
{
}

SphereSystem::~SphereSystem() {
}

void SphereSystem::setup() {
	// load particle texture
	ofImage particle_img;
	if(!particle_img.loadImage("particle_glow.png")) {
		printf("Cannot load particle image.\n");
		::exit(0);
	}
	particle_tex.setPixels(particle_img.getPixels(), particle_img.getWidth(), particle_img.getHeight(), GL_RGBA);
	particle_bb.setTexture(particle_tex.getID());
	printf("id: %d\n", particle_tex.getID());

	// load the sphere vertices
	OBJ sphere_loader;
	sphere_loader.import(File::toDataPath("sphere.obj"));
	sphere_vd = sphere_loader["sphere"];

	// create some test particles
	int num_particles = 200;
	if(pm.left_hand != NULL && pm.right_hand != NULL) {
		su.setup(pm.left_hand, pm.left_hand, pm.right_hand);
		su.addParticles(num_particles);
	}
}

void SphereSystem::update() {
	su.update();
}

void SphereSystem::draw(const Mat4& pm, const Mat4& vm, const Vec3& right, const Vec3& up) {
	su.draw(pm, vm, right, up);
}

void SphereSystem::debugDraw() {
	if(app_settings.debug_draw_spheres) {
		if(pm.left_hand != NULL) {
			Vec3& pos = pm.left_hand->position;
			glColor3f(1,1,1);
			glPushMatrix();
				glTranslatef(pos.x, pos.y, pos.z);
				sphere_vd.debugDraw();
			glPopMatrix();
		}
		if(pm.right_hand != NULL) {
			Vec3& pos = pm.right_hand->position;
			glColor3f(1,1,1);
			glPushMatrix();
				glTranslatef(pos.x, pos.y, pos.z);
				sphere_vd.debugDraw();
			glPopMatrix();
		}
	}
	su.debugDraw();
}

void SphereSystem::removeTrails() {
	su.removeTrails();
}
void SphereSystem::resetParticleSizes() {
	su.resetParticleSizes();
}


text:
module OutpostHelper
  # Public: Maps the standard Rails flash keys (+notice+, +alert+) to the
  # appropriate Bootstrap alert class (+success+, +error+ respectively).
  # Falls back to just returning the passed-in symbol as a string.
  #
  # name - The flash key as a Symbol.
  #
  # Examples
  #
  #   <div class="alert alert-<%= flash_alert_type(:notice) %>">
  #   # =>

  #
  # Returns String of appropriate CSS class for Bootstrap alerts.
  def flash_alert_type(name)
    name_bootstrap_map = {
      notice: "success",
      alert:  "error"
    }

    name_bootstrap_map[name.to_sym] || name.to_s
  end

  def render_flash_messages
    if flash.present?
      render '/outpost/shared/flash_messages', flash: flash
    end
  end

  def render_breadcrumbs
    if breadcrumbs.present?
      render '/outpost/shared/breadcrumbs', breadcrumbs: breadcrumbs
    end
  end

  def render_navigation
    render '/outpost/shared/navigation', current_user: current_user
  end

  # Public: Place a modal anywhere with a button to toggle it.
  #
  # options - (Hash) Options to pass into the modal template. Useful for
  #           CSS ID, and modal title.
  # block   - The block that gets captured and rendered inside of the modal.
  #
  # Returns String of rendered modal and toggle button.
  def modal_toggle(options={}, &block)
    render "/outpost/shared/modal", options: options, body: capture(&block)
  end
end


text:
//
//  PXSearchViewController.h
//  ZhonglieApp
//
//  Created by 邱思雨 on 15/5/29.
//  Copyright (c) 2015年 PX. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface PXSearchViewController : UIViewController
/**
 *  用户输入的搜索内容
 */
@property (nonatomic,copy) NSString *SearchText;

@end


text:
import hexutils
import serial

class SerialIO:
    """IO specialization for serial port."""

    def __init__(self, port, baudrate=115200):
        self.port = serial.Serial(port, timeout=1)
# some stupid ports need reset baudrate, sometimes
        self.port.setBaudrate(9600)
        self.port.setBaudrate(baudrate)
        self.port.flushInput()
        self.port.flushOutput()
        self._nl = b'\n\r'

    def getHardware(self):
        """Return HW type."""
        return 'RS232'

    def readRaw(self, size):
        """Read bytes from serial port, used only for sync."""
        return self.port.read(size)

    def recv(self):
        """Recieve message (line) from device."""
        data = self.port.readline()
        if not data.endswith(b'\r\n'):
            raise ValueError("Missing \\r\\n at end of recieved string: %s." % repr(data))
        return str(data[:-2], 'ascii')

    def writeRaw(self, data):
        """Send bytes to device, used only for sync."""
        return self.port.write(data)

    def send(self, data):
        """Send message to device."""
# we suppose that trought serial line is send only intel hex
# so we check if hex is OK or need append checksum
        if data[0] != ':':
            raise ValueError("FIXME: we expect intel hex but got: %s" % data)
        l = int(data[1:3], 16)
        if 1 + 2 + 4 + 2 + 2*l == len(data):
            data = data + hexutils.ihexcksum(data)
        elif 1 + 2 + 4 + 2 + 2*l + 2 != len(data):
            raise ValueError("FIXME: Invalid lenght for intel hex???: %s" % data)
        print("SerialIO.send(%s)" % data)
        return self.port.write(bytes(data, 'ascii') + self._nl)


text:
package v1

import (
	v1 "github.com/openshift/api/config/v1"
	scheme "github.com/openshift/client-go/config/clientset/versioned/scheme"
	meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	types "k8s.io/apimachinery/pkg/types"
	watch "k8s.io/apimachinery/pkg/watch"
	rest "k8s.io/client-go/rest"
)

// AuthenticationsGetter has a method to return a AuthenticationInterface.
// A group's client should implement this interface.
type AuthenticationsGetter interface {
	Authentications() AuthenticationInterface
}

// AuthenticationInterface has methods to work with Authentication resources.
type AuthenticationInterface interface {
	Create(*v1.Authentication) (*v1.Authentication, error)
	Update(*v1.Authentication) (*v1.Authentication, error)
	UpdateStatus(*v1.Authentication) (*v1.Authentication, error)
	Delete(name string, options *meta_v1.DeleteOptions) error
	DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
	Get(name string, options meta_v1.GetOptions) (*v1.Authentication, error)
	List(opts meta_v1.ListOptions) (*v1.AuthenticationList, error)
	Watch(opts meta_v1.ListOptions) (watch.Interface, error)
	Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Authentication, err error)
	AuthenticationExpansion
}

// authentications implements AuthenticationInterface
type authentications struct {
	client rest.Interface
}

// newAuthentications returns a Authentications
func newAuthentications(c *ConfigV1Client) *authentications {
	return &authentications{
		client: c.RESTClient(),
	}
}

// Get takes name of the authentication, and returns the corresponding authentication object, and an error if there is any.
func (c *authentications) Get(name string, options meta_v1.GetOptions) (result *v1.Authentication, err error) {
	result = &v1.Authentication{}
	err = c.client.Get().
		Resource("authentications").
		Name(name).
		VersionedParams(&options, scheme.ParameterCodec).
		Do().
		Into(result)
	return
}

// List takes label and field selectors, and returns the list of Authentications that match those selectors.
func (c *authentications) List(opts meta_v1.ListOptions) (result *v1.AuthenticationList, err error) {
	result = &v1.AuthenticationList{}
	err = c.client.Get().
		Resource("authentications").
		VersionedParams(&opts, scheme.ParameterCodec).
		Do().
		Into(result)
	return
}

// Watch returns a watch.Interface that watches the requested authentications.
func (c *authentications) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
	opts.Watch = true
	return c.client.Get().
		Resource("authentications").
		VersionedParams(&opts, scheme.ParameterCodec).
		Watch()
}

// Create takes the representation of a authentication and creates it.  Returns the server's representation of the authentication, and an error, if there is any.
func (c *authentications) Create(authentication *v1.Authentication) (result *v1.Authentication, err error) {
	result = &v1.Authentication{}
	err = c.client.Post().
		Resource("authentications").
		Body(authentication).
		Do().
		Into(result)
	return
}

// Update takes the representation of a authentication and updates it. Returns the server's representation of the authentication, and an error, if there is any.
func (c *authentications) Update(authentication *v1.Authentication) (result *v1.Authentication, err error) {
	result = &v1.Authentication{}
	err = c.client.Put().
		Resource("authentications").
		Name(authentication.Name).
		Body(authentication).
		Do().
		Into(result)
	return
}

// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().

func (c *authentications) UpdateStatus(authentication *v1.Authentication) (result *v1.Authentication, err error) {
	result = &v1.Authentication{}
	err = c.client.Put().
		Resource("authentications").
		Name(authentication.Name).
		SubResource("status").
		Body(authentication).
		Do().
		Into(result)
	return
}

// Delete takes name of the authentication and deletes it. Returns an error if one occurs.
func (c *authentications) Delete(name string, options *meta_v1.DeleteOptions) error {
	return c.client.Delete().
		Resource("authentications").
		Name(name).
		Body(options).
		Do().
		Error()
}

// DeleteCollection deletes a collection of objects.
func (c *authentications) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
	return c.client.Delete().
		Resource("authentications").
		VersionedParams(&listOptions, scheme.ParameterCodec).
		Body(options).
		Do().
		Error()
}

// Patch applies the patch and returns the patched authentication.
func (c *authentications) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Authentication, err error) {
	result = &v1.Authentication{}
	err = c.client.Patch(pt).
		Resource("authentications").
		SubResource(subresources...).
		Name(name).
		Body(data).
		Do().
		Into(result)
	return
}


text:
<!DOCTYPE html>

    <title>ProjectSession Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>

Open42 Docs (74% documented)

View on GitHub

        Open42 Reference

        ProjectSession Class Reference

            Classes

                Achievement

                ApiGeneral

                ApiRequester

                Attachment

                Campus

                Cursus

                DuoQuadraLoader

                Flag

                Friend

                FriendTableViewCell

                FriendViewController

                FriendsManager

                Language

                LoaderTableViewCell

                LoginViewController

                PdfProjectTableViewCell

                ProfilViewController

                Project

                ProjectDetailsViewController

                ProjectInformationViewController

                ProjectSession

                ProjectSettingsViewController

                ProjectTableViewCell

                ProjectUser

                ProjectUserTableViewCell

                ProjectViewController

                ProjectsManager

                ProjectsUserViewController

                Scale

                ScaleTeam

                ScaleTeamTableViewCell

                ScaleTeamsManager

                ScaleTeamsViewController

                SearchManager

                SearchUserContainerViewController

                SearchUserTableViewCell

                SearchUserViewController

                SettingsViewController

                Skill

                SkillTableViewCell

                SkillsUserViewController

                SuperModel

                TabBarViewController

                Team

                TeamUpload

                Title

                Upload

                User

                UserLocal

                UserManager

                UserViewController

                WebViewController

            Enums

                ProjectStatus

                ProjectsRouter

                ScaleTeamsRouter

                Theme

                UserRouter

                recommendationEnum

                sortBy

            Extensions

                String

                UIColor

                UIImage

            Functions

                addEventToCalendar(title:description:startDate:endDate:onCompletion:)

                showAlertWithTitle(_:message:view:handler:)

            Protocols

                ApiRouter

                DataLoader

                SearchManagerDelegation

ProjectSession

Undocumented

Int

                    id

id of a project.

Declaration

Swift

lazy var id:Int =

                    projetId

Undocumented

                    campusId

Undocumented

                    cursusId

Undocumented

                    maxPeople

Undocumented

                    estimateTime

Undocumented

Bool

                    isSuscriptable

Undocumented

                    solo

Undocumented

Date

                    beginAt

Date of the work beginning

Declaration

Swift

lazy var beginAt:NSDate? =

                    endAt

Undocumented

                    terminatingAfter

Undocumented

                    createdAt

Undocumented

                    updatedAt

Undocumented

© 2016 espiroux. All rights reserved. (Last updated: 2016-09-13)

Generated by jazzy ♪♫ v0.6.0, a Realm project.


text:
extern void
f_to_s_sum_F4(
    float *X,
    uint64_t nR,
    double *ptr_rslt // should be initialized prior to coming here
    )
;


text:
module Travis
  module Api
    module V2
      module Http
        class EnvVar < Travis::Api::Serializer
          attributes :id, :name, :value, :public, :repository_id

          def value
            if object.public?
              object.value.decrypt
            end
          end

          def serializable_hash
            hash = super
            hash.delete :value unless object.public?
            hash
          end
        end
      end
    end
  end
end


text:
from config import data as config
import praw

reddit = praw.Reddit(client_id = config['creds']['redditBotClientId'], client_secret = config['creds']['redditBotClientSecret'], password = config['creds']['redditBotPassword'], username = config['creds']['redditBotUserName'], user_agent=config['config']['reddit_user_agent'])
subreddit = reddit.subreddit(config['config']['subreddit'])

class Reddit():
    @classmethod
    def new_thread(cls, thread_title, thread_body):
        """Create a new reddit thread."""
        submission = subreddit.submit(title=thread_title, selftext=thread_body, send_replies=False)
        return submission.shortlink

    @classmethod
    def edit_thread(cls, thread_link, thread_body):
        """Edit an existing reddit thread given via a link."""
        submission = reddit.submission(url=thread_link)
        submission.edit(thread_body)

    @classmethod
    def setup_thread(cls, thread_link, sticky=False, sort_new=False, spoiler=True):
        """Set up an existing reddit thread."""
        submission = reddit.submission(url=thread_link)
        if sticky:
            try:
                submission.mod.sticky(state=True, bottom=True)
            except:
                pass
        if spoiler:
            submission.mod.spoiler()
        if sort_new:
            submission.mod.suggested_sort(sort='new')
        cls.flair_thread(thread_link)

    @classmethod
    def flair_thread(cls, thread_link, live=False):
        """Flair a reddit thread as Match Thread, optionally give it the LIVE text."""
        submission = reddit.submission(url=thread_link)
        if live and submission.link_flair_text != 'LIVE':
            submission.mod.flair(text='LIVE', css_class='Match')
        else:
            if submission.link_flair_text != 'Match Thread':
                submission.mod.flair(text='Match Thread', css_class='Match')

    @classmethod
    def getComments(cls, threadLink):
        submission = reddit.submission(url=threadLink)
        submission.comments.replace_more()
        return submission.comments

    @classmethod
    def getNewPosts(cls):
        return subreddit.new(limit=100)


text:
namespace arc {

namespace {

const base::TimeDelta kArcGameElapsedTimeSurveyTrigger = base::Minutes(10);
constexpr char kJSONKeyElapsedTimeSurveyTriggerMin[] =
    "elapsed_time_survey_trigger_min";
constexpr char kJSONKeyPackageNames[] = "package_names";
constexpr char kKeyMostRecentAndroidGame[] = "mostRecentAndroidGame";

// Singleton factory for ArcSurveyServiceFactory.
class ArcSurveyServiceFactory
    : public internal::ArcBrowserContextKeyedServiceFactoryBase<
          ArcSurveyService,
          ArcSurveyServiceFactory> {
 public:
  // Factory name used by ArcBrowserContextKeyedServiceFactoryBase.
  static constexpr const char* kName = "ArcSurveyServiceFactory";

  static ArcSurveyServiceFactory* GetInstance() {
    return base::Singleton<ArcSurveyServiceFactory>::get();
  }

 private:
  friend struct base::DefaultSingletonTraits<ArcSurveyServiceFactory>;
  ArcSurveyServiceFactory() = default;
  ~ArcSurveyServiceFactory() override = default;
};

}  // namespace

// static
ArcSurveyService* ArcSurveyService::GetForBrowserContext(
    content::BrowserContext* context) {
  return ArcSurveyServiceFactory::GetForBrowserContext(context);
}

// static
ArcSurveyService* ArcSurveyService::GetForBrowserContextForTesting(
    content::BrowserContext* context) {
  return ArcSurveyServiceFactory::GetForBrowserContextForTesting(context);
}

ArcSurveyService::ArcSurveyService(content::BrowserContext* context,
                                   ArcBridgeService* arc_bridge_service)
    : elapsed_time_survey_trigger_(kArcGameElapsedTimeSurveyTrigger),
      profile_(Profile::FromBrowserContext(context)) {
  DVLOG(1) << "ArcSurveyService created";

  if (!base::FeatureList::IsEnabled(ash::kHatsArcGamesSurvey.feature)) {
    VLOG(1) << "ARC Games HaTS survey feature is not enabled";
    return;
  }
  std::string survey_data = ash::HatsFinchHelper::GetCustomClientDataAsString(
      ash::kHatsArcGamesSurvey);
  if (survey_data.length() == 0) {
    VLOG(1) << "No survey data found for ARC Games.";
    return;
  }
  if (!LoadSurveyData(survey_data)) {
    VLOG(1) << "Error loading the survey data.";
    return;
  }
  ArcAppListPrefs* prefs = ArcAppListPrefs::Get(profile_);
  if (prefs)
    arc_prefs_observer_.Observe(prefs);
}

ArcSurveyService::~ArcSurveyService() {
  package_name_map_.clear();
  task_id_map_.clear();
}

bool ArcSurveyService::LoadSurveyData(std::string survey_data) {
  absl::optional<base::Value> root = base::JSONReader::Read(survey_data);
  if (!root) {
    LOG(ERROR) << "Unable to find JSON root. Trying char substitutions.";
    base::ReplaceSubstringsAfterOffset(&survey_data, 0, R"(\{@})", ":");
    base::ReplaceSubstringsAfterOffset(&survey_data, 0, R"(\{~})", ",");
    base::ReplaceSubstringsAfterOffset(&survey_data, 0, R"(\{%})", ".");
    DVLOG(1) << "Data after substitution: " << survey_data;
    root = base::JSONReader::Read(survey_data);
    if (!root) {
      LOG(ERROR) << "Unable to find JSON root after substitution";
      return false;
    }
  }

  // Load trigger duration
  absl::optional<int> elapsed_time_survey_trigger_min =
      root->FindIntKey(kJSONKeyElapsedTimeSurveyTriggerMin);
  if (elapsed_time_survey_trigger_min) {
    elapsed_time_survey_trigger_ =
        (elapsed_time_survey_trigger_min.value() >= 0)
            ? base::Minutes(elapsed_time_survey_trigger_min.value())
            : kArcGameElapsedTimeSurveyTrigger;
    DVLOG(1) << "Survey elapsed time trigger: " << elapsed_time_survey_trigger_;
  }

  // Load package names
  const base::Value* list = root->FindListKey(kJSONKeyPackageNames);
  if (!list) {
    VLOG(1) << "List of package names not found in the survey data.";
    return false;
  }
  const base::Value::ConstListView items = list->GetListDeprecated();
  if (items.empty()) {
    VLOG(1) << "List of package names is empty in the survey data.";
    return false;
  }
  for (const auto& item : items) {
    const std::string* package_name = item.GetIfString();
    if (!package_name) {
      VLOG(1) << "Non-string value found in list. Ignoring all results.";
      allowed_packages_.clear();
      return false;
    }
    allowed_packages_.emplace(*package_name);
  }
  DVLOG(1) << "Added " << allowed_packages_.size() << " entries";
  return true;
}

void ArcSurveyService::OnTaskCreated(int32_t task_id,
                                     const std::string& package_name,
                                     const std::string& activity,
                                     const std::string& intent,
                                     int32_t session_id) {
  if (allowed_packages_.count(package_name) == 0) {
    // Skip |package_name|.
    return;
  }

  // Add |task_id| to TaskIdMap
  DVLOG(1) << "Adding new entry in task ID map: {" << task_id << ", "
           << package_name << "}";
  task_id_map_.emplace(task_id, package_name);

  // Add or update the respective entry in PackageNameMap
  PackageNameMap::iterator entry = package_name_map_.find(package_name);
  if (entry == package_name_map_.end()) {
    // Add new entry
    DVLOG(1) << "Adding new entry to package name map:" << package_name;
    package_name_map_.emplace(
        package_name, std::make_pair(1, base::Time::NowFromSystemTime()));
  } else {
    // Update the count for the existing entry.
    entry->second.first++;
    DVLOG(1) << "Updating package name map: " << package_name;
  }
}

void ArcSurveyService::OnTaskDestroyed(int32_t task_id) {
  // Remove |task_id| from TaskIdMap
  const TaskIdMap::const_iterator task_id_iterator = task_id_map_.find(task_id);
  if (task_id_iterator == task_id_map_.end()) {
    // Not monitoring the |task_id|
    VLOG(1) << "Returning. " << task_id << " is not in TaskIDMap";
    return;
  }
  const std::string package_name = task_id_iterator->second;
  DVLOG(1) << "Removing entry from task ID map: {" << task_id_iterator->first
           << ", " << task_id_iterator->second << "}";
  task_id_map_.erase(task_id_iterator);

  // Update PackageNameMap
  const PackageNameMap::iterator package_name_iterator =
      package_name_map_.find(package_name);
  if (package_name_iterator == package_name_map_.end()) {
    DVLOG(1) << "Unable to find \"" << package_name << "\" in PackageNameMap";
    return;
  }
  package_name_iterator->second.first--;  // Decrement count
  if (package_name_iterator->second.first == 0) {
    const base::Time on_task_create_timestamp =
        package_name_iterator->second.second;
    DVLOG(1) << "Removing from package name map:  " << package_name;
    package_name_map_.erase(package_name_iterator);

    // Trigger ArcGames survey if it's been active for at least
    // |elapsed_time_survey_trigger_|.
    base::TimeDelta elapsed_time =
        base::Time::NowFromSystemTime() - on_task_create_timestamp;
    if (elapsed_time >= elapsed_time_survey_trigger_) {
      DVLOG(1) << "Elapsed time is more than " << elapsed_time_survey_trigger_
               << ": " << elapsed_time.InMinutes();
      if (ash::HatsNotificationController::ShouldShowSurveyToProfile(
              profile_, ash::kHatsArcGamesSurvey)) {
        const base::flat_map<std::string, std::string> product_specific_data = {
            {kKeyMostRecentAndroidGame, package_name}};
        hats_notification_controller_ =
            base::MakeRefCounted<ash::HatsNotificationController>(
                profile_, ash::kHatsArcGamesSurvey, product_specific_data);
      }
    }
  }
}

void ArcSurveyService::OnArcAppListPrefsDestroyed() {
  arc_prefs_observer_.Reset();
}

const ArcSurveyService::PackageNameMap*
ArcSurveyService::GetPackageNameMapForTesting() {
  return &package_name_map_;
}

const ArcSurveyService::TaskIdMap* ArcSurveyService::GetTaskIdMapForTesting() {
  return &task_id_map_;
}

const std::set<std::string>* ArcSurveyService::GetAllowedPackagesForTesting() {
  return &allowed_packages_;
}

void ArcSurveyService::AddAllowedPackageNameForTesting(
    const std::string package_name) {
  allowed_packages_.emplace(package_name);
}

}  // namespace arc


text:
namespace StrategyImplementation.FlyBehaviours
{
    using System;
    using Interfaces;

    public class FlyRocketPowered : IFlyBehaviour
    {
        public void Fly()
        {
            Console.WriteLine("Im a flying like a rockeeet!!!");
        }
    }
}


text:
using System.Collections.Generic;
using AnnuaireCertifies.FrontOffice.Web.ViewModels;
using AnnuaireCertifies.Infrastructure.Constant;
using AnnuaireCertifies.Infrastructure.Services.Caching;

namespace AnnuaireCertifies.FrontOffice.Web.ViewModels.Pages.Common
{
    public class ViewModelBase
    {
        public Context Context { get; set; }
        public ICaching CachingService { get; set; }

        public ViewModelBase(Context context, ICaching cachingService)
        {
            Context = context;
            CachingService = cachingService;
        }

        public ViewModelBase()
        {
        }
    }
}


text:
package ij.util;
import ij.*;
import ij.process.*;
import ij.plugin.DICOM;

/** DICOM utilities */
public class DicomTools {
	private static final int MAX_DIGITS = 5;
	private static String[] sliceLabels;

	/** Sorts a DICOM stack by image number. */
	public static ImageStack sort(ImageStack stack) {
		if (IJ.debugMode) IJ.log("Sorting by DICOM image number");
		if (stack.size()==1) return stack;
		String[] strings = getSortStrings(stack, "0020,0013");
		if (strings==null) return stack;
		StringSorter.sort(strings);
		ImageStack stack2 = null;
		if (stack.isVirtual())
			stack2 = ((VirtualStack)stack).sortDicom(strings, sliceLabels, MAX_DIGITS);
		else
			stack2 = sortStack(stack, strings);
		return stack2!=null?stack2:stack;
	}

	private static ImageStack sortStack(ImageStack stack, String[] strings) {
		ImageProcessor ip = stack.getProcessor(1);
		ImageStack stack2 = new ImageStack(ip.getWidth(), ip.getHeight(), ip.getColorModel());
		for (int i=0; i<stack.size(); i++) {
			int slice = (int)Tools.parseDouble(strings[i].substring(strings[i].length()-MAX_DIGITS), 0.0);
			if (slice==0) return null;
			stack2.addSlice(sliceLabels[slice-1], stack.getPixels(slice));
		}
		stack2.update(stack.getProcessor(1));
		return stack2;
	}

	private static String[] getSortStrings(ImageStack stack, String tag) {
		double series = getSeriesNumber(getSliceLabel(stack,1));
		int n = stack.size();
		boolean checkRescaleSlope = (stack instanceof VirtualStack)?((VirtualStack)stack).getBitDepth()==16:false;
		if (Prefs.ignoreRescaleSlope)
			checkRescaleSlope = false;
		boolean showError = false;
		String[] values = new String[n];
		sliceLabels = new String[n];
		for (int i=1; i<=n; i++) {
			String tags = getSliceLabel(stack,i);
			if (tags==null) return null;
			sliceLabels[i-1] = tags;
			double value = getNumericTag(tags, tag);
			if (Double.isNaN(value)) {
				if (IJ.debugMode) IJ.log("  "+tag+"  tag missing in slice "+i);
				if (showError) rescaleSlopeError(stack);
				return null;
			}
			if (getSeriesNumber(tags)!=series) {
				if (IJ.debugMode) IJ.log("  all slices must be part of the same series");
				if (showError) rescaleSlopeError(stack);
				return null;
			}
			values[i-1] = toString(value, MAX_DIGITS) + toString(i, MAX_DIGITS);
			if (checkRescaleSlope) {
				double rescaleSlope = getNumericTag(tags, "0028,1053");
				if (rescaleSlope!=1.0)
					showError = true;
			}
		}
		if (showError) rescaleSlopeError(stack);
		return values;
	}

	private static void rescaleSlopeError(ImageStack stack) {
		((VirtualStack)stack).setBitDepth(32);
	}

	private static String toString(double value, int width) {
		String s = "       " + IJ.d2s(value,0);
		return s.substring(s.length()-MAX_DIGITS);
	}

	private static String getSliceLabel(ImageStack stack, int n) {
		String info = stack.getSliceLabel(n);
		if ((info==null || info.length()<100) && stack.isVirtual()) {
			String dir = ((VirtualStack)stack).getDirectory();
			String name = ((VirtualStack)stack).getFileName(n);
			DICOM reader = new DICOM();
			info = reader.getInfo(dir+name);
			if (info!=null)
				info = name + "\n" + info;
		}
		return info;
	}

	/** Calculates the voxel depth of the specified DICOM stack based
		on the distance between the first and last slices. */
	public static double getVoxelDepth(ImageStack stack) {
		if (stack.isVirtual()) stack.getProcessor(1);
		String pos0 = getTag(stack.getSliceLabel(1), "0020,0032");
		String posn = null;
		double voxelDepth = -1.0;
		if (pos0!=null) {
			String[] xyz = pos0.split("\\\\");
			if (xyz.length!=3) return voxelDepth;
			double z0 = Double.parseDouble(xyz[2]);
			if (stack.isVirtual()) stack.getProcessor(stack.size());
			posn = getTag(stack.getSliceLabel(stack.size()), "0020,0032");
			if (posn==null) return voxelDepth;
			xyz = posn.split("\\\\");
			if (xyz.length!=3) return voxelDepth;
			double zn = Double.parseDouble(xyz[2]);
			voxelDepth = Math.abs((zn - z0) / (stack.size() - 1));
		}
		if (IJ.debugMode) IJ.log("DicomTools.getVoxelDepth: "+voxelDepth+"  "+pos0+"  "+posn);
		return voxelDepth;
	}

	/** Returns the value (as a string) of the specified DICOM tag id (in the form "0018,0050")
		of the specified image or stack slice. Returns null if the tag id is not found. */
	public static String getTag(ImagePlus imp, String id) {
		String metadata = null;
		if (imp.getStackSize()>1) {
			ImageStack stack = imp.getStack();
			String label = stack.getSliceLabel(imp.getCurrentSlice());
			if (label!=null && label.indexOf('\n')>0) metadata = label;
		}
		if (metadata==null)
			metadata = (String)imp.getProperty("Info");
		return getTag(metadata, id);
	}

	/** Returns the name of the specified DICOM tag id. */
	public static String getTagName(String id) {
		return DICOM.getTagName(id);
	}

	private static double getSeriesNumber(String tags) {
		double series = getNumericTag(tags, "0020,0011");
		if (Double.isNaN(series)) series = 0;
		return series;
	}

	private static double getNumericTag(String hdr, String tag) {
		String value = getTag(hdr, tag);
		if (value==null) return Double.NaN;
		int index3 = value.indexOf("\\");
		if (index3>0)
			value = value.substring(0, index3);
		return Tools.parseDouble(value);
	}

	private static String getTag(String hdr, String tag) {
		if (hdr==null) return null;
		int index1 = hdr.indexOf(tag);
		if (index1==-1) return null;
		//IJ.log(hdr.charAt(index1+11)+"   "+hdr.substring(index1,index1+20));
		if (hdr.charAt(index1+11)=='>') {
			// ignore tags in sequences
			index1 = hdr.indexOf(tag, index1+10);
			if (index1==-1) return null;
		}
		index1 = hdr.indexOf(":", index1);
		if (index1==-1) return null;
		int index2 = hdr.indexOf("\n", index1);
		String value = hdr.substring(index1+1, index2);
		return value;
	}

}


text:
title:  Tolesniam tyrinėjimui
date:   07/05/2021
---

E. Vait, "Prophets and Kings", p.15–22 ; p.367–378; p.703–721.

>

> "Dievas nepripažįsta jokio skirtumo dėl tautybės, rasės ar luomo. Jis yra visos žmonijos kūrėjas. Visi žmonės sukurti vienai šeimai, ir visi yra viena per atpirkimą. Kristus atėjo sugriauti visų sienų, atverti visas šventyklos kiemo dalis, kad kiekviena siela galėtų laisvai artintis prie Dievo. Jo meilė yra tokia plati, tokia gili, tokia pilna, kad ji skverbiasi visur. Ji išlaisvina iš šėtono įtakos tuos, kurie yra suvedžioti jo apgaulės, ir priartina juos prie Dievo sosto, apsupto pažado vaivorykštės. Kristuje nėra nei žydo, nei graiko, nei vergo, nei laisvo." (E. Vait, "Prophets and Kings", p.369)

Perskaitykite 1 Pt 2, 9–10, kad sužinotumėte keturis pavadinimus, kuriuos Petras taiko bažnyčiai. Dauguma šių pavadinimų atsispindi šiose Senojo Testamento eilutėse, kuriose kalbama apie Izraelį: Iš 19, 6 ir Iz 43, 20. Ką kiekvienas iš šių pavadinimų pabrėžia, kas susiję su bažnyčios santykiu su Dievu? (Pvz., pavadinime išsirinkta tauta pabrėžia tai, kad Dievas pasirinko bažnyčią ir dėl to jai tenka konkretus likimas.)

**Klausimai aptarimui:**

`1. Senovės Izraelyje kunigai aukojo gyvulius, kurie nurodė į Mesiją. Kokias "atnašas", būdami karališkosios kunigystės nariais, turi aukoti bažnyčios nariai? (1 Pt 2, 5).`

`2. Dievas atskyrė Izraelį nuo pasaulio, kad būtų šventa tauta. Jis taip pat turėjo dalytis su pasauliu išganymo tiesomis. Tas pats pasakytina ir apie bažnyčią šiandien. Kaip įmanoma atsiriboti nuo pasaulio ir tuo pačiu metu dalytis Evangelija su pasauliu? Kaip Izraelio patyrimas ir Jėzaus pavyzdys padeda mums atsakyti į šį klausimą?`

`3. Dievas senovės Izraelyje visada turėjo likutį. Apsvarstykite Eliją ir likutį jo laikmečiu (1 Kar 19; ypatingą dėmesį atkreipkite į 18 eilutę). Kodėl dažnai būti ištikimiems Dievui lengviau tarp pasauliečių nei tarp atpuolusių savos bažnyčios šeimos narių?`

**Santrauka:**

Tikrasis Dievo Izraelis (ar prieš, ar po kryžiaus) yra tikėjimo Izraelis, asmenys, gyvenantys dvasiniuose Sandoros santykiuose su Juo. Tokia Jo pasiuntinių funkcija, skelbti pasauliui Jo išganančios malonės Evangeliją.


text:
package com.smartalarm.alarm.service;

import org.junit.Before;
import org.junit.Test;

public class ACLServiceTest {

	@Before
	public void setUp() throws Exception {
	}

	@Test
	public void test() {
		// fail("Not yet implemented");
	}

}


text:
import $ from 'jquery';

/*global $*/
export default function() {
    $(() => {
        const modifyInfoTableRows = $('#container-frame .linkDescList');

        var accessTemplate = $($('#access-template').html());
        var select = modifyInfoTableRows.find('tr').eq(-2);
        accessTemplate.insertAfter(select);

        var advisorTemplate = $($('#advisor-template').html());
        select = modifyInfoTableRows.find('tr').eq(2);
        advisorTemplate.insertAfter(select);

        var nicknameTemplate = $($('#nickname-template').html());
        select = modifyInfoTableRows.find('tr').eq(0);
        nicknameTemplate.insertAfter(select);

        var enrollmentStatusTemplate = $($('#enrollment-status-template').html());
        select = modifyInfoTableRows.find('tr').eq(5);
        enrollmentStatusTemplate.insertAfter(select);

        var stuPassTemplate = $($('#stu-pass-template').html());

        // User is in group 50, so the template was picked up by jQuery
        if (stuPassTemplate.length > 0) {
            select = modifyInfoTableRows.find('tr').eq(-2);
            stuPassTemplate.insertAfter(select);
        }

        // Fix row coloring
        $('.box-round').find('tr').attr('bgcolor','');
    });
}


text:
/* Browser Resets
*********************************/
.flex-container a:active,
.flexslider a:active,
.flex-container a:focus,
.flexslider a:focus  {outline: none;}
.slides,
.flex-control-nav,
.flex-direction-nav {margin: 0; padding: 0; list-style: none;}

/* FlexSlider Necessary Styles
*********************************/
.flexslider {margin: 0; padding: 0;}
.flexslider .slides > li {display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */
.flexslider .slides img {width: 100%; display: block;}
.flex-pauseplay span {text-transform: capitalize;}

/* Clearfix for the .slides element */
.slides:after {content: "\0020"; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;}
html[xmlns] .slides {display: block;}
* html .slides {height: 1%;}

/* No JavaScript Fallback */
/* If you are not using another script, such as Modernizr, make sure you
 * include js that eliminates this class on page load */
.no-js .slides > li:first-child {display: block;}

/* FlexSlider Default Theme
*********************************/
.flexslider {
	position: relative;
	zoom: 1;
}
#main-slider {
	margin-top: 5.5em;
	margin-left: 12%;
	margin-right: 12%;
	padding: 3% 3% 6% 3%;
	background-image: url(../img/large-cinema-display.png);
	background-repeat: no-repeat;
	background-size: 100%;
}
.flex-viewport { max-height: 2000px; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -o-transition: all 1s ease; transition: all 1s ease; }
.loading .flex-viewport { max-height: 300px; }
.flexslider .slides { zoom: 1; }
.carousel li { margin-right: 5px; }

/* Direction Nav */
.flex-direction-nav {*height: 0;}
.flex-direction-nav a  {
	display: block;
	width: 40px;
	height: 43px;
	margin: -20px 0 0;
	position: absolute;
	top: 50%;
	z-index: 6;
	overflow: hidden;
	opacity: 0.5;
	-webkit-transition: all .3s ease;
	-moz-transition: all .3s ease;
	transition: all .3s ease;
}
.flex-direction-nav .flex-prev {
	left: -40px;
	background-image: url(../img/templates-gallery-left-arrow.png);
	background-repeat: no-repeat;
	background-size: contain;
}
.flex-direction-nav .flex-next {
	right: -60px;
	text-align: right;
	background-image: url(../img/templates-gallery-right-arrow.png);
	background-repeat: no-repeat;
	background-size: contain;
}
.flexslider:hover .flex-next:hover, .flexslider:hover .flex-prev:hover { opacity: 1; }
.flex-direction-nav .flex-disabled { opacity: 0!important; filter:alpha(opacity=0); cursor: default; }
.flex-direction-nav a:before  {
	display: inline-block;
}

@media screen and (max-width: 860px) {
  .flex-direction-nav .flex-prev { opacity: 1; left: 10px;}
  .flex-direction-nav .flex-next { opacity: 1; right: 10px;}
}

/* Tablettes --------------------------------------------------------------------------------------- */

@media screen and (max-width: 960px){
	.flex-direction-nav .flex-prev {
		left: -45px;
	}
	.flex-direction-nav .flex-next {
		right: -60px;
	}
}

/* Mobiles --------------------------------------------------------------------------------------- */

@media screen and (max-width: 460px){
	#main-slider {
		margin-top: 3em;
		margin-left: 6%;
		margin-right: 6%;
	}
	.flex-direction-nav a  {
		width: 20px;
		height: 23px;
	}
	.flex-direction-nav .flex-prev {
		left: -20px;
	}
	.flex-direction-nav .flex-next {
		right: -28px;
	}
}


text:
    How can I have Select2 display a placeholder?

    Select2 supports displaying a placeholder by default using the placeholder option. This can be either a data object matching the placeholder option, or a string to display as the placeholder if you are using a blank placeholder option.

{% highlight js linenos %}
$('select').select2({
  placeholder: 'Select an option'
});
{% endhighlight %}

    My first option is being displayed instead of my placeholder

    This usually means that you do not have a blank <option>&lt/option> as the first option in your <select>.

    Note that this does not apply to multiple selects, as the browser does not select the first option by default when multiple selections can be made.

    I am using AJAX, can I still show a placeholder?

    Yes, Select2 supports placeholders for all configurations. You will still need to add in the placeholder option if you are using a single select.

    Can I use an option without a blank value as my placeholder?

    The placeholder option allows you to pass in a data object instead of just a string if you need more flexibility. The id of the data object should match the value of the placeholder option.

{% highlight js linenos %}
$('select').select2({
  placeholder: {
    id: '-1', // the value of the option
    text: 'Select an option'
  }
});
{% endhighlight %}

    Can I change how the placeholder looks?

    When using Select2 when only a single selection can be made, the placeholder option will be passed through the standard templating methods, including the templateSelection option, so you are able to change how it is displayed.

{% highlight js linenos %}
$('select').select2({
  templateResult: function (data) {
    if (data.id === '') { // adjust for custom placeholder values
      return 'Custom styled placeholder text';
    }

    return data.text;
  }
});
{% endhighlight %}

    When multiple selections are allowed, the placeholder will be displayed using the placeholder attribute on the search box. You can cusotmize the display of this placholder using CSS, as explained in the following Stack Overflow answer: Change an input's HTML5 placeholder color with CSS

    My placeholders aren't being displayed in Internet Explorer

    Select2 uses the native placeholder attribute on input boxes for the multiple select, and that attribute is not supported in older versions of Internet Explorer. You need to include Placeholders.js on your page, or use the full build, in menuOrder to add placeholder attribute support to input boxes.


text:
package br.com.aquinofb.basicandroidapiclient.activities;

import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

import br.com.aquinofb.basicandroidapiclient.R;

public class MainActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}