text:
break;

//// [parser_breakNotInIterationOrSwitchStatement1.js]
break;

redpajama_set_name: RedPajamaGithub


text:
<?

date_default_timezone_set('Asia/Manila');

define('APP_NAME', 'Chukwu Framework');
define('APP_EMAIL', 'sheldonsenseng@gmail.com');
define('APP_MOD_DEFAULT', 'home');
define('APP_TPL_DEFAULT', 'main.tpl');

define('APP_SESSION', false); // set this to true to enable db based session handling

define('APP_CACHING', false); // set to true to enable caching

define('DEBUG', false); // set to false for production


text:
package org.springframework.security.web.server.authentication;

import org.springframework.security.core.Authentication;
import org.springframework.security.web.server.WebFilterExchange;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;

/**
 * @author Rob Winch
 * @since 5.0
 */
public class WebFilterChainServerAuthenticationSuccessHandler
	implements ServerAuthenticationSuccessHandler {
	@Override
	public Mono<Void> onAuthenticationSuccess(WebFilterExchange webFilterExchange,
		Authentication authentication) {
		ServerWebExchange exchange = webFilterExchange.getExchange();
		return webFilterExchange.getChain().filter(exchange);
	}
}


text:
namespace {
  class ElmBalancer : public parma::Balancer {
    private:
      double sideTol;
    public:
      ElmBalancer(apf::Mesh* m, double f, int v)
        : Balancer(m, f, v, "elements") {
          parma::Sides* s = parma::makeVtxSides(mesh);
          sideTol = parma::avgSharedSides(s);
          delete s;
      }
      bool runStep(apf::MeshTag* wtag, double tolerance) {
        const double maxElmImb =
          Parma_GetWeightedEntImbalance(mesh, wtag, mesh->getDimension());
        parma::Sides* s = parma::makeVtxSides(mesh);
        double avgSides = parma::avgSharedSides(s);
        parma::Weights* w =
          parma::makeEntWeights(mesh, wtag, s, mesh->getDimension());
        parma::Targets* t = parma::makeTargets(s, w, factor);
        parma::Selector* sel = parma::makeElmSelector(mesh, wtag);

        monitorUpdate(maxElmImb, iS, iA);
        monitorUpdate(avgSides, sS, sA);
        if( !PCU_Comm_Self() && verbose )
          fprintf(stdout, "elmImb %f avgSides %f\n", maxElmImb, avgSides);
        parma::BalOrStall* stopper =
          new parma::BalOrStall(iA, sA, sideTol*.001, verbose);

        parma::Stepper b(mesh, factor, s, w, t, sel, stopper);
        return b.step(tolerance, verbose);
      }
  };
}

apf::Balancer* Parma_MakeElmBalancer(apf::Mesh* m,
    double stepFactor, int verbosity) {
  if( !PCU_Comm_Self() && verbosity )
    fprintf(stdout,"PARMA_STATUS stepFactor %.3f\n", stepFactor);
  return new ElmBalancer(m, stepFactor, verbosity);
}


text:
package com.thaiopensource.relaxng.input;

public class InputFailedException extends Exception
{}


text:
namespace ui {
class ScopedEventDispatcher;
}

namespace views {

class MenuMessageLoopAura : public MenuMessageLoop {
 public:
  MenuMessageLoopAura();
  ~MenuMessageLoopAura() override;

  // Overridden from MenuMessageLoop:
  void Run(MenuController* controller,
           Widget* owner,
           bool nested_menu) override;
  void QuitNow() override;
  void ClearOwner() override;

 private:
  // Owner of child windows.
  // WARNING: this may be NULL.
  Widget* owner_;

  base::Closure message_loop_quit_;

  DISALLOW_COPY_AND_ASSIGN(MenuMessageLoopAura);
};

}  // namespace views

#endif  // UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_AURA_H_


text:
using Newtonsoft.Json;
using ShopifySharp.Converters;
using ShopifySharp.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ShopifySharp
{
    /// <summary>
    /// An object representing an application charge.
    /// </summary>
    public class ShopifyCharge : ShopifyObject
    {
        /// <summary>
        /// The URL that the customer should be sent to, to accept or decline the application charge.
        /// </summary>
        [JsonProperty("confirmation_url")]
        public string ConfirmationUrl { get; set; }

        /// <summary>
        /// The date and time when the application charge was created.
        /// </summary>
        [JsonProperty("created_at")]
        public DateTime CreatedAt { get; set; }

        /// <summary>
        /// The name of the application charge.
        /// </summary>
        [JsonProperty("name")]
        public string Name { get; set; }

        /// <summary>
        /// The price of the application charge.
        /// </summary>
        /// <remarks>Shopify returns this as a string, but JSON.net should be able to convert it to a double.</remarks>
        [JsonProperty("price")]
        public double Price { get; set; }

        /// <summary>
        /// The URL the customer is sent to once they accept/decline a charge.
        /// </summary>
        [JsonProperty("return_url")]
        public string ReturnUrl { get; set; }

        /// <summary>
        /// The status of the charged.
        /// </summary>
        [JsonProperty("status")]
        public ShopifyChargeStatus? Status { get; set; }

        /// <summary>
        /// States whether or not the application charge is a test transaction.
        /// </summary>
        /// <remarks>Valid values are 'true' or null. Needs a special converter to convert null to false and vice-versa.</remarks>
        [JsonProperty("test"), JsonConverter(typeof(FalseToNullConverter))]
        public bool Test { get; set; }

        /// <summary>
        /// The date and time when the recurring application charge was last updated.
        /// </summary>
        [JsonProperty("updated_at")]
        public DateTime UpdatedAt { get; set; }
    }
}


text:
/*
 *               In the name of Allah
 * This file is part of The "Quran Teacher or Learn Arabic" Project. Use is subject to
 * license terms.
 *
 * @author:         Fazle Rabbi Rahat
 *
 * edited: 24-feb-2015 for Quran for my Android app
 */
package com.frrahat.quransimple;

public class WordInformation{

	public String wordId;
	public String transliteration;
	public String meaning;

	public WordInformation(String wordId, String transliteration, String meaning) {
		this.wordId = wordId;
		this.transliteration = transliteration;
		this.meaning = meaning;
	}

	@Override
	public String toString() {
		return    "\nwordId=" + wordId
				+ "\ntransLiteration=" + transliteration
				+ "\nmeaning="+ meaning;
	}
}


text:
<?php

namespace GuildeBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Gedmo\Mapping\Annotation as Gedmo;

/**
 * Guilde
 *
 * @ORM\Table(name="p_guilde_grade")
 * @ORM\Entity(repositoryClass="GuildeBundle\Repository\GuildeAuthRepository")
 * @Gedmo\Loggable
 * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=true)
 */
