text:
package io.cdap.http;

import io.cdap.http.internal.HttpResourceHandler;

/**
 * Place holder for information about the environment. Will be passed in during lifecycle management calls of
 * HttpHandlers. Currently has methods to get RunTimeArguments.
 */
public interface HandlerContext {

  /**
   * @return the {@link HttpResourceHandler} associated with this context,
   * used to let one handler call another internally.
   */
  HttpResourceHandler getHttpResourceHandler();
}

redpajama_set_name: RedPajamaGithub


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><mkiisdir> Task</title>

            NAntContrib

          Help

          Task Reference
           <mkiisdir>

                        v0.92

<mkiisdir>

 Creates or modifies a virtual directory of a web site hosted on Internet Information Server.

 If the virtual directory does not exist it is created, and if it already exists it is modified. Only the IIS-properties specified will be set. If set by other means (e.g. the Management Console), the unspecified properties retain their current value, otherwise they are inherited from the parent.

 For a list of optional parameters see IIsWebVirtualDir.

 More information on metabase parameters is available here.

Parameters

          Attribute
          Type
          Description
          Required

          dirpath
          directory
           The file system path.
          True

          accessexecute
          bool
           Indicates whether the file or the contents of the folder may be executed, regardless of file type. The default is false.
          False

          accessnoremoteexecute
          bool
           Indicates whether remote requests to execute applications are denied; only requests from the same computer as the IIS server succeed if accessexecute is set to true. You cannot set accessnoremoteexecute to false to enable remote requests, and set accessexecute to false to disable local requests. The default is false.
          False

          accessnoremoteread
          bool
           Indicates whether remote requests to view files are denied; only requests from the same computer as the IIS server succeed if accessexecute is set to true. You cannot set accessnoremoteread to false to enable remote requests, and set accessread to false to disable local requests. The default is false.
          False

          accessnoremotescript
          bool
           A value of true indicates that remote requests to view dynamic content are denied; only requests from the same computer as the IIS server succeed if the AccessScript property is set to true. You cannot set AccessNoRemoteScript to false to enable remote requests, and set AccessScript to false to disable local requests.
          False

          accessnoremotewrite
          bool
           indicates that remote requests to create or change files are denied; only requests from the same computer as the IIS server succeed if the AccessWrite property is set to true. You cannot set AccessNoRemoteWrite to false to enable remote requests, and set AccessWrite to false to disable local requests.
          False

          accessread
          bool
           Indicates whether the file or the contents of the folder may be read. The default is true.
          False

          accessscript
          bool
           Indicates whether the file or the contents of the folder may be executed if they are script files or static content. The default is true.
          False

          accesssource
          bool
           Indicates whether users are allowed to access source code if either Read or Write permissions are set. The default is false.
          False

          accessssl
          bool
           Indicates whether file access requires SSL file permission processing, with or without a client certificate. The default is false.
          False

          accessssl128
          bool
           Indicates whether file access requires SSL file permission processing with a minimum key size of 128 bits, with or without a client certificate. The default is false.
          False

          accesssslmapcert
          bool
           Indicates whether SSL file permission processing maps a client certificate to a Microsoft Windows ® operating system user-account. accesssslnegotiatecert must also be set to true for the mapping to occur. The default is false.
          False

          accesssslnegotiatecert
          bool
           Indicates whether SSL file access processing requests a certificate from the client. The default is false.
          False

          accesssslrequirecert
          bool
           Indicates whether SSL file access processing requests a certificate from the client. If the client provides no certificate, the connection is closed. accesssslnegotiatecert must also be set to true when using accesssslrequirecert. The default is false.
          False

          accesswrite
          bool
           Indicates whether users are allowed to upload files and their associated properties to the enabled directory on your server or to change content in a Write-enabled file. The default is false.
          False

          anonymouspasswordsync
          bool
           Indicates whether IIS should handle the user password for anonymous users attempting to access resources. The default is false.
          False

          appallowclientdebug
          bool
           Specifies whether ASP client-side debugging is enabled. The default is false.
          False

          appallowdebugging
          bool
           Specifies whether ASP debugging is enabled on the server. The default is false.
          False

          appcreate

            AppType

           Specifies what type of application to create for this virtual directory. The default is Pooled.
          False

          appfriendlyname
          string
           The user-friendly name of the package or application.
          False

          apppoolid
          string
           Specifies the application pool where the application is routed (IIS 6.0 or higher).
          False

          aspallowsessionstate
          bool
           Enables session state persistence for the ASP application. The default is true.
          False

          aspbufferingon
          bool
           Specifies whether output from an ASP application will be buffered. If true, all output from the application is collected in the buffer before the buffer is flushed to the client. With buffering on, the ASP application has to completely process the ASP script before the client receives any output. The default is true.
          False

          aspenableapplicationrestart
          bool
           Determines whether an ASP application can be automatically restarted. When changes are made to Global.asa or metabase properties that affect an application, the application will not restart unless the aspenableapplicationrestart property is set to false. The default is true.
          False

          aspenableasphtmlfallback
          bool
           Controls the behavior of ASP when a new request is to be rejected due to a full request queue. If true, an .htm file with a similar name as the requested .asp file, will be sent instead of the .asp file. The naming convention for the .htm file is the name of the .asp file with _asp appended. The default is false.
          False

          aspenablechunkedencoding
          bool
           Specifies whether HTTP 1.1 chunked transfer encoding is enabled for the World Wide Web Publishing Service (WWW service). The default is false.
          False

          aspenableparentpaths
          bool
           Specifies whether an ASP page allows paths relative to the current directory. The default is true.
          False

          aspenabletypelibcache
          bool
           Specifies whether type libraries are cached on the server. The default is true.
          False

          asperrorstontlog
          bool
           Specifies which ASP errors are written to the Windows event log.
          False

          aspexceptioncatchenable
          bool
           Specifies whether ASP pages trap exceptions thrown by components. If set to false, the Microsoft Script Debugger tool does not catch exceptions sent by the component that you are debugging. The default is true.
          False

          asplogerrorrequests
          bool
           Controls whether the Web server writes ASP errors to the application section of the Windows event log. The default is true.
          False

          aspscripterrormessage
          string

          False

          aspscripterrorsenttobrowser
          bool
           Specifies whether the Web server writes debugging specifics (file name, error, line number, description) to the client browser, in addition to logging them to the Windows Event Log. The default is true.
          False

          aspthreadgateenabled
          bool
           Indicates whether IIS thread gating is enabled (only applies to IIS 4 and 5). The default is false.
          False

          asptrackthreadingmodel
          bool
           Specifies whether IIS checks the threading model of any components that your application creates. The default is false.
          False

          authanonymous
          bool
           Specifies Anonymous authentication as one of the possible authentication schemes returned to clients as being available. The default is true.
          False

          authbasic
          bool
           Specifies Basic authentication as one of the possible authentication schemes returned to clients as being available. The default is false.
          False

          authntlm
          bool
           Specifies Integrated Windows authentication as one of the possible authentication schemes returned to clients as being available. The default is false.
          False

          authpersistsinglerequest
          bool
           Specifies that authentication persists only for a single request on a connection. IIS resets the authentication at the end of each request, and forces re-authentication on the next request of the session.
          False

          authpersistsinglerequestalwaysifproxy
          bool
           Specifies whether authentication is valid for a single request if by proxy. IIS will reset the authentication at the end of the request and force re-authentication on the next request if the current authenticated request is by proxy of any type. Applies to IIS 5.0 and 5.1. The default is false.
          False

          authpersistsinglerequestifproxy
          bool
           Specifies authentication will persist only across single requests on a connection if the connection is by proxy. Applies to IIS 5.0 and 5.1. The default is false
          False

          cachecontrolnocache
          bool
           Specifies whether the HTTP 1.1 directive to prevent caching of content should be sent to clients. The default is false.
          False

          cacheisapi
          bool
           Indicates whether ISAPI extensions are cached in memory after first use. The default is true.
          False

          contentindexed
          bool
           Specifies whether the installed content indexer should index content under this directory tree. The default is true.
          False

          cpuappenabled
          bool
           Specifies whether process accounting and throttling should be performed for ISAPI extensions and ASP applications. The default is true.
          False

          cpucgienabled
          bool
           Indicates whether IIS should perform process accounting for CGI applications. The default is true.
          False

          createcgiwithnewconsole
          bool
           Indicates whether a CGI application runs in its own console. The default is false.
          False

          createprocessasuser
          bool
           Specifies whether a CGI process is created in the system context or in the context of the requesting user. The default is true.
          False

          defaultdoc
          string
           One or more file names of default documents that will be returned to the client if no file name is included in the client's request.
          False

          dirbrowseshowdate
          bool
           Specifies whether date information is displayed when browsing directories. The default is true.
          False

          dirbrowseshowextension
          bool
           Specifies whether file extensions are displayed when browsing directories. The default is true.
          False

          dirbrowseshowlongdate
          bool
           Specifies whether date information is displayed in extended format when displaying directories. The default is true.
          False

          dirbrowseshowsize
          bool
           Specifies whether file size information is displayed when displaying directories. The default is true.
          False

          dirbrowseshowtime
          bool
           Specifies whether file creation time is displayed when browsing directories. The default is true.
          False

          dontlog
          bool
           Specifies whether client requests are written to the IIS log files. The default is false.
          False

          enabledefaultdoc
          bool
           When set to true, the default document (specified by the DefaultDoc property) for a directory is loaded when the directory is browsed.
          False

          enabledirbrowsing
          bool
           Specifies whether directory browsing is enabled. The default is false.
          False

          enabledocfooter
          bool
           Enables or disables custom footers. The default is false.
          False

          enablereversedns
          bool
           Enables or disables reverse Domain Name Server (DNS) lookups for the World Wide Web Publishing Service (WWW service). The default is false.
          False

          ssiexecdisable
          bool
           Specifies whether server-side include (SSI) #exec directives are disabled under this path. The default is false.
          False

          uncauthenticationpassthrough
          bool

          False

          uncpassword
          string
           Specifies the encrypted password used to gain access to UNC (Universal Naming Convention) virtual roots.
          False

          uncusername
          string
           Specifies the user name for Universal Naming Convention (UNC) virtual roots.
          False

          vdirname
          string
           Name of the IIS virtual directory.
          True

          failonerror
          bool
           Determines if task failure stops the build, or is just reported. The default is true.
          False

          if
          bool
           If true then the task will be executed; otherwise, skipped. The default is true.
          False

          iisserver
          string
           The IIS server, which can be specified using the format [host]:[port]. The default is localhost:80.
          False

          unless
          bool
           Opposite of if. If false then the task will be executed; otherwise, skipped. The default is false.
          False

          verbose
          bool
           Determines whether the task should report detailed build log messages. The default is false.
          False

          website
          string
           The website on the IIS server.
          False

Examples

 Create a virtual directory named Temp pointing to c:\temp on the local machine.

