text:
FArticyEditorCustomizationManager::FArticyEditorCustomizationManager()
{
}

IArticyIdPropertyWidgetCustomizationFactory* FArticyEditorCustomizationManager::RegisterArticyIdPropertyWidgetCustomizationFactory(FOnCreateArticyIdPropertyWidgetCustomizationFactory GetCustomizationDelegate)
{
	ArticyIdPropertyWidgetCustomizationFactories.Add(GetCustomizationDelegate.Execute());
	return ArticyIdPropertyWidgetCustomizationFactories.Last().Get();
}

void FArticyEditorCustomizationManager::UnregisterArticyIdPropertyWidgetCustomizationFactory(const IArticyIdPropertyWidgetCustomizationFactory* Factory)
{
	const int32 RemovedElements = ArticyIdPropertyWidgetCustomizationFactories.RemoveAll([=](const TSharedPtr<IArticyIdPropertyWidgetCustomizationFactory> FactoryPtr)
	{
		return Factory == FactoryPtr.Get();
	});

	ensureMsgf(RemovedElements != 0, TEXT("Failed removing factory. It was either not registered or removed already."));
}

void FArticyEditorCustomizationManager::CreateArticyIdPropertyWidgetCustomizations(const UArticyObject* ArticyObject, TArray<TSharedPtr<IArticyIdPropertyWidgetCustomization>>& OutCustomizations)
{
	if(ArticyObject == nullptr)
	{
		return;
	}

	for (const TSharedPtr<IArticyIdPropertyWidgetCustomizationFactory>& Entry : ArticyIdPropertyWidgetCustomizationFactories)
	{
		if(Entry->SupportsType(ArticyObject))
		{
			OutCustomizations.Add(Entry->CreateCustomization());
		}
	}
}

void FArticyEditorCustomizationManager::Shutdown()
{
	ArticyIdPropertyWidgetCustomizationFactories.Empty();
}


text:
<?php

interface Sabre_DAVACL_IPrincipalBackend {

    /**
     * Returns a list of principals based on a prefix.
     *
     * This prefix will often contain something like 'principals'. You are only
     * expected to return principals that are in this base path.
     *
     * You are expected to return at least a 'uri' for every user, you can
     * return any additional properties if you wish so. Common properties are:
     *   {DAV:}displayname
     *   {http://sabredav.org/ns}email-address - This is a custom SabreDAV
     *     field that's actualy injected in a number of other properties. If
     *     you have an email address, use this property.
     *
     * @param string $prefixPath
     * @return array
     */
    function getPrincipalsByPrefix($prefixPath);

    /**
     * Returns a specific principal, specified by it's path.
     * The returned structure should be the exact same as from
     * getPrincipalsByPrefix.
     *
     * @param string $path
     * @return array
     */
    function getPrincipalByPath($path);

    /**
     * Returns the list of members for a group-principal
     *
     * @param string $principal
     * @return array
     */
    function getGroupMemberSet($principal);

    /**
     * Returns the list of groups a principal is a member of
     *
     * @param string $principal
     * @return array
     */
    function getGroupMembership($principal);

    /**
     * Updates the list of group members for a group principal.
     *
     * The principals should be passed as a list of uri's.
     *
     * @param string $principal
     * @param array $members
     * @return void
     */
    function setGroupMemberSet($principal, array $members);

}

redpajama_set_name: RedPajamaGithub


text:
'use strict'

import fs from 'fs'
import path from 'path'

const fixturesPath = path.join(__dirname, 'fixtures')

export default function readJSONFile(fileNameJSON) {
    let filePath = path.join(fixturesPath, fileNameJSON)
    let res = new Promise(function (resolve, reject) {
        fs.readFile(filePath, (err, data) => {
            if (err) {
                if (err.code === 'ENOENT') {
                    console.error('File does not exist')
                    reject(err)
                }
                throw err
            }
            let fixture = JSON.parse(data)
            resolve(fixture)
        })
    })
    return res
}


text:
<!DOCTYPE html>

Test that an auto-height region, absolutely positioned with bottom 0, is correctly sized and positioned when the region has min-height defined.

On success you should see PASS below and a green rectangle in the lower right corner.


text:
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using Microsoft.AspNetCore.SignalR.Infrastructure;