class GuildeGrade
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

 /**
     * @var text $nom
     *
     * @ORM\Column(name="nom", type="string", length=255, nullable=true)
     */
    private $nom;

     /**
     * @var text $nom
     *
     * @ORM\Column(name="descript", type="text", nullable=true)
     */
    private $description ;

    /**
     * @var text $nom
     *
     * @ORM\Column(name="contenu", type="text", nullable=true)
     */
    private $content ;

    /**
     * @Gedmo\Slug(fields={"nom"})
     * @ORM\Column(name="slug",length=255)
     * --, unique=true
     */
    private $slug;

    /**
     * @var Landing $landing
     *
     * @ORM\ManyToOne(targetEntity="Guilde", inversedBy="g_rights", cascade={"persist", "merge"})
     * @ORM\JoinColumns({
     *  @ORM\JoinColumn(name="guilde_id", referencedColumnName="id")
     * })
     */
    private $guilde ;

    /**
	 * @var \DateTime $createdAt
	 *
	 * @ORM\Column(name="created_at", type="datetime", nullable=true)
	 * @Gedmo\Timestampable(on="create")
	 */
	private $createdAt;

	/**
	 * @var \DateTime $updatedAt
	 *
	 * @ORM\Column(name="updated_at", type="datetime", nullable=true)
	 * @Gedmo\Timestampable(on="update")
	 */
	private $updatedAt;

	/**
	 * @var string $createdBy
	 *
	 * @ORM\Column(name="created_by", type="string", nullable=true , options={"default" : null })
	 * @Gedmo\Blameable(on="create")
	 */
	private $createdBy;

	/**
	 * @var string $updatedBy
	 *
	 * @ORM\Column(name="updated_by", type="string", nullable=true , options={"default" : null })
	 * @Gedmo\Blameable(on="update")
	 */
	private $updatedBy;

	/**
	 * @var \DateTime $deletedAt
	 *
	 * @ORM\Column(name="deleted_at", type="datetime", nullable=true)
	 */
	private $deletedAt;

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

    /**
     * Set createdAt
     *
     * @param \DateTime $createdAt
     *
     * @return Guilde
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;

        return $this;
    }

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

    /**
     * Set updatedAt
     *
     * @param \DateTime $updatedAt
     *
     * @return Guilde
     */
    public function setUpdatedAt($updatedAt)
    {
        $this->updatedAt = $updatedAt;

        return $this;
    }

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

    /**
     * Set createdBy
     *
     * @param string $createdBy
     *
     * @return Guilde
     */
    public function setCreatedBy($createdBy)
    {
        $this->createdBy = $createdBy;

        return $this;
    }

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

    /**
     * Set updatedBy
     *
     * @param string $updatedBy
     *
     * @return Guilde
     */
    public function setUpdatedBy($updatedBy)
    {
        $this->updatedBy = $updatedBy;

        return $this;
    }

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

    /**
     * Set deletedAt
     *
     * @param \DateTime $deletedAt
     *
     * @return Guilde
     */
    public function setDeletedAt($deletedAt)
    {
        $this->deletedAt = $deletedAt;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Set content
     *
     * @param string $content
     *
     * @return Guilde
     */
    public function setContent($content)
    {
        $this->content = $content;

        return $this;
    }

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

    /**
     * Set slug
     *
     * @param string $slug
     *
     * @return Guilde
     */
    public function setSlug($slug)
    {
        $this->slug = $slug;

        return $this;
    }

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


text:
package com.google.ads.googleads.v10.errors;

public interface OperatorErrorEnumOrBuilder extends
    // @@protoc_insertion_point(interface_extends:google.ads.googleads.v10.errors.OperatorErrorEnum)
    com.google.protobuf.MessageOrBuilder {
}


text:
script_dir=$(dirname "$0")
IN_SCOPE_PYTHON_FILES="$(git ls-files | grep '\.py$' | grep -v -E '(_pb2|third_party)')"
# Explicitly excluding the docs directory due to
# tools.go:4:2: import "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2" is a program,not an importable package
# tools.go:5:2: import "google.golang.org/grpc/cmd/protoc-gen-go-grpc" is a program, not an importable package
# tools.go:6:2: import "google.golang.org/protobuf/cmd/protoc-gen-go" is a program, not an importable package
# See also https://github.com/google/osv.dev/issues/573
IN_SCOPE_GO_MODULES="$(git ls-files | fgrep go.mod | fgrep -v docs | xargs dirname)"

python_lint_findings=""
if ! echo "$IN_SCOPE_PYTHON_FILES" | xargs pylint --rcfile="$script_dir/../.pylintrc"; then
  python_lint_findings="python_lint_findings"
fi

python_format_findings=""
if ! echo "$IN_SCOPE_PYTHON_FILES" | xargs yapf -d --style "$script_dir/../.style.yapf"; then
  python_format_findings="python_format_findings"
fi

go_vet_findings=""
for module_dir in $IN_SCOPE_GO_MODULES; do
  cd "$module_dir"
  if ! go vet ./...; then
    go_vet_findings="go_vet_findings"
  fi
  cd - > /dev/null
done

if [ $python_lint_findings ] || [ $python_format_findings ] || [ $go_vet_findings ]; then
  echo "Please fix the above findings"
  exit 1
fi


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="assets/css/normalize.css">
    <link rel="stylesheet" href="assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="assets/css/custom.css">


text:
package sun.jvm.hotspot.debugger.win32.coff;

/** Models the "sstSegName" subsection in Visual C++ 5.0 debug
    information. This subsection contains all of the logical segment
    and class names. The table is an array of zero-terminated strings.
    Each string is indexed by its beginning from the start of the
    table. See {@link
    sun.jvm.hotspot.debugger.win32.coff.DebugVC50SSSegMap}. (Some of
    the descriptions are taken directly from Microsoft's documentation
    and are copyrighted by Microsoft.) */

public interface DebugVC50SSSegName extends DebugVC50Subsection {
  /** Indexed by (0..DebugVC50SSSegMap.getNumSegDesc() - 1) */
  public String getSegName(int i);
}


text:
package test.frames;

import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.binary.Hex;
import org.apache.felix.ipojo.annotations.Component;
import org.apache.felix.ipojo.annotations.Instantiate;
import org.apache.felix.ipojo.annotations.Provides;

import javax.crypto.*;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.Charset;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.KeySpec;

/**
 * This component triggers some interesting frames issue.
 */
@Component
@Provides
@Instantiate(name = "crypto")
public class CryptoServiceSingleton {

    public static final String AES_CBC_ALGORITHM = "AES/CBC/PKCS5Padding";
    public static final String AES_ECB_ALGORITHM = "AES";
    private static final Charset UTF_8 = Charset.defaultCharset();
    public static final String HMAC_SHA_1 = "HmacSHA1";
    public static final String PBKDF_2_WITH_HMAC_SHA_1 = "PBKDF2WithHmacSHA1";

    private int keySize;
    private int iterationCount;
    private Hash defaultHash;

    private final String secret;

    public CryptoServiceSingleton(String secret, Hash defaultHash,
                                  Integer keySize, Integer iterationCount) {
        this.secret = secret;
        this.defaultHash = defaultHash;
        this.keySize = keySize;
        this.iterationCount = iterationCount;
    }

    public CryptoServiceSingleton() {
        this(
                "I;>qOs/VgFe?l@>Kn/RGa0p9b1ji?Kg7uhjAPHdIO8>@<em_AFs[BAMUQ0D]eOLV",
                Hash.valueOf("MD5"),
                128,
                20);
    }

    /**
     * Generate the AES key from the salt and the private key.
     *
     * @param salt       the salt (hexadecimal)
     * @param privateKey the private key
     * @return the generated key.
     */
    private SecretKey generateAESKey(String privateKey, String salt) {
        try {
            byte[] raw = Hex.decodeHex(salt.toCharArray());
            KeySpec spec = new PBEKeySpec(privateKey.toCharArray(), raw, iterationCount, keySize);
            SecretKeyFactory factory = SecretKeyFactory.getInstance(PBKDF_2_WITH_HMAC_SHA_1);
            return new SecretKeySpec(factory.generateSecret(spec).getEncoded(), AES_ECB_ALGORITHM);
        } catch (DecoderException e) {
            throw new IllegalStateException(e);
        } catch ( NoSuchAlgorithmException e) {
            throw new IllegalStateException(e);
        } catch (InvalidKeySpecException e) {
            throw new IllegalStateException(e);
        }
    }

    /**
     * Encrypt a String with the AES encryption advanced using 'AES/CBC/PKCS5Padding'. Unlike the regular
     * encode/decode AES method using ECB (Electronic Codebook), it uses Cipher-block chaining (CBC). The salt must be
     * valid hexadecimal String. This method uses parts of the application secret as private key and initialization
     * vector.
     *
     * @param value The message to encrypt
     * @param salt  The salt (hexadecimal String)
     * @return encrypted String encoded using Base64
     */
    public String encryptAESWithCBC(String value, String salt) {
        return encryptAESWithCBC(value, getSecretPrefix(), salt, getDefaultIV());
    }

    /**
     * Encrypt a String with the AES encryption advanced using 'AES/CBC/PKCS5Padding'. Unlike the regular
     * encode/decode AES method using ECB (Electronic Codebook), it uses Cipher-block chaining (CBC). The private key
     * must have a length of 16 bytes, the salt and initialization vector must be valid hex Strings.
     *
     * @param value      The message to encrypt
     * @param privateKey The private key
     * @param salt       The salt (hexadecimal String)
     * @param iv         The initialization vector (hexadecimal String)
     * @return encrypted String encoded using Base64
     */
    public String encryptAESWithCBC(String value, String privateKey, String salt, String iv) {
        SecretKey genKey = generateAESKey(privateKey, salt);
        byte[] encrypted = doFinal(Cipher.ENCRYPT_MODE, genKey, iv, value.getBytes(UTF_8));
        return new String(Base64.encodeBase64(encrypted), UTF_8);
    }

    /**
     * Decrypt a String with the AES encryption advanced using 'AES/CBC/PKCS5Padding'. Unlike the regular
     * encode/decode AES method using ECB (Electronic Codebook), it uses Cipher-block chaining (CBC). The salt and
     * initialization vector must be valid hex Strings. This method use parts of the application secret as private
     * key and the default initialization vector.
     *
     * @param value An encrypted String encoded using Base64.
     * @param salt  The salt (hexadecimal String)
     * @return The decrypted String
     */
    public String decryptAESWithCBC(String value, String salt) {
        return decryptAESWithCBC(value, getSecretPrefix(), salt, getDefaultIV());
    }

    /**
     * Decrypt a String with the AES encryption advanced using 'AES/CBC/PKCS5Padding'. Unlike the regular
     * encode/decode AES method using ECB (Electronic Codebook), it uses Cipher-block chaining (CBC). The private key
     * must have a length of 16 bytes, the salt and initialization vector must be valid hexadecimal Strings.
     *
     * @param value      An encrypted String encoded using Base64.
     * @param privateKey The private key
     * @param salt       The salt (hexadecimal String)
     * @param iv         The initialization vector (hexadecimal String)
     * @return The decrypted String
     */
    public String decryptAESWithCBC(String value, String privateKey, String salt, String iv) {
        SecretKey key = generateAESKey(privateKey, salt);
        byte[] decrypted = doFinal(Cipher.DECRYPT_MODE, key, iv, decodeBase64(value));
        return new String(decrypted, UTF_8);
    }

    /**
     * Utility method encrypting/decrypting the given message.
     * The sense of the operation is specified using the `encryptMode` parameter.
     *
     * @param encryptMode  encrypt or decrypt mode ({@link javax.crypto.Cipher#DECRYPT_MODE} or
     *                     {@link javax.crypto.Cipher#ENCRYPT_MODE}).
     * @param generatedKey the generated key
     * @param vector       the initialization vector
     * @param message      the plain/cipher text to encrypt/decrypt
     * @return the encrypted or decrypted message
     */
    private byte[] doFinal(int encryptMode, SecretKey generatedKey, String vector, byte[] message) {
        try {
            byte[] raw = Hex.decodeHex(vector.toCharArray());
            Cipher cipher = Cipher.getInstance(AES_CBC_ALGORITHM);
            cipher.init(encryptMode, generatedKey, new IvParameterSpec(raw));
            return cipher.doFinal(message);
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }
    }

    /**
     * Sign a message using the application secret key (HMAC-SHA1).
     */
    public String sign(String message) {
        return sign(message, secret.getBytes(UTF_8));
    }

    /**
     * Sign a message with a key.
     *
     * @param message The message to sign
     * @param key     The key to use
     * @return The signed message (in hexadecimal)
     */
    public String sign(String message, byte[] key) {
        try {
            // Get an hmac_sha1 key from the raw key bytes
            SecretKeySpec signingKey = new SecretKeySpec(key, HMAC_SHA_1);

            // Get an hmac_sha1 Mac instance and initialize with the signing key
            Mac mac = Mac.getInstance(HMAC_SHA_1);
            mac.init(signingKey);

            // Compute the hmac on input data bytes
            byte[] rawHmac = mac.doFinal(message.getBytes(UTF_8));

            // Convert raw bytes to Hex
            byte[] hexBytes = new Hex().encode(rawHmac);

            // Covert array of Hex bytes to a String
            return new String(hexBytes, UTF_8);
        } catch (Exception e) {
            throw new IllegalArgumentException(e);
        }
    }

    /**
     * Create a hash using the default hashing algorithm.
     *
     * @param input The password
     * @return The password hash
     */
    public String hash(String input) {
        return hash(input, defaultHash);
    }

    /**
     * Create a hash using specific hashing algorithm.
     *
     * @param input    The password
     * @param hashType The hashing algorithm
     * @return The password hash
     */
    public String hash(String input, Hash hashType) {
        try {
            MessageDigest m = MessageDigest.getInstance(hashType.toString());
            byte[] out = m.digest(input.getBytes(UTF_8));
            return new String(Base64.encodeBase64(out), UTF_8);
        } catch (NoSuchAlgorithmException e) {
            throw new IllegalArgumentException(e);
        }
    }

    /**
     * Encrypt a String with the AES standard encryption (using the ECB mode) using the default secret (the
     * application secret).
     *
     * @param value The String to encrypt
     * @return An hexadecimal encrypted string
     */
    public String encryptAES(String value) {
        return encryptAES(value, getSecretPrefix());
    }

    /**
     * Encrypt a String with the AES standard encryption (using the ECB mode). Private key must have a length of 16 bytes.
     *
     * @param value      The String to encrypt
     * @param privateKey The key used to encrypt
     * @return An hexadecimal encrypted string
     */
    public String encryptAES(String value, String privateKey) {
        try {
            byte[] raw = privateKey.getBytes(UTF_8);
            SecretKeySpec skeySpec = new SecretKeySpec(raw, AES_ECB_ALGORITHM);
            Cipher cipher = Cipher.getInstance(AES_ECB_ALGORITHM);
            cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
            return Hex.encodeHexString(cipher.doFinal(value.getBytes(UTF_8)));
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }
    }

    /**
     * Decrypt a String with the standard AES encryption (using the ECB mode) using the default secret (the
     * application secret).
     *
     * @param value An hexadecimal encrypted string
     * @return The decrypted String
     */
    public String decryptAES(String value) {
        return decryptAES(value, getSecretPrefix());
    }

    /**
     * Decrypt a String with the standard AES encryption (using the ECB mode). Private key must have a length of 16
     * bytes.
     *
     * @param value      An hexadecimal encrypted string
     * @param privateKey The key used to encrypt
     * @return The decrypted String
     */
    public String decryptAES(String value, String privateKey) {
        try {
            byte[] raw = privateKey.getBytes(UTF_8);
            SecretKeySpec skeySpec = new SecretKeySpec(raw, AES_ECB_ALGORITHM);
            Cipher cipher = Cipher.getInstance(AES_ECB_ALGORITHM);
            cipher.init(Cipher.DECRYPT_MODE, skeySpec);
            return new String(cipher.doFinal(Hex.decodeHex(value.toCharArray())), UTF_8);
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }
    }

    /**
     * Gets the 16 first characters of the application secret.
     *
     * @return the secret prefix.
     */
    private String getSecretPrefix() {
        return secret.substring(0, 16);
    }

    /**
     * Gets a segment of the application secret of 16 characters and encoded them in hexadecimal. The segment
     * contains from the 16th to the 32th characters from the application secret (16 characters). The extracted
     * segment is encoded in hexadecimal
     *
     * @return the default initialization vector.
     */
    private String getDefaultIV() {
        return String.valueOf(Hex.encodeHex(secret.substring(16, 32).getBytes(UTF_8)));
    }

    /**
     * Sign a token.  This produces a new token, that has this token signed with a nonce.
     *

     * This primarily exists to defeat the BREACH vulnerability, as it allows the token to effectively be random per
     * request, without actually changing the value.
     *
     * @param token The token to sign
     * @return The signed token
     */
    public String signToken(String token) {
        long nonce = System.currentTimeMillis();
        String joined = nonce + "-" + token;
        return sign(joined) + "-" + joined;
    }

    /**
     * Extract a signed token that was signed by {@link #signToken(String)}.
     *
     * @param token The signed token to extract.
     * @return The verified raw token, or null if the token isn't valid.
     */
    public String extractSignedToken(String token) {
        String[] chunks = token.split("-", 3);
        String signature = chunks[0];
        String nonce = chunks[1];
        String raw = chunks[2];
        if (constantTimeEquals(signature, sign(nonce + "-" + raw))) {
            return raw;
        } else {
            return null;
        }
    }

    /**
     * Constant time equals method.
     *

     * Given a length that both Strings are equal to, this method will always run in constant time.
     * This prevents timing attacks.
     */
    private boolean constantTimeEquals(String a, String b) {
        if (a.length() != b.length()) {
            return false;
        } else {
            int equal = 0;
            for (int i = 0; i < a.length(); i++) {
                equal = equal | a.charAt(i) ^ b.charAt(i);
            }
            return equal == 0;
        }
    }

    /**
     * Encode binary data to base64.
     *
     * @param value The binary data
     * @return The base64 encoded String
     */
    public String encodeBase64(byte[] value) {
        return new String(Base64.encodeBase64(value), UTF_8);
    }

    /**
     * Decode a base64 value.
     *
     * @param value The base64 encoded String
     * @return decoded binary data
     */
    public byte[] decodeBase64(String value) {
        return Base64.decodeBase64(value.getBytes(UTF_8));
    }

    /**
     * Build an hexadecimal MD5 hash for a String.
     *
     * @param value The String to hash
     * @return An hexadecimal Hash
     */
    public String hexMD5(String value) {
        try {
            MessageDigest messageDigest = MessageDigest.getInstance(Hash.MD5.toString());
            messageDigest.reset();
            messageDigest.update(value.getBytes(UTF_8));
            byte[] digest = messageDigest.digest();
            return String.valueOf(Hex.encodeHex(digest));
        } catch (Exception ex) {
            throw new RuntimeException(ex);
        }
    }

    /**
     * Build an hexadecimal SHA1 hash for a String.
     *
     * @param value The String to hash
     * @return An hexadecimal Hash
     */
    public String hexSHA1(String value) {
        try {
            MessageDigest md;
            md = MessageDigest.getInstance(Hash.SHA1.toString());
            md.update(value.getBytes(UTF_8));
            byte[] digest = md.digest();
            return String.valueOf(Hex.encodeHex(digest));
        } catch (Exception ex) {
            throw new RuntimeException(ex);
        }
    }
}


text:
package com.cloudata.files.webdav.model;

import java.io.IOException;
import java.util.List;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

import com.cloudata.files.webdav.WebdavRequest;
import com.google.common.collect.Lists;

public class PropfindRequest {
    private final WebdavRequest request;
    private final Document doc;

    private final Element propfindElement;

    public PropfindRequest(WebdavRequest request) throws IOException {
        this.request = request;

        this.doc = request.getRequestDocument();
        // System.out.println(XmlHelper.toXml(doc));

        if (this.doc != null) {
            this.propfindElement = this.doc.getDocumentElement();
            String nodeName = propfindElement.getLocalName();
            if (!nodeName.equals("propfind")) {
                throw new IOException("Error parsing request - expected propfind");
            }
        } else {
            this.propfindElement = null;
        }
    }

    Element findPropElement() {
        if (propfindElement == null) {
            return null;
        }
        NodeList children = propfindElement.getChildNodes();
        for (int i = 0; i < children.getLength(); i++) {
            Node item = children.item(i);
            if (item.getNodeType() != Node.ELEMENT_NODE) {
                continue;
            }

            if (!item.getNodeName().equals("prop")) {
                continue;
            }

            if (item.getNamespaceURI().equals(WebdavXmlWriter.XMLNS_DAV)) {
                return (Element) item;
            }
        }
        return null;
    }

    public WebdavPropertyList getRequestedProperties() {
        Element prop = findPropElement();
        if (prop == null) {
            return WebdavPropertyList.WILDCARD;
        }

        List<WebdavProperty> properties = Lists.newArrayList();

        NodeList children = prop.getChildNodes();
        for (int i = 0; i < children.getLength(); i++) {
            Node item = children.item(i);
            if (item.getNodeType() != Node.ELEMENT_NODE) {
                continue;
            }

            properties.add(WebdavProperty.build(item.getNamespaceURI(), item.getNodeName()));
        }

        return new WebdavPropertyList(properties);
    }

}


text:
package com.thinkaurelius.titan.hadoop;

import com.thinkaurelius.titan.core.TitanRelation;
import com.thinkaurelius.titan.graphdb.internal.ElementLifeCycle;

/**
 * @author Matthias Broecheler (me@matthiasb.com)
 */
public interface FaunusRelation extends TitanRelation {

    public boolean isModified();

    public FaunusRelationType getType();

    public void updateLifeCycle(ElementLifeCycle.Event event);

    public void setLifeCycle(byte lifecycle);

}


text:
<?php

interface substrate_IResourceLocator {
    /**
     * Find a target file
     * @param string $target
     * @param bool $realPath
     * @return string
     */
    public function find($target, $realPath = false);
}

?>


text:
package org.sagebionetworks.dashboard.dao.dynamo;

import javax.annotation.Resource;

import org.sagebionetworks.dashboard.config.DwConfig;
import org.sagebionetworks.dashboard.dao.BridgeDynamoDao;
import org.springframework.stereotype.Repository;

import com.amazonaws.services.dynamodbv2.AmazonDynamoDB;
import com.amazonaws.services.dynamodbv2.model.ResourceNotFoundException;

@Repository("bridgeDynamoDao")
public class BridgeDynamoDaoImpl implements BridgeDynamoDao {

    @Resource
    private DwConfig dwConfig;

    @Resource
    private AmazonDynamoDB bridgeDynamoClient;

    @Override
    public String getFullTableName(String dynamoTableName) {
        final String prefix = dwConfig.getBridgeStack() + "-" + dwConfig.getBridgeUser() + "-";
        return prefix + dynamoTableName;
    }

    @Override
    public boolean tableExists(String dynamoTableName) {
        try {
            bridgeDynamoClient.describeTable(getFullTableName(dynamoTableName));
            return true;
        } catch (ResourceNotFoundException e) {
            return false;
        }
    }
}


text:
konyLua.Slider = function(bconfig, lconfig, pspconfig) {

  konyLua.Slider.baseConstructor.call(this, bconfig, lconfig, pspconfig);

  this.min = bconfig.min;
  this.max = bconfig.max;
  this.step = bconfig.step;
  this.onslide = bconfig.onslide;
  this.onselection = bconfig.onselection;
  this.leftskin = bconfig.leftskin;
  this.rightskin = bconfig.rightskin;
  this.thumbimage = bconfig.thumbimage;
  this.focusthumbimage = bconfig.focusthumbimage;
  this.selectedvalue = bconfig.selectedvalue;

  //Internal Usage
  this.wType = "Slider";
  this.name = "konyLua.Slider";
};

kony.inherits(konyLua.Slider, konyLua.Widget);


text:
var assert = require("assert");
describe('dummy test', function() {
  describe('#1', function () {
    it('always passing', function () {
      assert.equal(true,true);
    });
  });
});


text:
export default {
  noActiveCalls: 'No active calls',
  noRecords: 'No results found.',
};

// @key: @#@"noActiveCalls"@#@ @source: @#@"No active calls"@#@
// @key: @#@"noRecords"@#@ @source: @#@"No results found."@#@


text:
const CGFloat XMGRed = 0.3;
const CGFloat XMGGreen = 0.3;
const CGFloat XMGBlue = 0.3;
const CGFloat XMGAlpha = 1.0;
const int XMGAge = 20;
NSString * const XMGName = @"jack";


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta name="Content-Type" content="text/html; charset=utf-8" />
<title>Class: LDAP::ResultError::NoSuchAttribute</title>
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />

    Index (N) »
    LDAP » ResultError
     »
    NoSuchAttribute

(no frames)

  Class List
  Method List
  File List

Class: LDAP::ResultError::NoSuchAttribute

Inherits:

      Object

Object

LDAP::ResultError::NoSuchAttribute

        show all

Defined in:

lib/ldap/server/result.rb

      Instance Method Summary
      (collapse)

      - (Object) to_i

Instance Method Details

    - (<tt>Object</tt>) to_i

33

# File 'lib/ldap/server/result.rb', line 33

def to_i; 16; end

  Generated on Mon Sep 13 13:27:16 2010 by
  yard
  0.6.0 (ruby-1.9.2).


text:
class WorkflowUpdateSchema < JsonSchema
  schema do
    type "object"
    description "A Description of a Classification Workflow"

    additional_properties false

    property "pairwise" do
      type "boolean"
    end

    property "grouped" do
      type "boolean"
    end

    property "active" do
      type "boolean"
    end

    property "retirement" do
      type "object"
      additional_properties false

      property "criteria" do
        type "string"
      end

      property "options" do
        type "object"
      end
    end

    property "prioritized" do
      type "boolean"
    end

    property "display_name" do
      type "string"
    end

    property "first_task" do
      type "string"
    end

    property "tasks" do
      type "object"
    end

    property "aggregation" do
      type "object"
    end

    property "links" do
      type "object"
      additional_properties false

      property "tutorial_subject" do
        type "string", "integer"
      end

      property "subject_sets" do
        type "array"

        items do
          type "string", "integer"
        end
      end
    end
  end
end


text:
/* This file performs the following test: overflow dispatch with pthreads

   - This example  tests the dispatch of overflow calls from PAPI. The event
     set is counted in the default counting domain and default granularity,
     depending on the platform. Usually this is the user domain
    (PAPI_DOM_USER) and thread context (PAPI_GRN_THR).

     The Eventset contains:
     + PAPI_TOT_INS (overflow monitor)
     + PAPI_TOT_CYC

   Each thread will do the followings :
   - enable overflow
   - Start eventset 1
   - Do flops
   - Stop eventset 1
   - disable overflow
*/
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include "papi.h"

#define THRESHOLD 200000
#define OVER_FMT    "handler(%d ) Overflow at %p! bit=0x%llx \n"
#define ERROR_RETURN(retval) { fprintf(stderr, "Error %d %s:line %d: \n", retval,__FILE__,__LINE__);  exit(retval); }

int total = 0;

void do_flops(int n)
{
    int i;
    double c = 0.11;
    double a = 0.5;
    double b = 6.2;

    for (i=0; i < n; i++)
        c += a * b;
}

/* overflow handler */
void
handler(int EventSet, void *address, long long overflow_vector, void *context)
{
   fprintf(stderr, OVER_FMT, EventSet, address, overflow_vector);
   total++;
}

void *Thread(void *arg)
{
	int retval;
	int EventSet1=PAPI_NULL;
	long long values[2];
	long long elapsed_us, elapsed_cyc;

	fprintf(stderr,"Thread %lx running PAPI\n",PAPI_thread_id());

	/* create the event set */
	if ( (retval = PAPI_create_eventset(&EventSet1))!=PAPI_OK)
    	ERROR_RETURN(retval);

 	/* query whether the event exists */
	if ((retval=PAPI_query_event(PAPI_TOT_INS)) != PAPI_OK)
    	ERROR_RETURN(retval);
	if ((retval=PAPI_query_event(PAPI_TOT_CYC)) != PAPI_OK)
    	ERROR_RETURN(retval);

	/* add events to the event set */
	if ( (retval = PAPI_add_event(EventSet1, PAPI_TOT_INS))!= PAPI_OK)
    	ERROR_RETURN(retval);

	if ( (retval = PAPI_add_event(EventSet1, PAPI_TOT_CYC)) != PAPI_OK)
    	ERROR_RETURN(retval);

	elapsed_us = PAPI_get_real_usec();

	elapsed_cyc = PAPI_get_real_cyc();

	retval = PAPI_overflow(EventSet1, PAPI_TOT_CYC, THRESHOLD, 0, handler);
	if(retval !=PAPI_OK)
    	ERROR_RETURN(retval);

    /* start counting */
  	if((retval = PAPI_start(EventSet1))!=PAPI_OK)
    	ERROR_RETURN(retval);

    do_flops(*(int *)arg);

    if ((retval = PAPI_stop(EventSet1, values))!=PAPI_OK)
    	ERROR_RETURN(retval);

    elapsed_us = PAPI_get_real_usec() - elapsed_us;

    elapsed_cyc = PAPI_get_real_cyc() - elapsed_cyc;

    /* disable overflowing */
	retval = PAPI_overflow(EventSet1, PAPI_TOT_CYC, 0, 0, handler);
	if(retval !=PAPI_OK)
    	ERROR_RETURN(retval);

	/* remove the event from the eventset */
	retval = PAPI_remove_event(EventSet1, PAPI_TOT_INS);
    if (retval != PAPI_OK)
    	ERROR_RETURN(retval);

    retval = PAPI_remove_event(EventSet1, PAPI_TOT_CYC);
    if (retval != PAPI_OK)
    	ERROR_RETURN(retval);

    printf("Thread %#x PAPI_TOT_INS : \t%lld\n",(int)PAPI_thread_id(),
	 values[0]);
    printf("            PAPI_TOT_CYC: \t%lld\n", values[1]);
    printf("            Real usec   : \t%lld\n", elapsed_us);
    printf("            Real cycles : \t%lld\n", elapsed_cyc);

    pthread_exit(NULL);
}

int main(int argc, char **argv)
{
    pthread_t thread_one;
    pthread_t thread_two;
    int flops1, flops2;
    int rc,retval;
    pthread_attr_t attr;
    long long elapsed_us, elapsed_cyc;

	/* papi library initialization */
    if ((retval=PAPI_library_init(PAPI_VER_CURRENT)) != PAPI_VER_CURRENT)
	{
    	printf("Library initialization error! \n");
    	exit(1);
	}

	/* thread initialization */
    retval=PAPI_thread_init((unsigned long(*)(void))(pthread_self));
    if (retval != PAPI_OK)
    	ERROR_RETURN(retval);

	/* return the number of microseconds since some arbitrary starting point */
    elapsed_us = PAPI_get_real_usec();

	/* return the number of cycles since some arbitrary starting point */
    elapsed_cyc = PAPI_get_real_cyc();

	/* pthread attribution init */
    pthread_attr_init(&attr);
    pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);

	/* create the first thread */
    flops1 = 1000000;
    rc = pthread_create(&thread_one, &attr, Thread, (void *)&flops1);
    if (rc)
        ERROR_RETURN(rc);

	/* create the second thread */
    flops2 = 4000000;
    rc = pthread_create(&thread_two, &attr, Thread, (void *)&flops2);
    if (rc)
        ERROR_RETURN(rc);

	/* wait for the threads to finish */
    pthread_attr_destroy(&attr);
    pthread_join(thread_one, NULL);
    pthread_join(thread_two, NULL);

	/* compute the elapsed cycles and microseconds */
    elapsed_cyc = PAPI_get_real_cyc() - elapsed_cyc;

    elapsed_us = PAPI_get_real_usec() - elapsed_us;

    printf("Master real usec   : \t%lld\n", elapsed_us);
    printf("Master real cycles : \t%lld\n", elapsed_cyc);

    /* clean up */
    PAPI_shutdown();
    exit(0);
}