<mkiisdir dirpath="c:\temp" vdirname="Temp" />

 Create a virtual directory named Temp pointing to c:\temp on machine Staging.

<mkiisdir iisserver="Staging" dirpath="c:\temp" vdirname="Temp" />

 Configure the home directory of for http://svc.here.dev/ to point to D:\Develop\Here and require authentication

<mkiisdir iisserver="svc.here.dev" dirpath="D:\Develop\Here" vdirname="/" authanonymous="false"/>

 Create a virtual directory named WebServices/Dev pointing to c:\MyProject\dev on the web site running on port 81 of machine MyHost.

<mkiisdir iisserver="MyHost:81" dirpath="c:\MyProject\dev" vdirname="WebServices/Dev" />

 Note that if WebServices is neither an existing virtual directory nor an existing physical subdirectory of the web root, your IIS Management Console will get confused. Even though http://MyHost:81/WebServices/Dev/theService.asmx may be a perfectly working webservice, the Management Console will not show it.

Requirements

      Assembly: NAnt.Contrib.Tasks (0.92.4543.0)


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>java.lang.annotation (Java Platform SE 7 )</title>
<meta name="date" content="2014-12-18">
<meta name="keywords" content="java.lang.annotation package">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Java™ Platform
Standard Ed. 7

Prev Package

Next Package

Frames

No Frames

All Classes

Package java.lang.annotation

Provides library support for the Java programming language
 annotation facility.

See: Description

Interface Summary

Interface
Description

Annotation

The common interface extended by all annotation types.

Enum Summary

Enum
Description

ElementType

A program element type.

RetentionPolicy

Annotation retention policy.

Exception Summary

Exception
Description

AnnotationTypeMismatchException

Thrown to indicate that a program has attempted to access an element of
 an annotation whose type has changed after the annotation was compiled
 (or serialized).

IncompleteAnnotationException

Thrown to indicate that a program has attempted to access an element of
 an annotation type that was added to the annotation type definition after
 the annotation was compiled (or serialized).

Error Summary

Error
Description

AnnotationFormatError

Thrown when the annotation parser attempts to read an annotation
 from a class file and determines that the annotation is malformed.

Annotation Types Summary

Annotation Type
Description

Documented

Indicates that annotations with a type are to be documented by javadoc
 and similar tools by default.

Inherited

Indicates that an annotation type is automatically inherited.

Retention

Indicates how long annotations with the annotated type are to
 be retained.

Target

Indicates the kinds of program element to which an annotation type
 is applicable.

Package java.lang.annotation Description

Provides library support for the Java programming language
 annotation facility.

Since:

1.5

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Java™ Platform
Standard Ed. 7

Prev Package

Next Package

Frames

No Frames

All Classes

 Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2015, Oracle and/or its affiliates.  All rights reserved.


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:background="@drawable/bg_marker_4dp"
                android:layout_height="36dp"
                android:layout_width="64dp">

    <TextView
        android:ellipsize="end"
        android:gravity="center"
        android:id="@+id/tv_marker"
        android:layout_centerInParent="true"
        android:layout_height="match_parent"
        android:layout_width="match_parent"
        android:maxLines="1"
        android:textColor="@android:color/white"
        android:textSize="12sp"/>

</RelativeLayout>


text:
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}

module SymbolStore (SymbolStore(..), MutableSymbolTable(..), ImmutableSymbolTable(..), SymbolStack(..), Symbol) where

import qualified Data.Map.Strict as M

import Data.Either (isLeft)

import AST (Expression(..))
import Error (Error(..))

type Symbol = String

data MutableSymbolTable k v = MutableSymbolTable   { getMutMap :: M.Map k v } deriving (Show, Eq)
data ImmutableSymbolTable k v = ImmutableSymbolTable { getImmutMap :: M.Map k v } deriving (Show, Eq)
data SymbolStack k v = SymbolStack { getStack :: [MutableSymbolTable k v] } deriving (Show, Eq)

class SymbolStore t e | t -> e where
    hasSymbol :: Symbol -> t Symbol v -> Bool
    getSymbolValue :: Symbol -> t Symbol v -> Either e v
    setSymbolValue :: Symbol -> v -> t Symbol v -> Either e (t Symbol v)

instance SymbolStore MutableSymbolTable Error where
    hasSymbol k t = M.member k (getMutMap t)
    getSymbolValue k t = let m = getMutMap t
                          in case M.lookup k m of
                              Nothing -> Left $ SymbolNotFoundError k
                              Just v  -> Right $ v
    setSymbolValue k v t = Right $ MutableSymbolTable $ M.insert k v (getMutMap t)

instance SymbolStore ImmutableSymbolTable Error where
    hasSymbol k t = M.member k (getImmutMap t)
    getSymbolValue k t = let m = getImmutMap t
                          in case M.lookup k m of
                              Nothing -> Left $ SymbolNotFoundError k
                              Just v  -> Right $ v
    setSymbolValue k v t = Left $ ReadOnlySymbolError k

-- type VarTable = SymbolTable Symbol Expression