namespace Microsoft.AspNetCore.SignalR.Messaging
{
    public sealed class TopicLookup : IEnumerable<KeyValuePair<string, Topic>>
    {
        private readonly ConcurrentDictionary<string, Topic> _topics = new ConcurrentDictionary<string, Topic>(new SipHashBasedStringEqualityComparer());

        public int Count
        {
            get
            {
                return _topics.Count;
            }
        }

        public Topic this[string key]
        {
            get
            {
                Topic topic;
                if (TryGetValue(key, out topic))
                {
                    return topic;
                }
                return null;
            }
        }

        public bool ContainsKey(string key)
        {
            return _topics.ContainsKey(key);
        }

        public bool TryGetValue(string key, out Topic topic)
        {
            return _topics.TryGetValue(key, out topic);
        }

        public IEnumerator<KeyValuePair<string, Topic>> GetEnumerator()
        {
            return _topics.GetEnumerator();
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }

        public bool TryRemove(string key)
        {
            Topic topic;
            return _topics.TryRemove(key, out topic);
        }

        public Topic GetOrAdd(string key, Func<string, Topic> factory)
        {
            return _topics.GetOrAdd(key, factory);
        }

        public void Clear()
        {
            _topics.Clear();
        }
    }
}


text:
(async function() {
  TestRunner.addResult(`Tests the load event.\n`);
  await TestRunner.loadLegacyModule('timeline'); await TestRunner.loadTestModule('performance_test_runner');
  await TestRunner.showPanel('timeline');

  UI.panels.timeline.disableCaptureJSProfileSetting.set(true);
  await PerformanceTestRunner.startTimeline();
  await TestRunner.reloadPagePromise();
  await TestRunner.evaluateInPagePromise(`
    function display() {
      return new Promise(resolve => {
        testRunner.setPopupBlockingEnabled(false);
        var popup = window.open("resources/hello.html");
        popup.onload = () => requestAnimationFrame(
            () => testRunner.updateAllLifecyclePhasesAndCompositeThen(resolve));
      });
    }
  `);
  await TestRunner.callFunctionInPageAsync('display');
  await PerformanceTestRunner.stopTimeline();

  TestRunner.addResult('Model records:');
  PerformanceTestRunner.printTimelineRecords('FrameStartedLoading');
  PerformanceTestRunner.printTimelineRecords('MarkDOMContent');
  PerformanceTestRunner.printTimelineRecords('MarkLoad');
  TestRunner.addResult('Timestamp records:');
  PerformanceTestRunner.printTimestampRecords('MarkDOMContent');
  PerformanceTestRunner.printTimestampRecords('MarkLoad');
  PerformanceTestRunner.printTimestampRecords('MarkFirstPaint');

  const markers = PerformanceTestRunner.timelineModel().timeMarkerEvents();
  markers.reduce((prev, current) => {
    TestRunner.assertGreaterOrEqual(current.startTime, prev.startTime,
        'Event divider timestamps should be monotonically non-decreasing');
    return current;
  });

  TestRunner.completeTest();
})();