text:
package org.apache.kafka.test;

import org.apache.kafka.streams.KeyValue;
import org.apache.kafka.streams.errors.InvalidStateStoreException;
import org.apache.kafka.streams.kstream.Windowed;
import org.apache.kafka.streams.processor.ProcessorContext;
import org.apache.kafka.streams.processor.StateStore;
import org.apache.kafka.streams.query.Position;
import org.apache.kafka.streams.state.KeyValueIterator;
import org.apache.kafka.streams.state.ReadOnlySessionStore;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.NavigableMap;
import java.util.TreeMap;

public class ReadOnlySessionStoreStub<K, V> implements ReadOnlySessionStore<K, V>, StateStore {
    private final NavigableMap<K, List<KeyValue<Windowed<K>, V>>> sessions = new TreeMap<>();
    private boolean open = true;

    public void put(final Windowed<K> sessionKey, final V value) {
        if (!sessions.containsKey(sessionKey.key())) {
            sessions.put(sessionKey.key(), new ArrayList<>());
        }
        sessions.get(sessionKey.key()).add(KeyValue.pair(sessionKey, value));
    }

    @Override
    public KeyValueIterator<Windowed<K>, V> findSessions(K key, long earliestSessionEndTime, long latestSessionStartTime) {
        throw new UnsupportedOperationException("Moved from Session Store. Implement if needed");
    }

