text:
<!DOCTYPE HTML>

<title>Uses of Class com.erudika.para.core.App.AllowedMethods (para-core 1.47.2 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2022-11-10">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../jquery/jquery-ui.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Module

Package

Class

Use

Tree

Deprecated

Index

Help

All Classes

SEARCH:
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">

JavaScript is disabled on your browser.

Uses of Class
com.erudika.para.core.App.AllowedMethods

Packages that use App.AllowedMethods

Package
Description

com.erudika.para.core

Core domain classes for modeling the Para domain space.

Uses of App.AllowedMethods in com.erudika.para.core

Fields in com.erudika.para.core with type parameters of type App.AllowedMethods

Modifier and Type
Field
Description

static EnumSet<App.AllowedMethods>
App.AllowedMethods.ALL

All methods allowed.

static EnumSet<App.AllowedMethods>
App.AllowedMethods.ALL_EXCEPT_DELETE

All methods allowed, except DELETE.

static EnumSet<App.AllowedMethods>
App.AllowedMethods.NONE

No methods allowed.

static EnumSet<App.AllowedMethods>
App.AllowedMethods.READ

Only GET is allowed.

static EnumSet<App.AllowedMethods>
App.AllowedMethods.READ_AND_WRITE

All methods allowed (*).

static EnumSet<App.AllowedMethods>
App.AllowedMethods.WRITE

All methods allowed, except GET.

Methods in com.erudika.para.core that return App.AllowedMethods

Modifier and Type
Method
Description

static App.AllowedMethods
App.AllowedMethods.fromString(String value)

Constructs the enum from a string value.

static App.AllowedMethods
App.AllowedMethods.valueOf(String name)

Returns the enum constant of this type with the specified name.

static App.AllowedMethods[]
App.AllowedMethods.values()

Returns an array containing the constants of this enum type, in
the order they are declared.

Method parameters in com.erudika.para.core with type arguments of type App.AllowedMethods

Modifier and Type
Method
Description

boolean
App.grantResourcePermission(String subjectid,
                       String resourcePath,
                       EnumSet<App.AllowedMethods> permission)

Grants a new permission for a given subject and resource.

boolean
App.grantResourcePermission(String subjectid,
                       String resourcePath,
                       EnumSet<App.AllowedMethods> permission,
                       boolean allowGuestAccess)

Grants a new permission for a given subject and resource.

Skip navigation links

Overview

Module

Package

Class

Use

Tree

Deprecated

Index

Help

All Classes

JavaScript is disabled on your browser.

Copyright © 2022 Erudika. All rights reserved.


text:
class ChargesController < ApplicationController
  def new
  end

  def create
    @appointment = Appointment.find(params[:appointment_id])

    customer = Stripe::Customer.create(
      :email => params[:stripeEmail],
      :source  => params[:stripeToken]
    )

    charge = Stripe::Charge.create(
      :customer    => customer.id,
      :amount      => params[:amount],
      :description => 'Rails Stripe customer',
      :currency    => 'usd'
    )

    @appointment.paid = true
    @appointment.total_price_paid = params[:amount].to_i/100
    @appointment.save
    redirect_to appointment_path(@appointment)

  rescue Stripe::CardError => e
    flash[:error] = e.message
    redirect_to new_charge_path
  end
end

redpajama_set_name: RedPajamaGithub


text:
.class public Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;
.super Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/AbstractFileFilter;
.source "SuffixFileFilter.java"

# interfaces
.implements Ljava/io/Serializable;

# instance fields
.field private final caseSensitivity:Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;

.field private final suffixes:[Ljava/lang/String;

# direct methods
.method public constructor <init>(Ljava/lang/String;)V
    .locals 1
    .parameter "suffix"

    .prologue
    .line 63
    sget-object v0, Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;->SENSITIVE:Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;

    invoke-direct {p0, p1, v0}, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;-><init>(Ljava/lang/String;Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;)V

    .line 64
    return-void
.end method

.method public constructor <init>(Ljava/lang/String;Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;)V
    .locals 2
    .parameter "suffix"
    .parameter "caseSensitivity"

    .prologue
    .line 75
    invoke-direct {p0}, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/AbstractFileFilter;-><init>()V

    .line 76
    if-nez p1, :cond_0

    .line 77
    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "The suffix must not be null"

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

    throw v0

    .line 79
    :cond_0
    const/4 v0, 0x1

    new-array v0, v0, [Ljava/lang/String;

    const/4 v1, 0x0

    aput-object p1, v0, v1

    iput-object v0, p0, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;->suffixes:[Ljava/lang/String;

    .line 80
    if-nez p2, :cond_1

    sget-object p2, Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;->SENSITIVE:Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;

    .end local p2
    :cond_1
    iput-object p2, p0, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;->caseSensitivity:Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;

    .line 81
    return-void
.end method

.method public constructor <init>(Ljava/util/List;)V
    .locals 1
    .parameter "suffixes"

    .prologue
    .line 124
    sget-object v0, Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;->SENSITIVE:Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;

    invoke-direct {p0, p1, v0}, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;-><init>(Ljava/util/List;Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;)V

    .line 125
    return-void
.end method

.method public constructor <init>(Ljava/util/List;Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;)V
    .locals 2
    .parameter "suffixes"
    .parameter "caseSensitivity"

    .prologue
    .line 137
    invoke-direct {p0}, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/AbstractFileFilter;-><init>()V

    .line 138
    if-nez p1, :cond_0

    .line 139
    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "The list of suffixes must not be null"

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

    throw v0

    .line 141
    :cond_0
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    new-array v0, v0, [Ljava/lang/String;

    invoke-interface {p1, v0}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [Ljava/lang/String;

    check-cast v0, [Ljava/lang/String;

    iput-object v0, p0, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;->suffixes:[Ljava/lang/String;

    .line 142
    if-nez p2, :cond_1

    sget-object p2, Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;->SENSITIVE:Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;

    .end local p2
    :cond_1
    iput-object p2, p0, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;->caseSensitivity:Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;

    .line 143
    return-void
.end method

.method public constructor <init>([Ljava/lang/String;)V
    .locals 1
    .parameter "suffixes"

    .prologue
    .line 93
    sget-object v0, Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;->SENSITIVE:Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;

    invoke-direct {p0, p1, v0}, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;-><init>([Ljava/lang/String;Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;)V

    .line 94
    return-void
.end method

.method public constructor <init>([Ljava/lang/String;Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;)V
    .locals 2
    .parameter "suffixes"
    .parameter "caseSensitivity"

    .prologue
    .line 108
    invoke-direct {p0}, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/AbstractFileFilter;-><init>()V

    .line 109
    if-nez p1, :cond_0

    .line 110
    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "The array of suffixes must not be null"

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

    throw v0

    .line 112
    :cond_0
    iput-object p1, p0, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;->suffixes:[Ljava/lang/String;

    .line 113
    if-nez p2, :cond_1

    sget-object p2, Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;->SENSITIVE:Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;

    .end local p2
    :cond_1
    iput-object p2, p0, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;->caseSensitivity:Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;

    .line 114
    return-void
.end method

# virtual methods
.method public accept(Ljava/io/File;)Z
    .locals 4
    .parameter "file"

    .prologue
    .line 156
    invoke-virtual {p1}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v1

    .line 157
    .local v1, name:Ljava/lang/String;
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    iget-object v2, p0, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;->suffixes:[Ljava/lang/String;

    array-length v2, v2

    if-ge v0, v2, :cond_1

    .line 158
    iget-object v2, p0, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;->caseSensitivity:Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;

    iget-object v3, p0, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;->suffixes:[Ljava/lang/String;

    aget-object v3, v3, v0

    invoke-virtual {v2, v1, v3}, Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;->checkEndsWith(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_0

    .line 159
    const/4 v2, 0x1

    .line 162
    :goto_1
    return v2

    .line 157
    :cond_0
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 162
    :cond_1
    const/4 v2, 0x0

    goto :goto_1
.end method

.method public accept(Ljava/io/File;Ljava/lang/String;)Z
    .locals 3
    .parameter "file"
    .parameter "name"

    .prologue
    .line 177
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    iget-object v1, p0, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;->suffixes:[Ljava/lang/String;

    array-length v1, v1

    if-ge v0, v1, :cond_1

    .line 178
    iget-object v1, p0, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;->caseSensitivity:Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;

    iget-object v2, p0, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;->suffixes:[Ljava/lang/String;

    aget-object v2, v2, v0

    invoke-virtual {v1, p2, v2}, Lcom/htc/util/mail/lib/org/apache/commons/io/IOCase;->checkEndsWith(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 179
    const/4 v1, 0x1

    .line 182
    :goto_1
    return v1

    .line 177
    :cond_0
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 182
    :cond_1
    const/4 v1, 0x0

    goto :goto_1
.end method

.method public toString()Ljava/lang/String;
    .locals 3

    .prologue
    .line 195
    new-instance v0, Ljava/lang/StringBuffer;

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

    .line 196
    .local v0, buffer:Ljava/lang/StringBuffer;
    invoke-super {p0}, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/AbstractFileFilter;->toString()Ljava/lang/String;

    move-result-object v2

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

    .line 197
    const-string v2, "("

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

    .line 198
    iget-object v2, p0, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;->suffixes:[Ljava/lang/String;

    if-eqz v2, :cond_1

    .line 199
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    iget-object v2, p0, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;->suffixes:[Ljava/lang/String;

    array-length v2, v2

    if-ge v1, v2, :cond_1

    .line 200
    if-lez v1, :cond_0

    .line 201
    const-string v2, ","

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

    .line 203
    :cond_0
    iget-object v2, p0, Lcom/htc/util/mail/lib/org/apache/commons/io/filefilter/SuffixFileFilter;->suffixes:[Ljava/lang/String;

    aget-object v2, v2, v1

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

    .line 199
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 206
    .end local v1           #i:I
    :cond_1
    const-string v2, ")"

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

    .line 207
    invoke-virtual {v0}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v2

    return-object v2
.end method


text:
#ifndef __SPEECHSYNTHESIS__
#define __SPEECHSYNTHESIS__
#ifndef __MACTYPES__
#include <MacTypes.h>
#endif
#ifndef __MIXEDMODE__
#include <MixedMode.h>
#endif
#ifndef __FILES__
#include <Files.h>
#endif
#if PRAGMA_ONCE
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_IMPORT
#pragma import on
#endif
#if PRAGMA_STRUCT_ALIGN
    #pragma options align=mac68k
#elif PRAGMA_STRUCT_PACKPUSH
    #pragma pack(push, 2)
#elif PRAGMA_STRUCT_PACK
    #pragma pack(2)
#endif
enum {
    kTextToSpeechSynthType      = FOUR_CHAR_CODE('ttsc'),
    kTextToSpeechVoiceType      = FOUR_CHAR_CODE('ttvd'),
    kTextToSpeechVoiceFileType  = FOUR_CHAR_CODE('ttvf'),
    kTextToSpeechVoiceBundleType = FOUR_CHAR_CODE('ttvb')
};
enum {
    kNoEndingProsody            = 1,
    kNoSpeechInterrupt          = 2,
    kPreflightThenPause         = 4
};
enum {
    kImmediate                  = 0,
    kEndOfWord                  = 1,
    kEndOfSentence              = 2
};
/*------------------------------------------*/
/* GetSpeechInfo & SetSpeechInfo selectors  */
/*------------------------------------------*/
enum {
    soStatus                    = FOUR_CHAR_CODE('stat'),
    soErrors                    = FOUR_CHAR_CODE('erro'),
    soInputMode                 = FOUR_CHAR_CODE('inpt'),
    soCharacterMode             = FOUR_CHAR_CODE('char'),
    soNumberMode                = FOUR_CHAR_CODE('nmbr'),
    soRate                      = FOUR_CHAR_CODE('rate'),
    soPitchBase                 = FOUR_CHAR_CODE('pbas'),
    soPitchMod                  = FOUR_CHAR_CODE('pmod'),
    soVolume                    = FOUR_CHAR_CODE('volm'),
    soSynthType                 = FOUR_CHAR_CODE('vers'),
    soRecentSync                = FOUR_CHAR_CODE('sync'),
    soPhonemeSymbols            = FOUR_CHAR_CODE('phsy'),
    soCurrentVoice              = FOUR_CHAR_CODE('cvox'),
    soCommandDelimiter          = FOUR_CHAR_CODE('dlim'),
    soReset                     = FOUR_CHAR_CODE('rset'),
    soCurrentA5                 = FOUR_CHAR_CODE('myA5'),
    soRefCon                    = FOUR_CHAR_CODE('refc'),
    soTextDoneCallBack          = FOUR_CHAR_CODE('tdcb'),       /* use with SpeechTextDoneProcPtr*/
    soSpeechDoneCallBack        = FOUR_CHAR_CODE('sdcb'),       /* use with SpeechDoneProcPtr*/
    soSyncCallBack              = FOUR_CHAR_CODE('sycb'),       /* use with SpeechSyncProcPtr*/
    soErrorCallBack             = FOUR_CHAR_CODE('ercb'),       /* use with SpeechErrorProcPtr*/
    soPhonemeCallBack           = FOUR_CHAR_CODE('phcb'),       /* use with SpeechPhonemeProcPtr*/
    soWordCallBack              = FOUR_CHAR_CODE('wdcb'),
    soSynthExtension            = FOUR_CHAR_CODE('xtnd'),
    soSoundOutput               = FOUR_CHAR_CODE('sndo')
};
/*------------------------------------------*/
/* Speaking Mode Constants                  */
/*------------------------------------------*/
enum {
    modeText                    = FOUR_CHAR_CODE('TEXT'),       /* input mode constants             */
    modePhonemes                = FOUR_CHAR_CODE('PHON'),
    modeNormal                  = FOUR_CHAR_CODE('NORM'),       /* character mode and number mode constants */
    modeLiteral                 = FOUR_CHAR_CODE('LTRL')
};
enum {
    soVoiceDescription          = FOUR_CHAR_CODE('info'),
    soVoiceFile                 = FOUR_CHAR_CODE('fref')
};
typedef struct OpaqueSpeechChannel*     SpeechChannel;
struct VoiceSpec {
    OSType                          creator;
    OSType                          id;
};
typedef struct VoiceSpec                VoiceSpec;
typedef VoiceSpec *                     VoiceSpecPtr;
enum {
    kNeuter                     = 0,
    kMale                       = 1,
    kFemale                     = 2
};
struct VoiceDescription {
    long                            length;
    VoiceSpec                       voice;
    long                            version;
    Str63                           name;
    Str255                          comment;
    short                           gender;
    short                           age;
    short                           script;
    short                           language;
    short                           region;
    long                            reserved[4];
};
typedef struct VoiceDescription         VoiceDescription;
struct VoiceFileInfo {
    FSSpec                          fileSpec;
    short                           resID;
};
typedef struct VoiceFileInfo            VoiceFileInfo;
struct SpeechStatusInfo {
    Boolean                         outputBusy;
    Boolean                         outputPaused;
    long                            inputBytesLeft;
    short                           phonemeCode;
};
typedef struct SpeechStatusInfo         SpeechStatusInfo;
struct SpeechErrorInfo {
    short                           count;
    OSErr                           oldest;
    long                            oldPos;
    OSErr                           newest;
    long                            newPos;
};
typedef struct SpeechErrorInfo          SpeechErrorInfo;
struct SpeechVersionInfo {
    OSType                          synthType;
    OSType                          synthSubType;
    OSType                          synthManufacturer;
    long                            synthFlags;
    NumVersion                      synthVersion;
};
typedef struct SpeechVersionInfo        SpeechVersionInfo;
struct PhonemeInfo {
    short                           opcode;
    Str15                           phStr;
    Str31                           exampleStr;
    short                           hiliteStart;
    short                           hiliteEnd;
};
typedef struct PhonemeInfo              PhonemeInfo;
struct PhonemeDescriptor {
    short                           phonemeCount;
    PhonemeInfo                     thePhonemes[1];
};
typedef struct PhonemeDescriptor        PhonemeDescriptor;
struct SpeechXtndData {
    OSType                          synthCreator;
    Byte                            synthData[2];
};
typedef struct SpeechXtndData           SpeechXtndData;
struct DelimiterInfo {
    Byte                            startDelimiter[2];
    Byte                            endDelimiter[2];
};
typedef struct DelimiterInfo            DelimiterInfo;
typedef CALLBACK_API( void , SpeechTextDoneProcPtr )(SpeechChannel chan, long refCon, const void **nextBuf, unsigned long *byteLen, long *controlFlags);
typedef CALLBACK_API( void , SpeechDoneProcPtr )(SpeechChannel chan, long refCon);
typedef CALLBACK_API( void , SpeechSyncProcPtr )(SpeechChannel chan, long refCon, OSType syncMessage);
typedef CALLBACK_API( void , SpeechErrorProcPtr )(SpeechChannel chan, long refCon, OSErr theError, long bytePos);
typedef CALLBACK_API( void , SpeechPhonemeProcPtr )(SpeechChannel chan, long refCon, short phonemeOpcode);
typedef CALLBACK_API( void , SpeechWordProcPtr )(SpeechChannel chan, long refCon, unsigned long wordPos, unsigned short wordLen);
typedef STACK_UPP_TYPE(SpeechTextDoneProcPtr)                   SpeechTextDoneUPP;
typedef STACK_UPP_TYPE(SpeechDoneProcPtr)                       SpeechDoneUPP;
typedef STACK_UPP_TYPE(SpeechSyncProcPtr)                       SpeechSyncUPP;
typedef STACK_UPP_TYPE(SpeechErrorProcPtr)                      SpeechErrorUPP;
typedef STACK_UPP_TYPE(SpeechPhonemeProcPtr)                    SpeechPhonemeUPP;
typedef STACK_UPP_TYPE(SpeechWordProcPtr)                       SpeechWordUPP;
#if OPAQUE_UPP_TYPES
#if CALL_NOT_IN_CARBON
    EXTERN_API(SpeechTextDoneUPP)
    NewSpeechTextDoneUPP           (SpeechTextDoneProcPtr   userRoutine);
    EXTERN_API(SpeechDoneUPP)
    NewSpeechDoneUPP               (SpeechDoneProcPtr       userRoutine);
    EXTERN_API(SpeechSyncUPP)
    NewSpeechSyncUPP               (SpeechSyncProcPtr       userRoutine);
    EXTERN_API(SpeechErrorUPP)
    NewSpeechErrorUPP              (SpeechErrorProcPtr      userRoutine);
    EXTERN_API(SpeechPhonemeUPP)
    NewSpeechPhonemeUPP            (SpeechPhonemeProcPtr    userRoutine);
    EXTERN_API(SpeechWordUPP)
    NewSpeechWordUPP               (SpeechWordProcPtr       userRoutine);
    EXTERN_API(void)
    DisposeSpeechTextDoneUPP       (SpeechTextDoneUPP       userUPP);
    EXTERN_API(void)
    DisposeSpeechDoneUPP           (SpeechDoneUPP           userUPP);
    EXTERN_API(void)
    DisposeSpeechSyncUPP           (SpeechSyncUPP           userUPP);
    EXTERN_API(void)
    DisposeSpeechErrorUPP          (SpeechErrorUPP          userUPP);
    EXTERN_API(void)
    DisposeSpeechPhonemeUPP        (SpeechPhonemeUPP        userUPP);
    EXTERN_API(void)
    DisposeSpeechWordUPP           (SpeechWordUPP           userUPP);
    EXTERN_API(void)
    InvokeSpeechTextDoneUPP        (SpeechChannel           chan,
                                    long                    refCon,
                                    const void **           nextBuf,
                                    unsigned long *         byteLen,
                                    long *                  controlFlags,
                                    SpeechTextDoneUPP       userUPP);
    EXTERN_API(void)
    InvokeSpeechDoneUPP            (SpeechChannel           chan,
                                    long                    refCon,
                                    SpeechDoneUPP           userUPP);
    EXTERN_API(void)
    InvokeSpeechSyncUPP            (SpeechChannel           chan,
                                    long                    refCon,
                                    OSType                  syncMessage,
                                    SpeechSyncUPP           userUPP);
    EXTERN_API(void)
    InvokeSpeechErrorUPP           (SpeechChannel           chan,
                                    long                    refCon,
                                    OSErr                   theError,
                                    long                    bytePos,
                                    SpeechErrorUPP          userUPP);
    EXTERN_API(void)
    InvokeSpeechPhonemeUPP         (SpeechChannel           chan,
                                    long                    refCon,
                                    short                   phonemeOpcode,
                                    SpeechPhonemeUPP        userUPP);
    EXTERN_API(void)
    InvokeSpeechWordUPP            (SpeechChannel           chan,
                                    long                    refCon,
                                    unsigned long           wordPos,
                                    unsigned short          wordLen,
                                    SpeechWordUPP           userUPP);
#endif  /* CALL_NOT_IN_CARBON */
#else
    enum { uppSpeechTextDoneProcInfo = 0x0000FFC0 };                /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
    enum { uppSpeechDoneProcInfo = 0x000003C0 };                    /* pascal no_return_value Func(4_bytes, 4_bytes) */
    enum { uppSpeechSyncProcInfo = 0x00000FC0 };                    /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
    enum { uppSpeechErrorProcInfo = 0x00003BC0 };                   /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 4_bytes) */
    enum { uppSpeechPhonemeProcInfo = 0x00000BC0 };                 /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes) */
    enum { uppSpeechWordProcInfo = 0x00002FC0 };                    /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 2_bytes) */
    #define NewSpeechTextDoneUPP(userRoutine)                       (SpeechTextDoneUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSpeechTextDoneProcInfo, GetCurrentArchitecture())
    #define NewSpeechDoneUPP(userRoutine)                           (SpeechDoneUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSpeechDoneProcInfo, GetCurrentArchitecture())
    #define NewSpeechSyncUPP(userRoutine)                           (SpeechSyncUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSpeechSyncProcInfo, GetCurrentArchitecture())
    #define NewSpeechErrorUPP(userRoutine)                          (SpeechErrorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSpeechErrorProcInfo, GetCurrentArchitecture())
    #define NewSpeechPhonemeUPP(userRoutine)                        (SpeechPhonemeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSpeechPhonemeProcInfo, GetCurrentArchitecture())
    #define NewSpeechWordUPP(userRoutine)                           (SpeechWordUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSpeechWordProcInfo, GetCurrentArchitecture())
    #define DisposeSpeechTextDoneUPP(userUPP)                       DisposeRoutineDescriptor(userUPP)
    #define DisposeSpeechDoneUPP(userUPP)                           DisposeRoutineDescriptor(userUPP)
    #define DisposeSpeechSyncUPP(userUPP)                           DisposeRoutineDescriptor(userUPP)
    #define DisposeSpeechErrorUPP(userUPP)                          DisposeRoutineDescriptor(userUPP)
    #define DisposeSpeechPhonemeUPP(userUPP)                        DisposeRoutineDescriptor(userUPP)
    #define DisposeSpeechWordUPP(userUPP)                           DisposeRoutineDescriptor(userUPP)
    #define InvokeSpeechTextDoneUPP(chan, refCon, nextBuf, byteLen, controlFlags, userUPP)  CALL_FIVE_PARAMETER_UPP((userUPP), uppSpeechTextDoneProcInfo, (chan), (refCon), (nextBuf), (byteLen), (controlFlags))
    #define InvokeSpeechDoneUPP(chan, refCon, userUPP)              CALL_TWO_PARAMETER_UPP((userUPP), uppSpeechDoneProcInfo, (chan), (refCon))
    #define InvokeSpeechSyncUPP(chan, refCon, syncMessage, userUPP)  CALL_THREE_PARAMETER_UPP((userUPP), uppSpeechSyncProcInfo, (chan), (refCon), (syncMessage))
    #define InvokeSpeechErrorUPP(chan, refCon, theError, bytePos, userUPP)  CALL_FOUR_PARAMETER_UPP((userUPP), uppSpeechErrorProcInfo, (chan), (refCon), (theError), (bytePos))
    #define InvokeSpeechPhonemeUPP(chan, refCon, phonemeOpcode, userUPP)  CALL_THREE_PARAMETER_UPP((userUPP), uppSpeechPhonemeProcInfo, (chan), (refCon), (phonemeOpcode))
    #define InvokeSpeechWordUPP(chan, refCon, wordPos, wordLen, userUPP)  CALL_FOUR_PARAMETER_UPP((userUPP), uppSpeechWordProcInfo, (chan), (refCon), (wordPos), (wordLen))
#endif
/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
#define NewSpeechTextDoneProc(userRoutine)                      NewSpeechTextDoneUPP(userRoutine)
#define NewSpeechDoneProc(userRoutine)                          NewSpeechDoneUPP(userRoutine)
#define NewSpeechSyncProc(userRoutine)                          NewSpeechSyncUPP(userRoutine)
#define NewSpeechErrorProc(userRoutine)                         NewSpeechErrorUPP(userRoutine)
#define NewSpeechPhonemeProc(userRoutine)                       NewSpeechPhonemeUPP(userRoutine)
#define NewSpeechWordProc(userRoutine)                          NewSpeechWordUPP(userRoutine)
#define CallSpeechTextDoneProc(userRoutine, chan, refCon, nextBuf, byteLen, controlFlags) InvokeSpeechTextDoneUPP(chan, refCon, nextBuf, byteLen, controlFlags, userRoutine)
#define CallSpeechDoneProc(userRoutine, chan, refCon)           InvokeSpeechDoneUPP(chan, refCon, userRoutine)
#define CallSpeechSyncProc(userRoutine, chan, refCon, syncMessage) InvokeSpeechSyncUPP(chan, refCon, syncMessage, userRoutine)
#define CallSpeechErrorProc(userRoutine, chan, refCon, theError, bytePos) InvokeSpeechErrorUPP(chan, refCon, theError, bytePos, userRoutine)
#define CallSpeechPhonemeProc(userRoutine, chan, refCon, phonemeOpcode) InvokeSpeechPhonemeUPP(chan, refCon, phonemeOpcode, userRoutine)
#define CallSpeechWordProc(userRoutine, chan, refCon, wordPos, wordLen) InvokeSpeechWordUPP(chan, refCon, wordPos, wordLen, userRoutine)
EXTERN_API( NumVersion )
SpeechManagerVersion            (void)                                                      FOURWORDINLINE(0x203C, 0x0000, 0x000C, 0xA800);
EXTERN_API( OSErr )
MakeVoiceSpec                   (OSType                 creator,
                                 OSType                 id,
                                 VoiceSpec *            voice)                              FOURWORDINLINE(0x203C, 0x0604, 0x000C, 0xA800);
EXTERN_API( OSErr )
CountVoices                     (short *                numVoices)                          FOURWORDINLINE(0x203C, 0x0108, 0x000C, 0xA800);
EXTERN_API( OSErr )
GetIndVoice                     (short                  index,
                                 VoiceSpec *            voice)                              FOURWORDINLINE(0x203C, 0x030C, 0x000C, 0xA800);
EXTERN_API( OSErr )
GetVoiceDescription             (const VoiceSpec *      voice,
                                 VoiceDescription *     info,
                                 long                   infoLength)                         FOURWORDINLINE(0x203C, 0x0610, 0x000C, 0xA800);
EXTERN_API( OSErr )
GetVoiceInfo                    (const VoiceSpec *      voice,
                                 OSType                 selector,
                                 void *                 voiceInfo)                          FOURWORDINLINE(0x203C, 0x0614, 0x000C, 0xA800);
EXTERN_API( OSErr )
NewSpeechChannel                (VoiceSpec *            voice, /* can be NULL */
                                 SpeechChannel *        chan)                               FOURWORDINLINE(0x203C, 0x0418, 0x000C, 0xA800);
EXTERN_API( OSErr )
DisposeSpeechChannel            (SpeechChannel          chan)                               FOURWORDINLINE(0x203C, 0x021C, 0x000C, 0xA800);
EXTERN_API( OSErr )
SpeakString                     (ConstStr255Param       textToBeSpoken)                     FOURWORDINLINE(0x203C, 0x0220, 0x000C, 0xA800);
EXTERN_API( OSErr )
SpeakText                       (SpeechChannel          chan,
                                 const void *           textBuf,
                                 unsigned long          textBytes)                          FOURWORDINLINE(0x203C, 0x0624, 0x000C, 0xA800);
EXTERN_API( OSErr )
SpeakBuffer                     (SpeechChannel          chan,
                                 const void *           textBuf,
                                 unsigned long          textBytes,
                                 long                   controlFlags)                       FOURWORDINLINE(0x203C, 0x0828, 0x000C, 0xA800);
EXTERN_API( OSErr )
StopSpeech                      (SpeechChannel          chan)                               FOURWORDINLINE(0x203C, 0x022C, 0x000C, 0xA800);
EXTERN_API( OSErr )
StopSpeechAt                    (SpeechChannel          chan,
                                 long                   whereToStop)                        FOURWORDINLINE(0x203C, 0x0430, 0x000C, 0xA800);
EXTERN_API( OSErr )
PauseSpeechAt                   (SpeechChannel          chan,
                                 long                   whereToPause)                       FOURWORDINLINE(0x203C, 0x0434, 0x000C, 0xA800);
EXTERN_API( OSErr )
ContinueSpeech                  (SpeechChannel          chan)                               FOURWORDINLINE(0x203C, 0x0238, 0x000C, 0xA800);
EXTERN_API( short )
SpeechBusy                      (void)                                                      FOURWORDINLINE(0x203C, 0x003C, 0x000C, 0xA800);
EXTERN_API( short )
SpeechBusySystemWide            (void)                                                      FOURWORDINLINE(0x203C, 0x0040, 0x000C, 0xA800);
EXTERN_API( OSErr )
SetSpeechRate                   (SpeechChannel          chan,
                                 Fixed                  rate)                               FOURWORDINLINE(0x203C, 0x0444, 0x000C, 0xA800);
EXTERN_API( OSErr )
GetSpeechRate                   (SpeechChannel          chan,
                                 Fixed *                rate)                               FOURWORDINLINE(0x203C, 0x0448, 0x000C, 0xA800);
EXTERN_API( OSErr )
SetSpeechPitch                  (SpeechChannel          chan,
                                 Fixed                  pitch)                              FOURWORDINLINE(0x203C, 0x044C, 0x000C, 0xA800);
EXTERN_API( OSErr )
GetSpeechPitch                  (SpeechChannel          chan,
                                 Fixed *                pitch)                              FOURWORDINLINE(0x203C, 0x0450, 0x000C, 0xA800);
EXTERN_API( OSErr )
SetSpeechInfo                   (SpeechChannel          chan,
                                 OSType                 selector,
                                 const void *           speechInfo)                         FOURWORDINLINE(0x203C, 0x0654, 0x000C, 0xA800);
EXTERN_API( OSErr )
GetSpeechInfo                   (SpeechChannel          chan,
                                 OSType                 selector,
                                 void *                 speechInfo)                         FOURWORDINLINE(0x203C, 0x0658, 0x000C, 0xA800);
EXTERN_API( OSErr )
TextToPhonemes                  (SpeechChannel          chan,
                                 const void *           textBuf,
                                 unsigned long          textBytes,
                                 Handle                 phonemeBuf,
                                 long *                 phonemeBytes)                       FOURWORDINLINE(0x203C, 0x0A5C, 0x000C, 0xA800);
EXTERN_API( OSErr )
UseDictionary                   (SpeechChannel          chan,
                                 Handle                 dictionary)                         FOURWORDINLINE(0x203C, 0x0460, 0x000C, 0xA800);
#if PRAGMA_STRUCT_ALIGN
    #pragma options align=reset
#elif PRAGMA_STRUCT_PACKPUSH
    #pragma pack(pop)
#elif PRAGMA_STRUCT_PACK
    #pragma pack()
#endif
#ifdef PRAGMA_IMPORT_OFF
#pragma import off
#elif PRAGMA_IMPORT
#pragma import reset
#endif
#ifdef __cplusplus
}
#endif
#endif /* __SPEECHSYNTHESIS__ */


text:
/*
 * Copyright (c) 2008-2014 MongoDB, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.mongodb;

/**
 * This exception is thrown if the application attempts to get information about the result of an unacknowledged write.
 *
 * @see WriteConcern#UNACKNOWLEDGED
 * @see WriteResult
 * @see BulkWriteResult
 * @since 2.12
 */
public class UnacknowledgedWriteException extends MongoClientException {

    private static final long serialVersionUID = 6974332938681213965L;

    /**
     * Constructs a new instance with the given message.
     *
     * @param msg the message
     */
    UnacknowledgedWriteException(final String msg) {
        super(msg);
    }
}


text:
/* ssl/d1_lib.c */
/*
 * DTLS implementation written by Nagendra Modadugu
 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
 */
/* ====================================================================
 * Copyright (c) 1999-2005 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. All advertising materials mentioning features or use of this
 *    software must display the following acknowledgment:
 *    "This product includes software developed by the OpenSSL Project
 *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
 *
 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please contact
 *    openssl-core@OpenSSL.org.
 *
 * 5. Products derived from this software may not be called "OpenSSL"
 *    nor may "OpenSSL" appear in their names without prior written
 *    permission of the OpenSSL Project.
 *
 * 6. Redistributions of any form whatsoever must retain the following
 *    acknowledgment:
 *    "This product includes software developed by the OpenSSL Project
 *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
 *
 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 * ====================================================================
 *
 * This product includes cryptographic software written by Eric Young
 * (eay@cryptsoft.com).  This product includes software written by Tim
 * Hudson (tjh@cryptsoft.com).
 *
 */

#include <stdio.h>
#define USE_SOCKETS
#include <openssl/objects.h>
#include "ssl_locl.h"

#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS)
#include <sys/timeb.h>
#endif

static void get_current_time(struct timeval *t);
const char dtls1_version_str[]="DTLSv1" OPENSSL_VERSION_PTEXT;
int dtls1_listen(SSL *s, struct sockaddr *client);

SSL3_ENC_METHOD DTLSv1_enc_data={
    dtls1_enc,
	tls1_mac,
	tls1_setup_key_block,
	tls1_generate_master_secret,
	tls1_change_cipher_state,
	tls1_final_finish_mac,
	TLS1_FINISH_MAC_LENGTH,
	tls1_cert_verify_mac,
	TLS_MD_CLIENT_FINISH_CONST,TLS_MD_CLIENT_FINISH_CONST_SIZE,
	TLS_MD_SERVER_FINISH_CONST,TLS_MD_SERVER_FINISH_CONST_SIZE,
	tls1_alert_code,
	tls1_export_keying_material,
	};

long dtls1_default_timeout(void)
	{
	/* 2 hours, the 24 hours mentioned in the DTLSv1 spec
	 * is way too long for http, the cache would over fill */
	return(60*60*2);
	}

int dtls1_new(SSL *s)
	{
	DTLS1_STATE *d1;

	if (!ssl3_new(s)) return(0);
	if ((d1=OPENSSL_malloc(sizeof *d1)) == NULL) return (0);
	memset(d1,0, sizeof *d1);

	/* d1->handshake_epoch=0; */

	d1->unprocessed_rcds.q=pqueue_new();
	d1->processed_rcds.q=pqueue_new();
	d1->buffered_messages = pqueue_new();
	d1->sent_messages=pqueue_new();
	d1->buffered_app_data.q=pqueue_new();

	if ( s->server)
		{
		d1->cookie_len = sizeof(s->d1->cookie);
		}

	if( ! d1->unprocessed_rcds.q || ! d1->processed_rcds.q
        || ! d1->buffered_messages || ! d1->sent_messages || ! d1->buffered_app_data.q)
		{
        if ( d1->unprocessed_rcds.q) pqueue_free(d1->unprocessed_rcds.q);
        if ( d1->processed_rcds.q) pqueue_free(d1->processed_rcds.q);
        if ( d1->buffered_messages) pqueue_free(d1->buffered_messages);
		if ( d1->sent_messages) pqueue_free(d1->sent_messages);
		if ( d1->buffered_app_data.q) pqueue_free(d1->buffered_app_data.q);
		OPENSSL_free(d1);
		return (0);
		}

	s->d1=d1;
	s->method->ssl_clear(s);
	return(1);
	}

static void dtls1_clear_queues(SSL *s)
	{
    pitem *item = NULL;
    hm_fragment *frag = NULL;
	DTLS1_RECORD_DATA *rdata;

    while( (item = pqueue_pop(s->d1->unprocessed_rcds.q)) != NULL)
        {
		rdata = (DTLS1_RECORD_DATA *) item->data;
		if (rdata->rbuf.buf)
			{
			OPENSSL_free(rdata->rbuf.buf);
			}
        OPENSSL_free(item->data);
        pitem_free(item);
        }

    while( (item = pqueue_pop(s->d1->processed_rcds.q)) != NULL)
        {
		rdata = (DTLS1_RECORD_DATA *) item->data;
		if (rdata->rbuf.buf)
			{
			OPENSSL_free(rdata->rbuf.buf);
			}
        OPENSSL_free(item->data);
        pitem_free(item);
        }

    while( (item = pqueue_pop(s->d1->buffered_messages)) != NULL)
        {
        frag = (hm_fragment *)item->data;
        OPENSSL_free(frag->fragment);
        OPENSSL_free(frag);
        pitem_free(item);
        }

    while ( (item = pqueue_pop(s->d1->sent_messages)) != NULL)
        {
        frag = (hm_fragment *)item->data;
        OPENSSL_free(frag->fragment);
        OPENSSL_free(frag);
        pitem_free(item);
        }

	while ( (item = pqueue_pop(s->d1->buffered_app_data.q)) != NULL)
		{
		frag = (hm_fragment *)item->data;
		OPENSSL_free(frag->fragment);
		OPENSSL_free(frag);
		pitem_free(item);
		}
	}

void dtls1_free(SSL *s)
	{
	ssl3_free(s);

	dtls1_clear_queues(s);

    pqueue_free(s->d1->unprocessed_rcds.q);
    pqueue_free(s->d1->processed_rcds.q);
    pqueue_free(s->d1->buffered_messages);
	pqueue_free(s->d1->sent_messages);
	pqueue_free(s->d1->buffered_app_data.q);

	OPENSSL_free(s->d1);
	}

void dtls1_clear(SSL *s)
	{
    pqueue unprocessed_rcds;
    pqueue processed_rcds;
    pqueue buffered_messages;
	pqueue sent_messages;
	pqueue buffered_app_data;
	unsigned int mtu;

	if (s->d1)
		{
		unprocessed_rcds = s->d1->unprocessed_rcds.q;
		processed_rcds = s->d1->processed_rcds.q;
		buffered_messages = s->d1->buffered_messages;
		sent_messages = s->d1->sent_messages;
		buffered_app_data = s->d1->buffered_app_data.q;
		mtu = s->d1->mtu;

		dtls1_clear_queues(s);

		memset(s->d1, 0, sizeof(*(s->d1)));

		if (s->server)
			{
			s->d1->cookie_len = sizeof(s->d1->cookie);
			}

		if (SSL_get_options(s) & SSL_OP_NO_QUERY_MTU)
			{
			s->d1->mtu = mtu;
			}

		s->d1->unprocessed_rcds.q = unprocessed_rcds;
		s->d1->processed_rcds.q = processed_rcds;
		s->d1->buffered_messages = buffered_messages;
		s->d1->sent_messages = sent_messages;
		s->d1->buffered_app_data.q = buffered_app_data;
		}

	ssl3_clear(s);
	if (s->options & SSL_OP_CISCO_ANYCONNECT)
		s->version=DTLS1_BAD_VER;
	else
		s->version=DTLS1_VERSION;
	}

long dtls1_ctrl(SSL *s, int cmd, long larg, void *parg)
	{
	int ret=0;

	switch (cmd)
		{
	case DTLS_CTRL_GET_TIMEOUT:
		if (dtls1_get_timeout(s, (struct timeval*) parg) != NULL)
			{
			ret = 1;
			}
		break;
	case DTLS_CTRL_HANDLE_TIMEOUT:
		ret = dtls1_handle_timeout(s);
		break;
	case DTLS_CTRL_LISTEN:
		ret = dtls1_listen(s, parg);
		break;

	default:
		ret = ssl3_ctrl(s, cmd, larg, parg);
		break;
		}
	return(ret);
	}

/*
 * As it's impossible to use stream ciphers in "datagram" mode, this
 * simple filter is designed to disengage them in DTLS. Unfortunately
 * there is no universal way to identify stream SSL_CIPHER, so we have
 * to explicitly list their SSL_* codes. Currently RC4 is the only one
 * available, but if new ones emerge, they will have to be added...
 */
const SSL_CIPHER *dtls1_get_cipher(unsigned int u)
	{
	const SSL_CIPHER *ciph = ssl3_get_cipher(u);

	if (ciph != NULL)
		{
		if (ciph->algorithm_enc == SSL_RC4)
			return NULL;
		}

	return ciph;
	}

void dtls1_start_timer(SSL *s)
	{
#ifndef OPENSSL_NO_SCTP
	/* Disable timer for SCTP */
	if (BIO_dgram_is_sctp(SSL_get_wbio(s)))
		{
		memset(&(s->d1->next_timeout), 0, sizeof(struct timeval));
		return;
		}
#endif

	/* If timer is not set, initialize duration with 1 second */
	if (s->d1->next_timeout.tv_sec == 0 && s->d1->next_timeout.tv_usec == 0)
		{
		s->d1->timeout_duration = 1;
		}

	/* Set timeout to current time */
	get_current_time(&(s->d1->next_timeout));

	/* Add duration to current time */
	s->d1->next_timeout.tv_sec += s->d1->timeout_duration;
	BIO_ctrl(SSL_get_rbio(s), BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT, 0, &(s->d1->next_timeout));
	}

struct timeval* dtls1_get_timeout(SSL *s, struct timeval* timeleft)
	{
	struct timeval timenow;

	/* If no timeout is set, just return NULL */
	if (s->d1->next_timeout.tv_sec == 0 && s->d1->next_timeout.tv_usec == 0)
		{
		return NULL;
		}

	/* Get current time */
	get_current_time(&timenow);

	/* If timer already expired, set remaining time to 0 */
	if (s->d1->next_timeout.tv_sec < timenow.tv_sec ||
		(s->d1->next_timeout.tv_sec == timenow.tv_sec &&
		 s->d1->next_timeout.tv_usec <= timenow.tv_usec))
		{
		memset(timeleft, 0, sizeof(struct timeval));
		return timeleft;
		}

	/* Calculate time left until timer expires */
	memcpy(timeleft, &(s->d1->next_timeout), sizeof(struct timeval));
	timeleft->tv_sec -= timenow.tv_sec;
	timeleft->tv_usec -= timenow.tv_usec;
	if (timeleft->tv_usec < 0)
		{
		timeleft->tv_sec--;
		timeleft->tv_usec += 1000000;
		}

	/* If remaining time is less than 15 ms, set it to 0
	 * to prevent issues because of small devergences with
	 * socket timeouts.
	 */
	if (timeleft->tv_sec == 0 && timeleft->tv_usec < 15000)
		{
		memset(timeleft, 0, sizeof(struct timeval));
		}

	return timeleft;
	}

int dtls1_is_timer_expired(SSL *s)
	{
	struct timeval timeleft;

	/* Get time left until timeout, return false if no timer running */
	if (dtls1_get_timeout(s, &timeleft) == NULL)
		{
		return 0;
		}

	/* Return false if timer is not expired yet */
	if (timeleft.tv_sec > 0 || timeleft.tv_usec > 0)
		{
		return 0;
		}

	/* Timer expired, so return true */
	return 1;
	}

void dtls1_double_timeout(SSL *s)
	{
	s->d1->timeout_duration *= 2;
	if (s->d1->timeout_duration > 60)
		s->d1->timeout_duration = 60;
	dtls1_start_timer(s);
	}

void dtls1_stop_timer(SSL *s)
	{
	/* Reset everything */
	memset(&(s->d1->timeout), 0, sizeof(struct dtls1_timeout_st));
	memset(&(s->d1->next_timeout), 0, sizeof(struct timeval));
	s->d1->timeout_duration = 1;
	BIO_ctrl(SSL_get_rbio(s), BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT, 0, &(s->d1->next_timeout));
	/* Clear retransmission buffer */
	dtls1_clear_record_buffer(s);
	}

int dtls1_check_timeout_num(SSL *s)
	{
	s->d1->timeout.num_alerts++;

	/* Reduce MTU after 2 unsuccessful retransmissions */
	if (s->d1->timeout.num_alerts > 2)
		{
		s->d1->mtu = BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGRAM_GET_FALLBACK_MTU, 0, NULL);
		}

	if (s->d1->timeout.num_alerts > DTLS1_TMO_ALERT_COUNT)
		{
		/* fail the connection, enough alerts have been sent */
		SSLerr(SSL_F_DTLS1_HANDLE_TIMEOUT,SSL_R_READ_TIMEOUT_EXPIRED);
		return -1;
		}

	return 0;
	}

int dtls1_handle_timeout(SSL *s)
	{
	/* if no timer is expired, don't do anything */
	if (!dtls1_is_timer_expired(s))
		{
		return 0;
		}

	dtls1_double_timeout(s);

	if (dtls1_check_timeout_num(s) < 0)
		return -1;

	s->d1->timeout.read_timeouts++;
	if (s->d1->timeout.read_timeouts > DTLS1_TMO_READ_COUNT)
		{
		s->d1->timeout.read_timeouts = 1;
		}

#ifndef OPENSSL_NO_HEARTBEATS
	if (s->tlsext_hb_pending)
		{
		s->tlsext_hb_pending = 0;
		return dtls1_heartbeat(s);
		}
#endif

	dtls1_start_timer(s);
	return dtls1_retransmit_buffered_messages(s);
	}

static void get_current_time(struct timeval *t)
{
#ifdef OPENSSL_SYS_WIN32
	struct _timeb tb;
	_ftime(&tb);
	t->tv_sec = (long)tb.time;
	t->tv_usec = (long)tb.millitm * 1000;
#elif defined(OPENSSL_SYS_VMS)
	struct timeb tb;
	ftime(&tb);
	t->tv_sec = (long)tb.time;
	t->tv_usec = (long)tb.millitm * 1000;
#else
	gettimeofday(t, NULL);
#endif
}

int dtls1_listen(SSL *s, struct sockaddr *client)
	{
	int ret;

	SSL_set_options(s, SSL_OP_COOKIE_EXCHANGE);
	s->d1->listen = 1;

	ret = SSL_accept(s);
	if (ret <= 0) return ret;

	(void) BIO_dgram_get_peer(SSL_get_rbio(s), client);
	return 1;
	}


text:
@implementation WLRSignHandler
-(UIViewController *)targetViewControllerWithRequest:(WLRRouteRequest *)request{
    UIStoryboard * story = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    UIViewController * vc = [story instantiateViewControllerWithIdentifier:@"WLRSignViewController"];
    return vc;
}
@end


text:
<!DOCTYPE html>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <title>Tutorial: CDN</title>

            <meta name="description" content="Britecharts is a client-side reusable Charting Library based on D3.js v4 that allows easy and intuitive use of charts and components that can be composed together creating amazing visualizations." />

                <meta name="keywords" content="Britecharts, D3.js" />

        <meta name="msapplication-tap-highlight" content="no">
        <meta name="msapplication-config" content="img/icons/browserconfig.xml">

        <link rel="manifest" href="manifest.json">

        <meta name="mobile-web-app-capable" content="yes">
        <meta name="application-name" content="Britecharts">
        <link rel="icon" sizes="192x192" href="img/icons/chrome-touch-icon-192x192.png">

        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="#009FA1">
        <meta name="apple-mobile-web-app-title" content="Britecharts">
        <link rel="apple-touch-icon" sizes="180x180" href="img/icons/apple-touch-icon.png">

        <link rel="mask-icon" href="img/icons/safari-pinned-tab.svg" color="#5bbad5">

        <meta name="theme-color" content="#ffffff">

        <link rel="shortcut icon" href="img/icons/favicon.ico">
        <link rel="icon" type="image/png" href="img/icons/favicon-32x32.png" sizes="32x32">
        <link rel="icon" type="image/png" href="img/icons/favicon-16x16.png" sizes="16x16">

            <meta property="og:title" content="Britecharts, a D3.js based charting library of reusable components"/>
            <meta property="og:type" content="website"/>
            <meta property="og:image" content="https://eventbrite.github.io/britecharts/img/logo-stripes-small.png"/>
            <meta property="og:site_name" content="Britecharts"/>
            <meta property="og:url" content=""/>

            <meta name="twitter:card" content="summary" />
            <meta name="twitter:site" content="@britecharts" />
            <meta name="twitter:description" content="Britecharts is a client-side reusable Charting Library based on D3.js v4 that allows easy and intuitive use of charts and components that can be composed together creating amazing visualizations." />

        <link type="text/css" rel="stylesheet" href="styles/custom.css">
        <link type="text/css" rel="stylesheet" href="styles/demos.css">
        <link type="text/css" rel="stylesheet" href="styles/prism.css"  />
        <link type="text/css" rel="stylesheet" href="styles/britecharts.css" />

            		<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">

                    </button>

            				API

Bar

Brush

Donut

Legend

Line

Mini-tooltip

Sparkline

Stacked-area

Step

Tooltip

            				Demos

Getting Started

Bar Chart

Brush Chart

CDN

Donut Chart

Kitchen Sink

Line Chart

Sparkline Chart

Stacked Area Chart

Step Chart

            				Global

Types

                            Github

                            <form class="navbar-form" role="search">

                                    <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">

                                <button class="btn btn-default" id="search-submit"></button>
                            </form>

CDN

        <!DOCTYPE html>

        <meta charset="UTF-8">
        <title>CDN Loading Demo - Britecharts</title>

        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/britecharts/dist/css/britecharts.min.css" type="text/css" />

                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>

Search results

                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>

            	Eventbrite Copyright

            	Documentation generated by JSDoc 3.4.3

            	using the DocStrap template.


text:
package Cass_Test;
import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.Session;
import com.datastax.driver.core.Statement;
import com.datastax.driver.core.policies.DCAwareRoundRobinPolicy;
import com.datastax.driver.core.policies.DefaultRetryPolicy;
import com.datastax.driver.core.policies.TokenAwarePolicy;
import com.datastax.driver.core.querybuilder.QueryBuilder;
import com.datastax.driver.core.ResultSet;
import com.datastax.driver.core.Row;
public class Part2DeleteQuery {
  public static void main(String[] args)
  {
	  Cluster cluster;
		Session session;
		cluster=Cluster.builder().addContactPoint("127.0.0.1").withRetryPolicy(DefaultRetryPolicy.INSTANCE).
				withLoadBalancingPolicy(new TokenAwarePolicy(new DCAwareRoundRobinPolicy())).build();
		session=cluster.connect("ecommerce");
		/*Update*/
		Statement updateStatement=QueryBuilder.delete().from("ecommerce","products").where(QueryBuilder.eq("pdt_id", 5));
		session.execute(updateStatement);
		Statement selectStatement=QueryBuilder.select().all().from("ecommerce","products");
		ResultSet resultSet=session.execute(selectStatement);
		if(resultSet!=null)
		{
			for(Row row:resultSet)
			{
				 System.out.println("Product ID:"+Integer.toString(row.getInt("pdt_id")));
				 System.out.println("Product Name:"+row.getString("pdt_name"));
				 System.out.println("Product Description:"+row.getString("pdt_desc"));
				 System.out.println("Price:"+row.getFloat("price"));
			}
			}
		cluster.close();
  }

}


text:
import * as React from 'react';
//https://github.com/borisyankov/DefinitelyTyped/issues/5128

React.render(
Hello JSX + TypeScript + JSPM
, document.getElementById("app"));


text:
/**
 * Functionality related to the tickets of the current logged user.
 */
(function() {
    'use strict';
    angular.module("tickets-zone",[])
    .config(function($stateProvider, $urlRouterProvider) {

        $stateProvider
          .state(
            'tab.my-tickets' , {
                url: '/my-tickets',
                templateUrl: 'js/my-tickets/my-tickets.html',
                controller: 'MyTicketsController',
                controllerAs: 'vm',
                params: {
                    view: 'my'
                }
        })
          .state(
            'tab.evaluate' , {
                url: '/my-tickets/eval/:id',
                templateUrl: 'js/my-tickets/evaluate.html',
                controller: 'EvaluateController',
                controllerAs: 'vm'
        });
    });

})();


text:
var currentPage;
var currentSearch = '';
var browser;
var numvideos = 6;
var reducedView;

var yt_loading =
{
        show: function()
        {
                var loading = document.createElement('div');
                loading.id = 'yt_loading';
                $('container').appendChild(loading);
        },

        remove: function()
        {
                if ($('yt_loading'))
                {
                        TVB.system.deleteElementById('yt_loading');
                }
        }
};

var hl_loading =
{
        show: function()
        {
                var loading = document.createElement('div');
                loading.id = 'hl_loading';
                $('container').appendChild(loading);
        },

        remove: function()
        {
                if ($('hl_loading'))
                {
                        TVB.system.deleteElementById('hl_loading');
                }
        }
};

function interruptCbk()
{
	TVB.log('Youtube: application put to sleep by user request.');
}

function resumeCbk()
{
	TVB.log('Youtube: application resumed.');
}

var clientLocation;
function getClientLocation()
{
	clientLocation = location.href;

	if(clientLocation.match(".html"))
	{
		clientLocation = clientLocation.substring(0, clientLocation.length - 11);
	}
}

function init()
{
	try
	{
		tvblob.logInfo("Youtube version 2.0.4.1 for Espial rev 6768");
	} catch (e) {
		try {
			console.log("Youtube version 2.0.4.1 for Espial rev 6768");
		} catch (e) {}
	}

	try
	{
		interruptMgr = new BlobInterruptManager();
		interruptMgr.setInterruptedHandler("interruptCbk");
		interruptMgr.setResumedHandler("resumeCbk");
	}
	catch (e) {}

	try
	{
		browser = TVB.Tools.getBrowser();
	}
	catch (e) {}

	try
	{
		TVB.remoteInit();
		TVB.remote.disableNav();
		TVB.remote.disableBack();
	}
	catch (e) {}

	if (document.body.offsetWidth < "700")
	{
		reducedView = true;
		reduce();
	}
	else
	{
		reducedView = false;
	}

	getClientLocation();

	_gaq.push(['_trackEvent',"Home Page", "Accesso"]);
	_gaq.push(['_trackEvent',"Home Page", "Lingua",getLanguageForAnalytics(youtubelanguage) ]);
	_gaq.push(['_trackEvent',"Home Page", "Tema",youtubetheme ]);
	_gaq.push(['_trackEvent',"Home Page", "Qualità",youtubequality]);

	home.draw();

	TVB.CustomEvent.unsubscribeEvent(TVB.remote.button.BACK);
	TVB.CustomEvent.subscribeEvent(TVB.remote.button.BACK, backhandler);
}

function getNameForAnalytics(name)
{
	var n = '';

	switch (name)
	{
		case 'piuvisti':
			n = "Più visti";
			break;
		case 'piuvotati':
			n = "Più votati";
			break;
		case 'popolari':
			n = "Popolari";
			break;
	}

	return n;
}

function getLanguageForAnalytics(lang)
{
	var l = "";
	switch (lang)
	{
		case "1":
			  l="English"; break;
		case "2":
			  l="Italiano"; break;
		case "3":
			  l="Français"; break;
		case "4":
			  l="Deutsch"; break;
		case "5":
			  l="Español"; break;
		case "6":
			  l="Japanese"; break;
	}

	return l;
}

function getCategoryForAnalytics(cat)
{
	var c = '';

	switch (cat)
	{
		case "piuvisti":
			c = "Più visti";
			break;
		case "piuvotati":
			c = "Più votati";
			break;
		case "popolari":
			c = "Popolari";
			break;
		case "myplaylists":
			c = "Le mie playlist";
			break;
		case "myfavorites":
			c = "I miei preferiti";
			break;
		case "myvideos":
			c = "I miei video";
			break;
		case "mychannels":
			c = "Le mie iscrizioni";
			break;
		case "useruploads":
			c = "I miei video";
			break;
		case "playlist":
			c = "Playlist";
			break;
	}

	return c;
}

function backhandler()
{
	TVB.log('Youtube: exiting from application');
	TVB.system.goBackOrExitBrowser();
}

function reduce(){
	numvideos = 4;
}

function drawSearch()
{
	$D.setStyle($('homepage'), 'display', 'none');
	$D.setStyle($('searchpage'), 'display', 'block');

	setTimeout(searchUx.enter, 250);
	//search('keyword');
}

function startSearch(el)
{
	$D.setStyle($('homepage'), 'display', 'none');
	$D.setStyle($('searchpage'), 'display', 'block');
	currentSearch = el;

	setTimeout(function()
			{
				home.exit();
				searchUx.enterWithQuery();
			}, 250);
}

function drawLogin()
{
	$D.setStyle($('homepage'), 'display', 'none');
	$D.setStyle($('loginpage'), 'display', 'block');

	setTimeout(function()
			{
				home.exit();
				loginUx.enter();
			}, 250);
}

function drawOptions()
{
	$D.setStyle($('homepage'), 'display', 'none');
	$D.setStyle($('optionspage'), 'display', 'block');

	setTimeout(function()
			{
				home.exit();
				optionsUx.enter();
			}, 250);
}

function getElementByFocus()
{
	return document.activeElement.id;
}

function escapeHtmlEntities(str)
{
   var tmp = document.createElement("DIV");
   tmp.innerHTML = str;
   return tmp.textContent||tmp.innerText;
}

function getViewportSize()
{
	var viewportwidth;
	var viewportheight;

	if (typeof window.innerWidth != 'undefined')
	{
	     viewportwidth = window.innerWidth;
	     viewportheight = window.innerHeight;
	}
	else if (typeof document.documentElement !== 'undefined' && typeof document.documentElement.clientWidth !== 'undefined' && document.documentElement.clientWidth !== 0)
	{
	      viewportwidth = document.documentElement.clientWidth;
	      viewportheight = document.documentElement.clientHeight;
	}
	else
	{
	      viewportwidth = document.getElementsByTagName('body')[0].clientWidth;
	      viewportheight = document.getElementsByTagName('body')[0].clientHeight;
	}

	return {'w':viewportwidth,'h':viewportheight};
}

function remoteHandler(type, args)
{
	try
	{
		var keyName = args[0].keyName;

		TVB.log('Key Pressed ' + args[0].keyName + ' in ' + currentPage);

	}
	catch (e)
	{
		TVB.error("Youtube: remoteHandler: " + e.message);
	}
}


text:
class B implements Greeter2 {
  public String SayHi() {
    return "Hello ";
  }
}


text:
package org.gradle.caching.local.internal;

import org.gradle.api.Action;
import org.gradle.api.internal.file.temp.TemporaryFileProvider;
import org.gradle.caching.BuildCacheKey;
import org.gradle.util.internal.GFileUtils;

import java.io.File;

public class DefaultBuildCacheTempFileStore implements BuildCacheTempFileStore {

    private final TemporaryFileProvider temporaryFileProvider;

    public DefaultBuildCacheTempFileStore(TemporaryFileProvider temporaryFileProvider) {
        this.temporaryFileProvider = temporaryFileProvider;
    }

    @Override
    public void withTempFile(BuildCacheKey key, Action<? super File> action) {
        String hashCode = key.getHashCode();
        File tempFile = null;
        try {
            tempFile = temporaryFileProvider.createTemporaryFile(hashCode + "-", PARTIAL_FILE_SUFFIX);
            action.execute(tempFile);
        } finally {
            GFileUtils.deleteQuietly(tempFile);
        }
    }
}


text:
<meta charset="UTF-8">
<title>TermTokenMerger.next - biomedicus-core</title>
<link rel="stylesheet" href="../../../style.css">

biomedicus-core / edu.umn.biomedicus.tokenization / TermTokenMerger / next

next

fun next(): TermToken


text:
<?php

defined('BASEPATH') OR exit('No direct script access allowed');

@include_once( APPPATH . 'controllers/admin/Admin_Controller.php');

class Deliveryboy_location extends Admin_Controller {

	public function __construct() {

		parent::__construct();

		$this->load->model('admin/deliveryboy_location_model');

   }

public function index()

	{

		//$this->load->view('welcome_message');

		$this->load->library('pagination');

		  $config = [
		   'base_url'   => base_url('admin/deliveryboy_location/index'),
		   'per_page'   => 5,
		   'total_rows'  => $this->deliveryboy_location_model->count_by(array()),
		   'full_tag_open'  => "
",
		   'full_tag_close' => "
",
		   'first_tag_open' => '
',
		   'first_tag_close' => '
',
		   'last_tag_open'  => '
',
		   'last_tag_close' => '
',
		   'next_tag_open'  => '
',
		   'next_tag_close' => '
',
		   'prev_tag_open'  => '
',
		   'prev_tag_close' => '
',
		   'num_tag_open'  => '
',
		   'num_tag_close'  => '
',
		   'cur_tag_open'  => "
",
		   'cur_tag_close'  => '
',
		  ];

		$this->pagination->initialize($config);

		$result=$this->deliveryboy_location_model->limit($config['per_page'], $this->uri->segment(4) )->order_by('created_at',$order = 'DESC')->get_all();

		//print_r($result); exit;

		$data['deliveryboy_locationdata'] =  $result;

		$this->template->write_view('content', 'admin/deliveryboy_location/index', $data);

		$this->template->render();

}

public function delete()

	{

	//echo $this->uri->segment(3); exit;

		$id=$this->uri->segment(4);
		$result=$this->deliveryboy_location_model->delete($id);

		if($result==1){

			$this->prepare_flashmessage("Successfully Deleted..", 0);
			return redirect('admin/deliveryboy_location');

		}

	}

}


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

#include "chrome/browser/ash/file_system_provider/operations/create_directory.h"

#include <stddef.h>

#include <memory>
#include <string>
#include <vector>

#include "base/bind.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "chrome/browser/ash/file_system_provider/icon_set.h"
#include "chrome/browser/ash/file_system_provider/operations/test_util.h"
#include "chrome/browser/ash/file_system_provider/provided_file_system_interface.h"
#include "chrome/common/extensions/api/file_system_provider.h"
#include "chrome/common/extensions/api/file_system_provider_capabilities/file_system_provider_capabilities_handler.h"
#include "chrome/common/extensions/api/file_system_provider_internal.h"
#include "extensions/browser/event_router.h"
#include "storage/browser/file_system/async_file_util.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace ash {
namespace file_system_provider {
namespace operations {
namespace {

const char kExtensionId[] = "mbflcebpggnecokmikipoihdbecnjfoj";
const char kFileSystemId[] = "testing-file-system";
const int kRequestId = 2;
const base::FilePath::CharType kDirectoryPath[] =
    FILE_PATH_LITERAL("/kitty/and/puppy/happy");

}  // namespace

class FileSystemProviderOperationsCreateDirectoryTest : public testing::Test {
 protected:
  FileSystemProviderOperationsCreateDirectoryTest() {}
  ~FileSystemProviderOperationsCreateDirectoryTest() override {}

  void SetUp() override {
    MountOptions mount_options(kFileSystemId, "" /* display_name */);
    mount_options.writable = true;
    file_system_info_ = ProvidedFileSystemInfo(
        kExtensionId, mount_options, base::FilePath(), false /* configurable */,
        true /* watchable */, extensions::SOURCE_FILE, IconSet());
  }

  ProvidedFileSystemInfo file_system_info_;
};

TEST_F(FileSystemProviderOperationsCreateDirectoryTest, Execute) {
  using extensions::api::file_system_provider::CreateDirectoryRequestedOptions;

  util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */);
  util::StatusCallbackLog callback_log;

  CreateDirectory create_directory(
      nullptr, file_system_info_, base::FilePath(kDirectoryPath),
      true /* recursive */,
      base::BindOnce(&util::LogStatusCallback, &callback_log));
  create_directory.SetDispatchEventImplForTesting(
      base::BindRepeating(&util::LoggingDispatchEventImpl::OnDispatchEventImpl,
                          base::Unretained(&dispatcher)));

  EXPECT_TRUE(create_directory.Execute(kRequestId));

  ASSERT_EQ(1u, dispatcher.events().size());
  extensions::Event* event = dispatcher.events()[0].get();
  EXPECT_EQ(extensions::api::file_system_provider::OnCreateDirectoryRequested::
                kEventName,
            event->event_name);
  const base::Value::List& event_args = event->event_args;
  ASSERT_EQ(1u, event_args.size());

  const base::Value* options_as_value = &event_args[0];
  ASSERT_TRUE(options_as_value->is_dict());

  CreateDirectoryRequestedOptions options;
  ASSERT_TRUE(
      CreateDirectoryRequestedOptions::Populate(*options_as_value, &options));
  EXPECT_EQ(kFileSystemId, options.file_system_id);
  EXPECT_EQ(kRequestId, options.request_id);
  EXPECT_EQ(kDirectoryPath, options.directory_path);
  EXPECT_TRUE(options.recursive);
}

TEST_F(FileSystemProviderOperationsCreateDirectoryTest, Execute_NoListener) {
  util::LoggingDispatchEventImpl dispatcher(false /* dispatch_reply */);
  util::StatusCallbackLog callback_log;

  CreateDirectory create_directory(
      nullptr, file_system_info_, base::FilePath(kDirectoryPath),
      true /* recursive */,
      base::BindOnce(&util::LogStatusCallback, &callback_log));
  create_directory.SetDispatchEventImplForTesting(
      base::BindRepeating(&util::LoggingDispatchEventImpl::OnDispatchEventImpl,
                          base::Unretained(&dispatcher)));

  EXPECT_FALSE(create_directory.Execute(kRequestId));
}

TEST_F(FileSystemProviderOperationsCreateDirectoryTest, Execute_ReadOnly) {
  util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */);
  util::StatusCallbackLog callback_log;

  const ProvidedFileSystemInfo read_only_file_system_info(
      kExtensionId, MountOptions(kFileSystemId, "" /* display_name */),
      base::FilePath() /* mount_path */, false /* configurable */,
      true /* watchable */, extensions::SOURCE_FILE, IconSet());

  CreateDirectory create_directory(
      nullptr, read_only_file_system_info, base::FilePath(kDirectoryPath),
      true /* recursive */,
      base::BindOnce(&util::LogStatusCallback, &callback_log));
  create_directory.SetDispatchEventImplForTesting(
      base::BindRepeating(&util::LoggingDispatchEventImpl::OnDispatchEventImpl,
                          base::Unretained(&dispatcher)));

  EXPECT_FALSE(create_directory.Execute(kRequestId));
}

TEST_F(FileSystemProviderOperationsCreateDirectoryTest, OnSuccess) {
  util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */);
  util::StatusCallbackLog callback_log;

  CreateDirectory create_directory(
      nullptr, file_system_info_, base::FilePath(kDirectoryPath),
      true /* recursive */,
      base::BindOnce(&util::LogStatusCallback, &callback_log));
  create_directory.SetDispatchEventImplForTesting(
      base::BindRepeating(&util::LoggingDispatchEventImpl::OnDispatchEventImpl,
                          base::Unretained(&dispatcher)));

  EXPECT_TRUE(create_directory.Execute(kRequestId));

  create_directory.OnSuccess(kRequestId, std::make_unique<RequestValue>(),
                             false /* has_more */);
  ASSERT_EQ(1u, callback_log.size());
  EXPECT_EQ(base::File::FILE_OK, callback_log[0]);
}

TEST_F(FileSystemProviderOperationsCreateDirectoryTest, OnError) {
  util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */);
  util::StatusCallbackLog callback_log;

  CreateDirectory create_directory(
      nullptr, file_system_info_, base::FilePath(kDirectoryPath),
      true /* recursive */,
      base::BindOnce(&util::LogStatusCallback, &callback_log));
  create_directory.SetDispatchEventImplForTesting(
      base::BindRepeating(&util::LoggingDispatchEventImpl::OnDispatchEventImpl,
                          base::Unretained(&dispatcher)));

  EXPECT_TRUE(create_directory.Execute(kRequestId));

  create_directory.OnError(kRequestId, std::make_unique<RequestValue>(),
                           base::File::FILE_ERROR_TOO_MANY_OPENED);
  ASSERT_EQ(1u, callback_log.size());
  EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, callback_log[0]);
}

}  // namespace operations
}  // namespace file_system_provider
}  // namespace ash


text:
namespace content {

class SystemMessageWindowWinTest : public testing::Test {
 public:
  virtual ~SystemMessageWindowWinTest() { }

 protected:
  virtual void SetUp() OVERRIDE {
    system_monitor_.AddDevicesChangedObserver(&observer_);
  }

  MessageLoop message_loop_;
  base::SystemMonitor system_monitor_;
  base::MockDevicesChangedObserver observer_;
  SystemMessageWindowWin window_;
};

TEST_F(SystemMessageWindowWinTest, DevicesChanged) {
  EXPECT_CALL(observer_, OnDevicesChanged(testing::_)).Times(1);
  window_.OnDeviceChange(DBT_DEVNODES_CHANGED, NULL);
  message_loop_.RunAllPending();
}

TEST_F(SystemMessageWindowWinTest, RandomMessage) {
  window_.OnDeviceChange(DBT_DEVICEQUERYREMOVE, NULL);
  message_loop_.RunAllPending();
}

}  // namespace content


text:
A Slim Middleware for generating Swagger documentation on the fly with Swagger-PHP.

## Installation
Easiest is using Composer:
```
composer require terwey/slim-swagger
```

Adding it to Slim is easy too:
```
$app->add(new \terwey\SlimSwagger(array(), array('baseDir' => __DIR__.'/../src/')));
```
Where ```src/``` is the directory you keep your API endpoint or Models.

## Resources
For now you'll have to grab a release of [Swagger-UI](https://github.com/swagger-api/swagger-ui) and copy ```/lib``` and ```/css``` to your ```/public``` directory.
Also copy over ```swagger-ui.min.js``` to the ```/public/lib``` directory.

## Template
I've provided a Twig template in the ```/templates``` directory. Copy this over to your Slim application. If you want to use Twig also install [Slim Views](https://github.com/codeguy/Slim-Views).

# Docs
The SlimSwagger class takes 2 parameters. The first one is the ```$swaggerSettings``` array, please see the Swagger-PHP docs for more info.
```
$swaggerSettings = array(
    'output' => 'json',
    'apiVersion' => $defaultApiVersion,
    'swaggerVersion' => $defaultSwaggerVersion,
    'defaultSwaggerVersion' => $resourceList['swaggerVersion'],
    'defaultBasePath' => $defaultBasePath
);
```

The second one is the ```$options``` array.
```
$options = array(
    'baseDir' => __DIR__.'/../',
    'ignoreDir' => array()
);
```


text:
namespace MPIWrap
{

namespace internal
{
    template <typename Derived> class Comm;
}

class Group
{
    friend class Intercomm;
    friend class Intracomm;
    template <typename Derived> friend class internal::Comm;

    protected:
        MPI_Group group;

        static int getRank(const MPI_Group& group)
        {
            MPI_Int rank;
            MPIWRAP_CALL(MPI_Group_rank(group, &rank));
            return rank;
        }

        static int getSize(const MPI_Group& group)
        {
            MPI_Int size;
            MPIWRAP_CALL(MPI_Group_size(group, &size));
            return size;
        }

        explicit Group(const MPI_Group& group)
        : group(group), rank(getRank(group)), size(getSize(group)) {}

    public:
        struct Range
        {
            MPI_Int from, to, stride;
            Range(MPI_Int from, MPI_Int to, MPI_Int stride)
            : from(from), to(to), stride(stride) {}
        };

        const MPI_Int rank;
        const MPI_Int size;

#if MPIWRAP_CXX11

        Group(Group&& other) : group(other.group), rank(other.rank), size(other.size)
        {
            other.group = MPI_GROUP_NULL;
        }

#endif

        ~Group()
        {
            if (group != MPI_GROUP_NULL)
            {
                MPIWRAP_CALL(MPI_Group_free(&group));
            }
        }

        operator MPI_Group&() { return group; }

        operator const MPI_Group&() const { return group; }

        operator MPI_Group*() { return &group; }

        operator const MPI_Group*() const { return &group; }

        std::vector<MPI_Int> translateRanks(const MPI_Int* ranks, MPI_Int count, const Group& other) const
        {
            std::vector<MPI_Int> other_ranks(count);
            MPIWRAP_CALL(MPI_Group_translate_ranks(group, count, nc(ranks), other, &other_ranks.front()));
            return other_ranks;
        }

        MPI_Int compare(const Group& other) const
        {
            MPI_Int result;
            MPIWRAP_CALL(MPI_Group_compare(group, other, &result));
            return result;
        }

        Group together(const Group& other) const
        {
            MPI_Group g;
            MPIWRAP_CALL(MPI_Group_union(group, other, &g));
            return Group(g);
        }

        Group intersection(const Group& other) const
        {
            MPI_Group g;
            MPIWRAP_CALL(MPI_Group_intersection(group, other, &g));
            return Group(g);
        }

        Group difference(const Group& other) const
        {
            MPI_Group g;
            MPIWRAP_CALL(MPI_Group_difference(group, other, &g));
            return Group(g);
        }

        Group including(const MPI_Int* ranks, MPI_Int count)
        {
            MPI_Group g;
            MPIWRAP_CALL(MPI_Group_incl(group, count, nc(ranks), &g));
            return Group(g);
        }

        Group including(const std::vector<MPI_Int>& ranks)
        {
            return including(&ranks.front(), ranks.size());
        }

        Group excluding(const MPI_Int* ranks, MPI_Int count)
        {
            MPI_Group g;
            MPIWRAP_CALL(MPI_Group_excl(group, count, nc(ranks), &g));
            return Group(g);
        }

        Group excluding(const std::vector<MPI_Int>& ranks)
        {
            return excluding(&ranks.front(), ranks.size());
        }

        Group including(const Range* ranges, MPI_Int count)
        {
            MPI_Group g;
            MPIWRAP_CALL(MPI_Group_incl(group, count, reinterpret_cast<MPI_Int*>(nc(ranges)), &g));
            return Group(g);
        }

        Group including(const std::vector<Range>& ranges)
        {
            return including(&ranges.front(), ranges.size());
        }

        Group excluding(const Range* ranges, MPI_Int count)
        {
            MPI_Group g;
            MPIWRAP_CALL(MPI_Group_excl(group, count, reinterpret_cast<MPI_Int*>(nc(ranges)), &g));
            return Group(g);
        }

        Group excluding(const std::vector<Range>& ranges)
        {
            return excluding(&ranges.front(), ranges.size());
        }
};

}

#endif


text:
<a href="<?php echo base_url()?>backend_dashboard"> Dashboard

<a href="<?php echo base_url(); ?>backend_course_allocation">course_allocation

Update course_allocation

Update course_allocation

	<form action="<?php echo base_url(); ?>backend_course_allocation/update/<?php echo $course_allocation_edit->course_allocation_id ?>" method="post">

		<?php
			if(!empty($this->session->flashdata('course_allocation_form_validation')))
			{?>

					<?php echo $this->session->flashdata('course_allocation_form_validation'); ?>

		<?php }?>

		  course_allocation Title
		  <input type="text" name="course_allocation_title" value="<?php echo $course_allocation_edit->course_allocation_title ?>" class="form-control">

		  Status
		  <select name="status" class="form-control">
			<option <?php if($course_allocation_edit->status==1) echo ' selected="selected" ';?> value="1">Publish</option>
			<option <?php if($course_allocation_edit->status==2) echo ' selected="selected" ';?> value="2">Unpublish</option>
		  </select>

		<button type="submit" class="btn btn-primary">Submit</button>

	</form>


text:
<?php

namespace spec\Sylius\Bundle\UserBundle\Form\Type;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Sylius\Component\User\Canonicalizer\CanonicalizerInterface;
use Symfony\Component\Form\FormBuilderInterface;

/**
 * @author Łukasz Chruściel <lukasz.chrusciel@lakion.com>
 */
class UserRegistrationTypeSpec extends ObjectBehavior
{
    public function let(CanonicalizerInterface $canonicalizer)
    {
        $this->beConstructedWith('Sylius\Component\User\Model\User', array('sylius'), $canonicalizer);
    }

    public function it_is_initializable()
    {
        $this->shouldHaveType('Sylius\Bundle\UserBundle\Form\Type\UserRegistrationType');
    }

    public function it_extends_abstract_resource_type()
    {
        $this->shouldHaveType('Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType');
    }

    public function it_has_name()
    {
        $this->getName()->shouldReturn('sylius_user_registration');
    }

    public function it_builds_form(FormBuilderInterface $builder)
    {
        $builder->add('plainPassword', 'repeated', Argument::any())->shouldBeCalled()->willReturn($builder);

        $this->buildForm($builder, array());
    }
}


text:
<!DOCTYPE frameset SYSTEM "frameset.dtd">
<frameset>
    <note/>
    <predicate lemma="preparation">
        <note/>
        <roleset framnet="" id="preparation.01" name="Creating" vncls="">
            <roles>
                <role descr="Creator" f="" n="0"/>
                <note/>
                <role descr="Creation" f="" n="1"/>
                <role descr="Created from, thing changed" f="" n="2"/>
                <role descr="Benefactive" f="" n="3"/>
            </roles>
            <note>~prepare.01</note>
            <example name="Arg0, 1, 2" src="" type="">
                <inflection aspect="ns" form="ns" person="ns" tense="ns" voice="ns"/>
                <text>Georgia's preparation of study notes for her midterms turned out to be a waste of time.</text>
                <note/>
                <arg f="" n="0">Georgia's</arg>
                <rel f="">preparation</rel>
                <arg f="" n="1">of study notes</arg>
                <arg f="" n="2">for her midterms</arg>
            </example>
        </roleset>
        <roleset framnet="" id="preparation.02" name="Making ready" vncls="">
            <roles>
                <role descr="Preparer" f="" n="0"/>
                <note/>
                <role descr="Thing made ready" f="" n="1"/>
                <role descr="Ready for what" f="" n="2"/>
            </roles>
            <note>~prepare.02</note>
            <example name="Arg0, Arg2" src="" type="">
                <inflection aspect="ns" form="ns" person="ns" tense="ns" voice="ns"/>
                <text>Darrent's preparation for the bar exam paid off when he passed.</text>
                <note/>
                <arg f="" n="0">Darrent's</arg>
                <rel f="">preparation</rel>
                <arg f="" n="2">for the bar exam</arg>
            </example>
        </roleset>
    </predicate>
</frameset>


text:
var HttpError = require('../errors/http');

var OaeshUtil = require('../util');
var RestAPI = require('oae-rest');

module.exports = {
    'description': 'Reindex all documents in the search index.',
    'help': 'Usage: search-reindex-all',
    'invoke': function(session, args, callback) {
        var globalAdminRestCtx = session.env('current').ctx;
        RestAPI.Search.reindexAll(globalAdminRestCtx, function(err) {
            if (err) {
                throw new HttpError(err.code, err.msg);
            }

            console.log('Re-indexing started');
            return callback();
        });
    }
};


text:
layout: content-main
title: Kurssi-info
course: rub3.7
published: true
---
## Hjärtligt välkommen!
Tervetuloa ruotsin kolmannelle kurssille! Tällä kurssilla opettelemme kertomaan ruotsiksi seuraavista teemoista:

1. Suomi, suomalaisuus
2. kulttuuri
3. tienneuvominen
4. nähtävyydet
5. suomenruotsalaisuus

Kieliopissa käsittelemme seuraavia asioita:

1. epäsuorakysymys
2. relatiivilause
3. interrogatiivipronominit
4. demonstratiivipronominit
5. indefiniittipronominit

## [REK-regler](/media/rub1/REK_regler_uusi.pdf)

Kun hallitset yllä olevat säännöt, kaikki tästä eteenpäin menee kuin vettä vain :)

Jos jokin asia jää mietitityttämään, älä murehdi yksin tai kuuntele huhupuheita. **Kysy opelta!** Voit lähettää viestin Wilmassa tai yksityisviestin Teamsissa.

Jos sinulla on **erityisen tuen suunnitelma** ja mahdollisesti myönnetty lisäaika, ilmoita siitä opettajalle heti kurssin alussa.

### Poissaolot
Jos olet sairaana, tai muusta pätevästä syystä poissa arvioitavan suorituksen päivänä, **ilmoita siitä viimeistään samana aamuna opettajalle** (Wilma, Snap, sähköposti). **Ilman pätevää syytä tai ilmoitusta suorituksestasi annetaan 0 pistettä.** Poissaolotunneilta tulee hoitaa tehdyksi sekä tunnin aikana tehdyt tehtävät, että kotitehtävät.

### Pidemmät poissaolot
Ennalta tiedossa olevat poissaolot (lomamatkat, leirit jne) tulee saattaa opettajan tietoon heti kurssin alussa, jotta voidaan sopia tehtävistä ja aikataulusta.

## Arviointi
Kurssin kokonaisarviointi koostuu kaikista jakson aikana tehtävistä suorituksista sekä muista arviointiin vaikuttavista osa-alueista.

### Arvioitavat suoritukset

1. Sanakokeet
1. Kuuntelut
1. Ohjatut kirjoitusharjoitukset
1. Suulliset tehtävät ja suullinen koe
1. Kielioppikoe
1. Luetunymmärtämisen koe
1. Käännöslauseet

### Muut arviointiin vaikuttavat osa-alueet

1. Tuntiaktiivisuus ja parityöskentely
1. Läksyt (pakollisten tehtävien teko on edellytys arvosanan saannille)
1. Plussatehtävät (läksyplussat, ylimääräiset suulliset/kirjoitukset, ym.)
1. Työvihkon täyttäminen (täydellinen täyttäminen on edellytys arvosanalle)
1. Muut mahdolliset lisätehtävät / pistarit
1. Kirjoitelmien puhtaaksikirjoitukset

Arvioitavat suoritukset (sanakokeet, kuuntelut, Flipgridit ja ohjatut kirjoitustehtävät) on oltava tehtynä kurssin viimeiseen oppituntiin mennessä.

* Täytetty työvihko palautetaan arviointipäivänä.
* Ohjattujen kirjoitustehtävien puhtaaksikirjoituksen deadline on arviointipäivä.

## Arvosana 4
Nelonen on ansaittava ja edellyttää jo melko paljon osaamista osaamista.

* Mikäli kurssin osasuorituksista liian moni (kts. yllä) jäävät alle arvosanan 4-, ei kurssista voi antaa arvosanaa vaan kurssi katsotaan keskeytyneeksi (K)
* Keskeytynyt kurssi on suoritettava alusta asti uudelleen.
* Arvosanan saamiseksi ei riitä läsnäolo, vaan opetukseen on osallistuttava aktiivisesti ja kaikki vaadittavat suoritukset (kts. yllä) tehtävä ajallaan.

### Muuta huomioitavaa
* Läksyt tarkistetaan joka tunti (ope kiertää) ja merkataan ylös plussat.
* Läksyjen teko vaikuttaa arvosanaan niin nousevasti kuin laskevastikin.
* EXTRAPLUSSAT eivät ole pakollisia tehtäviä, mutta niitä kannattaa tehdä jos on voimia ja ajankäyttö sallii. MUTTA, jos ei koskaan tee yhtään extraa, on vaikea tavoittaa huipputuloksia tai yltää omaan parhaaseesi.
* Extrat ovat se ratkaiseva tekijä millä ylletään ysiin, kymppiin, eximiaan ja laudaturiin.
* Jos olet esim. seiskan tai kasin saaja, voit hyvin helposti nostaa osaamistasi ja arvosanaa numerolla tekemällä extroja. Extralla kerrataan opittua ja kertaus on opintojen äiti :D

**OHJEET PARI- JA RYHMÄTYÖSKENTELYYN**

- Ole läsnä, kuuntele, kommentoi.
- Auta kaveria, korjaa.
- Olette vastuussa toinen toistenne oppimisesta.
- Jos kaveri ei keskity, huomauta asiasta.

### Sanakokeisiin luku

Opiskele sanakoetta varten työvihkossa olevat tekstien alleviivaukset. Tekstien
fraaseista on hyvä opetella niissä esiintyvät sanat taivutuksineen.

Etsi itsellesi sopivaa lukutyyliä kokeilemalla eri tapoja. Alla muutama esimerkki:

1. Kirjoita fraasit työvihkoon ja kysele itseltäsi fraaseja vuorotellen suomesta
ruotsiin ja ruotsista suomeen.
2. Lue fraasit ääneen puhelimen sanelimeen ja kuuntele niitä esim. bussissa,
tiskatessa tai pyöräillessä. Tämä auttaa myös ääntämisen treeniin, kuin myös kuullunymmärtämiseen!
3. Pyydä äitiä, veljeä, kummia, kaimaa tai kaveria kyselemään.
4. Tee fraaseista muistipeli paperilapuille.
5. Käytä valmiita Quizletteja ja sen eri ominaisuuksia (esim. pelit, kuunteleminen jne.)

Sanakokeisiin on hyvä alkaa lukea pari päivää ennen sanakoetta ja tehdä hommaa
pikkuhiljaa. Mikäli kokeeseen luetaan 23-01 välillä edellisenä yönä, ei tieto
tartu päähän niin, että voisit hyödyntää sitä vielä päättöviikolla.

### Kirjoitelmien arviointi

**P = PANOSTUS** eli sanasto ja laajuus = miten hyvin osaat soveltaa kurssilla opeteltua sanastoa 0 – 5p

- 1-2 p Kirjoitelma on minimipituinen. Sanasto pysyy yleisellä tasolla, ei vaaditun aihepiirin sanastoa riittävästi tai juuri ollenkaan.

- 3 p Kirjoitelmassa on jo enemmän pituutta, mutta sanastossa on vain pari kurssilla opeteltua fraasia ja teksti on luettelomainen.

- 4 – 5 p Kirjoitelman pituus on lähellä sanamäärän ylärajaa, aiheen käsittely on monipuolista ja siinä on hyödynnetty kurssilla opittua sanastoa. Tekstissä on selkeä punainen lanka ja asioiden esittely on looginen ja etenee sujuvasti. Teksti alkaa ja loppuu sujuvasti ja vastaa tehtävässä pyydettyä tekstityyppiä (puhe, viesti, mielipide...).

**K = KIELI** eli rakenne = kirjoitelman virheettömyys ja kielelliset ansiot 0 – 5p

- 1 – 2 p Kirjoitelmassa on käytetty pääasiassa pelkkiä suoria päälauseita. Tekstissä on runsaasti virheitä jotka hankaloittavat tekstin lukemista/ymmärtämistä.

- 3 p Lauserakenteet ovat jo monipuolisempia, mutta virheitä melko paljon peruskieliopissa (omistus, sanajärjestys, ajanilmaukset, verbien aikamuodot). Tekstissä kuitenkin välittyy viesti lukijalle.

- 4 – 5 p Kirjoitelmassa on käytetty sekä päälauseen suoraa että käänteistä sanajärjestystä, mukana on myös yksi tai useampia sivulauseita, teksti on melko virheetöntä.


text:
package org.apereo.cas.oidc.claims.mapping;

import lombok.RequiredArgsConstructor;

import java.util.Map;

/**
 * This is {@link DefaultOidcAttributeToScopeClaimMapper}.
 * In order for attributes to be released when using a scope in OIDC, attributes need to mapped
 * in to the correct OIDC name (i.e. {@code given_name}) for those attributes.
 * The side effect is that the attribute will always be released as the mapped name
 * even for non-OIDC requests.
 * This component allows for an arbitrary mapping between the predefined OIDC claims and attributes.
 * If a mapping is found for a claim, then the attribute mapped to the claim will be used.
 *
 * @author Misagh Moayyed
 * @since 5.1.0
 */
@RequiredArgsConstructor
public class DefaultOidcAttributeToScopeClaimMapper implements OidcAttributeToScopeClaimMapper {

    /**
     * Map OIDC claim to an attribute.
     */
    private final Map<String, String> claimsToAttribute;

    @Override
    public String getMappedAttribute(final String claim) {
        return claimsToAttribute.get(claim);
    }

    @Override
    public boolean containsMappedAttribute(final String claim) {
        return claimsToAttribute.containsKey(claim);
    }
}


text:
from flask import Blueprint
from flask import flash
from flask import render_template
from flask import url_for
from flask_wtf import FlaskForm
from glob import glob
from os import path
from wtforms import widgets
from wtforms.fields import BooleanField
from wtforms.fields import RadioField
from wtforms.fields import SelectField
from wtforms.fields import SelectMultipleField
from wtforms.fields import StringField
from wtforms.fields import PasswordField
from wtforms.validators import InputRequired
from wtforms.validators import Length
from wtforms.validators import EqualTo
from wtforms.validators import ValidationError

# This is the blueprint object that gets registered into the app in blueprints.py.
components = Blueprint('components', __name__)

@components.route("/")
def index():
    def parse_path(demo_path):
        demo_path = path.relpath(demo_path, 'src/land_registry_elements').replace('/demos', '').replace('.html', '')
        path_parts = demo_path.split('/')
        return url_for('components.component_demo', component_name=path_parts[0], demo_name=path_parts[1])

    demos = glob('src/land_registry_elements/**/demos/*.html')
    parsed_demos = sorted(list(map(parse_path, demos)))

    return render_template('app/index.html', demos=parsed_demos)

@components.route('/<component_name>/<demo_name>')
def component_demo(component_name, demo_name):

    readme = open('src/land_registry_elements/{}/README.md'.format(component_name))

    return render_template('land_registry_elements/{}/demos/{}.html'.format(component_name, demo_name),
                           readme=readme.read()
                           )

@components.route('/clientside-form-validation/demo', methods=['GET', 'POST'])
def clientside_form_validation_demo():
    form = ExampleForm()

    readme = open('src/land_registry_elements/clientside-form-validation/README.md')

    if form.validate_on_submit():
      flash('Success!')

    return render_template('land_registry_elements/clientside-form-validation/demos/demo.html',
                           readme=readme.read(),
                           form=form
                           )

class ExampleForm(FlaskForm):
    full_name = StringField('Full name',
                            validators=[InputRequired(message='Full name is required')]
                            )

    ni = StringField('National Insurance number',
                     validators=[InputRequired(message='National Insurance number is required')]
                     )

    checkbox = BooleanField('Boolean field',
                            validators=[InputRequired(message='Please tick the box')]
                            )

    select_field = SelectField('Select field',
                               [InputRequired(message='Please select an option')],
                               choices=[('', 'Please select'), ('one', 'One'), ('two', 'Two'), ('three', 'Three')],
                               default=''
                               )

    radio_field = RadioField('Radio field',
                             [InputRequired(message='Please select an option')],
                             choices=[('one', 'One'), ('two', 'Two'), ('three', 'Three')]
                             )

    checkboxes_field = SelectMultipleField('Select multiple',
                                           [InputRequired(message='Please select an option')],
                                           choices=[('one', 'One'), ('two', 'Two'), ('three', 'Three')],
                                           option_widget=widgets.CheckboxInput(),
                                           widget=widgets.ListWidget(prefix_label=False)
                                           )

    password = PasswordField('Create a password', validators=[
        InputRequired('Password is required'),
        EqualTo('password_retype', message='Please ensure both password fields match'),
    ])

    password_retype = PasswordField('Re-type your password')

    def validate_full_name(self, field):
        if field.data != 'John Smith':
            raise ValidationError('Example serverside error - type "John Smith" into this field to suppress it')


text:
package org.vaadin.netbeans.model.gwt;

/**
 * Interface for Source element's children
 *
 * @author denis
 */
public interface FilterComponent extends GwtComponent {

    String getName();

    void setName( String name );
}


text:
namespace WMPR.DataProvider.Json
{
	public class Enemy
	{
		public string name { get; set; }
		public int id { get; set; }
		public int guid { get; set; }
		public string type { get; set; }
		public string fights { get; set; }
		public string bosses { get; set; }
	}
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    <meta http-equiv="Content-Language" content="en-ca" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="../style.css" />
    <title><arg> Element</title>

            NAnt

          Help

          Element Reference
           <arg>

                        v0.86-beta1

<arg>

[This is preliminary documentation and subject to change.]

 Represents a command-line argument.

 When passed to an external application, the argument will be quoted when appropriate. This does not apply to the line parameter, which is always passed as is.

Parameters

          Attribute
          Type
          Description
          Required

          dir
          directory
           The value for a directory-based command-line argument; will be replaced with the absolute path of the directory.
          False

          file
          file
           The name of a file as a single command-line argument; will be replaced with the absolute filename of the file.
          False

          if
          bool
           Indicates if the argument should be passed to the external program. If true then the argument will be passed; otherwise, skipped. The default is true.
          False

          line
          string
           List of command-line arguments; will be passed to the executable as is.
          False

          path
          <path>
           The value for a PATH-like command-line argument; you can use : or ; as path separators and NAnt will convert it to the platform's local conventions, while resolving references to environment variables.
          False

          unless
          bool
           Indicates if the argument should not be passed to the external program. If false then the argument will be passed; otherwise, skipped. The default is false.
          False

          value
          string
           A single command-line argument; can contain space characters.
          False

Nested Elements:

                    <path>

 Sets a single command-line argument and treats it like a PATH - ensures the right separator for the local platform is used.

                    </path>

Examples

 A single command-line argument containing a space character.

<arg value="-l -a" />

 Two separate command-line arguments.

<arg line="-l -a" />

 A single command-line argument with the value \dir;\dir2;\dir3 on DOS-based systems and /dir:/dir2:/dir3 on Unix-like systems.

<arg path="/dir;/dir2:\dir3" />

Requirements

      Assembly: NAnt.Core (0.86.2898.0)