text:
{-# LANGUAGE LambdaCase, QuasiQuotes, TemplateHaskell, TupleSections #-}
module ChessLogic where
import ChessUtil
import Control.Arrow
import Control.Monad
import Data.Array
import Data.List
import Data.Maybe
import Text.Printf.TH
import qualified Data.Aeson as A
import qualified Data.Aeson.TH as AT

type Location = (Int, Int)
data Move = Move { mvSource :: Location, mvDest :: Location } deriving Show
newtype ChessBoard = ChessBoard (Array Location (Maybe ChessPiece)) deriving Show
data GameState = GameState {
    gsCurrentPlayer :: ChessPieceColor,
    gsBoard :: ChessBoard
    } deriving Show

instance A.ToJSON ChessBoard where toJSON (ChessBoard board) = A.toJSON $ assocs board
instance A.FromJSON ChessBoard where parseJSON aList = fmap (ChessBoard . array ((1,1), (8, 8))) $ A.parseJSON aList

data ChessPieceType = Pawn | Rook | Knight | Bishop | Queen | King deriving (Eq, Show)
data ChessPieceColor = Black | White deriving (Eq, Show)

data ChessPiece = ChessPiece {
    cpType :: ChessPieceType,
    cpColor :: ChessPieceColor,
    cpHasMoved :: Bool
    }

instance Show ChessPiece where show (ChessPiece ty col _) = [s|ChessPiece %6? %?|] ty col

fmap concat $ mapM (AT.deriveJSON AT.defaultOptions) [
    ''ChessPieceType,
    ''ChessPieceColor,
    ''ChessPiece,
    ''GameState,
    ''Move]

defaultBoard = ChessBoard . listArray ((1, 1), (8, 8)) . concat $ transpose [
    [mk Rook White, mk Knight White, mk Bishop White, mk Queen White, mk King White, mk Bishop White, mk Knight White, mk Rook White],
    [mk Pawn White, mk   Pawn White, mk   Pawn White, mk  Pawn White, mk Pawn White, mk   Pawn White, mk   Pawn White, mk Pawn White],
    [Nothing,               Nothing,         Nothing,        Nothing,       Nothing,         Nothing,         Nothing,       Nothing],
    [Nothing,               Nothing,         Nothing,        Nothing,       Nothing,         Nothing,         Nothing,       Nothing],
    [Nothing,               Nothing,         Nothing,        Nothing,       Nothing,         Nothing,         Nothing,       Nothing],
    [Nothing,               Nothing,         Nothing,        Nothing,       Nothing,         Nothing,         Nothing,       Nothing],
    [mk Pawn Black, mk   Pawn Black, mk   Pawn Black, mk  Pawn Black, mk Pawn Black, mk   Pawn Black, mk   Pawn Black, mk Pawn Black],
    [mk Rook Black, mk Knight Black, mk Bishop Black, mk Queen Black, mk King Black, mk Bishop Black, mk Knight Black, mk Rook Black]
    ] where mk piece color = Just $ ChessPiece piece color False

defaultGameState = GameState White defaultBoard

otherColor Black = White
otherColor White = Black

arr !? i = if inRange (bounds arr) i then Just (arr!i) else Nothing
getByDelta arr (dx, dy) = unfoldr (\i@(ix, iy) -> fmap ((,(ix+dx, iy+dy)) . (i,)) (arr !? i)) . ((+dx) *** (+dy))

makeMove :: GameState -> Move -> Either String GameState
makeMove (GameState curPlayer (ChessBoard board)) = aux where
    aux (Move src _) | not (inBounds src) = Left $ [s|Source %? is out of bounds|] src
    aux (Move _ dst) | not (inBounds dst) = Left $ [s|Destination %? is out of bounds|] dst
    aux move@(Move src@(x1, y1) dst@(x2, y2)) = maybe (Left $ [s|No piece is at position %?|] src) Right (board!src) >>= \case
        ChessPiece _ col _ | col /= curPlayer -> Left $ [s|%? has %?'s piece, and it's %?'s turn|] src col curPlayer
        piece@(ChessPiece Pawn col moved) -> do
            -- TODO: arbitrary promotion, en passant
            let (#) = if col == Black then (-) else (+)
            let shouldPromote = y2 == (if col == Black then 1 else 8)
            let piece' = if shouldPromote then piece { cpType = Queen } else piece
            case () of
                _ | (dst == (x1, y1#1)) && (isNothing (board!dst)) -> uncheckedMakeMove move piece'
                _ | (dst == (x1, y1#2)) && (all isNothing $ map (board!) [(x1,y1#1), dst]) && (moved == False) -> uncheckedMakeMove move piece'
                _ | (dst `elem` [(x1-1, y1#1), (x1+1, y1#1)]) && (isJust (board!dst)) -> uncheckedMakeMove move piece'
                _ -> Left $ [s|No valid moves for Pawn at %?|] src
        piece@(ChessPiece Rook _ _) -> straightLineMovement orthogonalDeltas move piece
        piece@(ChessPiece Bishop _ _) -> straightLineMovement diagonalDeltas move piece
        piece@(ChessPiece Queen _ _) -> straightLineMovement (orthogonalDeltas ++ diagonalDeltas) move piece
        piece@(ChessPiece Knight _ _) -> moveIfInSet move piece (knightMoveSet src)
        piece@(ChessPiece King _ _) -> moveIfInSet move piece (kingMoveSet src) `onFailDo` castleMovement piece src dst
    castleMovement (ChessPiece _ c1 moved) src@(x1, y1) (x2, y2) = do
        when moved $ Left "The king must not have previously moved in order to castle."
        when (y1 /= y2) $ Left "Castling is only valid within the same row."
        when ((abs $ x2 - x1) /= 2) $ Left "Castling requires the king to move exactly 2 squares."
        let deltaX = (x2 - x1) `div` 2
        let squaresBetween = getByDelta board (deltaX, 0) src
        let rookPos = fst $ foldl (\(rookPos, done) (i, e) -> if done then (rookPos, done) else case e of {
            Just (ChessPiece Rook c2 False) | c1 == c2 -> (Just i, True);
            Nothing -> (Nothing, False); _ -> (Nothing, True)}) (Nothing, False) squaresBetween
        case rookPos of
            Nothing -> Left "There is no path from the king to a same-colored, unmoved rook."
            Just rookPos -> do
                let newKing = ((x2, y2), Just (ChessPiece King c1 True))
                let newRook = ((x1+deltaX, y1), Just (ChessPiece Rook c1 True))
                Right (GameState (otherColor curPlayer) (ChessBoard $ board // [(src, Nothing), (rookPos, Nothing), newKing, newRook]))
    knightMoveSet (x, y) = let r = [-2, -1, 1, 2] in [(x+dx, y+dy) | dx <- r, dy <- r, abs dy /= abs dx]
    kingMoveSet (x, y) = (map ((x+) *** (y+)) (orthogonalDeltas ++ diagonalDeltas))
    takeWhileUnoccupied = reverse . fst . foldl (\(a, done) (i,e) -> (if done then a else (i,e):a, done || isJust e)) ([], False)
    straightLineMovement deltas move@(Move src _) piece = moveIfInSet move piece $
        concatMap (\delta -> map fst . takeWhileUnoccupied $ getByDelta board delta src) deltas
    orthogonalDeltas = [(-1, 0), (1, 0), (0, -1), (0, 1)]
    diagonalDeltas = [(-1, -1), (-1, 1), (1, 1), (1, -1)]
    moveIfInSet move piece set = if mvDest move `elem` set then uncheckedMakeMove move piece else Left $ [s|Invalid move for %?|] (cpType piece)
    uncheckedMakeMove (Move src dst) piece = do
        when (maybe False ((== curPlayer) . cpColor) (board!dst)) $ Left "Can't take a piece of the same color"
        Right (GameState (otherColor curPlayer) (ChessBoard $ board // [(src, Nothing), (dst, Just (piece {cpHasMoved=True}))]))
    inBounds = inRange ((1,1), (8, 8))

eitherToBool = either (const False) (const True)

validMoves :: GameState -> Location -> Array Location Bool
validMoves gs@(GameState _ (ChessBoard board)) loc = array (bounds board) . map (\(i, x) -> (i, eitherToBool . abortIfInCheck $ makeMove gs (Move loc i))) $ assocs board

anyValidMovesExist :: GameState -> Bool
anyValidMovesExist gs@(GameState player (ChessBoard board)) = any (\i -> any id (elems $ validMoves gs i)) (indices board)

abortIfInCheck :: Either String GameState -> Either String GameState
abortIfInCheck (Right gs@(GameState player _)) | inCheck gs (otherColor player) = Left "Can't move into check"
abortIfInCheck x = x

inCheck :: GameState -> ChessPieceColor -> Bool
inCheck (GameState _ cb@(ChessBoard board)) player = any canTakeKing (indices board) where
    canTakeKing src = eitherToBool $ makeMove (GameState (otherColor player) cb) (Move src dst)
    dst = fst . head . filter (\(i, Just x) -> cpType x == King && cpColor x == player) $ filter (isJust . snd) (assocs board)


text:
package arq;

import jena.cmd.ArgDecl;
import jena.cmd.CmdArgModule;
import jena.cmd.CmdGeneral;
import jena.cmd.ModBase;

import org.apache.jena.shared.uuid.* ;

public class juuid extends CmdGeneral
{
    ModJUUID modJUUID = new ModJUUID() ;
    int number = 1 ;
    boolean resetEachTime = false ;
    int uuidType = 0 ;
    boolean asURN = false ;
    boolean asURI = false ;
    boolean asPlain = false ;

    public static void main (String [] argv)
    {
        new juuid(argv).mainAndExit() ;
    }

    private juuid(String argv[])
    {
        super(argv) ;
        super.addModule(modJUUID) ;
    }

    @Override
    protected String getSummary()
    {
        return getCommandName()+" [--num=N] [--reset] [--type={1|4}]" ;
    }

    @Override
    protected void exec()
    {
        if ( uuidType == UUID_V1.version )
            JenaUUID.setFactory(new UUID_V1_Gen()) ;
        if ( uuidType == UUID_V4.version )
            JenaUUID.setFactory(new UUID_V4_Gen()) ;

        for ( int i = 0 ; i < number ; i++ )
        {
            if ( resetEachTime && i != 0)
                JenaUUID.reset() ;
            JenaUUID uuid = JenaUUID.generate() ;
            String str = null ;
            if ( asURN )
                str = uuid.asURN() ;
            else if ( asURI )
                str = uuid.asURI() ;
            else if ( asPlain )
                str = uuid.asString() ;
            if ( str == null )
                str = uuid.asString() ;
            System.out.println(str) ;
        }
    }

    @Override
    protected String getCommandName()
    {
        return "uuid" ;
    }

    @Override
    protected void processModulesAndArgs()
    {

    }

    static ArgDecl argDeclNum      = new ArgDecl(ArgDecl.HasValue,  "num", "n") ;
    static ArgDecl argDeclReset    = new ArgDecl(ArgDecl.NoValue,   "reset") ;
    static ArgDecl argDeclGen      = new ArgDecl(ArgDecl.HasValue,  "gen", "scheme", "type", "ver") ;
    static ArgDecl argDeclURN      = new ArgDecl(ArgDecl.NoValue,   "urn") ;
    static ArgDecl argDeclURI      = new ArgDecl(ArgDecl.NoValue,   "uri") ;
    static ArgDecl argDeclPlain    = new ArgDecl(ArgDecl.NoValue,   "plain") ;

    class ModJUUID extends ModBase
    {
        @Override
        public void registerWith(CmdGeneral cmdLine)
        {
            cmdLine.add(argDeclNum) ;
            cmdLine.add(argDeclReset) ;
            cmdLine.add(argDeclGen) ;
            cmdLine.add(argDeclURN) ;
            cmdLine.add(argDeclURI) ;
            cmdLine.add(argDeclPlain) ;
        }

        @Override
        public void processArgs(CmdArgModule cmdLine)
        {
            String numStr = null ;

            if ( getNumPositional() > 1)
                cmdError("Too many positional arguments") ;

            if ( cmdLine.contains(argDeclNum) )
            {
                if ( getNumPositional() != 0 )
                    cmdError("--num and positional arguments don't go together") ;
                numStr = getValue(argDeclNum) ;
            }

            if ( numStr == null && cmdLine.getNumPositional() == 1 )
                numStr = cmdLine.getPositionalArg(0) ;

            if ( numStr != null )
            {
                try
                {
                    number = Integer.parseInt(numStr) ;
                    if ( number < 0 || number > 10000 )
                        cmdLine.cmdError("Number out of range:" + numStr);
                }
                catch (NumberFormatException e)
                {
                    cmdLine.cmdError("Bad argument: " + numStr);
                }
            }

            resetEachTime = cmdLine.contains(argDeclReset) ;

            if ( contains(argDeclGen) )
            {
                String s = getValue(argDeclGen) ;
                if ( s.equalsIgnoreCase("time") || s.equalsIgnoreCase("1"))
                    uuidType = UUID_V1.version ;
                else if ( s.equalsIgnoreCase("random") || s.equalsIgnoreCase("rand") || s.equalsIgnoreCase("4"))
                    uuidType = UUID_V4.version ;
                else
                    cmdError("Unrecognized UUID scheme: "+s) ;
            }

            if ( contains(argDeclURN) || contains(argDeclURI) || contains(argDeclPlain) )
            {
                asURN = contains(argDeclURN) ;
                asURI = contains(argDeclURI) ;
                asPlain = contains(argDeclPlain) ;
            }
            else
            {
                // Defaults
                asURN = true ;
                asURI = false ;
                asPlain = false ;
            }
        }
    }
}


text:
<!DOCTYPE html>

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

          Stripe iOS SDKs 23.2.0

        <form role="search" action="../search.json">
          <input type="text" placeholder="Search documentation" data-typeahead>
        </form>

            View on GitHub

      Stripe iOS SDKs

      StripePaymentsUI

      STPAUBECSDebitFormViewDelegate Protocol Reference

            Classes

                STPAPIClient

                STPAUBECSDebitFormView

                STPAppInfo

                STPCardFormView

                – Representable

                STPError

                STPFormView

                STPImageLibrary

                STPMultiFormTextField

                STPPaymentCardTextField

                – Representable

                StripeAPI

            Enumerations

                STPCardErrorCode

                STPCardFormViewStyle

                STPErrorCode

            Extensions

                NSError

            Protocols

                STPAUBECSDebitFormViewDelegate

                STPCardFormViewDelegate

                STPFormTextFieldContainer

                STPPaymentCardTextFieldDelegate

STPAUBECSDebitFormViewDelegate

@objc
public protocol STPAUBECSDebitFormViewDelegate : NSObjectProtocol

STPAUBECSDebitFormViewDelegate provides methods for STPAUBECSDebitFormView to inform its delegate
of when the form has been completed.

                Show on GitHub

                    auBECSDebitForm(_:<wbr>didChangeToStateComplete:<wbr>)

Called when the form transitions from complete to incomplete or vice-versa.

Declaration

Swift

func auBECSDebitForm(_ form: STPAUBECSDebitFormView, didChangeToStateComplete complete: Bool)

Parameters

                                form

The STPAUBECSDebitFormView instance whose completion state has changed

                                complete

Whether the form is considered complete and can generate an STPPaymentMethodParams instance.

                        Show on GitHub

© 2022 Stripe. All rights reserved. (Last updated: 2022-11-14)

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


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

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

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<!-- Test schema file for DenseVectorField -->

<schema name="bad-schema-densevector-dimension" version="1.0">
  <fieldType name="string" class="solr.StrField" multiValued="true"/>
  <fieldType name="knn_vector" class="solr.DenseVectorField" vectorDimension="4.6" similarityFunction="euclidean"/>

  <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="false"/>
  <field name="vector" type="knn_vector" indexed="true" stored="true" multiValued="false" />

  <uniqueKey>id</uniqueKey>
</schema>


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

describe "The -s command line option" do
  describe "when using -- to stop parsing" do
    it "sets the value to true without an explicit value" do
      ruby_exe("p $n", escape: true,
                          options: "-s",
                          args: "-- -n").chomp.should == "true"
    end

    it "parses single letter args into globals" do
      ruby_exe("puts $n", escape: true,
                          options: "-s",
                          args: "-- -n=blah").chomp.should == "blah"
    end

    it "parses long args into globals" do
      ruby_exe("puts $_name", escape: true,
                          options: "-s",
                          args: "-- --name=blah").chomp.should == "blah"
    end

    it "converts extra dashes into underscores" do
      ruby_exe("puts $___name__test__", escape: true,
                          options: "-s",
                          args: "-- ----name--test--=blah").chomp.should == "blah"
    end
  end

  describe "when running a script" do
    before :all do
      @script = fixture __FILE__, "dash_s_script.rb"
    end

    it "sets the value to true without an explicit value" do
      ruby_exe(@script, options: "-s",
                        args: "-n 0").chomp.should == "true"
    end

    it "parses single letter args into globals" do
      ruby_exe(@script, options: "-s",
                        args: "-n=blah 1").chomp.should == "blah"
    end

    it "parses long args into globals" do
      ruby_exe(@script, options: "-s",
                        args: "--name=blah 2").chomp.should == "blah"
    end

    it "converts extra dashes into underscores" do
      ruby_exe(@script, options: "-s",
                        args: "----name--test--=blah 3").chomp.should == "blah"
    end

  end
end


text:
<!DOCTYPE refentry [ <!ENTITY % mathent SYSTEM "math.ent"> %mathent; ]>

<!-- Converted by db4-upgrade version 1.1 -->

<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="glGetObjectLabel">
    <info>
        <copyright>
            <year>2013-2014</year>
            <holder>Khronos Group</holder>
        </copyright>
    </info>
    <refmeta>
        <refentrytitle>glGetObjectLabel</refentrytitle>
        <manvolnum>3G</manvolnum>
    </refmeta>
    <refnamediv>
        <refname>glGetObjectLabel</refname>
        <refpurpose>retrieve the label of a named object identified within a namespace</refpurpose>
    </refnamediv>
    <refsynopsisdiv><title>C Specification</title>
        <funcsynopsis>
            <funcprototype>
                <funcdef>void <function>glGetObjectLabel</function></funcdef>
                <paramdef>GLenum <parameter>identifier</parameter></paramdef>
                <paramdef>GLuint <parameter>name</parameter></paramdef>
                <paramdef>GLsizei <parameter>bifSize</parameter></paramdef>
                <paramdef>GLsizei * <parameter>length</parameter></paramdef>
                <paramdef>char * <parameter>label</parameter></paramdef>
            </funcprototype>
        </funcsynopsis>
    </refsynopsisdiv>
    <refsect1 xml:id="parameters"><title>Parameters</title>
        <variablelist>
        <varlistentry>
            <term><parameter>identifier</parameter></term>
            <listitem>
                <para>
                    The namespace from which the name of the object is allocated.
                </para>
            </listitem>
        </varlistentry>
        <varlistentry>
            <term><parameter>name</parameter></term>
            <listitem>
                <para>
                    The name of the object whose label to retrieve.
                </para>
            </listitem>
        </varlistentry>
        <varlistentry>
            <term><parameter>bufSize</parameter></term>
            <listitem>
                <para>
                    The length of the buffer whose address is in <parameter>label</parameter>.
                </para>
            </listitem>
        </varlistentry>
        <varlistentry>
            <term><parameter>length</parameter></term>
            <listitem>
                <para>
                    The address of a variable to receive the length of the object label.
                </para>
            </listitem>
        </varlistentry>
        <varlistentry>
            <term><parameter>label</parameter></term>
            <listitem>
                <para>
                    The address of a string that will receive the object label.
                </para>
            </listitem>
        </varlistentry>
        </variablelist>
    </refsect1>
    <refsect1 xml:id="description"><title>Description</title>
        <para>
            <function>glGetObjectLabel</function> retrieves the label of the object identified by
            <parameter>name</parameter> within the namespace given by <parameter>identifier</parameter>.
            <parameter>identifier</parameter> must be one of <constant>GL_BUFFER</constant>, <constant>GL_SHADER</constant>,
            <constant>GL_PROGRAM</constant>, <constant>GL_VERTEX_ARRAY</constant>, <constant>GL_QUERY</constant>,
            <constant>GL_PROGRAM_PIPELINE</constant>, <constant>GL_TRANSFORM_FEEDBACK</constant>, <constant>GL_SAMPLER</constant>,
            <constant>GL_TEXTURE</constant>, <constant>GL_RENDERBUFFER</constant>, <constant>GL_FRAMEBUFFER</constant>,
            to indicate the namespace containing the names of buffers, shaders, programs, vertex array objects, query objects,
            program pipelines, transform feedback objects, samplers, textures, renderbuffers and frame
            buffers, respectively.
        </para>
        <para>
            <parameter>label</parameter> is the address of a string that will be used to store the object label.
            <parameter>bufSize</parameter> specifies the number of characters in the array identified by <parameter>label</parameter>.
            <parameter>length</parameter> contains the address of a variable which will receive the the number of characters in the object label.
            If <parameter>length</parameter> is NULL, then it is ignored and no data is written. Likewise, if <parameter>label</parameter>
            is NULL, or if <parameter>bufSize</parameter> is zero then no data is written to <parameter>label</parameter>.
        </para>
    </refsect1>
    <refsect1 xml:id="errors"><title>Errors</title>
        <para>
            <constant>GL_INVALID_ENUM</constant> is generated if <parameter>identifier</parameter>
            is not one of the accepted object types.
        </para>
        <para>
            <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>name</parameter>
            is not the name of an existing object of the type specified by <parameter>identifier</parameter>.
        </para>
        <para>
            <constant>GL_INVALID_VALUE</constant> is generated if <parameter>bufSize</parameter> is
            zero.
        </para>
        <para>
            If not NULL, <parameter>length</parameter> and <parameter>label</parameter> should be addresses
            to which the client has write access, otherwise undefined behavior, including process termination
            may occur.
        </para>
    </refsect1>
    <refsect1 xml:id="associatedgets"><title>Associated Gets</title>
        <para>
            <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_LABEL_LENGTH</constant>.
        </para>
    </refsect1>
    <refsect1 xml:id="versions"><title>Version Support</title>
        <informaltable>
            <tgroup cols="13" align="left">
                <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apifunchead.xml" xpointer="xpointer(/*/*)"/>
                <tbody>
                    <row>
                        <entry><function>glGetObjectLabel</function></entry>
                        <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apiversion.xml" xpointer="xpointer(/*/*[@role='43']/*)"/>
                    </row>
                </tbody>
            </tgroup>
        </informaltable>
    </refsect1>
    <refsect1 xml:id="seealso"><title>See Also</title>
        <para>
            <citerefentry><refentrytitle>glPushDebugGroup</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glPopDebugGroup</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glObjectLabel</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glGetObjectPtrLabel</refentrytitle></citerefentry>.
        </para>
    </refsect1>
    <refsect1 xml:id="Copyright"><title>Copyright</title>
        <para>
            Copyright <trademark class="copyright"/> 2013-2014 Khronos Group.
            This material may be distributed subject to the terms and conditions set forth in
            the Open Publication License, v 1.0, 8 June 1999.
            <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://opencontent.org/openpub/">http://opencontent.org/openpub/</link>.
        </para>
    </refsect1>
</refentry>


text:
var readyjs = (function (exports) {
  'use strict';

  const ready = function (fn) {
      const completed = () => {
          document.removeEventListener('DOMContentLoaded', completed);
          window.removeEventListener('load', completed);
          fn();
      };
      if (document.readyState !== 'loading') {
          setTimeout(fn);
      }
      else {
          document.addEventListener('DOMContentLoaded', completed);
          window.addEventListener('load', completed);
      }
  };

  exports.ready = ready;

  return exports;

}({}));
//# sourceMappingURL=readyjs.iffe.js.map


text:
var path = require("path")

var pathUtils = module.exports = {}

pathUtils.appendOnce = function(base, ending) {
  if (!path.basename(base) == ending) {
    return path.join(base, ending)
  }

  return base
}


text:
#ifndef mitkIContextMenuAction_H_
#define mitkIContextMenuAction_H_

#include <berryMacros.h>
#include <berryQtViewPart.h>

#include <vector>
#include <mitkDataNode.h>
#include "mitkDataStorage.h"

class QmitkStdMultiWidget;

namespace mitk
{
  /**
  * A context menu action, which is linked to the context menu

  * through an extension point. For an example check the

  *  plugin.xml  and the connected classes of

  * the the segmentation bundle and also the  QmitkDataManagerView.cpp

  * in this bundle.
  */
  struct IContextMenuAction
  {

      /**
      * @brief Executes the action, that linked to the context menu entry.
      */
      virtual void Run( const QList<mitk::DataNode::Pointer>& selectedNodes ) = 0;

    // Setters
    virtual void SetDataStorage(mitk::DataStorage* dataStorage) = 0;
    virtual void SetSmoothed(bool smoothed) = 0;
    virtual void SetDecimated(bool decimated) = 0;
    virtual void SetFunctionality(berry::QtViewPart* functionality) = 0;
  };
}

Q_DECLARE_INTERFACE(mitk::IContextMenuAction, "org.mitk.datamanager.IContextMenuAction")

#endif // mitkIContextMenuAction_H_


text:
FactoryGirl.define do
  factory :identity do
    user nil
    uid "MyString"
    provider "MyString"
    provider "MyText"
    text "MyString"
  end
end


text:
@class FBTask;

@interface FBTaskCompletionSource : NSObject
{
    FBTask *_task;
}

+ (id)taskCompletionSource;
- (void)cancel;
- (void)dealloc;
- (id)init;
- (void)setError:(id)arg1;
- (void)setException:(id)arg1;
- (void)setResult:(id)arg1;
@property(retain, nonatomic) FBTask *task; // @synthesize task=_task;
- (BOOL)trySetCancelled;
- (BOOL)trySetError:(id)arg1;
- (BOOL)trySetException:(id)arg1;
- (BOOL)trySetResult:(id)arg1;

@end


text:
ambari-server stop
sudo -u postgres psql -c "drop database ambari;"
sudo -u postgres psql -c "drop database ambarirca;"
ambari-server setup << _EOF_
y
n
n
n
_EOF_
ambari-server start