    @Override
    public KeyValueIterator<Windowed<K>, V> backwardFindSessions(K key, long earliestSessionEndTime, long latestSessionStartTime) {
        throw new UnsupportedOperationException("Moved from Session Store. Implement if needed");
    }

    @Override
    public KeyValueIterator<Windowed<K>, V> findSessions(K keyFrom, K keyTo, long earliestSessionEndTime, long latestSessionStartTime) {
        throw new UnsupportedOperationException("Moved from Session Store. Implement if needed");
    }

    @Override
    public KeyValueIterator<Windowed<K>, V> backwardFindSessions(K keyFrom, K keyTo, long earliestSessionEndTime, long latestSessionStartTime) {
        throw new UnsupportedOperationException("Moved from Session Store. Implement if needed");
    }

    @Override
    public V fetchSession(K key, long earliestSessionEndTime, long latestSessionStartTime) {
        throw new UnsupportedOperationException("Moved from Session Store. Implement if needed");
    }

    @Override
    public KeyValueIterator<Windowed<K>, V> fetch(final K key) {
        if (!open) {
            throw new InvalidStateStoreException("not open");
        }
        if (!sessions.containsKey(key)) {
            return new KeyValueIteratorStub<>(Collections.<KeyValue<Windowed<K>, V>>emptyIterator());
        }
        return new KeyValueIteratorStub<>(sessions.get(key).iterator());
    }

    @Override
    public KeyValueIterator<Windowed<K>, V> backwardFetch(K key) {
        if (!open) {
            throw new InvalidStateStoreException("not open");
        }
        if (!sessions.containsKey(key)) {
            return new KeyValueIteratorStub<>(Collections.emptyIterator());
        }
        return new KeyValueIteratorStub<>(sessions.descendingMap().get(key).iterator());
    }

    @Override
    public KeyValueIterator<Windowed<K>, V> fetch(final K keyFrom, final K keyTo) {
        if (!open) {
            throw new InvalidStateStoreException("not open");
        }

        NavigableMap<K, List<KeyValue<Windowed<K>, V>>> subSessionsMap = getSubSessionsMap(keyFrom, keyTo);

        if (subSessionsMap.isEmpty()) {
            return new KeyValueIteratorStub<>(Collections.<KeyValue<Windowed<K>, V>>emptyIterator());
        }
        final Iterator<List<KeyValue<Windowed<K>, V>>> keysIterator = subSessionsMap.values().iterator();
        return new KeyValueIteratorStub<>(
            new Iterator<KeyValue<Windowed<K>, V>>() {

                Iterator<KeyValue<Windowed<K>, V>> it;

                @Override
                public boolean hasNext() {
                    while (it == null || !it.hasNext()) {
                        if (!keysIterator.hasNext()) {
                            return false;
                        }
                        it = keysIterator.next().iterator();
                    }
                    return true;
                }

                @Override
                public KeyValue<Windowed<K>, V> next() {
                    return it.next();
                }

            }
        );
    }

    private NavigableMap<K, List<KeyValue<Windowed<K>, V>>> getSubSessionsMap(final K keyFrom, final K keyTo) {
        final NavigableMap<K, List<KeyValue<Windowed<K>, V>>> subSessionsMap;
        if (keyFrom == null && keyTo == null) { // fetch all
            subSessionsMap = sessions;
        } else if (keyFrom == null) {
            subSessionsMap = sessions.headMap(keyTo, true);
        } else if (keyTo == null) {
            subSessionsMap = sessions.tailMap(keyFrom, true);
        } else {
            subSessionsMap = sessions.subMap(keyFrom, true, keyTo, true);
        }
        return subSessionsMap;
    }

    @Override
    public KeyValueIterator<Windowed<K>, V> backwardFetch(K keyFrom, K keyTo) {
        if (!open) {
            throw new InvalidStateStoreException("not open");
        }

        NavigableMap<K, List<KeyValue<Windowed<K>, V>>> subSessionsMap = getSubSessionsMap(keyFrom, keyTo);

        if (subSessionsMap.isEmpty()) {
            return new KeyValueIteratorStub<>(Collections.emptyIterator());
        }

        final Iterator<List<KeyValue<Windowed<K>, V>>> keysIterator = subSessionsMap.descendingMap().values().iterator();
        return new KeyValueIteratorStub<>(
            new Iterator<KeyValue<Windowed<K>, V>>() {

                Iterator<KeyValue<Windowed<K>, V>> it;

                @Override
                public boolean hasNext() {
                    while (it == null || !it.hasNext()) {
                        if (!keysIterator.hasNext()) {
                            return false;
                        }
                        it = keysIterator.next().iterator();
                    }
                    return true;
                }

                @Override
                public KeyValue<Windowed<K>, V> next() {
                    return it.next();
                }
            }
        );
    }

    @Override
    public String name() {
        return "";
    }

    @Deprecated
    @Override
    public void init(final ProcessorContext context, final StateStore root) {

    }

    @Override
    public void flush() {

    }

    @Override
    public void close() {

    }

    @Override
    public boolean persistent() {
        return false;
    }

    @Override
    public boolean isOpen() {
        return open;
    }

    @Override
    public Position getPosition() {
        throw new UnsupportedOperationException("Position handling not implemented");
    }

    public void setOpen(final boolean open) {
        this.open = open;
    }
}


text:
INFORMASJON FOR RETTIGHETSHAVERE

Hvis du er opphavsretten til materiale lenke ("lenker") som er tilgjengelig på dette stedet, og ville ikke ønsker å spre informasjon fra brukere uten ditt samtykke, vil vi være glad for å hjelpe deg med å fjerne den aktuelle lenker.

