text:
.class abstract Landroid/util/apk/ZipUtils;
.super Ljava/lang/Object;
.source "ZipUtils.java"

# static fields
.field private static final UINT16_MAX_VALUE:I = 0xffff

.field private static final ZIP64_EOCD_LOCATOR_SIG_REVERSE_BYTE_ORDER:I = 0x504b0607

.field private static final ZIP64_EOCD_LOCATOR_SIZE:I = 0x14

.field private static final ZIP_EOCD_CENTRAL_DIR_OFFSET_FIELD_OFFSET:I = 0x10

.field private static final ZIP_EOCD_CENTRAL_DIR_SIZE_FIELD_OFFSET:I = 0xc

.field private static final ZIP_EOCD_COMMENT_LENGTH_FIELD_OFFSET:I = 0x14

.field private static final ZIP_EOCD_REC_MIN_SIZE:I = 0x16

.field private static final ZIP_EOCD_REC_SIG:I = 0x6054b50

# direct methods
.method private constructor <init>()V
    .locals 0

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

    return-void
.end method

.method private static assertByteOrderLittleEndian(Ljava/nio/ByteBuffer;)V
    .locals 2

    invoke-virtual {p0}, Ljava/nio/ByteBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v0

    sget-object v1, Ljava/nio/ByteOrder;->LITTLE_ENDIAN:Ljava/nio/ByteOrder;

    if-eq v0, v1, :cond_0

    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string/jumbo v1, "ByteBuffer byte order must be little endian"

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    return-void
.end method

.method private static findZipEndOfCentralDirectoryRecord(Ljava/nio/ByteBuffer;)I
    .locals 9

    const/4 v8, -0x1

    invoke-static {p0}, Landroid/util/apk/ZipUtils;->assertByteOrderLittleEndian(Ljava/nio/ByteBuffer;)V

    invoke-virtual {p0}, Ljava/nio/ByteBuffer;->capacity()I

    move-result v1

    const/16 v6, 0x16

    if-ge v1, v6, :cond_0

    return v8

    :cond_0
    add-int/lit8 v6, v1, -0x16

    const v7, 0xffff

    invoke-static {v6, v7}, Ljava/lang/Math;->min(II)I

    move-result v5

    add-int/lit8 v3, v1, -0x16

    const/4 v4, 0x0

    :goto_0
    if-gt v4, v5, :cond_2

    sub-int v2, v3, v4

    invoke-virtual {p0, v2}, Ljava/nio/ByteBuffer;->getInt(I)I

    move-result v6

    const v7, 0x6054b50

    if-ne v6, v7, :cond_1

    add-int/lit8 v6, v2, 0x14

    invoke-static {p0, v6}, Landroid/util/apk/ZipUtils;->getUnsignedInt16(Ljava/nio/ByteBuffer;I)I

    move-result v0

    if-ne v0, v4, :cond_1

    return v2

    :cond_1
    add-int/lit8 v4, v4, 0x1

    goto :goto_0

    :cond_2
    return v8
.end method

.method static findZipEndOfCentralDirectoryRecord(Ljava/io/RandomAccessFile;)Landroid/util/Pair;
    .locals 7
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/io/RandomAccessFile;",
            ")",
            "Landroid/util/Pair",
            "<",
            "Ljava/nio/ByteBuffer;",
            "Ljava/lang/Long;",
            ">;"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const/4 v6, 0x0

    invoke-virtual {p0}, Ljava/io/RandomAccessFile;->length()J

    move-result-wide v0

    const-wide/16 v4, 0x16

    cmp-long v3, v0, v4

    if-gez v3, :cond_0

    return-object v6

    :cond_0
    const/4 v3, 0x0

    invoke-static {p0, v3}, Landroid/util/apk/ZipUtils;->findZipEndOfCentralDirectoryRecord(Ljava/io/RandomAccessFile;I)Landroid/util/Pair;

    move-result-object v2

    if-eqz v2, :cond_1

    return-object v2

    :cond_1
    const v3, 0xffff

    invoke-static {p0, v3}, Landroid/util/apk/ZipUtils;->findZipEndOfCentralDirectoryRecord(Ljava/io/RandomAccessFile;I)Landroid/util/Pair;

    move-result-object v3

    return-object v3
.end method