-- data SymbolTable k v = MutableSymbolTable   { getTable :: M.Map k v }
--                      | ImmutableSymbolTable { getTable :: M.Map k v }
--                      | SymbolStack { getStack :: [SymbolTable k v] }
--                      | RuntimeSymbols {
--                      deriving (Show, Eq)

-- data RuntimeSymbols k v = { builtIns :: ImmutableSymbolTable k v,

-- symbolNotFound :: String -> Either LanguageError Expression
-- symbolNotFound s = Left $ SymbolNotFoundError $ "Symbol not found: " ++ s

-- getSymbolValue :: Symbol -> SymbolTable Symbol Expression -> Either LanguageError Expression
-- getSymbolValue k stc =
--     case stc of
--         (MutableSymbolTable   { getTable = st }) -> getValue st
--         (ImmutableSymbolTable { getTable = st }) -> getValue st
--         (SymbolStack { getStack = stk}) ->
--             let l = dropWhile isLeft $ fmap (getSymbolValue k) stk
--              in case l of
--                  [] -> symbolNotFound k
--                  (x:xs) -> x
--     where getValue st' = case M.lookup k st' of
--               Just v  -> return v
--               Nothing -> symbolNotFound k
--
-- setSymbolValue :: Symbol -> Expression -> SymbolTable Symbol Expression -> Either LanguageError (SymbolTable Symbol Expression)
-- setSymbolValue k v (MutableSymbolTable   { getTable = st }) =
--     return $ MutableSymbolTable $ M.insert k v st
-- setSymbolValue k v (ImmutableSymbolTable { getTable = st }) =
--     case M.member k st of
--         True  -> Left $ ReadOnlySymbolError $ "Symbol is read-only"
--         False -> Left $ mkReadOnlyTableError -- ImmutableSymbolTable $ M.insert k v st

-- data SymbolStack k v = SymbolStack { getStack :: [SymbolTable k v] }
--                      deriving (Show, Eq)

-- instance SymbolStore SymbolTable LanguageError where
--     -- getSymbolValue :: Symbol -> SymbolTable Symbol Expression -> Either LanguageError Expression
--     getSymbolValue k stc =
--         case stc of
--             (MutableSymbolTable   { getTable = st }) -> getValue k st
--             (ImmutableSymbolTable { getTable = st }) -> getValue k st
--         where getValue k' st' = case M.lookup k' st' of
--                   Just v  -> return v
--                   Nothing -> Left $ SymbolNotFoundError "Symbol not found"
--
--     setSymbolValue :: Symbol -> Expression -> SymbolTable Symbol Expression -> Either LanguageError (SymbolTable Symbol Expression)
--     setSymbolValue k v (MutableSymbolTable   { getTable = st }) = return $ MutableSymbolTable $ M.insert k v st
--     setSymbolValue k v (ImmutableSymbolTable { getTable = st }) =
--         case M.member k st of
--             True  -> Left $ ReadOnlySymbolError $ "Symbol is read-only"
--             False -> return $ ImmutableSymbolTable $ M.insert k v st


text:
class StackUnderflowError(Exception):
    pass

def is_integer(string):
    try:
        int(string)
        return True
    except ValueError:
        return False

def evaluate(input_data):
    defines = {}
    while input_data[0][0] == ':':
        values = input_data.pop(0).split()
        values.pop()
        values.pop(0)
        key = values.pop(0)
        if is_integer(key):
            raise ValueError()
        defines[key] = values
    stack = []
    input_data = input_data[-1].split()
    while any(input_data):
        word = input_data.pop(0).lower()
        try:
            if is_integer(word):
                stack.append(int(word))
            elif word in defines:
                input_data = defines[word] + input_data
            elif word == '+':
                stack.append(stack.pop() + stack.pop())
            elif word == '-':
                stack.append(-stack.pop() + stack.pop())
            elif word == '*':
                stack.append(stack.pop() * stack.pop())
            elif word == '/':
                divider = stack.pop()
                if divider == 0:
                    raise ZeroDivisionError()
                stack.append(int(stack.pop() / divider))
            elif word == 'dup':
                stack.append(stack[-1])
            elif word == 'drop':
                stack.pop()
            elif word == 'swap':
                stack.append(stack[-2])
                del stack[-3]
            elif word == 'over':
                stack.append(stack[-2])
            else:
                raise ValueError()
        except ZeroDivisionError:
            raise
        except IndexError:
            raise StackUnderflowError()
    return stack


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!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">
    <meta name="description" content="CARTOLA UEFA LEAGUE - ADMIN">
    <meta name="author" content="Diego Santos">
    <title>SB Admin - Bootstrap Admin Template</title>

    <link href="<?php echo base_url('css/bootstrap.min.css')?>" rel="stylesheet">

    <link href="<?php echo base_url('css/sb-admin.css')?>" rel="stylesheet">

    <link href="<?php echo base_url('css/plugins/morris.css')?>" rel="stylesheet">

    <link href="<?php echo base_url('font-awesome/css/font-awesome.min.css')?>" rel="stylesheet" type="text/css">

						<?php if (isset($error)): ?>

<?php echo $error; ?>

						<?php endif; ?>
						<form class="form-signin" method="POST" action="<?php echo base_url('index.php/Login/getAutentication');?>">

Cartola Uefa League - ADM

					        Email
					        <input type="email" name="EMAIL" id="inputEmail" class="form-control" placeholder="Email" required autofocus>
					        Senha
					        <input type="password" name="SENHA" id="inputPassword" class="form-control" placeholder="Senha" required>

					        <button class="btn btn-lg btn-primary btn-block" type="submit">Login</button>
					    </form>


text:
"""
Import Barking-and-Dagenham
"""
from data_collection.management.commands import BaseShpStationsShpDistrictsImporter

class Command(BaseShpStationsShpDistrictsImporter):
    """
    Imports the Polling Station data from Barking-and-Dagenham
    """
    council_id = 'E09000002'
    districts_name = 'Barking_n_Dag_completed_PDs_region_updated/Barking_n_Dag_completed_PDs_region_updated'
    stations_name = 'parl.2017-06-08/Version 1/Polling_Stations2017DemocracyClub'
    elections = ['parl.2017-06-08']
    seen_stations = set()

    def district_record_to_dict(self, record):
        return {
            'internal_council_id': record[0],
            'name': record[1],
        }

    def station_record_to_dict(self, record):

        address = record[3].strip()
        postcode = " ".join(address.split(' ')[-2:])
        code = record[4].strip()

        if code in self.seen_stations:
            return None

        self.seen_stations.add(code)
        return {
            'internal_council_id': code,
            'polling_district_id': code,
            'postcode' : postcode,
            'address' : address,
        }


text:
/**
 * User: DISI
 * Date: 12.08.13
 * Time: 21:26
 */

var fs = require('fs-extra');
var time = require('./../modules/graphic_authoring/util/time.js');
var logger = require('log4js').getLogger(null);

var serverStartTime = exports.serverStartTime = time.currentSStamp();

var packageFile = fs.readJsonSync('./package.json');
var appConfigFile = fs.readJsonSync('./app_config.json');
var devInfoFilePath = './app_dev_info.json';
var appDevInfo = exports.appDevInfo = fs.readJsonSync(devInfoFilePath);

var appName = exports.appName = appConfigFile.appName;
var runMode = exports.runMode = appConfigFile.runMode; // dev|demo|alpha
var plateSdf = exports.plateSdf = appConfigFile.plateSdf;
var database = exports.database = appConfigFile.database;
var versionNum = exports.versionNum = packageFile.version;
var emailConfig = exports.emailConfig = appConfigFile.emailConfig;

logger.setLevel('debug');

var buildNum = '';
var devInfoStr = '';

exports.readDevInfo = function () {

    console.log('versionNum: ' + versionNum);
    if (appDevInfo === null) {
        return;
    }
    /** @namespace appDevInfo.clientSideTestNum */
    var clientSideTestNum = appDevInfo.clientSideTestNum;
    /** @namespace appDevInfo.serverSideTestNum */
    var serverSideTestNum = appDevInfo.serverSideTestNum;
    console.log('clientSideTestNum: ' + clientSideTestNum);
    console.log('serverSideTestNum: ' + serverSideTestNum);

    exports.updateDevInfo('s_startUp');
};
exports.updateDevInfo = function (from) {

    //noinspection JSValidateTypes
    if (runMode === 'dev') {
//        devInfoStr = generateDevInfoStr();
//        writeDevInfo();
        if (from === 's_startUp') {
            appDevInfo.serverSideTestNum++;
            writeDevInfo();
        } else if (from === 'c_page_authoring') {
            appDevInfo.clientSideTestNum++;
            writeDevInfo();
        }

    }
    buildNum = appDevInfo.serverSideTestNum + '.' + appDevInfo.clientSideTestNum;
    devInfoStr = generateDevInfoStr();

};
exports.getDevInfoStr = function () {
    return devInfoStr;
};

exports.getVersionNum = function () {
    return versionNum;
};
exports.getBuildNum = function () {
    return buildNum;
};

exports.logger = logger;

writeDevInfo = function () {

    fs.outputJson(devInfoFilePath, exports.appDevInfo, function (err) {
        if (err) throw err;

    });
};
generateDevInfoStr = function () {

    return 'ver=' + versionNum
        + ' [#'
        + exports.appDevInfo.serverSideTestNum + '.' +exports.appDevInfo.clientSideTestNum
        + ']'
        + ', run=' + runMode
        + ', update=' + serverStartTime;
};


text:
/**
 * @author Nikolay A. Kuznetsov
 */
package org.teavm.classlib.java.util.regex;

/**
 * Greedy quantifier node for the case where there is no intersection with next
 * node and normal quantifiers could be treated as greedy and possessive.
 *
 * @author Nikolay A. Kuznetsov
 */
class TUnifiedQuantifierSet extends TLeafQuantifierSet {

    public TUnifiedQuantifierSet(TLeafSet innerSet, TAbstractSet next, int type) {
        super(innerSet, next, type);
    }

    public TUnifiedQuantifierSet(TLeafQuantifierSet quant) {
        super((TLeafSet)quant.getInnerSet(), quant.getNext(), quant.getType());
        innerSet.setNext(this);

    }

    @Override
    public int matches(int stringIndex, CharSequence testString, TMatchResultImpl matchResult) {
        while (stringIndex + leaf.charCount() <= matchResult.getRightBound() &&
                leaf.accepts(stringIndex, testString) > 0)
            stringIndex += leaf.charCount();

        return next.matches(stringIndex, testString, matchResult);
    }

    @Override
    public int find(int stringIndex, CharSequence testString, TMatchResultImpl matchResult) {
        int startSearch = next.find(stringIndex, testString, matchResult);
        if (startSearch < 0)
            return -1;
        int newSearch = startSearch - leaf.charCount();
        while (newSearch >= stringIndex && leaf.accepts(newSearch, testString) > 0) {
            startSearch = newSearch;
            newSearch -= leaf.charCount();
        }

        return startSearch;
    }
}


text:
<?php
/**
 * UsVerifications
 *
 * PHP version 7.3
 *
 * @category Class
 * @package  OpenAPI\Client
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * Lob
 *
 * The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
 *
 * The version of the OpenAPI document: 1.3.0
 * Contact: lob-openapi@lob.com
 * Generated by: https://openapi-generator.tech
 * OpenAPI Generator version: 5.2.1
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

namespace OpenAPI\Client\Model;

use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;

/**
 * UsVerifications Class Doc Comment
 *
 * @category Class
 * @package  OpenAPI\Client
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<TKey, TValue>
 * @template TKey int|null
 * @template TValue mixed|null
 */
class UsVerifications implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $openAPIModelName = 'us_verifications';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'addresses' => '\OpenAPI\Client\Model\UsVerificationOrError[]',
        'errors' => 'bool'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      * @phpstan-var array<string, string|null>
      * @psalm-var array<string, string|null>
      */
    protected static $openAPIFormats = [
        'addresses' => null,
        'errors' => null
    ];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function openAPITypes()
    {
        return self::$openAPITypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function openAPIFormats()
    {
        return self::$openAPIFormats;
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'addresses' => 'addresses',
        'errors' => 'errors'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'addresses' => 'setAddresses',
        'errors' => 'setErrors'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'addresses' => 'getAddresses',
        'errors' => 'getErrors'
    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @return array
     */
    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @return array
     */
    public static function setters()
    {
        return self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @return array
     */
    public static function getters()
    {
        return self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName()
    {
        return self::$openAPIModelName;
    }

    /**
     * Associative array for storing property values
     *
     * @var mixed[]
     */
    protected $container = [];

    /**
     * Constructor
     *
     * @param mixed[] $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(array $data = null)
    {
        $this->container['addresses'] = $data['addresses'] ?? null;
        $this->container['errors'] = $data['errors'] ?? null;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = [];

        if (!method_exists($this, 'getId') || (!empty($this->getId()) && strpos($this->getId(), "fakeId") === False)) {
            if ($this->container['addresses'] === null) {
                $invalidProperties[] = "'addresses' can't be null";
            }
        }
        if (!method_exists($this, 'getId') || (!empty($this->getId()) && strpos($this->getId(), "fakeId") === False)) {
            if ($this->container['errors'] === null) {
                $invalidProperties[] = "'errors' can't be null";
            }
        }
        return $invalidProperties;
    }

    /**
     * Validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {
        return count($this->listInvalidProperties()) === 0;
    }

    /**
     * Gets addresses
     *
     * @return \OpenAPI\Client\Model\UsVerificationOrError[]
     */
    public function getAddresses()
    {
        return $this->container['addresses'];
    }

    /**
     * Sets addresses
     *
     * @param \OpenAPI\Client\Model\UsVerificationOrError[] $addresses addresses
     *
     * @return self
     */
    public function setAddresses($addresses)
    {
        $this->container['addresses'] = [];
        if ($addresses) {
            foreach ($addresses as $point) {
                $deserializedData = ObjectSerializer::deserialize($point, '\OpenAPI\Client\Model\UsVerificationOrError', []);

                array_push($this->container['addresses'], $deserializedData);
            }
        }

        return $this;
    }

    /**
     * Gets errors
     *
     * @return bool
     */
    public function getErrors()
    {
        return $this->container['errors'];
    }

    /**
     * Sets errors
     *
     * @param bool $errors Indicates whether any errors occurred during the verification process.
     *
     * @return self
     */
    public function setErrors($errors)
    {
        $this->container['errors'] = $errors;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param integer $offset Offset
     *
     * @return boolean
     */
    #[\ReturnTypeWillChange]
    public function offsetExists($offset)
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     *
     * @param integer $offset Offset
     *
     * @return mixed|null
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($offset)
    {
        return $this->container[$offset] ?? null;
    }

    /**
     * Sets value based on offset.
     *
     * @param int|null $offset Offset
     * @param mixed    $value  Value to be set
     *
     * @return void
     */
    #[\ReturnTypeWillChange]
    public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param integer $offset Offset
     */
    #[\ReturnTypeWillChange]
    public function offsetUnset($offset)
    {
        unset($this->container[$offset]);
    }

    /**
     * Serializes the object to a value that can be serialized natively by json_encode().
     * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
     *
     * @return mixed Returns data which can be serialized by json_encode(), which is a value
     * of any type other than a resource.
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
       return ObjectSerializer::sanitizeForSerialization($this);
    }

    /**
     * Gets the string presentation of the object
     *
     * @return string
     */
    public function __toString()
    {
        return json_encode(
            ObjectSerializer::sanitizeForSerialization($this),
            JSON_PRETTY_PRINT
        );
    }

    /**
     * Gets a header-safe presentation of the object
     *
     * @return string
     */
    public function toHeaderValue()
    {
        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }
}


text:
use Cwd;
use Carp;
use strict;
use Data::Dumper;
use utf8;
use Encode;
use warnings;
use diagnostics;
use open IO => ':encoding(utf8)';
use File::Basename;
use ElectricCommander;
use ElectricCommander::PropDB;
use ElectricCommander::PropMod qw(/myProject/libs);
use ChefHelper;
use File::Temp qw/ tempfile /;

$| = 1;

# -------------------------------------------------------------------------
# Main functions
# -------------------------------------------------------------------------

###########################################################################

=head2 main

  Title    : main
  Usage    : main();
  Function : Performs a Chef run
  Returns  : none
  Args     : named arguments: none
=cut

###########################################################################

sub main {
    my $ec = ElectricCommander->new();
    $ec->abortOnError(0);

    # -------------------------------------------------------------------------
    # Parameters
    # -------------------------------------------------------------------------
    my $knife_path =
      ( $ec->getProperty("knife_path") )->findvalue('//value')->string_value;
    my $node_data =
      ( $ec->getProperty("node_data") )->findvalue('//value')->string_value;
    my $additional_options =
      ( $ec->getProperty("additional_options") )->findvalue('//value')
      ->string_value;

    $ec->abortOnError(1);

    #Write to file
    my $dir      = cwd();
    my $fh       = tempfile();
    my $template = "nodedataXXXX";
    my $filename;
    ( $fh, $filename ) =
      tempfile( $template, SUFFIX => ".json", DIR => $dir, UNLINK => 1 );

    if ( $node_data && $node_data ne '' ) {
        open my $fh, '>', $filename or die "can't open $filename: $!";
        print $fh $node_data;
        close $fh;
    }

    #Variable that stores the command to be executed
    my $command = $knife_path . " node from file";

    my @cmd;
    my %props;

    #Prints procedure and parameters information
    my $pluginKey  = 'EC-Chef';
    my $xpath      = $ec->getPlugin($pluginKey);
    my $pluginName = $xpath->findvalue('//pluginVersion')->value;
    print "Using plugin $pluginKey version $pluginName\n";
    print "Running procedure EditNode\n";

    #Parameters are checked to see which should be included
    if ( $filename && $filename ne '' ) {
        $command = $command . " " . $filename;
    }

    if ( $additional_options && $additional_options ne '' ) {
        $command = $command . " " . $additional_options;
    }

    #Print out the command to be executed
    print "\nCommand to be executed: \n$command \n\n";

    #Execute the command
    system("$command");

    # To get exit code of process shift right by 8
    my $exitCode = $? >> 8;

    # Set outcome
    setOutcomeFromExitCode( $ec, $exitCode );
}

main();


text:
package org.wso2.am.integration.tests.other;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.json.JSONObject;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Factory;
import org.testng.annotations.Test;
import org.wso2.am.integration.test.utils.base.APIMIntegrationBaseTest;
import org.wso2.am.integration.test.utils.bean.*;
import org.wso2.am.integration.test.utils.clients.APIPublisherRestClient;
import org.wso2.am.integration.test.utils.clients.APIStoreRestClient;
import org.wso2.carbon.automation.engine.context.TestUserMode;
import org.wso2.carbon.automation.test.utils.http.client.HttpRequestUtil;
import org.wso2.carbon.automation.test.utils.http.client.HttpResponse;
import org.wso2.carbon.integration.common.admin.client.UserManagementClient;

import javax.ws.rs.core.Response;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;

import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;

public class APIScopeTestCase extends APIMIntegrationBaseTest {

    private static final Log log = LogFactory.getLog(APIScopeTestCase.class);

    private APIPublisherRestClient apiPublisher;

    private APIStoreRestClient apiStore;

    private UserManagementClient userManagementClient = null;

    private static final String API_NAME = "APIScopeTestAPI";

    private static final String API_VERSION = "1.0.0";

    private static final String APP_NAME = "NewApplication";

    private static final String USER_JOHN = "john";

    private static final String SUBSCRIBER_ROLE = "subscriber";

    private static String apiProvider;

    @Factory(dataProvider = "userModeDataProvider")
    public APIScopeTestCase(TestUserMode userMode) {
        this.userMode = userMode;
    }

    @BeforeClass(alwaysRun = true)
    public void setEnvironment() throws Exception {

        super.init(userMode);

        apiProvider = user.getUserName();

        String publisherURLHttp = getPublisherURLHttp();

        String storeURLHttp = getStoreURLHttp();

        apiPublisher = new APIPublisherRestClient(publisherURLHttp);

        apiStore = new APIStoreRestClient(storeURLHttp);
    }

    @Test(groups = {"wso2.am"}, description = "Testing the scopes with admin, subscriber roles")
    public void testSetScopeToResourceTestCase() throws Exception {

        userManagementClient = new UserManagementClient(keyManagerContext.getContextUrls().getBackEndUrl(),
                                                        keyManagerContext.getContextTenant().getContextUser().getUserName(),
                                                        keyManagerContext.getContextTenant().getContextUser().getPassword());

        // adding new role subscriber
        userManagementClient.addRole(SUBSCRIBER_ROLE, new String[]{}, new String[]{"/permission/admin/login",
                                                                                "/permission/admin/manage/api/subscribe"});

        // crating user john
        String userJohn;
        String gatewayUrl;
        if (keyManagerContext.getContextTenant().getDomain().equals("carbon.super")) {
            gatewayUrl = gatewayUrlsWrk.getWebAppURLNhttp();
            userJohn = USER_JOHN;
        } else {
            gatewayUrl = gatewayUrlsWrk.getWebAppURLNhttp() + "t/" + keyManagerContext.getContextTenant().getDomain() + "/";
            userJohn = USER_JOHN + "@" + keyManagerContext.getContextTenant().getDomain();
        }
        userManagementClient.addUser(USER_JOHN, "john123", new String[]{SUBSCRIBER_ROLE}, USER_JOHN);

        // Adding API
        String apiContext = "testScopeAPI";
        String tags = "thomas-bayer, testing, rest-Apis";
        String url = "http://www.thomas-bayer.com/sqlrest/";
        String description = "This is a test API created by API manager integration test";

        apiPublisher.login(publisherContext.getContextTenant().getContextUser().getUserName(),
                           publisherContext.getContextTenant().getContextUser().getPassword());
        APIRequest apiRequest = new APIRequest(API_NAME, apiContext, new URL(url));
        apiRequest.setTags(tags);
        apiRequest.setDescription(description);
        apiRequest.setVersion(API_VERSION);
        apiRequest.setProvider(apiProvider);
        apiPublisher.addAPI(apiRequest);

        //publishing API
        APILifeCycleStateRequest updateRequest = new APILifeCycleStateRequest(API_NAME, apiProvider,
                                                                              APILifeCycleState.PUBLISHED);
        apiPublisher.changeAPILifeCycleStatus(updateRequest);

        //resources are modified using swagger doc.
        // admin_scope(used for POST) :- admin
        // user_scope (used for GET) :- admin,subscriber
        String modifiedResource = "{\"paths\":{ \"/*\":{\"put\":{ \"responses\":{\"200\":{}},\"x-auth-type\":\"Application User\"," +
                                  "\"x-throttling-tier\":\"Unlimited\" },\"post\":{ \"responses\":{\"200\":{}},\"x-auth-type\":\"Application User\"," +
                                  "\"x-throttling-tier\":\"Unlimited\",\"x-scope\":\"admin_scope\"},\"get\":{ \"responses\":{\"200\":{}},\"x-auth-type\":\"Application User\"," +
                                  "\"x-throttling-tier\":\"Unlimited\",\"x-scope\":\"user_scope\"},\"delete\":{ \"responses\":{\"200\":{}},\"x-auth-type\":\"Application User\"," +
                                  "\"x-throttling-tier\":\"Unlimited\"},\"options\":{ \"responses\":{\"200\":{}},\"x-auth-type\":\"None\"," +
                                  "\"x-throttling-tier\":\"Unlimited\"}}},\"swagger\":\"2.0\",\"info\":{\"title\":\"APIScopeTestAPI\",\"version\":\"1.0.0\"}," +
                                  "\"x-wso2-security\":{\"apim\":{\"x-wso2-scopes\":[{\"name\":\"admin_scope\",\"description\":\"\",\"key\":\"admin_scope\",\"roles\":\"admin\"}," +
                                  "{\"name\":\"user_scope\",\"description\":\"\",\"key\":\"user_scope\",\"roles\":\"admin,subscriber\"}]}}}";

        apiPublisher.updateResourceOfAPI(apiProvider, API_NAME, API_VERSION, modifiedResource);

        // For Admin user
        // create new application and subscribing
        apiStore.login(storeContext.getContextTenant().getContextUser().getUserName(),
                       storeContext.getContextTenant().getContextUser().getPassword());
        apiStore.addApplication(APP_NAME, "Unlimited", "some_url", "NewApp");

        SubscriptionRequest subscriptionRequest = new SubscriptionRequest(API_NAME, apiProvider);
        subscriptionRequest.setApplicationName(APP_NAME);
        apiStore.subscribe(subscriptionRequest);

        //Generate production token and invoke with that
        APPKeyRequestGenerator generateAppKeyRequest = new APPKeyRequestGenerator(APP_NAME);
        String responseString = apiStore.generateApplicationKey(generateAppKeyRequest).getData();
        JSONObject jsonResponse = new JSONObject(responseString);

        // get Consumer Key and Consumer Secret
        String consumerKey = jsonResponse.getJSONObject("data").getJSONObject("key").getString("consumerKey");
        String consumerSecret = jsonResponse.getJSONObject("data").getJSONObject("key").getString("consumerSecret");

        URL tokenEndpointURL = new URL(gatewayUrlsWrk.getWebAppURLNhttp() + "token");
        String accessToken;
        Map<String, String> requestHeaders;
        HttpResponse response;
        URL endPointURL;
        String requestBody;
        JSONObject accessTokenGenerationResponse;

        //Obtain user access token for Admin
        requestBody = "grant_type=password&username=" + storeContext.getContextTenant().getContextUser().getUserName() +
                      "&password=" + storeContext.getContextTenant().getContextUser().getPassword() +
                      "&scope=admin_scope user_scope";

        response = apiStore.generateUserAccessKey(consumerKey, consumerSecret,
                                                  requestBody, tokenEndpointURL);
        accessTokenGenerationResponse = new JSONObject(response.getData());
        accessToken = accessTokenGenerationResponse.getString("access_token");

        requestHeaders = new HashMap<String, String>();
        requestHeaders.put("Authorization", "Bearer " + accessToken);

        // Accessing GET method
        response = HttpRequestUtil.doGet(gatewayUrl + "testScopeAPI/1.0.0/ITEM", requestHeaders);
        assertEquals(response.getResponseCode(), Response.Status.OK.getStatusCode(),
                     "Admin user cannot access the GET Method");

        // Accessing POST method
        endPointURL = new URL(gatewayUrl + "testScopeAPI/1.0.0/PRODUCT/35");
        response = HttpRequestUtil.doPost(endPointURL, "<resource><PRICE>8.5</PRICE></resource>", requestHeaders);
        assertEquals(response.getResponseCode(), Response.Status.OK.getStatusCode(),
                     "Admin user cannot access the POST Method");

        //Obtaining user access token for john
        requestBody = "grant_type=password&username=" + userJohn + "&password=john123&scope=admin_scope user_scope";
        accessTokenGenerationResponse = new JSONObject(apiStore.generateUserAccessKey(consumerKey, consumerSecret,
                                                                                requestBody, tokenEndpointURL)
                                                               .getData());
        accessToken = accessTokenGenerationResponse.getString("access_token");

        requestHeaders = new HashMap<String, String>();
        requestHeaders.put("Authorization", "Bearer " + accessToken);

        // Accessing GET method
        response = HttpRequestUtil.doGet(gatewayUrl + "testScopeAPI/1.0.0/ITEM", requestHeaders);
        assertEquals(response.getResponseCode(), Response.Status.OK.getStatusCode(),
                     "User John cannot access the GET Method");

        try {
            // Accessing POST method
            endPointURL = new URL(gatewayUrl + "testScopeAPI/1.0.0/PRODUCT/35");
            response = HttpRequestUtil.doPost(endPointURL, "<resource><PRICE>8.5</PRICE></resource>", requestHeaders);
            assertTrue(response.getResponseCode() != Response.Status.OK.getStatusCode(),
                       "testRole John can access the POST Method");

        } catch (Exception e) {
            log.error("user john cannot access the resources (expected behaviour)");
            assertTrue(true, "user john cannot access the resources");
        }
    }

    @AfterClass(alwaysRun = true)
    public void destroy() throws Exception {

        if (apiStore != null) {
            apiStore.removeApplication(APP_NAME);
        }

        if (apiPublisher != null) {
            apiPublisher.deleteAPI(API_NAME, API_VERSION, apiProvider);
        }

        if (userManagementClient != null) {
            userManagementClient.deleteUser(USER_JOHN);
            userManagementClient.deleteRole(SUBSCRIBER_ROLE);
        }
        super.cleanUp();
    }

    @DataProvider
    public static Object[][] userModeDataProvider() {
        return new Object[][]{
//                new Object[]{TestUserMode.SUPER_TENANT_ADMIN},
                new Object[]{TestUserMode.TENANT_ADMIN},
        };
    }
}


text:
package org.springframework.test.context.junit4.profile.annotation;

import org.junit.Test;
import org.junit.runner.RunWith;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.testfixture.beans.Employee;
import org.springframework.beans.testfixture.beans.Pet;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.AnnotationConfigContextLoader;

import static org.assertj.core.api.Assertions.assertThat;

/**
 * @author Sam Brannen
 * @since 3.1
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = { DefaultProfileConfig.class, DevProfileConfig.class }, loader = AnnotationConfigContextLoader.class)
public class DefaultProfileAnnotationConfigTests {

	@Autowired
	protected Pet pet;

	@Autowired(required = false)
	protected Employee employee;

	@Test
	public void pet() {
		assertThat(pet).isNotNull();
		assertThat(pet.getName()).isEqualTo("Fido");
	}

	@Test
	public void employee() {
		assertThat(employee).as("employee bean should not be created for the default profile").isNull();
	}

}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
Uses of Package de.l3s.boilerpipe.filters.english (1.0 API)
</TITLE>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=utf-8"

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Package
de.l3s.boilerpipe.filters.english

Packages that use de.l3s.boilerpipe.filters.english

de.l3s.boilerpipe.filters.english

The BoilerpipeFilters in this package have only been tested on English text.

Classes in de.l3s.boilerpipe.filters.english used by de.l3s.boilerpipe.filters.english

DensityRulesClassifier

          Classifies TextBlocks as content/not-content through rules that have
 been determined using the C4.8 machine learning algorithm, as described in the
 paper "Boilerplate Detection using Shallow Text Features", particularly using
 text densities and link densities.

IgnoreBlocksAfterContentFilter

          Marks all blocks as "non-content" that occur after blocks that have been
 marked TextBlockLabel.INDICATES_END_OF_TEXT.

KeepLargestFulltextBlockFilter

          Keeps the largest TextBlock only (by the number of words).

MinFulltextWordsFilter

          Keeps only those content blocks which contain at least k full-text words
 (measured by TextBlock#getNumFullTextWords()). k is 30 by default.

NumWordsRulesClassifier

          Classifies TextBlocks as content/not-content through rules that have
 been determined using the C4.8 machine learning algorithm, as described in
 the paper "Boilerplate Detection using Shallow Text Features" (WSDM 2010),
 particularly using number of words per block and link density per block.

TerminatingBlocksFinder

          Finds blocks which are potentially indicating the end of an article text and marks
 them with TextBlockLabel.INDICATES_END_OF_TEXT.

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes


text:
layout: post
title: 12.Mai 2017 - Exporo startet das Projekt 'Porta Nova'
laufzeit: 30 Monate
rendite: 5,5% p.a.
zinsfaelligkeit:  endfällig
categories: [abc, def]
canonical_url: https://schwarmanleger.de/blog/2017/05/12/Exporo-Porta-Nova.html
---

Die Plattform Exporo hat am 12.05.17 das Projekt 'Porta Nova' gestartet.

Bei dem Investmentangebot handelt es sich um ein Nachrangdarlehen für den Umbau eines Kasernengeländes in Triers zu einem Stadtquartier, bestehend aus 12 einzelnen Wohngebäuden, einem Appartmenthaus und einem Hotel.

Das Investment Porta Nova auf einen Blick:

Rendite: 5,5 % p.a. (endfällig) - Laufzeit: ca. 30 Monate (07.11.2019).

Pächter des Hotelgebäudes ist Holiday Inn Express, eine der weltweit größten Hotelketten.

Der Gesellschafter der Wagner Gruppe bürgt mit einer selbstschuldnerischen Bürgschaft über die Gesamtsumme der Exporo-Anleger zzgl. Zinsen.

Der Projektentwickler hat bereits Immobilien mit einem Volumen von über 1 Milliarde € umgesetzt.

    {% comment %}
    <button>SHARE</button>
    {% endcomment %}
    ZUR PROJEKTSEITE »


text:
package me.panpf.sketch.uri;

import android.content.Context;
import android.text.TextUtils;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import java.io.File;

import me.panpf.sketch.datasource.DataSource;
import me.panpf.sketch.datasource.FileDataSource;
import me.panpf.sketch.request.DownloadResult;

public class FileUriModel extends UriModel {

    public static final String SCHEME = "/";

    @Override
    protected boolean match(@NonNull String uri) {
        return !TextUtils.isEmpty(uri) && uri.startsWith(SCHEME);
    }

    @NonNull
    @Override
    public DataSource getDataSource(@NonNull Context context, @NonNull String uri, @Nullable DownloadResult downloadResult) {
        return new FileDataSource(new File(uri));
    }
}


text:
using System.Reflection;
using UnityEngine;

public class EditorController : MonoBehaviour, IController {

	IServices services;
	public IServices Services {
		get {
			return services;
		}
	}

    public GameObject GameObject { get { return gameObject; } }
    public MaterialStorage MaterialStorage { get { return GetComponent<MaterialStorage>(); } }

    void Start () {
		services = new EditorServices(this);
        replaceFactoriesWithEditorOnes();
        services.Init();
    }

	void Update () {
		services.Update();
	}

    void replaceFactoriesWithEditorOnes() {
        ViewService viewService = services.ViewService as ViewService;
        FieldInfo fieldInfo = viewService.GetType().GetField("factory", BindingFlags.Instance | BindingFlags.NonPublic);
        fieldInfo.SetValue(viewService, new EditorViewFactory(Services));
    }
}


text:
package interp

import (
	"fmt"
	"os"
)

func mkfifo(path string, mode uint32) error {
	return fmt.Errorf("unsupported")
}

// hasPermissionToDir is a no-op on Windows.
func hasPermissionToDir(info os.FileInfo) bool {
	return true
}


text:
.slider {
  display: inline-block;
  vertical-align: middle;
  position: relative;
}
.slider.slider-horizontal {
  width: 210px;
  height: 30px;
}
.slider.slider-horizontal .slider-track {
  height: 4px;
  width: 100%;
  margin-top: -2px;
  top: 50%;
  left: 0;
}
.slider.slider-horizontal .slider-selection {
  height: 100%;
  top: 0;
  bottom: 0;
}
.slider.slider-horizontal .slider-handle {
  margin-left: -15px;
  margin-top: -15px;
}
.slider.slider-horizontal .slider-handle.triangle {
  border-color: transparent;
  box-shadow: none;
  -webkit-box-shadow: none;
  border-width: 0 15px 15px 15px;
  width: 0;
  height: 0;
  border-bottom-color: #92cf5c;
  margin-top: 0;
}
.slider.slider-vertical {
  height: 210px;
  width: 30px;
}
.slider.slider-vertical .slider-track {
  width: 4px;
  height: 100%;
  margin-left: -2px;
  left: 50%;
  top: 0;
}
.slider.slider-vertical .slider-selection {
  width: 100%;
  left: 0;
  top: 0;
  bottom: 0;
}
.slider.slider-vertical .slider-handle {
  margin-left: -15px;
  margin-top: -15px;
}
.slider.slider-vertical .slider-handle.triangle {
  border-width: 15px 0 15px 15px;
  width: 1px;
  height: 1px;
  border-left-color: #fff;
  margin-left: 0;
}
.slider input {
  display: none;
}
.slider .tooltip-inner {
  white-space: nowrap;
}
.slider-track {
  position: absolute;
  cursor: pointer;
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 5px;
}
.slider-selection {
  position: absolute;
  background-color: #5dcff3;
  border: 1px solid #5dcff3;
  border-radius: 5px;
}
.slider-handle {
  position: absolute;
  width: 30px;
  height: 30px;
  background-color: #fff;
  border: 1px solid #eee;
  border-color: rgba(0,0,0,0.1);
  -webkit-box-shadow: 1px 1px 3px rgba(0,0,0,0.15);
  box-shadow: 1px 1px 3px rgba(0,0,0,0.15);
}
.slider-handle.round {
  border-radius: 30px;
}
.slider-handle.triangle {
  background: transparent none;
}


text:
using namespace std;
using namespace Scheduler;
using namespace Core;

Resource::Resource(const string& name) : p_res_type(ResourceStatic), p_name(name), p_str_val(), p_avail(RESC_UNSPECIFIED), p_max(RESC_INFINITY), p_assign(RESC_UNSPECIFIED) {}

Resource::~Resource() {}

void Resource::set_capacity(char *value)
  {
  if (is_num(value))
    {
    this->p_max = res_to_num(value);
    this->p_str_val = value;
    this->p_res_type = ResourceStatic;
    }
  else
    {
    this->p_max = RESC_UNSPECIFIED;
    this->p_avail = RESC_UNSPECIFIED;
    this->p_assign = RESC_UNSPECIFIED;
    this->p_str_val = value;
    this->p_res_type = ResourceString;
    }
  }

void Resource::set_avail(char *value)
  {
  if (is_num(value))
    {
    this->p_avail = res_to_num(value);
    this->p_max = RESC_UNSPECIFIED; // dynamic resources don't have capacity
    this->p_str_val = value;
    this->p_res_type = ResourceDynamic;
    }
  else
    {
    this->p_avail = 0;
    this->p_max = RESC_UNSPECIFIED;
    this->p_str_val = value;
    this->p_res_type = ResourceString;
    }
  }

void Resource::set_utilization(sch_resource_t value)
  {
  this->p_assign = value;
//  if (this->p_max == UNSPECIFIED)
//    this->p_max = 0;
  }

void Resource::set_utilization(char *value)
  {
  sch_resource_t val = res_to_num(value);
  this->set_utilization(val);
  }

void Resource::consume_resource(char *value)
  {
  sch_resource_t val = res_to_num(value);
  this->consume_resource(val);
  }

void Resource::consume_resource(sch_resource_t value)
  {
  this->p_assign += value;
  }

void Resource::freeup_resource(char *value)
  {
  sch_resource_t val = res_to_num(value);
  this->freeup_resource(val);
  }

void Resource::freeup_resource(sch_resource_t value)
  {
  this->p_assign -= value;
  }

void Resource::reset()
  {
  this->p_res_type = ResourceStatic;
  this->p_avail = RESC_UNSPECIFIED;
  this->p_max = RESC_UNSPECIFIED;
  this->p_assign = RESC_UNSPECIFIED;
  }

CheckResult Resource::check_numeric_fit(sch_resource_t amount)
  {
  if (this->p_max != RESC_INFINITY && this->p_max != RESC_UNSPECIFIED && this->p_max < amount) // there is a max and it's lower than the requested amount
    return CheckNonFit;

  if (this->p_max == RESC_UNSPECIFIED || this->p_max == RESC_INFINITY) // no max value present, only current
    {
    if (this->p_avail - this->p_assign >= amount)
      return CheckAvailable;
    else
      return CheckOccupied;
    }
  else // max value present
    {
    if (this->p_max - this->p_assign >= amount)
      return CheckAvailable;
    else
      return CheckOccupied;
    }
  }

CheckResult Resource::check_fit(char *value)
  {
  if (this->is_string()) // string resources work as properties
    {
    if (p_str_val != value)
      return CheckNonFit;
    else
      return CheckAvailable;
    }

  sch_resource_t amount = res_to_num(value);

  return this->check_numeric_fit(amount);
  }


text:
using System;

namespace Supermortal.OpenSource.Common.Models
{
    public class OauthTokenModel
    {
        public string AccessToken { get; set; }
        public string RefreshToken { get; set; }
        public string TokenType { get; set; }
        public DateTime? AccessTokenExpiry { get; set; }

        public bool? AccessTokenExpired
        {
            get
            {
                if (AccessTokenExpiry == null)
                    return null;

                return DateTime.UtcNow >= AccessTokenExpiry;
            }
        }

        public void UpdateYouTubeStorage(StorageModel sm)
        {
            sm.YouTubeAccessToken = AccessToken;
            sm.YouTubeTokenType = TokenType;
            sm.YouTubeRefreshToken = RefreshToken;
            sm.YouTubeAccessTokenExpiry = AccessTokenExpiry;
        }

        public void UpdateSoundCloudStorage(StorageModel sm)
        {
            sm.SoundCloudAccessToken = AccessToken;
            sm.SoundCloudTokenType = TokenType;
            sm.SoundCloudRefreshToken = RefreshToken;
            sm.SoundCloudAccessTokenExpiry = AccessTokenExpiry;
        }

        public void UpdateFacebookStorage(StorageModel sm)
        {
            sm.FacebookAccessToken = AccessToken;
            sm.FacebookTokenType = TokenType;
            sm.FacebookRefreshToken = RefreshToken;
            sm.FacebookAccessTokenExpiry = AccessTokenExpiry;
        }

        //public SCAccessToken ToSCAccessToken()
        //{
        //    return new SCAccessToken() { AccessToken = AccessToken, ExpiresIn = (DateTime)AccessTokenExpiry - DateTime.Now, RefreshToken = RefreshToken, Scope = SCScope.NonExpiring };
        //}
    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>The GNU C Library: Growing Objects</title>

<meta name="description" content="The GNU C Library: Growing Objects">
<meta name="keywords" content="The GNU C Library: Growing Objects">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Obstacks.html#Obstacks" rel="up" title="Obstacks">
<link href="Extra-Fast-Growing.html#Extra-Fast-Growing" rel="next" title="Extra Fast Growing">
<link href="Obstack-Functions.html#Obstack-Functions" rel="prev" title="Obstack Functions">

Next: Extra Fast Growing, Previous: Obstack Functions, Up: Obstacks   [Contents][Index]

3.2.4.6 Growing Objects

Because memory in obstack chunks is used sequentially, it is possible to
build up an object step by step, adding one or more bytes at a time to the
end of the object.  With this technique, you do not need to know how much
data you will put in the object until you come to the end of it.  We call
this the technique of growing objects.  The special functions
for adding data to the growing object are described in this section.

You don’t need to do anything special when you start to grow an object.
Using one of the functions to add data to the object automatically
starts it.  However, it is necessary to say explicitly when the object is
finished.  This is done with the function obstack_finish.

The actual address of the object thus built up is not known until the
object is finished.  Until then, it always remains possible that you will
add so much data that the object must be copied into a new chunk.

While the obstack is in use for a growing object, you cannot use it for
ordinary allocation of another object.  If you try to do so, the space
already added to the growing object will become part of the other object.

Function: void obstack_blank (struct obstack *<var>obstack-ptr</var>, int <var>size</var>)

Preliminary:
| MT-Safe race:obstack-ptr
| AS-Safe
| AC-Unsafe corrupt mem
| See POSIX Safety Concepts.

The most basic function for adding to a growing object is
obstack_blank, which adds space without initializing it.

Function: void obstack_grow (struct obstack *<var>obstack-ptr</var>, void *<var>data</var>, int <var>size</var>)

Preliminary:
| MT-Safe race:obstack-ptr
| AS-Safe
| AC-Unsafe corrupt mem
| See POSIX Safety Concepts.

To add a block of initialized space, use obstack_grow, which is
the growing-object analogue of obstack_copy.  It adds <var>size</var>
bytes of data to the growing object, copying the contents from
<var>data</var>.

Function: void obstack_grow0 (struct obstack *<var>obstack-ptr</var>, void *<var>data</var>, int <var>size</var>)

Preliminary:
| MT-Safe race:obstack-ptr
| AS-Safe
| AC-Unsafe corrupt mem
| See POSIX Safety Concepts.

This is the growing-object analogue of obstack_copy0.  It adds
<var>size</var> bytes copied from <var>data</var>, followed by an additional null
character.

Function: void obstack_1grow (struct obstack *<var>obstack-ptr</var>, char <var>c</var>)

Preliminary:
| MT-Safe race:obstack-ptr
| AS-Safe
| AC-Unsafe corrupt mem
| See POSIX Safety Concepts.

To add one character at a time, use the function obstack_1grow.
It adds a single byte containing <var>c</var> to the growing object.

Function: void obstack_ptr_grow (struct obstack *<var>obstack-ptr</var>, void *<var>data</var>)

Preliminary:
| MT-Safe race:obstack-ptr
| AS-Safe
| AC-Unsafe corrupt mem
| See POSIX Safety Concepts.

Adding the value of a pointer one can use the function
obstack_ptr_grow.  It adds sizeof (void *) bytes
containing the value of <var>data</var>.

Function: void obstack_int_grow (struct obstack *<var>obstack-ptr</var>, int <var>data</var>)

Preliminary:
| MT-Safe race:obstack-ptr
| AS-Safe
| AC-Unsafe corrupt mem
| See POSIX Safety Concepts.

A single value of type int can be added by using the
obstack_int_grow function.  It adds sizeof (int) bytes to
the growing object and initializes them with the value of <var>data</var>.

Function: void * obstack_finish (struct obstack *<var>obstack-ptr</var>)

Preliminary:
| MT-Safe race:obstack-ptr
| AS-Safe
| AC-Unsafe corrupt
| See POSIX Safety Concepts.

When you are finished growing the object, use the function
obstack_finish to close it off and return its final address.

Once you have finished the object, the obstack is available for ordinary
allocation or for growing another object.

This function can return a null pointer under the same conditions as
obstack_alloc (see Allocation in an Obstack).

When you build an object by growing it, you will probably need to know
afterward how long it became.  You need not keep track of this as you grow
the object, because you can find out the length from the obstack just
before finishing the object with the function obstack_object_size,
declared as follows:

Function: int obstack_object_size (struct obstack *<var>obstack-ptr</var>)

Preliminary:
| MT-Safe race:obstack-ptr
| AS-Safe
| AC-Safe
| See POSIX Safety Concepts.

This function returns the current size of the growing object, in bytes.
Remember to call this function before finishing the object.
After it is finished, obstack_object_size will return zero.

If you have started growing an object and wish to cancel it, you should
finish it and then free it, like this:

obstack_free (obstack_ptr, obstack_finish (obstack_ptr));

This has no effect if no object was growing.

You can use obstack_blank with a negative size argument to make
the current object smaller.  Just don’t try to shrink it beyond zero
length—there’s no telling what will happen if you do that.

Next: Extra Fast Growing, Previous: Obstack Functions, Up: Obstacks   [Contents][Index]


text:
package dagger.android.support;

import android.support.v4.app.Fragment;
import dagger.Module;
import dagger.android.AndroidInjectionModule;
import dagger.android.AndroidInjector;
import dagger.internal.Beta;
import dagger.multibindings.Multibinds;
import java.util.Map;

/**
 * Configures bindings to ensure the usability of {@code dagger.android} and {@code
 * dagger.android.support} framework classes. This module should be installed in the root-most
 * component which will use these types.
 */
@Beta
@Module(includes = AndroidInjectionModule.class)
public abstract class AndroidSupportInjectionModule {
  @Multibinds
  abstract Map<Class<? extends Fragment>, AndroidInjector.Factory<? extends Fragment>>
      supportFragmentInjectorFactories();

  private AndroidSupportInjectionModule() {}
}


text:
package navis.transportation.support;

public interface ItfPointAccess {
	/**
	 * @return true if elevation data is stored
	 */
	boolean is3D();

	int getDimension();

	/**
	 * This methods sets the latitude, longitude and elevation to the specified value.
	*/
	void setNode( int nodeId, double lat, double lon );

	void setNode( int nodeId, double lat, double lon, double ele );

	/**
	 * @param nodeId
	 * @return latitude of the specified node
	 */
	double getLatitude( int nodeId );

	/**
	 * @param nodeId
	 * @return longtitude of the specified node
	 */
	double getLongtitude( int nodeId );

	/**
	 * @param nodeId
	 * @return elevation of the specified node
	 */
	double getElevation( int nodeId );
}


text:
package com.baolian.entity.map.comp;

import com.baolian.entity.map.TopAliasResult;

import java.util.Comparator;

/**
 * 门户评分比较器
 * Created by tomxie on 2017/5/10 15:19.
 */
public class TopAliasComparator implements Comparator<TopAliasResult> {
    @Override
    public int compare(TopAliasResult o1, TopAliasResult o2) {
        return -o1.getQoe().compareTo(o2.getQoe());
    }
}


text: {{ include.description }}


text:
Kode Barang

            Jenis Barang

            Kode Barang

            Digunakan Untuk

            Stok Minimum

            Harga

            Satuan

            Keterangan

            <form role="form">

                 <select class="form-control form-purchase">
                    <option>Ban</option>
                    <option>Suku Cadang</option>
                    <option>3</option>
                    <option>4</option>
                    <option>5</option>
                </select>

                <input type="text" class="form-control form-purchase" placeholder="Kode Supplier" style=>

                <input type="text" class="form-control form-purchase" placeholder="Digunakan Untuk" style=>

                <input type="text" class="form-control form-purchase" placeholder="Stock Minimum" style=>

                <input type="text" class="form-control form-purchase" placeholder="Harga">

                <input type="text" class="form-control form-purchase" placeholder="Satuan">

                <textarea></textarea>

        </form>

<button type="button" class="btn btn-primary pull-right">Tambah</button>

                    No.
                    Kode Barang
                    Nama Barang
                    Harga
                    Stock Minimum
                    Keterangan
                    Action

                        <button type="button" class="btn btn-outline btn-primary">
                            Edit
                        </button><button type="button" class="btn btn-outline btn-primary">Delete</button>

        <button type="button" class="btn btn-primary pull-right">Update</button>


text:
<?xml version="1.0" encoding="utf-8" ?>
<INTERACTIONS>
<INTERACTION>
<SOURCE>
<CLINICAL_SOURCE>ANSM</CLINICAL_SOURCE>
<SOURCE_FILE>454-RIFABUTIN.html
</SOURCE_FILE>
</SOURCE>
<DRUG1>
<DRUG name="RIFABUTIN" rxcui="55672">
<ATC code="J04AB04" />
</DRUG>
</DRUG1>
<DRUG2>
<DRUG name="ATOVAQUONE" rxcui="60212">
<ATC code="P01AX06" />
</DRUG>
</DRUG2>
<DESCRIPTION>Moderate decrease of the plasma concentrations of atovaquone by the enzymatic inducer</DESCRIPTION>
<SEVERITY>Take into account</SEVERITY>
</INTERACTION>
<INTERACTION>
<SOURCE>
<CLINICAL_SOURCE>ANSM</CLINICAL_SOURCE>
<SOURCE_FILE>454-RIFABUTIN.html
</SOURCE_FILE>
</SOURCE>
<DRUG1>
<DRUG name="RIFABUTIN" rxcui="55672">
<ATC code="J04AB04" />
</DRUG>
</DRUG1>
<DRUG2>
<DRUG name="CLARITHROMYCIN" rxcui="21212">
<ATC code="J01FA09" />
</DRUG>
</DRUG2>
<DESCRIPTION>Risk of increase of the undesirable effects of the rifabutin (uveitis) due to increase of its concentrations and of those of its active metabolite by the clarithromycin. In addition, increase of the metabolism of the clarithromycin by the rifabutin, with increase of the concentrations of its active metabolite</DESCRIPTION>
<SEVERITY>Precaution for use</SEVERITY>
<COMMENT>Regular clinical and biological monitoring, especially at the beginning of the administration of the two medications together.</COMMENT>
</INTERACTION>
<INTERACTION>
<SOURCE>
<CLINICAL_SOURCE>ANSM</CLINICAL_SOURCE>
<SOURCE_FILE>454-RIFABUTIN.html
</SOURCE_FILE>
</SOURCE>
<DRUG1>
<DRUG name="RIFABUTIN" rxcui="55672">
<ATC code="J04AB04" />
</DRUG>
</DRUG1>
<DRUG2>
<DRUG name="COBICISTAT" rxcui="1306284">
<ATC code="J05AR09" />
</DRUG>
</DRUG2>
<DESCRIPTION>Very large increase of the metabolite of the rifabutin, with risk of increase of its toxicity (uveitis, neutropenia). Furthermore, possible decrease of the concentrations of cobicistat</DESCRIPTION>
<SEVERITY>Precaution for use</SEVERITY>
<COMMENT>Adjustment of the dosage of the rifabutin (in principle, reduction of the doses by half). </COMMENT>
</INTERACTION>
<INTERACTION>
<SOURCE>
<CLINICAL_SOURCE>ANSM</CLINICAL_SOURCE>
<SOURCE_FILE>454-RIFABUTIN.html
</SOURCE_FILE>
</SOURCE>
<DRUG1>
<DRUG name="RIFABUTIN" rxcui="55672">
<ATC code="J04AB04" />
</DRUG>
</DRUG1>
<DRUG2>
<DRUG name="EFAVIRENZ" rxcui="195085">
<ATC code="J05AR06" />
</DRUG>
</DRUG2>
<DESCRIPTION>Decrease of the concentrations of rifabutin by about half, due to increase of its hepatic metabolism by the efavirenz </DESCRIPTION>
<SEVERITY>Precaution for use</SEVERITY>
<COMMENT>Adjustment of the dosage of the rifabutin during the treatment with efavirenz.</COMMENT>
</INTERACTION>
<INTERACTION>
<SOURCE>
<CLINICAL_SOURCE>ANSM</CLINICAL_SOURCE>
<SOURCE_FILE>454-RIFABUTIN.html
</SOURCE_FILE>
</SOURCE>
<DRUG1>
<DRUG name="RIFABUTIN" rxcui="55672">
<ATC code="J04AB04" />
</DRUG>
</DRUG1>
<DRUG2>
<DRUG name="ELVITEGRAVIR" rxcui="1306286">
<ATC code="J05AR09" />
</DRUG>
</DRUG2>
<DESCRIPTION>Decrease of the minimal concentrations of elvitegravir</DESCRIPTION>
<SEVERITY>Take into account</SEVERITY>
</INTERACTION>
<INTERACTION>
<SOURCE>
<CLINICAL_SOURCE>ANSM</CLINICAL_SOURCE>
<SOURCE_FILE>454-RIFABUTIN.html
</SOURCE_FILE>
</SOURCE>
<DRUG1>
<DRUG name="RIFABUTIN" rxcui="55672">
<ATC code="J04AB04" />
</DRUG>
</DRUG1>
<DRUG2>
<DRUG name="FLUCONAZOLE" rxcui="4450">
<ATC code="J02AC01" />
</DRUG>
</DRUG2>
<DESCRIPTION>Risk of increase of the undesirable effects of the rifabutin (uveitis), due to increase of its concentrations and of those of its active metabolite</DESCRIPTION>
<SEVERITY>Precaution for use</SEVERITY>
<COMMENT>Regular clinical and biological monitoring, especially at the beginning of the treatment with the two medications together. </COMMENT>
</INTERACTION>
<INTERACTION>
<SOURCE>
<CLINICAL_SOURCE>ANSM</CLINICAL_SOURCE>
<SOURCE_FILE>454-RIFABUTIN.html
</SOURCE_FILE>
</SOURCE>
<DRUG1>
<DRUG name="RIFABUTIN" rxcui="55672">
<ATC code="J04AB04" />
</DRUG>
</DRUG1>
<DRUG2>
<CLASS name="THYROID HORMONES" code="H03AA" /></DRUG2>
<DESCRIPTION>Described for phenytoin, rifampicin, and carbamazepine. Risk of clinical hypothyroidism in patients with low thyroid, due to increase of the metabolism of the T3 and T4</DESCRIPTION>
<SEVERITY>Precaution for use</SEVERITY>
<COMMENT>Monitoring of serum concentrations of T3 and of T4 and adjustment, if needed, of the dosage of the thyroid hormones during the treatment with rifabutin and after it is stopped.</COMMENT>
</INTERACTION>
<INTERACTION>
<SOURCE>
<CLINICAL_SOURCE>ANSM</CLINICAL_SOURCE>
<SOURCE_FILE>454-RIFABUTIN.html
</SOURCE_FILE>
</SOURCE>
<DRUG1>
<DRUG name="RIFABUTIN" rxcui="55672">
<ATC code="J04AB04" />
</DRUG>
</DRUG1>
<DRUG2>
<CLASS name="RITONAVIR BOOSTED PROTEASE INHIBITORS" code="J05AE-002" /></DRUG2>
<DESCRIPTION>Risk of reduction of the effectiveness of the protease inhibitor (even more so when the dosage of the rifabutin is large) for one thing, and risk of increase of the undesirable effects (uveitis) of the rifabutin for another. </DESCRIPTION>
<SEVERITY>Precaution for use</SEVERITY>
<COMMENT>Regular clinical and biological monitoring, especially at the beginning of the administration of the substances together. </COMMENT>
</INTERACTION>
<INTERACTION>
<SOURCE>
<CLINICAL_SOURCE>ANSM</CLINICAL_SOURCE>
<SOURCE_FILE>454-RIFABUTIN.html
</SOURCE_FILE>
</SOURCE>
<DRUG1>
<DRUG name="RIFABUTIN" rxcui="55672">
<ATC code="J04AB04" />
</DRUG>
</DRUG1>
<DRUG2>
<DRUG name="POSACONAZOLE" rxcui="282446">
<ATC code="J02AC04" />
</DRUG>
</DRUG2>
<DESCRIPTION>Risk of increase of the undesirable effects of the rifabutin (uveitis), due to increase of its concentrations and of those of its active metabolite</DESCRIPTION>
<SEVERITY>Not recommended</SEVERITY>
<COMMENT>Regular clinical and biological monitoring, especially at the beginning of the administration of the medications together. </COMMENT>
</INTERACTION>
<INTERACTION>
<SOURCE>
<CLINICAL_SOURCE>ANSM</CLINICAL_SOURCE>
<SOURCE_FILE>454-RIFABUTIN.html
</SOURCE_FILE>
</SOURCE>
<DRUG1>
<DRUG name="RIFABUTIN" rxcui="55672">
<ATC code="J04AB04" />
</DRUG>
</DRUG1>
<DRUG2>
<DRUG name="VORICONAZOLE" rxcui="121243">
<ATC code="J02AC03" />
</DRUG>
</DRUG2>
<DESCRIPTION>Decrease of the plasma concentrations of the voriconazole with risk of loss of effectiveness, due to increase of its hepatic metabolism by the rifabutin for one thing; and risk of increase of the undesirable effects (uveitis) of the rifabutin for another</DESCRIPTION>
<SEVERITY>Not recommended</SEVERITY>
<COMMENT>If the administration of these substances together is judged necessary, clinical monitoring and adjustment of the dosage of the voriconazole (generally doubled) during the treatment with the rifabutin. </COMMENT>
</INTERACTION>
</INTERACTIONS>


text:
package pipes.editing;

import java.util.Stack;

import pipes.editing.actions.EditAction;

/**
 * Maintains a history of changes made to a Tune, for purposes of navigating the changes using Undo and Redo commands.
 *
 */
public class TuneEditHistory {

	/**
	 * @return true if there are EditActions in the history.
	 */
	public boolean canUndo() {
		return !undoActions.isEmpty();
	}

	/**
	 * @return true if there are previously undone EditActions that can be redone; ie after the user has hit Undo but before changes have been made.
	 */
	public boolean canRedo() {
		return !redoActions.isEmpty();
	}

	/**
	 * Adds an EditAction to the history.
	 * This clears out Redo stack. It is assumed at this point that "action" has already been executed.
	 */
	public void addToHistory(EditAction action) {
		undoActions.add(action);
		redoActions.clear();
	}

	/**
	 * Pulls out the most recent EditAction in the history. It is assumed that this action is then Undone, so it is pushed onto the Redo stack.
	 * @return the most recent EditAction in the history
	 */
	public EditAction pullFromUndoHistory() {
		EditAction undoAction = undoActions.pop();
		redoActions.push(undoAction);
		return undoAction;
	}

	/**
	 * @return the most recently Undone EditAction
	 */
	public EditAction pullFromRedoHistory() {
		EditAction redoAction = redoActions.pop();
		undoActions.push(redoAction);
		return redoAction;
	}

	/**
	 * Empties all Undo and Redo history.
	 */
	public void clear() {
		undoActions.clear();
		redoActions.clear();
	}

	public TuneEditHistory() {
		undoActions = new Stack<EditAction>();
		redoActions = new Stack<EditAction>();
	}

	/**
	 * EditActions that have been executed and so can be undone.
	 */
	private Stack<EditAction> undoActions;

	/**
	 * EditActions that have been undone and so can be re-executed.
	 */
	private Stack<EditAction> redoActions;
}


text:
~/fedora-installs/utilities/update-utilities.sh

eclipse_plugin_url="http://first.wpi.edu/FRC/roborio/release/eclipse/"

if [[ -d "${HOME}/wpilib" ]]; then
    echo ""
	echo "Uninstalling WPILib libraries ..."
	rm -rf ~/wpilib
fi

echo ""
echo "Uninstalling WPILib plugins from Eclipse ..."
eclipse -application org.eclipse.equinox.p2.director -repository ${eclipse_plugin_url} -uninstallIU edu.wpi.first.wpilib.plugins.java.feature.feature.group > /dev/null
#
# Install latest WPILib
#
echo "Installing latest WPILib plugins into Eclipse"
eclipse -application org.eclipse.equinox.p2.director -repository ${eclipse_plugin_url} -installIU edu.wpi.first.wpilib.plugins.java.feature.feature.group
if [[ ! -d "${HOME}/wpilib" ]]; then
    echo ""
	echo "Open Eclipse and create new robot project to complete installatin of WPILib libraries."
    echo ""
fi

#
# Install latest Strongback
#
~/fedora-installs/utilities/strongback install


text:
The goals / steps of this project are the following:

* Compute the camera calibration matrix and distortion coefficients given a set of chessboard images.
* Apply a distortion correction to raw images.
* Use color transforms, gradients, etc., to create a thresholded binary image.
* Apply a perspective transform to rectify binary image ("birds-eye view").
* Detect lane pixels and fit to find the lane boundary.
* Determine the curvature of the lane and vehicle position with respect to center.
* Warp the detected lane boundaries back onto the original image.
* Output visual display of the lane boundaries and numerical estimation of lane curvature and vehicle position.

[//]: # (Image References)

[image1]: ./output/calibration.png "Camera calibration"
[image2]: ./output/undistort.png "Undistort example"
[image3]: ./output/unwarped.png "Perspective transform"
[image4]: ./output/sobelx.png "Gradient thresholding"
[image5]: ./output/yellow_white_mask.png "Color thresholding"
[image6]: ./output/pipeline.png "Pipeline example"
[image7]: ./output/pipeline_histogram.png "Histogram"
[image8]: ./output/sliding_window.png "Sliding window and polyfit"
[image9]: ./output/overlay.png "Overlay, Final output"
[video1]: ./output/project_video_out.mp4 "Video"

### [Rubric](https://review.udacity.com/#!/rubrics/571/view) Points
#### Here I will consider the rubric points individually and describe how I addressed each point in my implementation.

---

### Writeup / README

#### 1. Provide a Writeup / README that includes all the rubric points and how you addressed each one.  You can submit your writeup as markdown or pdf.

You're reading it!

### Camera Calibration

#### 1. Briefly state how you computed the camera matrix and distortion coefficients. Provide an example of a distortion corrected calibration image.

The code for this step is contained in `Camera Calibration` section of the IPython notebook `P4 - Data Analysis`.

I start by preparing "object points", which will be the (x, y, z) coordinates of the chessboard corners in the world. Here I am assuming the chessboard is fixed on the (x, y) plane at z=0, such that the object points are the same for each calibration image.  Thus, `objp` is just a replicated array of coordinates, and `objpoints` will be appended with a copy of it every time I successfully detect all chessboard corners in a test image.  `imgpoints` will be appended with the (x, y) pixel position of each of the corners in the image plane with each successful chessboard detection.

I then used the output `objpoints` and `imgpoints` to compute the camera calibration and distortion coefficients using the `cv2.calibrateCamera()` function.  I applied this distortion correction to the test image using the `cv2.undistort()` function and obtained this result:

##### Camera calibration
![alt text][image1]

### Pipeline (single images)

#### 1. Provide an example of a distortion-corrected image.

##### Distortion correction example
![alt text][image2]

#### 2. Describe how (and identify where in your code) you performed a perspective transform and provide an example of a transformed image.

Refer to `section 3` of the IPython notebook `P4 - Data Analysis` for the implementation of perspective transform.  I chose the hardcode the source and destination points in the following manner:

```
# source points
top_left = (588, 454)
top_right = (692, 454)
bottom_left = (203, 720)
bottom_right = (1105, 720)

src = np.float32([top_right,
                  bottom_right,
                  bottom_left,
                  top_left])

# desired destination
dst_top_left = (200, 0)
dst_top_right = (1000, 0)
dst_bottom_right = (1000, 720)
dst_bottom_left = (200, 720)

dst = np.float32([dst_top_right,
                  dst_bottom_right,
                  dst_bottom_left,
                  dst_top_left])
```

I verified that my perspective transform was working as expected by drawing the `src` and `dst` points onto a test image and its warped counterpart to verify that the lines appear parallel in the warped image.

![alt text][image3]

#### 3. Describe how (and identify where in your code) you used color transforms, gradients or other methods to create a thresholded binary image.  Provide an example of a binary image result.

Based on various color and gradient transformations on test images (refer to `section 4` and `section 5` in the IPython notebook `P4 - Data Analysis`), identified a combination of the SobelX gradient, Yellow and White color transformations for the pipeline (refer to `section 6` in the IPython notebook `P4 - Data Analysis`)

##### Gradient thresholding example
![alt text][image4]

##### Yellow and White color masking example
![alt text][image5]

##### Pipeline example
![alt text][image6]

#### 4. Describe how (and identify where in your code) you identified lane-line pixels and fit their positions with a polynomial?

Using histogram of the pipeline image and sliding window approach (refer to section 8 in the IPython notebook `P4 - Data Analysis`), I was able to identify and fit my lane lines with a 2nd order polynomial.

##### Histogram of the pipeline image
![alt text][image7]

##### Sliding window and 2nd order polyfit
![alt text][image8]

#### 5. Describe how (and identify where in your code) you calculated the radius of curvature of the lane and the position of the vehicle with respect to center.

Refer to `sections 8.3 - 8.5` in the IPython notebook `P4 - Data Analysis` for the calculation of radius curvature and the position of the vehicle with respect to the center of the lane.

#### 6. Provide an example image of your result plotted back down onto the road such that the lane area is identified clearly.

Refer to `section 8.7` in the IPython notebook `P4 - Data Analysis`.  Here is an example of my result on a test image:

![alt text][image9]

---

### Pipeline (video)

##### Provide a link to your final video output.  Your pipeline should perform reasonably well on the entire project video (wobbly lines are ok but no catastrophic failures that would cause the car to drive off the road!).

* Project video : Here's a [link to the project video result](./output/project_video_out.mp4), also available [here at youtube](https://youtu.be/wzrTNAlSwtM).
* Challenge video : Here is a [link to the challenge video result](./output/challenge_video_out.mp4). Please note that this is still a work-in-progress.

---

### References

#### 1. [P4 - Data Analysis](./P4 - Data Analysis.ipynb)
#### 2. [P4 - Project](./P4 - Project.ipynb)

---
### Discussion

##### Briefly discuss any problems / issues you faced in your implementation of this project.  Where will your pipeline likely fail?  What could you do to make it more robust?

* One of the biggest challenge was to come up with color/gradient tranform thresholds that works well for different road conditions (shadows, contrast and poor visibility of the lane).
* Current implementation of the Pipeline, works reasonably well for straightforward usecases (clear lane lines for the most part) and is not robust or challenging road conditions.
* Also, the current implementation is based on 2nd order poly fit, this could be a limitation on challenging road conditions like steep curves for example.
* It would be interesting to explore if higher order poly fit could be tried to handle more challenging road conditions.


text:
package exit

import "os"

var atexitFuncs []func()

// AtExit registers a function f that will be run when exit is called. The
// handlers so registered will be called the in reverse order of their
// registration.
func AtExit(f func()) {
	atexitFuncs = append(atexitFuncs, f)
}

// Exit calls all AtExit handlers before exiting the process with status.
func Exit(status int) {
	for i := len(atexitFuncs) - 1; i >= 0; i-- {
		f := atexitFuncs[i]
		f()
	}
	os.Exit(status)
}


text:
define(['./forOwn'], function (forOwn) {

    /**
     * checks if a object contains all given properties/values
     */
    function matches(target, props){
	// can't use "object/every" because of circular dependency
	var result = true;
	forOwn(props, function(val, key){
	    if (target[key] !== val) {
		// break loop at first difference
		return (result = false);
	    }
	});
	return result;
    }

    return matches;

});


text:
package org.guvnor.ala.runtime.base;

import java.util.Objects;
import org.guvnor.ala.config.RuntimeConfig;
import org.guvnor.ala.runtime.RuntimeInfo;

/*
 * BaseRuntimeInfo implementation to be extended by each Runtime Provider
*/
public class BaseRuntimeInfo implements RuntimeInfo {

    private RuntimeConfig config;

    /*
     * No-args constructor for enabling marshalling to work, please do not remove.
    */
    public BaseRuntimeInfo() {
    }

    public BaseRuntimeInfo( RuntimeConfig config ) {

        this.config = config;
    }

    @Override
    public RuntimeConfig getConfig() {
        return config;
    }

    @Override
    public String toString() {
        return "RuntimeInfo{ config=" + config + '}';
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 67 * hash + Objects.hashCode( this.config );
        return hash;
    }

    @Override
    public boolean equals( Object obj ) {
        if ( this == obj ) {
            return true;
        }
        if ( obj == null ) {
            return false;
        }
        if ( getClass() != obj.getClass() ) {
            return false;
        }
        final BaseRuntimeInfo other = ( BaseRuntimeInfo ) obj;
        if ( !Objects.equals( this.config, other.config ) ) {
            return false;
        }
        return true;
    }

}