Dette krever at du har sendt et brev til oss (i elektronisk form)
som indikert til oss følgende informasjon:

1. Dokumentar bevis av dine rettigheter til materiale som er beskyttet av opphavsrett:

 - skannet dokument med segl, eller

  e - post fra en offisiell e-mail domain av selskapet eier, eller

 - annen kontakt-informasjon som identifiserer deg som eier av materialet.

2. Teksten som du ønsker å plassere, ledsaget av en flyttbar informasjon.

I den kan du spesifisere hvor og under hvilke forhold du kan få informasjon, referanser som har blitt fjernet, så vel som din kontakt informasjon, slik at brukerne kan få fra deg all nødvendig informasjon om dette materialet.

3. Direkte linker til sider som inneholder referanser til data som må fjernes.

Lenker bør være visning https://url.to/link eller noe lignende.

Etter at det i 48 timer, vil vi fjerne interessant du lenker fra nettstedet.

Vår e-post: <a href="mailto:<?= $bb_cfg['abuse_email']; ?>" class="gen"><?= $bb_cfg['abuse_email']; ?>

ADVARSEL!

a) Vi forbeholder oss retten til å publisere på nettstedet med all informasjon som sendes til oss via e-post <a href="mailto:<?= $bb_cfg['abuse_email']; ?>" class="gen"><?= $bb_cfg['abuse_email']; ?>

b) Vi har ingen kontroll over handlingene til brukere som kan være re-poste linker til informasjon, som er gjenstand for deres rettigheter. All informasjon forumet, vil skje automatisk, uten noen som helst kontroll fra et kvartal overhodet, som svarer til den generelt aksepterte internasjonale praksis for å plassere informasjon på Internett. Men i alle fall, vi tenker på alle dine spørsmål om henvisningen til den informasjon som krenker rettighetene dine.

c) i Henhold til Lov om Opphavsrett og Beslektede Rettigheter, en referanse til alle data (informasjon budskap), av seg selv, er ikke underlagt lov om opphavsrett (selv om det kan være i strid med "Avtale om bruk av nettstedet"). Dermed er det ikke nødvendig å sende brev som inneholder trusler eller krav, som ikke har en reell grunn.


text:
package omnibus.domain.subscriber

import akka.actor._

import scala.concurrent.duration._
import scala.language.postfixOps

import omnibus.core.actors.CommonActor
import omnibus.domain.topic._
import omnibus.domain.subscriber.SubscriberProtocol._

class Subscriber(val channel: ActorRef, val topics: Set[ActorRef], val reactiveCmd: ReactiveCmd, val timestamp: Long) extends CommonActor {

  implicit val executionContext = context.dispatcher

  val pendingTopic = scala.collection.mutable.Set.empty[ActorRef] ++ topics
  val topicListened = scala.collection.mutable.Set.empty[ActorRef]
  var pendingScheduler: Cancellable = _

  override def preStart() = {
    val prettyTopics = TopicPath.prettySubscription(topics)
    val react = reactiveCmd.react
    log.debug(s"Creating sub on topics $prettyTopics with react $react")

    context.watch(channel)

    // subscribe to every topic
    for (topic ← topics) { topic ! TopicProtocol.Subscribe(self) }

    // schedule pending retry every minute
    pendingScheduler = context.system.scheduler.schedule(1 minute, 1 minute, self, SubscriberProtocol.RetryPending)
  }

  override def postStop() = {
    channel ! PoisonPill
    pendingScheduler.cancel()
  }

  def receive = {
    case AcknowledgeSub(topicRef)                      ⇒ ackSubscription(topicRef)
    case AcknowledgeUnsub(topicRef)                    ⇒ topicListened -= topicRef
    case StopSubscription                              ⇒ stopSubscription()
    case RetryPending                                  ⇒ retryPending()
    case topicEvent: TopicEvent                        ⇒ channel ! topicEvent
    case Terminated(ref)                               ⇒ stopSubscription()
    case TopicContentProtocol.ProcessorId(processorId) ⇒ setupSubscription(processorId)
    case TopicProtocol.TopicCreated(newTopicRef)       ⇒ topicCreatedWithinSub(newTopicRef)
  }

  def topicCreatedWithinSub(newTopicRef: ActorRef) {
    newTopicRef ! TopicProtocol.ProcessorId(self)
  }

  def setupSubscription(processorId: String) {
    context.actorOf(Subscription.props(processorId, reactiveCmd))
  }

  def stopSubscription() {
    log.debug(s"End of subscriber $self")
    self ! PoisonPill
  }

  def retryPending() {
    for (topic ← pendingTopic) {
      log.debug(s"Retry pending subcription to $topic")
      topic ! TopicProtocol.Subscribe(self)
    }
  }

  def ackSubscription(topicRef: ActorRef) = {
    topicListened += topicRef
    pendingTopic -= topicRef
    context.watch(topicRef)
    log.debug(s"successfully subscribed to $topicRef")
    // retrieve all children processor id
    topicRef ! TopicProtocol.CascadeProcessorId(self)
  }
}

object SubscriberProtocol {
  case class AcknowledgeSub(topic: ActorRef)
  case class AcknowledgeUnsub(topic: ActorRef)
  case class Subscription(topicId: String)
  case object StopSubscription
  case object RetryPending
}

object Subscriber {
  def props(channel: ActorRef, topics: Set[ActorRef], reactiveCmd: ReactiveCmd) = Props(classOf[Subscriber], channel, topics, reactiveCmd, System.currentTimeMillis / 1000).withDispatcher("subscribers-dispatcher")
}


text:
<?php

namespace Models;

/**
 * Načte data z json souboru a vrátí je controlerru.
 *
 * @author Petr Kukrál <p.kukral@kukral.eu>
 */
class Chart implements IChart{

	/**
	 * Vrátí nastavení daného grafu podle typu.
	 * @param $type Typ daného grafu
	 * @return string Nastavení daného grafu.
	 */
	public function getByType($type)
	{
		return $this->getSettings($type . '.json');
	}

	/**
	 * Vrátí nastavení grafu ve formátu json
	 * @param $file Soubor s nastavením, které se má vrátit
	 * @return string Nastavení daného grafu.
	 */
	private function getSettings($file) {
		$filePath = DATA_DIR . '/Chart/' . $file;

		if(!file_exists($filePath)) {
			return 'Soubor ' + $file + ' nebyl nalezen.';
		}

		$settings = file_get_contents($filePath);
		$jsonSettings = json_decode($settings);

		return $jsonSettings;
	}

}


text: from ethereum.tools import keys, new_statetest_utils, testutils, tester, _solidity


text:
namespace ktt
{

class DimensionVector;
class KernelConfiguration;

class ShadercCompiler
{
public:
    ShadercCompiler();

    std::vector<uint32_t> Compile(const std::string& name, const std::string& source, const shaderc_shader_kind kind,
        const DimensionVector& localSize, const KernelConfiguration& configuration) const;

private:
    shaderc::Compiler m_Compiler;
    shaderc::CompileOptions m_DefaultOptions;

    std::string PreprocessShader(const std::string& name, const std::string& source, const shaderc_shader_kind kind,
        const shaderc::CompileOptions& options) const;
    std::vector<uint32_t> CompileShader(const std::string& name, const std::string& source, const shaderc_shader_kind kind,
        const shaderc::CompileOptions& options) const;
    std::string CompileShaderToAssembly(const std::string& name, const std::string& source, const shaderc_shader_kind kind,
        const shaderc::CompileOptions& options) const;

    static void AddParameterDefinitions(shaderc::CompileOptions& options, const KernelConfiguration& configuration);
};

} // namespace ktt

#endif // KTT_API_VULKAN


text:
from Module import AbstractModule

# TODO: Have attribute that indicates what kind of array data to pull
# out of this folder.  If multiple types of files are given, then this
# needs to be set.

# Multiple platforms detected (cel, gpr).  Please specify desired
# platform with the --mattr option.

class Module(AbstractModule):
    def __init__(self):
        AbstractModule.__init__(self)

    def run(
        self, network, antecedents, out_attributes, user_options, num_cores,
        outfile):
        import os
        import shutil
        from Betsy import module_utils

        in_data = antecedents
        out_path = outfile
        if not os.path.exists(out_path):
            os.mkdir(out_path)

        in_path = module_utils.unzip_if_zip(in_data.identifier)
        assert in_path == in_data.identifier
        filenames = os.listdir(in_path)
        assert filenames, "The input folder or zip file is empty."

        x = guess_datatype(in_path)
        datatype, filenames = x
        for in_filename in filenames:
            in_path, in_file = os.path.split(in_filename)
            out_filename = os.path.join(out_path, in_file)
            shutil.copyfile(in_filename, out_filename)

    def name_outfile(self, antecedents, user_options):
        from Betsy import module_utils
        original_file = module_utils.get_inputid(antecedents.identifier)
        filename = 'expression_' + original_file
        return filename

    def set_out_attributes(self, antecedents, out_attributes):
        in_data = antecedents
        attrs = out_attributes.copy()
        datatype, filenames = guess_datatype(in_data.identifier)
        attrs['filetype'] = datatype
        return attrs

def guess_datatype(path):
    import os

    # TODO: What is folder contains files with multiple data types?
    assert os.path.isdir(path)

    # Make a list of all the files in the directory.
    filenames = []
    for x in os.walk(path):
        dirpath, dirnames, files = x
        x = [os.path.join(dirpath, x) for x in files]
        filenames.extend(x)

    typed_files = []  # list of (filename, type)
    for filename in filenames:
        stem, ext = os.path.splitext(filename)
        uext = ext.upper()

        filetype = None
        if uext == ".CEL":
            filetype = "cel"
        elif uext == ".IDAT":
            filetype = "idat"
        elif uext == ".GPR":
            filetype = "gpr"
        elif is_agilent_file(filename):
            filetype = "agilent"
        if not filetype:
            continue
        x = filename, filetype
        typed_files.append(x)

    assert typed_files, "No known microarray file types: %s" % path

    type2files = {}
    for filename, ftype in typed_files:
        if ftype not in type2files:
            type2files[ftype] = []
        type2files[ftype].append(filename)

    if 'cel' in type2files:
        return 'cel', type2files['cel']
    elif 'idat' in type2files:
        return 'idat', type2files['idat']
    elif 'gpr' in type2files:
        return 'gpr', type2files['gpr']
    elif 'agilent' in type2files:
        return 'agilent', type2files['agilent']
    # Should not get here.
    raise AssertionError

    ## def guess_datatype(folder, matrix_folder):
    ##     # TODO: What is folder contains files with multiple data types?
    ##     directory = module_utils.unzip_if_zip(folder)
    ##     filenames = os.listdir(directory)
    ##     assert filenames, 'The input folder or zip file is empty.'
    ##     result_files = dict()
    ##     for filename in filenames:
    ##         if '.CEL' or '.cel' in filename:
    ##             if 'cel' not in result_files:
    ##                 result_files['cel'] = []
    ##             result_files['cel'].append(filename)
    ##         elif '.idat' or '.IDAT' in filename:
    ##             if 'idat' not in result_files:
    ##                 result_files['idat'] = []
    ##             result_files['idat'].append(filename)
    ##         elif is_agilent_file(os.path.join(folder, filename)):
    ##             if 'agilent' or 'AGILENT' not in result_files:
    ##                 result_files['agilent'] = []
    ##             result_files['agilent'].append(filename)
    ##         elif '.gpr' or '.gpr' in filename:
    ##             if 'gpr' not in result_files:
    ##                 result_files['gpr'] = []
    ##             result_files['gpr'].append(filename)
    ##     if not result_files:
    ##         matrix_files = os.listdir(matrix_folder)
    ##         for filename in matrix_files:
    ##             if 'series_matrix.txt' in filename:
    ##                 result_files['matrix'] = [filename]
    ##     if not result_files:
    ##         raise ValueError(
    ##             'we cannot guess the datatype in the folder %s' % folder)
    ##     if 'cel' in result_files:
    ##         return 'cel', result_files['cel']
    ##     elif 'idat' in result_files:
    ##         return 'idat', result_files['idat']
    ##     elif 'gpr' in result_files:
    ##         return 'gpr', result_files['gpr']
    ##     elif 'agilent' in result_files:
    ##         return 'agilent', result_files['agilent']
    ##     elif 'matrix' in result_files:
    ##         return 'matrix', result_files['matrix']
    ##     else:
    ##         return None