.method private static findZipEndOfCentralDirectoryRecord(Ljava/io/RandomAccessFile;I)Landroid/util/Pair;
    .locals 13
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/io/RandomAccessFile;",
            "I)",
            "Landroid/util/Pair",
            "<",
            "Ljava/nio/ByteBuffer;",
            "Ljava/lang/Long;",
            ">;"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const-wide/16 v10, 0x16

    const/4 v12, 0x0

    if-ltz p1, :cond_0

    const v5, 0xffff

    if-le p1, v5, :cond_1

    :cond_0
    new-instance v5, Ljava/lang/IllegalArgumentException;

    new-instance v8, Ljava/lang/StringBuilder;

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

    const-string/jumbo v9, "maxCommentSize: "

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-direct {v5, v8}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v5

    :cond_1
    invoke-virtual {p0}, Ljava/io/RandomAccessFile;->length()J

    move-result-wide v6

    cmp-long v5, v6, v10

    if-gez v5, :cond_2

    return-object v12

    :cond_2
    int-to-long v8, p1

    sub-long v10, v6, v10

    invoke-static {v8, v9, v10, v11}, Ljava/lang/Math;->min(JJ)J

    move-result-wide v8

    long-to-int p1, v8

    add-int/lit8 v5, p1, 0x16

    invoke-static {v5}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;

    move-result-object v0

    sget-object v5, Ljava/nio/ByteOrder;->LITTLE_ENDIAN:Ljava/nio/ByteOrder;

    invoke-virtual {v0, v5}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;

    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->capacity()I

    move-result v5

    int-to-long v8, v5

    sub-long v2, v6, v8

    invoke-virtual {p0, v2, v3}, Ljava/io/RandomAccessFile;->seek(J)V

    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->array()[B

    move-result-object v5

    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->arrayOffset()I

    move-result v8

    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->capacity()I

    move-result v9

    invoke-virtual {p0, v5, v8, v9}, Ljava/io/RandomAccessFile;->readFully([BII)V

    invoke-static {v0}, Landroid/util/apk/ZipUtils;->findZipEndOfCentralDirectoryRecord(Ljava/nio/ByteBuffer;)I

    move-result v4

    const/4 v5, -0x1

    if-ne v4, v5, :cond_3

    return-object v12

    :cond_3
    invoke-virtual {v0, v4}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;

    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->slice()Ljava/nio/ByteBuffer;

    move-result-object v1

    sget-object v5, Ljava/nio/ByteOrder;->LITTLE_ENDIAN:Ljava/nio/ByteOrder;

    invoke-virtual {v1, v5}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;

    int-to-long v8, v4

    add-long/2addr v8, v2

    invoke-static {v8, v9}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v5

    invoke-static {v1, v5}, Landroid/util/Pair;->create(Ljava/lang/Object;Ljava/lang/Object;)Landroid/util/Pair;

    move-result-object v5

    return-object v5
.end method

.method private static getUnsignedInt16(Ljava/nio/ByteBuffer;I)I
    .locals 2

    invoke-virtual {p0, p1}, Ljava/nio/ByteBuffer;->getShort(I)S

    move-result v0

    const v1, 0xffff

    and-int/2addr v0, v1

    return v0
.end method

.method private static getUnsignedInt32(Ljava/nio/ByteBuffer;I)J
    .locals 4

    invoke-virtual {p0, p1}, Ljava/nio/ByteBuffer;->getInt(I)I

    move-result v0

    int-to-long v0, v0

    const-wide v2, 0xffffffffL

    and-long/2addr v0, v2

    return-wide v0
.end method

.method public static getZipEocdCentralDirectoryOffset(Ljava/nio/ByteBuffer;)J
    .locals 2

    invoke-static {p0}, Landroid/util/apk/ZipUtils;->assertByteOrderLittleEndian(Ljava/nio/ByteBuffer;)V

    invoke-virtual {p0}, Ljava/nio/ByteBuffer;->position()I

    move-result v0

    add-int/lit8 v0, v0, 0x10

    invoke-static {p0, v0}, Landroid/util/apk/ZipUtils;->getUnsignedInt32(Ljava/nio/ByteBuffer;I)J

    move-result-wide v0

    return-wide v0
.end method

.method public static getZipEocdCentralDirectorySizeBytes(Ljava/nio/ByteBuffer;)J
    .locals 2

    invoke-static {p0}, Landroid/util/apk/ZipUtils;->assertByteOrderLittleEndian(Ljava/nio/ByteBuffer;)V

    invoke-virtual {p0}, Ljava/nio/ByteBuffer;->position()I

    move-result v0

    add-int/lit8 v0, v0, 0xc

    invoke-static {p0, v0}, Landroid/util/apk/ZipUtils;->getUnsignedInt32(Ljava/nio/ByteBuffer;I)J

    move-result-wide v0

    return-wide v0
.end method

.method public static final isZip64EndOfCentralDirectoryLocatorPresent(Ljava/io/RandomAccessFile;J)Z
    .locals 7
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const/4 v2, 0x0

    const-wide/16 v4, 0x14

    sub-long v0, p1, v4

    const-wide/16 v4, 0x0

    cmp-long v3, v0, v4

    if-gez v3, :cond_0

    return v2

    :cond_0
    invoke-virtual {p0, v0, v1}, Ljava/io/RandomAccessFile;->seek(J)V

    invoke-virtual {p0}, Ljava/io/RandomAccessFile;->readInt()I

    move-result v3

    const v4, 0x504b0607

    if-ne v3, v4, :cond_1

    const/4 v2, 0x1

    :cond_1
    return v2
.end method

.method private static setUnsignedInt32(Ljava/nio/ByteBuffer;IJ)V
    .locals 4

    const-wide/16 v0, 0x0

    cmp-long v0, p2, v0

    if-ltz v0, :cond_0

    const-wide v0, 0xffffffffL

    cmp-long v0, p2, v0

    if-lez v0, :cond_1

    :cond_0
    new-instance v0, Ljava/lang/IllegalArgumentException;

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string/jumbo v2, "uint32 value of out range: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_1
    invoke-virtual {p0}, Ljava/nio/ByteBuffer;->position()I

    move-result v0

    add-int/2addr v0, p1

    long-to-int v1, p2

    invoke-virtual {p0, v0, v1}, Ljava/nio/ByteBuffer;->putInt(II)Ljava/nio/ByteBuffer;

    return-void
.end method

.method public static setZipEocdCentralDirectoryOffset(Ljava/nio/ByteBuffer;J)V
    .locals 1

    invoke-static {p0}, Landroid/util/apk/ZipUtils;->assertByteOrderLittleEndian(Ljava/nio/ByteBuffer;)V

    invoke-virtual {p0}, Ljava/nio/ByteBuffer;->position()I

    move-result v0

    add-int/lit8 v0, v0, 0x10

    invoke-static {p0, v0, p1, p2}, Landroid/util/apk/ZipUtils;->setUnsignedInt32(Ljava/nio/ByteBuffer;IJ)V

    return-void
.end method


text:
#include "config.h"

#if ENABLE(INTERSECTION_OBSERVER)
#include "IntersectionObserverEntry.h"

#include "Element.h"

namespace WebCore {

IntersectionObserverEntry::IntersectionObserverEntry(const Init& init)
    : m_time(init.time)
    , m_rootBounds(DOMRectReadOnly::fromRect(init.rootBounds))
    , m_boundingClientRect(DOMRectReadOnly::fromRect(init.boundingClientRect))
    , m_intersectionRect(DOMRectReadOnly::fromRect(init.intersectionRect))
    , m_target(init.target)
{
}

} // namespace WebCore

#endif // ENABLE(INTERSECTION_OBSERVER)

redpajama_set_name: RedPajamaGithub


text:
require 'spec_helper'

describe 'mongodb::mongos' do
  let :facts do
    {
      :osfamily        => 'Debian',
      :operatingsystem => 'Debian',
    }
  end

  let :params do
    {
      :configdb => ['127.0.0.1:27019']
    }
  end

  context 'with defaults' do
    it { is_expected.to contain_class('mongodb::mongos::install') }
    it { is_expected.to contain_class('mongodb::mongos::config') }
    it { is_expected.to contain_class('mongodb::mongos::service') }
  end

  context 'when deploying on Solaris' do
    let :facts do
      { :osfamily        => 'Solaris' }
    end
    it { expect { is_expected.to raise_error(Puppet::Error) } }
  end

end


text:
<?php

namespace Steelbot\Protocol\Payload\Incoming;

use Steelbot\GroupChatInterface;
use Steelbot\Protocol\IncomingPayloadInterface;
use Steelbot\UserInterface;

/**
 * Class AbstractMessage
 *
 */
class GroupChatNewParticipant implements IncomingPayloadInterface
{
    /**
     * @var GroupChatInterface
     */
    protected $groupChat;

    /**
     * @var UserInterface
     */
    protected $user;

    /**
     * @param \Steelbot\GroupChatInterface $from
     * @param \Steelbot\UserInterface $user
     */
    public function __construct(GroupChatInterface $groupChat, UserInterface $user)
    {
        $this->groupChat = $groupChat;
        $this->user = $user;
    }

    /**
     * @return GroupChatInterface
     */
    public function getGroupChat(): GroupChatInterface
    {
        return $this->groupChat;
    }

    /**
     * @return \Steelbot\UserInterface
     */
    public function getUser(): UserInterface
    {
        return $this->user;
    }

    public function __toString(): string
    {
        $groupChatId = $this->groupChat->getId();
        $userId = $this->user->getId();

        return "chat:$groupChatId;user:$userId";
    }
}


text:
package client

type directFinder struct {
	address string
}

func (finder *directFinder) Init() error {
	return nil
}

func (finder *directFinder) Get() (string, error) {
	return finder.address, nil
}

func newDirectFinder(conf *Direct) *directFinder {
	return &directFinder{conf.Address}
}


text:
  Belmont-lès-Darney est
       un village
       géographiquement positionné dans le département des Vosges en Lorraine. On dénombrait 120 habitants en 2008.

Le nombre de logements, à Belmont-lès-Darney, se décomposait en 2011 en cinq appartements et 55 maisons soit
 un marché relativement équilibré.

Si vous envisagez de emmenager à Belmont-lès-Darney, vous pourrez facilement trouver une maison à acheter.

La ville propose quelques  équipements, elle dispose, entre autres, de un terrain de sport.

À coté de Belmont-lès-Darney sont positionnées géographiquement les villes de
Claudon localisée à 6 km, 220 habitants,
Provenchères-lès-Darney située à 6 km, 157 habitants,
Monthureux-sur-Saône à 6 km, 948 habitants,
Viviers-le-Gras à 6 km, 167 habitants,
Belrupt à 5 km, 109 habitants,
Nonville à 1 km, 143 habitants,
 entre autres. De plus, Belmont-lès-Darney est située à seulement 25 km de Mirecourt.


text:
package org.pi2.form.azk;

import java.awt.*;
import java.io.File;
import java.io.IOException;

/**
 * User: ikka
 * Date: 27.09.13
 * Time: 7:28
 */
public class Test {
  public static void main(String[] args) {
    for (File file : File.listRoots()) {
      System.out.println(file.getAbsolutePath());
    }

    try {
      Desktop.getDesktop().open(new File("D:\\dl\\Mr Nobody (2009)\\Mr.Nobody.2009.Extended.1080p.BluRay.x264.YIFY.mkv"));
    } catch (IOException e) {
      e.printStackTrace();
    }

  }
}


text:
using System;
using System.Collections.Specialized;
using System.Configuration.Provider;
using System.Linq;
using System.Web.Security;

namespace CompositeC1Contrib.Security.Web
{
    public class CompositeC1RoleProvider : RoleProvider
    {
        public static readonly string AuthenticatedRole = "AUTHENTICATED";
        public static readonly string AnonymousdRole = "ANONYMOUS";

        public override string ApplicationName { get; set; }

        public override void Initialize(string name, NameValueCollection config)
        {
            ApplicationName = config["applicationName"];
            if (String.IsNullOrEmpty(ApplicationName))
            {
                throw new ProviderException("Application name needs to be set");
            }

            base.Initialize(name, config);
        }

        public override void AddUsersToRoles(string[] usernames, string[] roleNames)
        {
            throw new NotSupportedException();
        }

        public override void CreateRole(string roleName)
        {
            throw new NotSupportedException();
        }

        public override bool DeleteRole(string roleName, bool throwOnPopulatedRole)
        {
            throw new NotSupportedException();
        }

        public override string[] FindUsersInRole(string roleName, string usernameToMatch)
        {
            throw new NotSupportedException();
        }

        public override string[] GetAllRoles()
        {
            return new[] { AuthenticatedRole, AnonymousdRole };
        }

        public override string[] GetRolesForUser(string username)
        {
            if (String.IsNullOrEmpty(username))
            {
                return new[] { AnonymousdRole };
            }

            return new[] { AuthenticatedRole };
        }

        public override string[] GetUsersInRole(string roleName)
        {
            throw new NotSupportedException();
        }

        public override bool IsUserInRole(string username, string roleName)
        {
            if (String.IsNullOrEmpty(username))
            {
                return roleName == AnonymousdRole;
            }

            return roleName == AuthenticatedRole;
        }

        public override void RemoveUsersFromRoles(string[] usernames, string[] roleNames)
        {
            throw new NotSupportedException();
        }

        public override bool RoleExists(string roleName)
        {
            return GetAllRoles().Contains(roleName);
        }
    }
}


text:
<?xml version="1.0"?>
<Document>

	<Sentence>
		<value>Bleeding may come from any site along the GI tract, but is often divided into:  - Upper GI bleeding: The upper GI tract includes the esophagus (the tube from the mouth to the stomach), stomach, and first part of the small intestine.</value>
		<pattern_crowdsource> Bleeding may come from any site along the GI tract, but is often divided into:  - Upper GI bleeding: The upper GI tract includes the [[esophagus|C0014876]] (the tube from the mouth to the stomach), stomach, and first part of the [[small intestine|C0021852]].		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>Bleeding</surface-form>
				<RDF-ID>C0019080</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>site</surface-form>
				<RDF-ID>C0205145</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>GI tract</surface-form>
				<RDF-ID>C1281182</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>often</surface-form>
				<RDF-ID>C0332183</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Upper GI bleeding</surface-form>
				<RDF-ID>C0041909</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>upper GI tract</surface-form>
				<RDF-ID>C1268997</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>esophagus</surface-form>
				<RDF-ID>C0014876</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>tube</surface-form>
				<RDF-ID>C1561954</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>mouth</surface-form>
				<RDF-ID>C1278910</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>first</surface-form>
				<RDF-ID>C1279901</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>part</surface-form>
				<RDF-ID>C0449719</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>small intestine</surface-form>
				<RDF-ID>C0021852</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0014876 PART_OF C0021852</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>GI bleeding may be due to conditions that are not serious, including:  - Anal fissure  - Hemorrhoids   GI bleeding may also be a sign of more serious diseases and conditions.</value>
		<pattern_crowdsource> GI bleeding may be due to conditions that are not serious, including:  - Anal fissure  - Hemorrhoids   [[GI bleeding|C0017181]] may also be a [[sign|C0311392]] of more serious diseases and conditions.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>GI bleeding</surface-form>
				<RDF-ID>C0017181</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>conditions</surface-form>
				<RDF-ID>C0348080</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>not</surface-form>
				<RDF-ID>C1518422</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>serious</surface-form>
				<RDF-ID>C0205404</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Anal fissure</surface-form>
				<RDF-ID>C0016167</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Hemorrhoids</surface-form>
				<RDF-ID>C0019112</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>GI bleeding</surface-form>
				<RDF-ID>C0017181</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>sign</surface-form>
				<RDF-ID>C0311392</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>more</surface-form>
				<RDF-ID>C0205172</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>serious</surface-form>
				<RDF-ID>C0205404</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>diseases</surface-form>
				<RDF-ID>C0012634</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>conditions</surface-form>
				<RDF-ID>C0348080</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0017181 ISA C0311392</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>These may include cancers of the GI tract such as:  - Cancer of the colon  - Cancer of the small intestine  - Cancer of the stomach  - Intestinal polyps (a pre-cancerous condition)   Other causes of GI bleeding may include:  - Abnormal blood vessels in the lining of the intestines (also called angiodysplasia)  - Bleeding diverticulum, or diverticulosis  - Crohn's disease or ulcerative colitis  - Esophageal varices  - Esophagitis  - Gastric (stomach) ulcer  - Intussusception (bowel telescoped on itself)  - Mallory-Weiss tear  - Meckel's diverticulum  - Radiation injury to the bowel</value>
		<pattern_crowdsource> These may include cancers of the GI tract such as:  - Cancer of the colon  - Cancer of the [[small intestine  - Cancer|C0153425]] of the stomach  - [[Intestinal polyps|C0021846]] (a pre-cancerous condition)   Other causes of GI bleeding may include:  - Abnormal blood vessels in the lining of the intestines (also called angiodysplasia)  - Bleeding diverticulum, or diverticulosis  - Crohn's disease or ulcerative colitis  - Esophageal varices  - Esophagitis  - Gastric (stomach) ulcer  - Intussusception (bowel telescoped on itself)  - Mallory-Weiss tear  - Meckel's diverticulum  - Radiation injury to the bowel		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>cancers</surface-form>
				<RDF-ID>C0006826</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>GI tract</surface-form>
				<RDF-ID>C0017189</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Cancer</surface-form>
				<RDF-ID>C0006826</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>colon  - Cancer</surface-form>
				<RDF-ID>C0007102</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>small intestine  - Cancer</surface-form>
				<RDF-ID>C0153425</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Intestinal polyps</surface-form>
				<RDF-ID>C0021846</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>pre-</surface-form>
				<RDF-ID>C0740175</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>cancerous</surface-form>
				<RDF-ID>C0006826</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>condition</surface-form>
				<RDF-ID>C0348080</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>causes</surface-form>
				<RDF-ID>C0015127</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>GI bleeding</surface-form>
				<RDF-ID>C0017181</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Abnormal</surface-form>
				<RDF-ID>C0205161</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>blood vessels</surface-form>
				<RDF-ID>C0005847</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>intestines</surface-form>
				<RDF-ID>C0021853</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>angiodysplasia</surface-form>
				<RDF-ID>C0085411</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Bleeding</surface-form>
				<RDF-ID>C0019080</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>diverticulum</surface-form>
				<RDF-ID>C0012817</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>diverticulosis</surface-form>
				<RDF-ID>C1510475</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Crohn's disease</surface-form>
				<RDF-ID>C0010346</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>colitis</surface-form>
				<RDF-ID>C1522057</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Esophageal varices</surface-form>
				<RDF-ID>C0014867</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>ulcerative colitis  - Esophageal varices  - Esophagitis</surface-form>
				<RDF-ID>C0267075</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Gastric</surface-form>
				<RDF-ID>C0038351</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>ulcer</surface-form>
				<RDF-ID>C0041582</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Intussusception</surface-form>
				<RDF-ID>C0021933</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>bowel</surface-form>
				<RDF-ID>C0021853</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>tear</surface-form>
				<RDF-ID>C0039409</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Meckel's diverticulum</surface-form>
				<RDF-ID>C0025037</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Radiation injury</surface-form>
				<RDF-ID>C0034530</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>bowel</surface-form>
				<RDF-ID>C0021853</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0021846 LOCATION_OF C0153425</triple>
		</triples>
	</Sentence>

</Document>


text:
package org.fest.swing.core;

import static org.fest.assertions.Assertions.assertThat;

import org.junit.Test;

/**
 * Tests for {@link NameMatcher#matches(java.awt.Component)}.
 * <p>
 * The {@link NameMatcher} is created through {@link NameMatcher#NameMatcher(String, boolean)}, passing {@code true} to
 * indicate that the {@link java.awt.Component} to match must be showing on the screen.
 * </p>
 *
 * @author Alex Ruiz
 */
public class NameMatcher_matches_byNameAndShowing_Test extends NameMatcher_TestCase {
  @Test
  public void should_return_false_if_name_does_not_match_and_Component_is_showing() {
    window.display();
    NameMatcher matcher = new NameMatcher("b", true);
    assertThat(matcher.matches(window.button)).isFalse();
  }

  @Test
  public void should_return_false_if_name_matches_but_Component_is_not_showing() {
    NameMatcher matcher = new NameMatcher(LABEL_TEXT, true);
    assertThat(matcher.matches(window.button)).isFalse();
  }

  @Test
  public void should_return_false_if_nothing_matches() {
    NameMatcher matcher = new NameMatcher("b", true);
    assertThat(matcher.matches(window.button)).isFalse();
  }
}


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

/**
 * Object is the property of global
 *
 * @path ch15/15.2/S15.2_A1.js
 * @description Checking if Object equals to this.Object
 */

var obj=Object;

var thisobj=this.Object;

if(obj!==thisobj){
  $ERROR('Object is the property of global');
}


text:
\hypertarget{structCatch_1_1IShared}{}\section{Catch\+:\+:I\+Shared Struct Reference}
\label{structCatch_1_1IShared}\index{Catch\+::\+I\+Shared@{Catch\+::\+I\+Shared}}
Inheritance diagram for Catch\+:\+:I\+Shared\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.004474cm]{structCatch_1_1IShared}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item
virtual void {\bfseries add\+Ref} () const  =0\hypertarget{structCatch_1_1IShared_ade3e1cd5df74b030058e201ffec156e5}{}\label{structCatch_1_1IShared_ade3e1cd5df74b030058e201ffec156e5}

\item
virtual void {\bfseries release} () const  =0\hypertarget{structCatch_1_1IShared_a42030b50ca8aa628b48a37e51dd55d29}{}\label{structCatch_1_1IShared_a42030b50ca8aa628b48a37e51dd55d29}

\end{DoxyCompactItemize}

The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item
catch.\+hpp\end{DoxyCompactItemize}


text:
<?php
namespace Crossjoin\Json;

use Crossjoin\Json\Exception\InvalidArgumentException;
use Crossjoin\Json\Exception\JsonException;

/**
 * Returns the JSON representation of a value, encoded in UTF-8
 * (or false on failure)
 *
 * @param mixed $value
 * @param int $options
 * @param int $depth
 *
 * For details about the parameters and the return values see the native json_encode() function.
 * @link http://php.net/manual/en/function.json-encode.php
 *
 * @return string|false
 * @throws \Crossjoin\Json\Exception\InvalidArgumentException
 */
function json_encode($value, $options = 0, $depth = 512)
{
    $encoder = new Encoder();
    try {
        return $encoder->encode($value, $options, $depth);
    } catch (InvalidArgumentException $e) {
        throw $e;
    } catch (JsonException $e) {
        return false;
    }
}

/** @noinspection MoreThanThreeArgumentsInspection */
/**
 * Decodes a JSON string (encoded as UTF-8, UTF-16BE, UTF-16LE, UTF-32BE or UTF-32LE,
 * with or without byte order mark)
 *
 * @param mixed $json
 * @param bool $assoc
 * @param int $depth
 * @param int $options
 *
 * For details about the parameters and the return values see the native json_decode() function.
 * @link http://php.net/manual/en/function.json-decode.php
 *
 * @return mixed
 * @throws \Crossjoin\Json\Exception\InvalidArgumentException
 */
function json_decode($json, $assoc = false, $depth = 512, $options = 0)
{
    $decoder = new Decoder();
    try {
        return $decoder->decode($json, $assoc, $depth, $options);
    } catch (InvalidArgumentException $e) {
        throw $e;
    } catch (JsonException $e) {
        return null;
    }
}

/**
 * Returns the code of the last error occurred
 *
 * For details about the return values see the native json_last_error() function
 * @link http://php.net/manual/en/function.json-last-error.php
 *
 * @return int
 */
function json_last_error () {
    return \json_last_error();
}

/**
 * Returns the error string of the last json_encode() or json_decode() call
 *
 * For details about the return values see the native json_last_error_msg() function
 * @link http://php.net/manual/en/function.json-last-error-msg.php
 *
 * @return string|false
 */
function json_last_error_msg ()  {
    if (function_exists('\json_last_error_msg')) {
        return \json_last_error_msg();
    }
    return 'An error occurred while encoding or decoding JSON.';
}


text:
describe("Airport", function() {
  var plane;
  var airport;

  beforeEach(function() {

    airport = new Airport();

    plane = {
      isFlying: function() {
        true;
      },
      land: function() {
        this.isFlying = false;
      },
      take_off: function(){
        this.isFlying = true
      }
    };
    weather = {
      isStormy: function() {}
    };
  });

  it('initiated with an empty hanger', function(){
    expect(airport.hanger.length).toBe(0)
  });

  it('can instruct a plane to take_off', function(){
    spyOn(weather, 'isStormy').and.returnValue(false);
    airport.instruct_to_land(plane)
    airport.instruct_to_take_off(plane)
    expect(airport.hanger.length).toEqual(0)
  });

  it('can instruct a plane to land', function() {
    spyOn(weather, 'isStormy').and.returnValue(false);
    airport.instruct_to_land(plane)
    expect(airport.hanger).toEqual([plane])
  });

  it('Plane is flying after instructed to take off', function() {
    spyOn(weather, 'isStormy').and.returnValue(false);
    airport.instruct_to_land(plane);
    airport.instruct_to_take_off(plane);
    expect(plane.isFlying).toBe(true);
  });

  it('Plane is landed after instructed to land', function() {
    spyOn(weather, 'isStormy').and.returnValue(false);
    airport.instruct_to_land(plane);
    expect(plane.isFlying).toBe(false);
  });

  it("should have capacity when created", function() {
    expect(airport.capacity).toBe(20)
  });

  it('Plane can\'t land if hanger is full', function() {
    spyOn(weather, 'isStormy').and.returnValue(false);
    airport.capacity = 1
    airport.instruct_to_land(plane)
    expect(function(){ airport.instruct_to_land(plane); }).toThrow("Hanger is full");
  });

  it('Can\'t instruct plane to take off if not in hanger', function(){
    spyOn(weather, 'isStormy').and.returnValue(false);
    expect(function(){airport.instruct_to_take_off(plane); }).toThrow("Plane not in hanger");
  });

  it('Can\'t take off in stormy weather', function(){
    airport.hanger = [plane]
    spyOn(weather, 'isStormy').and.returnValue(true);
    expect(function(){airport.instruct_to_take_off(plane); }).toThrow("Cannot take off in stormy weather");
  });

  it('Can\'t land in stormy weather', function(){
    spyOn(weather, 'isStormy').and.returnValue(true);
    expect(function(){airport.instruct_to_land(plane); }).toThrow("Cannot land in stormy weather");
  });
});


text:
package com.lyndir.lhunath.opal.system.error;

import javax.annotation.Nullable;

/**
 *
{@link InternalInconsistencyException}
 [in short] (TODO).

 *
 *
 Feb 28, 2010

 *
 * @author lhunath
 */
@SuppressWarnings({ "UncheckedExceptionClass" })
public class InternalInconsistencyException extends RuntimeException {

    /**
     * Create a new {@link InternalInconsistencyException} instance.
     *
     * @param message Some context with what was going on or what caused this.
     */
    public InternalInconsistencyException(final String message) {

        this( message, null );
    }

    /**
     * Create a new {@link InternalInconsistencyException} instance.
     *
     * @param message Some context with what was going on or what caused this.
     * @param cause   The optional exception cause of this.
     */
    public InternalInconsistencyException(final String message, @Nullable final Throwable cause) {

        super( message, cause );
    }

    /**
     * Create a new {@link InternalInconsistencyException} instance.
     *
     * @param cause The optional exception cause of this.
     */
    public InternalInconsistencyException(final Throwable cause) {

        super( cause );
    }
}


text:
package edu.hadoop.gis.samples.hbase;

import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.LineNumberReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

/**
 * Imports text file directly into HBase using the client API.
 *
 * @author Jan Tschada
 *
 */
public class TextFileImporter {

	private final Logger logger;

	private final File inputFile;

	private final TextFileSchema schema;

	/**
	 * Creates a new importer.
	 *
	 * @param inputFile
	 *            the file which should be imported.
	 * @param schema
	 *            the schema of the file specified.
	 */
	public TextFileImporter(File inputFile, TextFileSchema schema) {
		if (null == inputFile) {
			throw new IllegalArgumentException("The file must not be null!");
		}
		if (!inputFile.canRead()) {
			throw new IllegalArgumentException("The file cannot be read!");
		}
		if (null == schema) {
			throw new IllegalArgumentException("The schema must not be null!");
		}

		this.logger = LogManager.getLogger(getClass());
		this.inputFile = inputFile;
		this.schema = schema;
	}

	public void importInto(HBaseTableImportConfiguration importConfiguration) throws IOException, InterruptedException {
		if (null == importConfiguration) {
			throw new IllegalArgumentException("The configuration must not be null!");
		}

		LineNumberReader reader = new LineNumberReader(new FileReader(inputFile));
		try {
			String line;
			Map<Integer, TextFileField> fields = schema.getFields();
			if (schema.hasHeader()) {
				// Omit the first line
				if (null == (line = reader.readLine())) {
					// End of the stream was reached
					return;
				}

				// No fields are set
				if (fields.isEmpty()) {
					String[] splittedLine = line.split(schema.getDelimiter());
					for (int tokenIndex = 0, tokenCount = splittedLine.length; tokenIndex < tokenCount; tokenIndex++) {
						String fieldName = splittedLine[tokenIndex];
						TextFileField field = new TextFileField(tokenIndex, fieldName);
						fields.put(tokenIndex, field);
					}
				}
			}

			// Put data into the table
			HBaseTableConfiguration tableConfiguration = importConfiguration.getConfiguration();
			HTable table = new HTable(tableConfiguration.getConfiguration(), tableConfiguration.getTableName());
			try {
				String columnFamily = importConfiguration.getColumnFamily();
				byte[] columnFamilyAsBytes = Bytes.toBytes(columnFamily);

				// Doing bulk inserts
				int autoCommitSize = importConfiguration.getAutoCommitSize();
				if (0 < autoCommitSize) {
					autoCommitSize = 1;
				}
				List<Put> puts = new ArrayList<Put>(autoCommitSize);
				Object[] results = new Object[autoCommitSize];

				while (null != (line = reader.readLine())) {
					// Create the put using the line number
					Put recordPut = new Put(Bytes.toBytes(reader.getLineNumber()));

					String[] splittedLine = line.split(schema.getDelimiter());
					for (int tokenIndex = 0, tokenCount = splittedLine.length; tokenIndex < tokenCount; tokenIndex++) {
						if (fields.containsKey(tokenIndex)) {
							// Get the field using the token index
							TextFileField field = fields.get(tokenIndex);
							String value = splittedLine[tokenIndex];

							// Put the next value
							recordPut.add(columnFamilyAsBytes, Bytes.toBytes(field.getName()), Bytes.toBytes(value));
						}
					}

					puts.add(recordPut);
					if (puts.size() == autoCommitSize) {
						// Put the records into the table
						batchInsert(table, puts, results);
					}
				}

				// Check if there are still uncommitted puts available
				if (!puts.isEmpty()) {
					// Put the records into the table
					batchInsert(table, puts, results);
				}
			} finally {
				table.close();
			}
		} finally {
			reader.close();
		}
	}

	private void batchInsert(HTable table, List<Put> puts, Object[] results) throws IOException, InterruptedException {
		try {
			table.batch(puts, results);
			puts.clear();
		} catch (InterruptedException e) {
			logger.error("Batch insert failed!", e);
			throw e;
		}
	}
}


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

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <title>Findosg_functions — CMake 3.8.1 Documentation</title>

    <link rel="stylesheet" href="../_static/cmake.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />

    <link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindosgFX" href="FindosgFX.html" />
    <link rel="prev" title="FindosgDB" href="FindosgDB.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.8.1 Documentation »

cmake-modules(7) »

Findosg_functions¶

This CMake file contains two macros to assist with searching for OSG
libraries and nodekits.  Please see FindOpenSceneGraph.cmake for full
documentation.

Previous topic

FindosgDB

Next topic

FindosgFX

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">

<input type="text" name="q" />

<input type="submit" value="Go" />

      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.8.1 Documentation »

cmake-modules(7) »

        © Copyright 2000-2017 Kitware, Inc. and Contributors.
      Created using Sphinx 1.5.2.


text:
var searchData=
[
  ['doxygen_20documentation',['Doxygen documentation',['../index.html',1,'']]]
];


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using AspNet.FileProviders.AzureStorage.Infrastructure;
using Microsoft.AspNet.FileProviders;
using Microsoft.Framework.Expiration.Interfaces;
using Microsoft.WindowsAzure.Storage.Blob;

namespace AspNet.FileProviders.AzureStorage
{
    public class AzureFileProvider : IFileProvider
    {
        private readonly CloudBlobContainer _blobContainer;

        public AzureFileProvider(CloudBlobContainer blobContainer)
        {
            if (blobContainer == null)
            {
                throw new ArgumentNullException(nameof(blobContainer));
            }

            _blobContainer = blobContainer;
        }

        public IDirectoryContents GetDirectoryContents(string subpath)
        {
            IEnumerable<IFileInfo> blobs = _blobContainer
                .ListBlobs(prefix: subpath, useFlatBlobListing: false)
                .ToList()
                .Select(blobItem => blobItem.ToFileInfo());

            return new EnumerableDirectoryContents(blobs);
        }

        public IFileInfo GetFileInfo(string subpath)
        {
            if(subpath == null)
            {
                throw new NullReferenceException(nameof(subpath));
            }

            ICloudBlob blob = _blobContainer.GetBlobReferenceFromServer(subpath);

            return new AzureFileInfo(blob);
        }

        public IExpirationTrigger Watch(string filter)
        {
            return NoopTrigger.Instance;
        }
    }

    internal class AzureFileInfo : IFileInfo
    {
        private readonly ICloudBlob _cloudBlob;

        public AzureFileInfo(ICloudBlob cloudBlob)
        {
            if (cloudBlob == null)
            {
                throw new NullReferenceException(nameof(cloudBlob));
            }

            _cloudBlob = cloudBlob;
        }

        public bool Exists
        {
            get
            {
                throw new NotImplementedException();
            }
        }

        public bool IsDirectory
        {
            get
            {
                throw new NotImplementedException();
            }
        }

        public DateTimeOffset LastModified
        {
            get
            {
                throw new NotImplementedException();
            }
        }

        public long Length
        {
            get
            {
                throw new NotImplementedException();
            }
        }

        public string Name
        {
            get
            {
                throw new NotImplementedException();
            }
        }

        public string PhysicalPath
        {
            get
            {
                throw new NotImplementedException();
            }
        }

        public Stream CreateReadStream()
        {
            throw new NotImplementedException();
        }
    }

    internal static class IListBlobItemExtensions
    {
        public static IFileInfo ToFileInfo(this IListBlobItem blobItem)
        {
            throw new NotImplementedException();
        }
    }
}


text:
Editor of svg chapes (JSYG framework)

[demo](http://yannickbochatay.github.io/JSYG.Editor/)


text:
/**
 * Testing our A component
 */

import { mount } from 'enzyme';
import * as React from 'react';

import A from '../index';

const onClick = () => null;
const href = 'http://www.naver.com';
const children = (
Test
);
const renderComponent = (props = {}) => mount(

    {children}
  ,
);

describe('', () => {
  it('should render an  tag if no route is specified', () => {
    const renderedComponent = renderComponent({ href });
    expect(renderedComponent.find('a').length).toEqual(1);
  });

  it('should render an  tag to change route if the handleRoute prop is specified', () => {
    const renderedComponent = renderComponent({ onClick });
    expect(renderedComponent.find('a').length).toEqual(1);
  });

  it('should have children', () => {
    const renderedComponent = renderComponent();
    expect(renderedComponent.contains(children)).toEqual(true);
  });

  it('should handle click events', () => {
    const onClickSpy = jest.fn();
    const renderedComponent = renderComponent({ onClick: onClickSpy });
    renderedComponent.find('a').simulate('click');
    expect(onClickSpy).toHaveBeenCalled();
  });

  it('should have a className attribute', () => {
    const renderedComponent = renderComponent();
    expect(renderedComponent.find('a').prop('className')).toBeDefined();
  });

  it('should not adopt a type attribute when rendering an  tag', () => {
    const type = 'text/html';
    const renderedComponent = renderComponent({ href, type });
    expect(renderedComponent.find('a').prop('type')).toBeUndefined();
  });

  it('should not adopt a type attribute when rendering a button', () => {
    const type = 'submit';
    const renderedComponent = renderComponent({ onClick, type });
    expect(renderedComponent.find('a').prop('type')).toBeUndefined();
  });
});


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

import java.util.Optional;
import java.util.stream.Stream;

interface StateStorage {

    Optional<String> getValue(final String section, final String key);

    Stream<String> getKeys(final String section);

    Stream<String> getSections();

    void setValue(final String section, final String key, final String value);

    void unsetValue(final String section, final String key);

    void unsetValues(final String section);

    boolean store();
}


text:
@interface CustomNavigationController : UINavigationController

@end


text:
namespace Env.CnemcPublish.DAL
{
    using System;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Runtime.Serialization;
    using OpenRiaServices.DomainServices.Client;

    [DataContract(Namespace="http://schemas.datacontract.org/2004/07/Env.CnemcPublish.DAL")]
    public sealed class AQIChartValue : Entity
    {
        private string _isLimits;
        private string _monValue;
        private string _monValue_24;
        private string[] _openAccessGenerated;
        private string _positionName;
        private string _stationCode;
        private DateTime _timePoint;

        public override object GetIdentity()
        {
            return this._stationCode;
        }

        [ConcurrencyCheck, RoundtripOriginal, StringLength(0xff), DataMember]
        public string IsLimits
        {
            get
            {
                return this._isLimits;
            }
            set
            {
                if (this._isLimits != value)
                {
                    base.RaiseDataMemberChanging("IsLimits");
                    base.ValidateProperty("IsLimits", value);
                    this._isLimits = value;
                    base.RaiseDataMemberChanged("IsLimits");
                }
            }
        }

        [ConcurrencyCheck, RoundtripOriginal, StringLength(0xff), DataMember]
        public string MonValue
        {
            get
            {
                return this._monValue;
            }
            set
            {
                if (this._monValue != value)
                {
                    base.RaiseDataMemberChanging("MonValue");
                    base.ValidateProperty("MonValue", value);
                    this._monValue = value;
                    base.RaiseDataMemberChanged("MonValue");
                }
            }
        }

        [StringLength(0xff), ConcurrencyCheck, DataMember, RoundtripOriginal]
        public string MonValue_24
        {
            get
            {
                return this._monValue_24;
            }
            set
            {
                if (this._monValue_24 != value)
                {
                    base.RaiseDataMemberChanging("MonValue_24");
                    base.ValidateProperty("MonValue_24", value);
                    this._monValue_24 = value;
                    base.RaiseDataMemberChanged("MonValue_24");
                }
            }
        }

        [Editable(false), RoundtripOriginal, Display(AutoGenerateField=false, AutoGenerateFilter=false, Description="OpenAccess Key", Name="-ID-"), DataMember, ReadOnly(true)]
        public string[] OpenAccessGenerated
        {
            get
            {
                return this._openAccessGenerated;
            }
            set
            {
                if (this._openAccessGenerated != value)
                {
                    base.ValidateProperty("OpenAccessGenerated", value);
                    this._openAccessGenerated = value;
                    base.RaisePropertyChanged("OpenAccessGenerated");
                }
            }
        }

        [ConcurrencyCheck, RoundtripOriginal, StringLength(0xff), DataMember]
        public string PositionName
        {
            get
            {
                return this._positionName;
            }
            set
            {
                if (this._positionName != value)
                {
                    base.RaiseDataMemberChanging("PositionName");
                    base.ValidateProperty("PositionName", value);
                    this._positionName = value;
                    base.RaiseDataMemberChanged("PositionName");
                }
            }
        }

        [DataMember, Key, Editable(false, AllowInitialValue=true), RoundtripOriginal, StringLength(0xff), ConcurrencyCheck]
        public string StationCode
        {
            get
            {
                return this._stationCode;
            }
            set
            {
                if (this._stationCode != value)
                {
                    base.ValidateProperty("StationCode", value);
                    this._stationCode = value;
                    base.RaisePropertyChanged("StationCode");
                }
            }
        }

        [ConcurrencyCheck, DataMember, RoundtripOriginal]
        public DateTime TimePoint
        {
            get
            {
                return this._timePoint;
            }
            set
            {
                if (this._timePoint != value)
                {
                    base.RaiseDataMemberChanging("TimePoint");
                    base.ValidateProperty("TimePoint", value);
                    this._timePoint = value;
                    base.RaiseDataMemberChanged("TimePoint");
                }
            }
        }
    }
}


text:
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import { _calculateUpdatedHref } from 'ember-a11y-testing/test-support/should-force-audit';

module('Query parameter normalization', function (hooks) {
  setupTest(hooks);

  const baseUrl = 'https://www.example.com';

  const paramPermutations = [
    {
      label: 'Enable with no params',
      input: '/some/path',
      enabled: true,
      expected: '/some/path?enableA11yAudit',
    },
    {
      label: 'Disable with no other params',
      input: '/some/path?enableA11yAudit',
      enabled: false,
      expected: '/some/path',
    },
    {
      label: 'Enable with multiple params',
      input: '/some/path?foo=123&bar&baz',
      enabled: true,
      expected: '/some/path?foo=123&bar&baz&enableA11yAudit',
    },
    {
      label: 'Disable with multiple params',
      input: '/some/path?foo=123&bar&baz&enableA11yAudit',
      enabled: false,
      expected: '/some/path?foo=123&bar&baz',
    },
    {
      label: 'Already enabled, enabling noops',
      input: '/some/path?foo=123&bar&baz&enableA11yAudit',
      enabled: true,
      expected: '/some/path?foo=123&bar&baz&enableA11yAudit',
    },
    {
      label: 'Already enabled, enabling normalizes',
      input: '/some/path?foo=123&bar&baz&enableA11yAudit=',
      enabled: true,
      expected: '/some/path?foo=123&bar&baz&enableA11yAudit',
    },
    {
      label: 'Disable when not normalized',
      input: '/some/path?foo=123&bar&baz&enableA11yAudit=',
      enabled: false,
      expected: '/some/path?foo=123&bar&baz',
    },
    {
      label: 'Does not normalize unknown params',
      input: '/some/path?foo=&bar=&baz&enableA11yAudit=',
      enabled: true,
      expected: '/some/path?foo=&bar=&baz&enableA11yAudit',
    },
    {
      label: 'Normalize as first param',
      input: '/some/path?enableA11yAudit=&foo&bar=',
      enabled: true,
      expected: '/some/path?enableA11yAudit&foo&bar=',
    },
    {
      label: 'Disable as first param',
      input: '/some/path?enableA11yAudit=&foo&bar=',
      enabled: false,
      expected: '/some/path?foo&bar=',
    },
    {
      label: 'Not found, disabling is noop',
      input: '/some/path?foo=123&bar&baz=',
      enabled: false,
      expected: '/some/path?foo=123&bar&baz=',
    },
  ];

  paramPermutations.forEach(function ({ label, input, enabled, expected }) {
    test(`_calculateUpdatedHref ${label}`, function (assert) {
      const url = `${baseUrl}${input}`;
      const expectedHref = `${baseUrl}${expected}`;
      const href = _calculateUpdatedHref(url, baseUrl, enabled);

      assert.strictEqual(
        href,
        expectedHref,
        `_calculateUpdatedHref( ${url}, ${baseUrl}, ${enabled} ) -> ${href}`
      );
    });
  });
});


text:
jusolink.example.jsp
=========================

주소링크 SDK Example for jsp.

requirements
 * jdk 1.6+
 * jusolink.sdk.java
 * linkhub.auth.java
 * gson 2.3+

reference
 * https://github.com/linkhub-sdk/jusolink.sdk.java
 * https://github.com/linkhub-sdk/linkhub.auth.java
 * https://code.google.com/p/google-gson/


text:
package com.fluent.pgm.mixtures;

import com.fluent.specs.unit.AbstractSpec;
import org.junit.Test;

import static com.fluent.collections.Lists.asFList;
import static com.fluent.pgm.mixtures.Sequence.Ngram;
import static com.fluent.pgm.mixtures.Token.END;
import static com.fluent.pgm.mixtures.Token.START;

public class Sequence_Spec extends AbstractSpec
{
    @Test
    public void knows_its_ngrams() throws Exception
    {
        Ngram ngram_1 = Ngram.from(START, Token.from("A"));
        Ngram ngram_2 = Ngram.from(Token.from("A"), END);

        So(Sequence.from_chars("A").ngrams()).shouldBe(asFList(ngram_1, ngram_2));
    }

    @Test
    public void knwows_its_size() throws Exception
    {
        So(Sequence.from_chars("A").size()).shouldBe(3);
    }

    @Test
    public void knwows_its_tokens_indeces() throws Exception
    {
        So(Sequence.from_chars("A").at(1)).shouldBe(Token.from("A"));
    }

    @Test
    public void builds_consistently() throws Exception
    {
        So(Sequence.from_chars("A")).shouldBe(Sequence.from(asFList(Token.from("A"))));
    }

}


text:
<resources>
    <!-- Default screen margins, per the Android Design guidelines. -->
    <dimen name="activity_horizontal_margin">16dp</dimen>
    <dimen name="activity_vertical_margin">16dp</dimen>

    <dimen name="bullet_radius">2dp</dimen>
    <dimen name="bullet_gap_width">8dp</dimen>
    <dimen name="quote_stripe_width">8dp</dimen>
    <dimen name="quote_gap_width">2dp</dimen>
    <dimen name="radius_span">6dp</dimen>
    <dimen name="padding_span">8dp</dimen>
</resources>


text:
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

Polymer({
  is: 'viewer-page-selector',

  properties: {
    /**
     * The number of pages the document contains.
     */
    docLength: {
      type: Number,
      value: 1,
      observer: 'docLengthChanged'
    },

    /**
     * The current page being viewed (1-based).
     */
    pageNo: {
      type: String,
      value: '1'
    }
  },

  pageNoCommitted: function() {
    var page = parseInt(this.pageNo);
    if (!isNaN(page)) {
      this.fire('change-page', {page: page - 1});
      this.$.input.blur();
    }
  },

  docLengthChanged: function() {
    var numDigits = this.docLength.toString().length;
    this.$.pageselector.style.width = numDigits + 'ch';
    // Set both sides of the slash to the same width, so that the layout is
    // exactly centered.
    this.$['pagelength-spacer'].style.width = numDigits + 'ch';
  },

  select: function() {
    this.$.input.select();
  },

  /**
   * @return {boolean} True if the selector input field is currently focused.
   */
  isActive: function() {
    return this.shadowRoot.activeElement == this.$.input;
  }
});


text:
create unique index SYS_C0021069_idx on AR_UNIGENE_ID
(GENECHIP_ARRAY,UNIGENE_ID,PROBE_SET_ID) tablespace CABIO_MAP_FUT;
alter table AR_UNIGENE_ID enable constraint SYS_C0021069 using index SYS_C0021069_idx;

alter table AR_UNIGENE_ID enable constraint SYS_C0021069;
alter table AR_UNIGENE_ID enable constraint SYS_C0021069;
alter table AR_UNIGENE_ID enable constraint SYS_C0021069;
alter table AR_UNIGENE_ID enable constraint SYS_C004304;
alter table AR_UNIGENE_ID enable constraint SYS_C004305;
alter table AR_UNIGENE_ID enable constraint SYS_C004306;

alter table AR_UNIGENE_ID enable primary key;

--EXIT;


text:
<?xml version="1.0" encoding="UTF-8"?>
<out> west near-west center near-east east far-east</out>


text:
const ElProgress = require('./src/progress');

ElProgress.install = function(Vue) {
  Vue.component(ElProgress.name, ElProgress);
};

module.exports = ElProgress;


text:
.. _writing-auth-backends:

===============================
Writing Authentication Backends
===============================

.. versionadded:: 1.6
   The authentication backends described here are new in Review Board 1.6.
   For Review Board 1.0 and 1.5, see :ref:`writing-legacy-auth-backends`.

Overview
========

Authentication in Review Board is handled by classes called Authentication
Backends. They perform the tasks of looking up users from some database or
server, authenticating against it given user credentials, and creating
local representations of the users in Review Board's database.

Review Board provides local database, NIS, LDAP and Active Directory backends
out of the box. New ones can be written to work with other types of
authentication schemes.

Authentication Classes
======================

An Authentication Backend class is a simple class inheriting from
:py:class:`reviewboard.accounts.backends.AuthBackend`. It must set the
following attributes:

* :py:attr:`backend_id`
* :py:attr:`name`

And can optionally set the following attributes:

* :py:attr:`login_instructions`
* :py:attr:`settings_form`
* :py:attr:`supports_registration`
* :py:attr:`supports_change_name`
* :py:attr:`supports_change_email`
* :py:attr:`supports_change_password`

It must also define the methods:

* :py:meth:`authenticate`
* :py:meth:`get_or_create_user`

And can optionally define these methods:

* :py:meth:`query_users`
* :py:meth:`search_users`

We'll go into each function and attribute in detail.

.. py:class:: reviewboard.accounts.backends.AuthBackend

.. py:attribute:: backend_id

   This is the ID used for registering and looking up the authentication
   backend.

   This ID needs to be unique, and therefore should include some
   vendor-specific prefix.

.. py:attribute:: name

   This is the human-readable name of the authentication backend. This is what
   users will see when they go to select the authentication backend to use.

.. py:attribute:: login_instructions

   If set, this string is displayed on the login page.

.. py:attribute:: settings_form

   This is an optional attribute that can be used to specify a settings form
   to present for any configuration needed by the backend.

   If this is not ``None``, it must point to a
   :py:class:`djblets.siteconfig.forms.SiteSettingsForm` subclass. This works
   like a standard Django Form, where each field name is the name of the
   settings key that will be automatically loaded and saved. See
   :ref:`auth-settings-form` for more information.

.. py:attribute:: supports_registration

   A boolean that indicates whether the registration form can be used.
   If this is set to ``True``, then logged out users will have the ability
   to register a new account.

   The registration process will create a new
   :py:class:`User <django.contrib.auth.models.User>` in the database.
   Currently, there is no support for handing off registration to the
   authentication backend, but it's planned.

.. py:attribute:: supports_change_name

   A boolean that indicates whether a user can change his full name on
   the My Account page. If this is set to ``True``, fields for the first
   and last name will be available and editable.

   Currently, there is no support for allowing the authentication module to
   handle setting the name, so it cannot update the backend server. This
   is planned for the future.

.. py:attribute:: supports_change_email

   A boolean that indicates whether a user can change his e-mail address on
   the My Account page. If this is set to ``True``, a field for the e-mail
   address will be available and editable.

   Currently, there is no support for allowing the authentication module to
   handle setting the e-mail address, so it cannot update the backend server.
   This is planned for the future.

.. py:attribute:: supports_change_password

   A boolean that indicates whether a user can change his password on
   the My Account page. If this is set to ``True``, a field for the password
   will be available and editable.

   Currently, there is no support for allowing the authentication module to
   handle setting the password, so it cannot update the backend server.
   This is planned for the future.

.. py:method:: authenticate(username, password)

   :param username: The user's username.
   :param password: The user's password.
   :rtype: The authenticated user, if authentication succeeds. On failure,
           ``None``.

   Authenticates the user against a database or server.

   This is responsible for making any necessary communication with the
   database or server and determining the validity of the credentials
   passed.

   If the credentials are invalid, the function must return ``None``, which
   will allow it to fall back to the next authentication backend in the chain
   (or fail, if this is the last authentication backend).

   If the credentials are valid, the function must return a valid
   :py:class:`User <django.contrib.auth.models.User>`. Generally, rather than
   constructing one itself, it should call its own
   :py:meth:`get_or_create_user` with the username.

   To help with debugging, this function should log any errors in
   communication using Python's :py:mod:`logging` support.

   The function may need to strip whitespace from the username before
   authentication. If the server itself strips whitespace when authenticating,
   but this function does not, it can lead to duplicate users in the database.

.. py:method:: get_or_create_user(username, request)

   :param username: The user's username.
   :param request: The current Django Request object.
   :rtype: The user, if it exists. Otherwise, ``None``.

   Looks up or creates a :py:class:`User <django.contrib.auth.models.User>`
   based on information from the database or server.

   This tends to follow the pattern of:

   .. code-block:: python

      username = username.strip()

      try:
          user = User.objects.get(username=username)
      except User.DoesNotExist:
          # Construct a user from the database...
          return user

   Like :py:meth:`authenticate`, this will look up the user from the
   database or server. However, it will not verify anything other than the
   username. It also must make sure to strip the username.

   This function is used both when logging in and when adding a user to
   a review request as a reviewer. In the latter case, Review Board will
   look up the user using the authentication backend in order to see if
   the user exists and can be added.

.. py:method:: query_users(query, request)

   :param query: A user-query search string.
   :param request: The current Django Request object.
   :rtype: ``None``.

   This function is executed when querying :ref:`webapi2.0-user-list-resource`,
   before retrieving the list of users from the database.

   The response is always fetched directly from the database; however,
   this function allows backends to search an external service and
   create or update users in the Review Board database before the
   query is executed.

   To pass errors up to the web API layer, raise a
   :py:exc:`reviewboard.accounts.errors.UserQueryError`
   exception with a specific error message.

.. py:method:: search_users(query, request)

   :param query: A user-query search string.
   :param request: The current Django Request object.
   :rtype: django.db.models.Q or ``None``.

   This function is executed when querying :ref:`webapi2.0-user-list-resource`,
   when the ``q`` parameter is given, meaning there is a search query.  It
   can return a Django Q object to filter the database results, or it can
   return None (the default, if not overriden).  If None, this method is
   called on the next enabled auth backend, if any.  If all backends return
   None, the default filter is applied.

.. _auth-settings-form:

Settings Forms
==============

Authentication backends can provide a settings form just like the built-in
backends (NIS, LDAP, etc.). The backend class just needs to set
:py:attr:`settings_form` to a
:py:class:`djblets.siteconfig.forms.SiteSettingsForm` subclass (not an
instance).

This is a special sort of form where each field name is the name of the
key in the settings database to store the value. The proper convention
for these classes is to prefix the field name with :samp:`auth_{backendid}_`.
The ``backendid`` is a short, lowercase name that represents the auth
backend. For example, ``nis``, ``ldap``, or ``ad``.

Every field will be saved to the database with the exception of "blacklisted"
fields. See :ref:`auth-settings-form-blacklisting`.

The form can also include some metadata by way of a ``Meta`` class within
the form. It can contain a :py:attr:`title` attribute, containing the title
to show on the settings form, and a :py:attr:`save_blacklist` for blacklisting
fields.

The form may also provide custom :py:meth:`load` and :py:meth:`save` methods
for handling any custom loading and saving. These must always call the parent
class's methods.

An example class would be::

    from django import forms
    from djblets.siteconfig.forms import SiteSettingsForm

    class MySettingsForm(SiteSettingsForm):
        auth_myauth_foo = forms.CharField(
            label="Some setting",
            help_text="Some useful help text",
            required=True)

        auth_myauth_bar = forms.BooleanField(
            label="Another setting",
            help_text="Some more useful help text",
            required=False)

        class Meta:
            title = "My Auth Backend Settings"

These can use any Django form fields. The actual loading and saving of
settings from the database are handled under the hood.

You can also make use of standard Django form validation to ensure that
valid data was entered before save.

.. _auth-settings-form-blacklisting:

Blacklisting Fields
-------------------

Sometimes it's necessary to process a setting before it goes into the
database or when it comes out. In this case, you don't want the setting to
be handled automatically. The field can be prevented from saving/loading by
adding it to the ``Meta.save_blacklist`` attribute. This is a tuple of
field names that will be ignored during save/load.

This is usually used in conjunction with custom :py:meth:`load` and
:py:meth:`save` methods.

When loading a setting into a field, you should set the value in
:samp:`self.fields['{fieldname}'].initial` and retrieve the value from the
database when using :samp:`self.siteconfig.get('{settingname}')`.

When saving a setting from a field, you should set the value in the database
using :samp:`self.siteconfig.set('{settingname}', value)` and retrieving it
from the field using :samp:`self.cleaned_data['{fieldname}']`.

For example::

    class MySettingsForm(SiteSettingsForm):
        auth_myauth_list = forms.CharField(
            label="Comma-separated list of values")

        def load(self):
            self.fields['auth_myauth_list'].initial = \
                ','.join(self.siteconfig.get('auth_myauth_list'))

            super(MySettingsForm, self).load()

        def save(self):
            self.siteconfig.set(
                'auth_myauth_list',
                re.split(r',\*', self.cleaned_data['auth_myauth_list']))

            super(MySettingsForm, self).save()

Disabling Fields
----------------

It can be useful to disable fields based on different conditions, such as
a missing Python module. In this case, you can disable any fields in the
form and provide an inline message by setting the
:py:attr:`disabled_fields` and :py:attr:`disabled_reasons` attributes during
:py:meth:`load`.

Both of these attributes are dictionaries mapping from a field name to a
value. For :py:attr:`disabled_fields`, the value is a boolean indicating
whether the field is disabled. For :py:attr:`disabled_reasons`, the value is a
string describing why the field is disabled.

For example::

    def load(self):
        if not get_can_enable_myauth():
            self.disabled_fields['auth_myauth_foo'] = True
            self.disabled_reasons['auth_myauth_foo'] = \
                'You must do a handstand before you can enable this ' \
                'authentication backend.'

        super(MySettingsForm, self).load()

Accessing Settings
==================

The authentication backend can access any settings stored in the site
configuration database (such as those defined in the
:ref:`Settings form <site-settings-forms>` through the
:py:class:`djblets.siteconfig.models.SiteConfiguration` API.

Working with this is pretty simple. First, you just need to get a
:py:class:`SiteConfiguration <djblets.siteconfig.models.SiteConfiguration>`
object::

    from djblets.siteconfig.models import SiteConfiguration

    siteconfig = SiteConfiguration.objects.get_current()

You can then load and save through :py:meth:`SiteConfiguration.set`
and :py:meth:`SiteConfiguration.get` methods. Each take a setting name and
work with any native Python primitive (strings, booleans, lists, tuples,
dictionaries).

For example::

    from djblets.siteconfig.models import SiteConfiguration

    siteconfig = SiteConfiguration.objects.get_current()
    siteconfig.set('auth_myauth_foo', 'Some value')
    bar = siteconfig.get('auth_myauth_bar')

Packaging
=========

Using Extensions
----------------

As of Review Board 2.0, authentication backends should be provided by
extensions, using :ref:`auth-backend-hook`. This allows the authentication
backends to be easily added or removed.

Using Entry Points
------------------

When extensions are, for some reason, not an ideal option, you can instead
fall back on using Python entry point registration. This is required
if your authentication backend needs to work on versions of Review Board
prior to 2.0.

For entry point registration, your authentication backends will need to be
packaged as a standard Python egg module. Generally, this looks something
like::

    setup.py
    myauth/__init__.py

The :file:`__init__.py` would contain your authentication backend's classes
and logic.

You can of course split this up into separate files (such as
:file:`backends.py` for the backend class and :file:`forms.py` for the
settings form). This is entirely up to you. However, to be a proper Python
module, you must have a :file:`__init__.py`, though it can be blank.

:file:`setup.py` must define an "entry point" for your module in order for
Review Board to find it. This is done through the ``entry_points`` parameter
passed to ``setup``. For example::

    setup(...,
          entry_points={
              'reviewboard.auth_backends': [
                  'myauth = myauth:MyAuthBackend',
              ],
          }
    )

Review Board will look in ``reviewboard.auth_backends`` for every module and
attempt to load it. The module path specified must be the full Python module
path for your class. The ID (``myauth`` in the example above) can be anything,
but generally should be consistent with your settings prefix for the settings
form, and must not conflict with any other authentication modules.

The authentication module can then be installed by typing (as root)::

    $ python setup.py install


text:
from django.conf.urls.defaults import *

urlpatterns = patterns('',
    url(r'^login/$', 'authsub.views.login', name="authsub_login"),
)