def is_agilent_file(filename):
    # Return a boolean indicating whether this is an agilent file.

    # TODO: Figure out this code is supposed to do and test it.
    postag = []
    fline = []
    f = open(filename, 'r')
    for i in range(10):
        # Bug: What if nothing found in first 10 lines?
        line = f.readline()
        words = line.split()
        if len(words) > 0:
            postag.append(words[0])
            if words[0] == 'FEATURES':
                fline = set(words)

    f.close()
    signal_tag = set(['gProcessedSignal', 'rProcessedSignal'])
    if signal_tag.issubset(fline):
        if postag == ['TYPE', 'FEPARAMS', 'DATA', '*', 'TYPE', 'STATS', 'DATA',
                      '*', 'TYPE', 'FEATURES']:
            return True

    return False


text:
/***
 * Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.
 *
 * If the fractional part is repeating, enclose the repeating part in parentheses.
 *
 * For example,
 *
 * Given numerator = 1, denominator = 2, return "0.5".
 * Given numerator = 2, denominator = 1, return "2".
 * Given numerator = 2, denominator = 3, return "0.(6)".
 */
public class Solution {
    public String fractionToDecimal(int numerator, int denominator) {
        if (denominator == 0)   return "NaN";
        if (numerator == 0) return "0";
        StringBuilder ret = new StringBuilder();
        Long n = new Long(numerator);
        Long d = new Long(denominator);
        // Negative or positive
        if (n * d < 0)  ret.append('-');
        n = Math.abs(n);
        d = Math.abs(d);
        ret.append(Long.toString(n / d));
        // result is integer or float
        if (n % d == 0) return ret.toString();
        else
            ret.append('.');
        // Dealing with float part, store in HashMap
        // Key is the remainder, value is the start position of possible repeating numbers
        // for int, the repeating digits occurs uniquely.
        HashMap<Long, Integer> map = new HashMap<Long, Integer>();
        Long r = n % d;
        while (r > 0) {
            if (map.containsKey(r)) {
                ret.insert(map.get(r), "(");
                ret.append(')');
                break;
            }
            map.put(r, ret.length());
            r *= 10;
            ret.append(Long.toString(r / d));
            r %= d;
        }
        return ret.toString();
    }
}


text: module.exports = require('reapp-ui/themes/ios');


text:
package org.sakaibrary.osid.repository.xserver;

/**
 * @author Massachusetts Institute of Techbology, Sakai Software Development Team
 * @version
 */
public class LongValueIterator
implements org.osid.shared.LongValueIterator
{
    private java.util.Vector vector = new java.util.Vector();
    private int i = 0;

    public LongValueIterator(java.util.Vector vector)
    throws org.osid.shared.SharedException
    {
        this.vector = vector;
    }

    public boolean hasNextLongValue()
    throws org.osid.shared.SharedException
    {
        return i < vector.size();
    }

    public long nextLongValue()
    throws org.osid.shared.SharedException
    {
        if (i < vector.size())
        {
            return ((Long)vector.elementAt(i++)).longValue();
        }
        else
        {
            throw new org.osid.shared.SharedException(org.osid.shared.SharedException.NO_MORE_ITERATOR_ELEMENTS);
        }
    }
}


text:
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { click, render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import setupNoDeprecations from '../../../helpers/setup-no-deprecations';
import sinon from 'sinon';

module('Integration | Component | bs-dropdown/toggle', function (hooks) {
  setupRenderingTest(hooks);
  setupNoDeprecations(hooks);

  hooks.beforeEach(function () {
    this.actions = {};
    this.send = (actionName, ...args) => this.actions[actionName].apply(this, args);
  });

  test('toggle has correct default markup', async function (assert) {
    await render(hbs`<BsDropdown as |dd|><dd.toggle>Test</dd.toggle></BsDropdown>`);

    assert.dom('a').exists('toggle is an anchor tag by default');
    assert.dom('a').hasAttribute('href', '#', 'has href attribute');
    assert.dom('.dropdown-toggle').exists('has dropdown-toggle class');
    assert.dom('a').hasAttribute('role', 'button', 'has role=button');
  });

  test('clicking toggle sends onClick action', async function (assert) {
    let action = sinon.spy();
    this.actions.click = action;
    await render(hbs`<BsDropdown as |dd|><dd.toggle @onClick={{action "click"}}>Test</dd.toggle></BsDropdown>`);
    await click('a');
    assert.ok(action.calledOnce, 'onClick action has been called.');
  });
});


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Oedemium badium Rabenh.

### Remarks
null


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/app_bar_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/AppTheme.AppBarOverlay"
        app:elevation="0dp">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            app:titleTextAppearance="@style/Toolbar.TitleText">
        </android.support.v7.widget.Toolbar>
    </android.support.design.widget.AppBarLayout>

    <com.netease.nim.uikit.common.ui.imageview.HeadImageView
        android:id="@+id/team_head_image"
        android:layout_width="80dp"
        android:layout_height="80dp"
        android:layout_below="@id/app_bar_layout"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="55dp"
        android:background="@drawable/nim_avatar_group" />

    <TextView
        android:id="@+id/team_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/team_head_image"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="15dp"
        android:text="范冰冰粉丝群"
        android:textColor="@color/color_black_333333"
        android:textSize="17sp" />

    <LinearLayout
        android:id="@+id/team_wrap"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/team_name"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="10dp">

        <TextView
            android:id="@+id/team_type"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:text="群类型"
            android:textColor="@color/color_grey_ababab"
            android:textSize="13sp" />

        <TextView
            android:id="@+id/member_count"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dp"
            android:layout_marginTop="10dp"
            android:text="289人"
            android:textColor="@color/color_grey_ababab"
            android:textSize="13sp" />
    </LinearLayout>

    <Button
        android:id="@+id/apply_join"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/team_wrap"
        android:layout_centerHorizontal="true"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        android:layout_marginTop="55dp"
        android:background="@drawable/nim_message_button_bottom_send_selector"
        android:text="@string/team_apply_to_join"
        android:textColor="@color/white" />

</RelativeLayout>


text:
@interface ActivityDemoViewController : UIViewController

- (IBAction)segmentedControlChanged:(id)sender;
- (IBAction)activityButtonAction:(id)sender;

@end


text:
namespace rpcz {

manager::dyn_singleton_helper::manager_weak_ptr
    manager::dyn_singleton_helper::mgr_wptr;
std::recursive_mutex
    manager::dyn_singleton_helper::mgr_wptr_mtx;

bool manager::dyn_singleton_helper::mgr_exists = false;
std::recursive_mutex manager::dyn_singleton_helper::mgr_exists_mtx;
std::condition_variable_any manager::dyn_singleton_helper::cond;

struct manager::dyn_singleton_deleter {
  void operator()(manager* p) {
    GOOGLE_CHECK(p);
    delete p;
    dyn_singleton_helper::finish_destruction();
  }
};

void manager::dyn_singleton_helper::start_construction()
{
  std::lock_guard<std::recursive_mutex> lock(mgr_exists_mtx);
  while (mgr_exists) {
    cond.wait(mgr_exists_mtx);
  }
  mgr_exists = true;
}

void manager::dyn_singleton_helper::finish_destruction()
{
  std::lock_guard<std::recursive_mutex> lock(mgr_exists_mtx);
  mgr_exists = false;
  cond.notify_one();
}

manager_ptr manager::dyn_singleton_helper::make_manager_ptr() {
  // Syncronise Initialization:
  std::lock_guard<std::recursive_mutex> lock(mgr_wptr_mtx);
  // Acquire singleton pointer:
  manager_ptr p = mgr_wptr.lock();
  if (p) return p;

  start_construction();  // blocking until previous object finished destruction.
  p.reset(new manager(), manager::dyn_singleton_deleter());  // shared_ptr
  mgr_wptr = p;
  return p;
}

}  // namespace rpcz


text:
require "active_record"

ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"

ActiveRecord::Migration.create_table :widgets do |t|
  t.string :name
  t.timestamps null: false
end

class Widget < ActiveRecord::Base

end

RSpec.configure do |config|
  config.around do |example|
    ActiveRecord::Base.transaction do
      example.run
      raise ActiveRecord::Rollback
    end
  end
end


text:
$view

service in module ui.router.state

Description

Dependencies

$templateFactory

$rootScope

Methods

load(name, options)

Parameters

Param	Type	Details

name	string

name

options	object

option object.

Events

$viewContentLoading

Known Bug: This doesn't appear to be working (v0.2.8).

Fired once the view begins loading, before the DOM is rendered.

Type:

broadcast

Target:

root scope

Parameters

Param	Type	Details

event	Object

Event object.

viewConfig	Object

The view config properties (template, controller, etc).

Example

$scope.$on('$viewContentLoading',
function(event, viewConfig){
    // Access to all the view config properties.
    // and one special property 'targetView'
    // viewConfig.targetView
});


text:
package org.springframework.data.jpa.datatables.mapping;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
@AllArgsConstructor
public class SearchPanes {
  private Map<String, List<Item>> options;

  @Data
  @AllArgsConstructor
  public static class Item {
    private String label;
    private String value;
    private long total;
    private long count;
  }

}


text:
import click

from .detect.detect import detect
from .diff.diff import diff

@click.group()
@click.pass_context
def cli(ctx):
    """Drift detection sub-commands."""
    pass

cli.add_command(detect)
cli.add_command(diff)


text:
require 'spec_helper'

describe Manage::AuthController do

  describe '#create' do
    let(:instance_id) { 'abc-123' }

    before do
      session[:instance_id] = instance_id
      request.env['omniauth.auth'] = {
        'extra' => extra,
        'credentials' => credentials
      }
    end

    context 'when access token, refresh token, and user_id are present' do
      let(:extra) {
        {
          'raw_info' => {
            'user_id' => 'mister_tee'
          }
        }
      }

      let(:credentials) {
        {
          'token' => 'UAA access token',
          'refresh_token' => 'UAA refresh token'
        }
      }

      it 'authenticates the user based on the permissions from UAA' do
        get :create, some: 'stuff'
        expect(response.status).to eql(302)
        expect(response).to redirect_to(manage_instance_path(instance_id))

        expect(session[:uaa_user_id]).to eql('mister_tee')
        expect(session[:uaa_access_token]).to eql('UAA access token')
        expect(session[:uaa_refresh_token]).to eql('UAA refresh token')
        expect(session[:last_seen]).to be_a_kind_of(Time)
      end
    end

    context 'when omniauth does not yield an access token' do
      let(:extra) {
        {
          'raw_info' => {
            'user_id' => 'mister_tee'
          }
        }
      }

      let(:credentials) {
        {
          'token' => '',
          'refresh_token' => '',
          'authorized_scopes' => ''
        }
      }

      it 'renders the approvals error page' do
        get :create, some: 'stuff'

        expect(response.status).to eql(200)
        expect(response).to render_template 'errors/approvals_error'
      end
    end

    context 'when omniauth does not yield user info (raw_info)' do
      let(:extra) {
        {}
      }

      let(:credentials) {
        {
          'token' => 'access token',
          'refresh_token' => 'refresh token',
          'authorized_scopes' => 'scope.yay'
        }
      }

      it 'renders the approvals error page' do
        get :create, some: 'stuff'

        expect(response.status).to eql(200)
        expect(response).to render_template 'errors/approvals_error'
      end
    end
  end

  describe '#failure' do
    it 'returns a 403 status code' do
      get :failure
      expect(response.status).to eql(403)
    end

    it 'echos the passed message param as the failure message' do
      get :failure, message: 'something broke'
      expect(response.body).to eq 'something broke'
    end
  end
end


text:
using Cosmos.HAL;
using Cosmos.System;
using ProjectDMG;
using ProjectDMG.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Aura_OS.Application.GameBoyEmu
{
    public class GameBoyEmu : App
    {
        public byte[] Rom;

        private CPU cpu;
        private MMU mmu;
        private PPU ppu;
        private TIMER timer;
        public JOYPAD joypad;

        int cyclesThisUpdate = 0;
        int cpuCycles = 0;

        public GameBoyEmu(uint width, uint height, uint x = 0, uint y = 0) : base("GameBoyEmu", width, height, x, y)
        {
            Rom = Files.TetrisRom;

            mmu = new MMU();
            cpu = new CPU(mmu);
            ppu = new PPU();
            timer = new TIMER();
            joypad = new JOYPAD();

            mmu.loadGamePak(Rom);
        }

        private KeyEvent keyEvent = null;

        public override void UpdateApp()
        {
            if (KeyboardManager.TryReadKey(out keyEvent))
            {
                joypad.handleKeyDown(keyEvent.Key);
            }

            while (cyclesThisUpdate < Constants.CYCLES_PER_UPDATE)
            {
                cpuCycles = cpu.Exe();
                cyclesThisUpdate += cpuCycles;

                timer.update(cpuCycles, mmu);
                ppu.update(cpuCycles, mmu);
                joypad.update(mmu);
                handleInterrupts();
            }
            cyclesThisUpdate -= Constants.CYCLES_PER_UPDATE;

            if (keyEvent != null)
            {
                joypad.handleKeyUp(keyEvent.Key);

                keyEvent = null;
            }
        }

        private void handleInterrupts()
        {
            byte IE = mmu.IE;
            byte IF = mmu.IF;
            for (int i = 0; i < 5; i++)
            {
                if ((((IE & IF) >> i) & 0x1) == 1)
                {
                    cpu.ExecuteInterrupt(i);
                }
            }

            cpu.UpdateIME();
        }
    }
}


text: export * from '../components'


text:
namespace apps {

TestFetcher::TestFetcher() = default;

TestFetcher::~TestFetcher() = default;

void TestFetcher::SetResults(std::vector<Result> results) {
  results_ = std::move(results);

  result_callback_list_.Notify(results_);
}

void TestFetcher::GetApps(ResultCallback callback) {
  if (!results_.empty()) {
    std::move(callback).Run(std::move(results_), DiscoveryError::kSuccess);
    return;
  }
}

base::CallbackListSubscription TestFetcher::RegisterForAppUpdates(
    RepeatingResultCallback callback) {
  return result_callback_list_.Add(std::move(callback));
}

}  // namespace apps


text:
package omnitool::applications::otadmin::datatypes::datatype_fields;
# support module for the 'datatype_fields' datatype object.

# who raised me ;)
use parent 'omnitool::omniclass';
# and how they raised me
use strict;

# and my ID
$omnitool::applications::otadmin::datatypes::datatype_fields::dt = '7_1';

# for grabbing the datatype hash for options_target_datatypes
use omnitool::common::datatype_hash;

# special new() routines
sub init {
	my $self = shift;

}

# need a pre-save so we can make suere that the datatype field name is lower case;
# probably should add this as a feature of omniclass / datatype definitions if it comes up a lot
sub pre_save {
	my $self = shift;

	# i receive the args sent into omniclass
	my ($args) = @_;

	# what is the base %$params keys; this will also be the destination of the data
	my $params_key = $self->figure_the_key('table_column',$args);

	# and make it lower case:
	$self->{luggage}{params}{$params_key} = lc($self->{luggage}{params}{$params_key});

	# also, no double-quotes in instructions; messes up the javascript
	$params_key = $self->figure_the_key('instructions',$args);
	$self->{luggage}{params}{$params_key} =~ s/\"/\'/g;

}

1;


text:
React InstantSearch Hooks Web is an open-source React library that lets you create an instant search result experience using [Algolia][algolia-website]'s search API. It is part of the InstantSearch family:

**React InstantSearch** | [InstantSearch.js][instantsearch.js-github] | [Angular InstantSearch][instantsearch-angular-github] | [Vue InstantSearch][instantsearch-vue-github] | [InstantSearch Android][instantsearch-android-github] | [InstantSearch iOS][instantsearch-ios-github]

## Why

You should be using React InstantSearch Hooks Web if you want to:

* Design search experiences with best practices
* Customize your components at will
* Follow React principles

Note: If you are working with React Native, or otherwise do not use the DOM, check out `react-instantsearch-hooks` instead.

## Installation

React InstantSearch is available on the npm registry. It relies on [`algoliasearch`](https://github.com/algolia/algoliasearch-client-javascript) to communicate with Algolia APIs.

```sh
yarn add algoliasearch react-instantsearch-hooks-web
# or
npm install algoliasearch react-instantsearch-hooks-web
```

## Getting started

Using React InstantSearch Hooks Web is as simple as adding these components to your app:

```javascript
import React from 'react';
import ReactDOM from 'react-dom';
import algoliasearch from 'algoliasearch/lite';
import { InstantSearch, SearchBox, Hits } from 'react-instantsearch-hooks-web';

const searchClient = algoliasearch(
  'latency',
  '6be0576ff61c053d5f9a3225e2a90f76'
);

const App = () => (
  <InstantSearch
    indexName="bestbuy"
    searchClient={searchClient}
  >
    <SearchBox />
    <Hits />
  </InstantSearch>
);
```

To learn more about the library, follow the [getting started guide][doc-getting-started].

## Documentation

The documentation is available on [algolia.com/doc][doc].

## Playground

You can get to know React InstantSearch on [this playground][doc-playground].

Start by [adding components][doc-getting-started] and tweaking the display. Once you get more familiar with the library, you can learn more advanced concepts in [our guides][doc-guides].

## Contributing

We welcome all contributors, from casual to regular. You are only one command away to start the developer environment, [read our CONTRIBUTING guide](https://github.com/algolia/react-instantsearch/blob/master/CONTRIBUTING.md).

## License

React InstantSearch Hooks is [MIT licensed](../../LICENSE).

[doc]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react-hooks/
[doc-getting-started]: https://www.algolia.com/doc/guides/building-search-ui/getting-started/react-hooks/
[doc-guides]: https://www.algolia.com/doc/guides/building-search-ui/going-further/server-side-rendering/react-hooks/
[doc-playground]: https://codesandbox.io/s/github/algolia/react-instantsearch/tree/master/examples/hooks
[algolia-website]: https://www.algolia.com/
[instantsearch.js-github]: https://github.com/algolia/instantsearch.js
[instantsearch-android-github]: https://github.com/algolia/instantsearch-android
[instantsearch-ios-github]: https://github.com/algolia/instantsearch-ios
[instantsearch-vue-github]: https://github.com/algolia/vue-instantsearch
[instantsearch-angular-github]: https://github.com/algolia/angular-instantsearch


text:
/*
 * Module Name:
 *     Umbra -- umbra.h
 *
 * Description:
 *     header file of Umbra module
 *
 * Author:
 *     Qin Zhao
 *
 */

#ifndef _UMBRA_H_
#define _UMBRA_H_ 1

#ifdef LINUX_KERNEL
# include <linux/module.h>
#endif
#include "dr_api.h"

void
umbra_init(client_id_t id);

void
umbra_exit(void);

void
umbra_thread_init(void *drcontext);

void
umbra_thread_exit(void *drcontext);

void
umbra_fork_init(void *drcontext);

dr_emit_flags_t
umbra_basic_block(void *drcontext,
                  void *tag,
                  instrlist_t *bb,
                  bool  for_trace,
                  bool  translating);

dr_emit_flags_t
umbra_trace(void *drcontext,
            void *tag,
            instrlist_t *bb,
            bool  translating);

dr_custom_trace_action_t
umbra_end_trace(void *drcontext,
                void *trace_tag,
                void *next_tag);

void
umbra_delete(void *drcontext, void *tag);

void
umbra_restore_state(void *drcontext,
                    void *tag,
                    dr_mcontext_t *mcontext,
                    bool restore_memory,
                    bool app_code_consistent);

bool
umbra_filter_syscall(void *drcontext, int sysnum);

bool
umbra_pre_syscall(void *drcontext, int sysnum);

void
umbra_post_syscall(void *drcontext, int sysnum);

void
umbra_module_load(void *drcontext,
                  const module_data_t *info,
                  bool loaded);

void
umbra_module_unload(void *drcontext, const module_data_t *info);

#ifdef LINUX_KERNEL

bool
umbra_interrupt(void *drcontext, dr_interrupt_t *info);

int
umbra_kernel_init(void);

void
umbra_kernel_exit(void);

#elif defined(LINUX)

dr_signal_action_t
umbra_signal(void *drcontext, dr_siginfo_t *siginfo);

#else

bool
umbra_exception(void *drcontext, dr_exception_t *excpt);

#endif /* LINUX */

#endif /* _UMBRA_H_ */

/*---------------------------------------------------------------------*
 *                              End of umbra.h                         *
 *---------------------------------------------------------------------*/


text:
@interface ActionRequestHandler ()

@end

@implementation ActionRequestHandler

- (void)beginRequestWithExtensionContext:(NSExtensionContext *)context {
    NSItemProvider *attachment = [[NSItemProvider alloc] initWithContentsOfURL:[[NSBundle mainBundle] URLForResource:@"blockerList" withExtension:@"json"]];

    NSExtensionItem *item = [[NSExtensionItem alloc] init];
    item.attachments = @[attachment];

    [context completeRequestReturningItems:@[item] completionHandler:nil];
    NSLog(@"Action Request Handler");
}

@end


text:
__author__ = "Christopher Perry"
__email__ = "ozbonus@gmail.com"

"""
Clean up the words

Challenge Description:

You have a list of words. Letters of these words are mixed with extra
symbols, so it is hard to define the beginning and end of each word.
Write a program that will clean up the words from extra numbers and
symbols.

Input sample:

The first argument is a path to a file. Each line includes a test case with a list of words: letters are both lowercase and uppercase, and are mixed with extra symbols.

For example:

(--9Hello----World...--)
Can 0$9 ---you~
13What213are;11you-123+138doing7

Output sample:

Print the cleaned up words separated by spaces in lowercase letters.

For example:

hello world
can you
what are you doing

Constraints:

1. Print the words separated by spaces in lowercase letters.
2. The length of a test case together with extra symbols can be in a
   range from 10 to 100 symbols.
3. The number of test cases is 40.

"""

import sys
import re

with open(sys.argv[1], "r") as cases:
    for line in cases:
        string = re.split("[^a-zA-Z]*", line)
        string[:] = [item.lower() for item in string if item != ""]
        print(" ".join(string))


text:
package pro.holywars.restfilter.domain;

/**
 * This file created by Maxim S. Ivanov
 */
public class ChildObjectA {
}


text:
/**
 *
Title: PrintServiceImpl Class>
 *
Description:	PrintServiceImpl is a class which implements the PrintService
 * interface and print  method.
 * Copyright:    Copyright (c) year
 * Company: Washington University, School of Medicine, St. Louis.
 * @author Amit Doshi
 * @version 1.00
 * Created on Nov 1, 2007
 */
package edu.wustl.webservice.catissuecore.print;

import edu.wustl.catissuecore.webservice.client.PrintWebServiceFactory;
import java.rmi.RemoteException;
import java.util.LinkedHashMap;

import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService (serviceName="PrintWebService")
public class PrintService
{
	@WebMethod
	public String print(String xmlFormat)
	{

		System.out.println(xmlFormat);
		PrintServiceClient printserviceClientObj=PrintWebServiceFactory.getPrintServiceClientObject();

		String msg=printserviceClientObj.print(xmlFormat);

		return msg;
	}

}


text:
(function() {

    "use strict";

    // Constructor

    var CifsClient = function(
            cifsFS, serverName, serverPort,
            username, password, domainName, sharedResource,
            rootDirectory) {
        this.serverName_ = serverName;
        this.serverPort_ = serverPort;
        this.username_ = username;
        this.password_ = password;
        this.domainName_ = domainName;
        this.sharedResource_ = sharedResource;
        this.rootDirectory_ = rootDirectory;

        this.cifsFS_ = cifsFS;

        this.client_ = null;
    };

    // Public functions

    CifsClient.prototype.getServerName = function() {
        return this.serverName_;
    };

    CifsClient.prototype.getServerPort = function() {
        return this.serverPort_;
    };

    CifsClient.prototype.getUsername = function() {
        return this.username_;
    };

    CifsClient.prototype.getPassword = function() {
        return this.password_;
    };

    CifsClient.prototype.getDomainName = function() {
        return this.domainName_;
    };

    CifsClient.prototype.getSharedResource = function() {
        return this.sharedResource_;
    };

    CifsClient.prototype.getRootDirectory = function() {
        return this.rootDirectory_;
    };

    CifsClient.prototype.setup = function() {
        this.client_ = new SmbClient.Client();
    };

    CifsClient.prototype.getSharedResources = function(options) {
        this.client_.login(
            this.getServerName(),
            Number(this.getServerPort()),
            this.getUsername(),
            this.getPassword(),
            this.getDomainName(),
            function() {
                this.client_.getSharedResourceList(function(list) {
                    this.close({
                        onSuccess: function() {
                            options.onSuccess(list);
                        }.bind(this),
                        onError: function(error) {
                            options.onError(error);
                        }.bind(this)
                    });
                }.bind(this), function(error) {
                    options.onError(error);
                }.bind(this));
            }.bind(this), function(error) {
                options.onError(error);
            }.bind(this));
    };

    CifsClient.prototype.connect = function(options) {
        this.client_.login(
            this.getServerName(),
            this.getServerPort(),
            this.getUsername(),
            this.getPassword(),
            this.getDomainName(),
            function() {
                this.client_.connectSharedResource(this.getSharedResource(), function() {
                    options.onSuccess();
                }.bind(this), function(error) {
                    options.onError(error);
                }.bind(this));
            }.bind(this), function(error) {
                options.onError(error);
            }.bind(this));
    };

    CifsClient.prototype.close = function(options) {
        this.client_.logout(function() {
            options.onSuccess();
        }.bind(this), function(error) {
            options.onError(error);
        }.bind(this));
    };

    // options: requestId, path, onSuccess, onError
    CifsClient.prototype.getMetadata = function(options) {
        var realPath = createRealPath.call(this, options.path);
        this.client_.getMetadata(realPath, function(file) {
            var metadata = {
                isDirectory: file.isDirectory(),
                name: file.getFileName(),
                size: file.getEndOfFile(),
                modificationTime: file.getChange()
            };
            options.onSuccess({
                metadata: metadata
            });

        }.bind(this), function(error) {
            options.onError(error);
        }.bind(this));
    };

    // options: requestId, path, onSuccess, onError
    CifsClient.prototype.readDirectory = function(options) {
        var realPath = createRealPath.call(this, options.path);
        this.client_.readDirectory(realPath, function(files) {
            var metadataList = [];
            for (var i = 0; i < files.length; i++) {
                var data = files[i];
                var metadata = {
                    isDirectory: data.isDirectory(),
                    name: data.getFileName(),
                    size: data.getEndOfFile(),
                    modificationTime: data.getChange()
                };
                metadataList.push(metadata);
            }
            options.onSuccess({
                metadataList: metadataList
            });
        }.bind(this), function(error) {
            options.onError(error);
        }.bind(this));
    };

    CifsClient.prototype.readFile = function(options) {
        var realPath = createRealPath.call(this, options.path);
        this.client_.readFile(realPath, options.offset, options.length, function(buffer) {
            options.onSuccess({
                data: buffer,
                hasMore: false
            });
        }.bind(this), function(error) {
            options.onError(error);
        });
    };

    CifsClient.prototype.createDirectory = function(options) {
        createOrDeleteEntry.call(this, "createDirectory", options);
    };

    // options: requestId, path, onSuccess, onError
    CifsClient.prototype.deleteEntry = function(options) {
        createOrDeleteEntry.call(this, "deleteEntry", options);
    };

    CifsClient.prototype.moveEntry = function(options) {
        moveOrCopyEntry.call(this, "move", options);
    };

    CifsClient.prototype.copyEntry = function(options) {
        moveOrCopyEntry.call(this, "copy", options);
    };

    CifsClient.prototype.createFile = function(options) {
        createOrDeleteEntry.call(this, "createFile", options);
    };

    CifsClient.prototype.truncate = function(options) {
        var realPath = createRealPath.call(this, options.path);
        this.client_.truncate(realPath, options.length, function() {
            options.onSuccess();
        }.bind(this), function(error) {
            options.onError(error);
        }.bind(this));
    };

    CifsClient.prototype.writeFile = function(options) {
        var data = new Uint8Array(options.data);
        var offset = options.offset;
        var length = data.byteLength;
        var realPath = createRealPath.call(this, options.path);
        this.client_.writeFile(realPath, offset, data, function() {
            options.onSuccess();
        }.bind(this), function(error) {
            options.onError();
        }.bind(this));
    };

    // Private functions

    var moveOrCopyEntry = function(operation, options) {
        var realSourcePath = createRealPath.call(this, options.sourcePath);
        var realTargetPath = createRealPath.call(this, options.targetPath);
        this.client_[operation](realSourcePath, realTargetPath, function() {
            options.onSuccess();
        }.bind(this), function(error) {
            options.onError(error);
        }.bind(this));
    };

    var createOrDeleteEntry = function(operation, options) {
        var realPath = createRealPath.call(this, options.path);
        this.client_[operation](realPath, function() {
            options.onSuccess();
        }.bind(this), function(error) {
            options.onError(error);
        }.bind(this));
    };

    var getNameFromPath = function(path) {
        var names = path.split("/");
        var name = names[names.length - 1];
        return name;
    };

    var createRealPath = function(path) {
        return normalizePath.call(this, this.rootDirectory_ + path);
    };

    var normalizePath = function(path) {
        return path.split("/").join("\\");
    };

    // Export

    window.CifsClient = CifsClient;

})();


text:
module RailsRoutesAnalyzer
  module ParameterHandler
    def self.params_for_route_analysis(env = ENV)
      {
        only_only:   env['ONLY_ONLY'].present?,
        only_except: env['ONLY_EXCEPT'].present?,
        verbose:     env['ROUTES_VERBOSE'].present?,
      }
    end

    def self.params_for_annotate(env = ENV, extras = [])
      params_for_route_analysis.merge(
        try_to_fix:     false,
        allow_deleting: false,
        force_overwrite: env['ROUTES_FORCE'].present? || extras.include?('force'),
      )
    end

    def self.file_to_annotate(env = ENV)
      env['ROUTES_FILE']
    end

    def self.params_for_fix(env = ENV, extras = [])
      params_for_route_analysis.merge(
        try_to_fix:     true,
        allow_deleting: true,
        force_overwrite: env['ROUTES_FORCE'].present? || extras.include?('force'),
      )
    end

    def self.params_for_action_analysis(env = ENV, extras = [])
      {
        report_duplicates: env['ROUTES_DUPLICATES'].present? || extras.include?('duplicates'),
        report_gems:       env['ROUTES_GEMS'].present?       || extras.include?('gems'),
        report_modules:    env['ROUTES_MODULES'].present?    || extras.include?('modules'),
        full_path:         env['ROUTES_FULL_PATH'].present?  || extras.include?('full'),
        metadata:          env['ROUTES_METADATA'].present?   || extras.include?('metadata'),
      }
    end
  end
end


text:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Hybridauth extends MX_Controller {
	public function __construct()
	{
		parent::__construct();
		$this->config->load('hybridauth');
	}

	public function hybridauth_endpoint()
	{
		include APPPATH .'/vendor/hybridauth/hybridauth/hybridauth/index.php';
	}

	public function login()
	{

		$hybridauth = new Hybrid_Auth( $this->config->item('social') );
 		$provider = ucfirst($this->uri->segment(3));
	    $adapter = $hybridauth->authenticate('Facebook' );

	    $user_profile = $adapter->getUserProfile();
	    echo "<pre>";
	    print_r($user_profile);
	    echo "</pre>";
	}

}

/* End of file hybridauth.php */
/* Location: .//G/xampp/htdocs/projects/ci3_tut/app/controllers/hybridauth.php */


text:
This page was generated with Wiki Builder. Do not change the format!

## Info

* **URI:** [[/App/oauth/token/|https://www.bungie.net/Platform/App/oauth/token/]]
* **Method:** POST
* **Accessibility:** Private
* **Service:** [[ApplicationService|Endpoints#ApplicationService]]

## Parameters
### Path Parameters
None

### Query String Parameters
None

### JSON POST Parameters
None

## Example

## References


text:
/*!
 * Ext JS Library 3.3.1
 * Copyright(c) 2006-2010 Sencha Inc.
 * licensing@sencha.com
 * http://www.sencha.com/license
 */
/**
 * Plugin for PagingToolbar which replaces the textfield input with a slider
 */
Ext.ux.SlidingPager = Ext.extend(Object, {
    init : function(pbar){
        var idx = pbar.items.indexOf(pbar.inputItem);
        Ext.each(pbar.items.getRange(idx - 2, idx + 2), function(c){
            c.hide();
        });
        var slider = new Ext.Slider({
            width: 114,
            minValue: 1,
            maxValue: 1,
            plugins: new Ext.slider.Tip({
                getText : function(thumb) {
                    return String.format('Page {0} of {1}', thumb.value, thumb.slider.maxValue);
                }
            }),
            listeners: {
                changecomplete: function(s, v){
                    pbar.changePage(v);
                }
            }
        });
        pbar.insert(idx + 1, slider);
        pbar.on({
            change: function(pb, data){
                slider.setMaxValue(data.pages);
                slider.setValue(data.activePage);
            }
        });
    }
});