text:
untilEachRight

Until a test condition is true, invoke a function for each element in a collection, iterating from right to left.

Usage

var untilEachRight = require( '@stdlib/utils/until-each-right' );

untilEachRight( collection, predicate, fcn[, thisArg ] )

Invokes a function for each element in a collection, iterating from right to left, until either a predicate function returns true or the function has iterated over all collection elements.

function predicate( value ) {
    return ( value !== value );
}

function log( value, index ) {
    console.log( '%s: %d', index, value );
}

var arr = [ 1, NaN, 2, 3, 4 ];

untilEachRight( arr, predicate, log );
/* =>
    4: 4
    3: 3
    2: 2
*/

Both the predicate function and the function to apply are provided three arguments:

value: collection element

index: collection index

collection: input collection

Basic support for dynamic collections is provided. Note, however, that index incrementation is not guaranteed to be monotonically decreasing.

var arr = [ 1, 2, 3, 4 ];
var i = 0;

function predicate( value ) {
    return ( value !== value );
}

function log1( value, index, collection ) {
    console.log( '%s: %d', index, value );
    i += 1;
    if ( index === 0 && collection.length < 10 ) {
        collection.unshift( i+1 );
    }
}

untilEachRight( arr, predicate, log1 );
/* =>
    3: 4
    2: 3
    1: 2
    0: 1
    0: 5
    0: 6
    0: 7
    0: 8
    0: 9
    0: 10
*/

function log2( value, index, collection ) {
    console.log( '%s: %d', index, value );
    collection.pop();
}

arr = [ 1, 2, 3, 4 ];

untilEachRight( arr, predicate, log2 );
/* =>
    3: 4
    1: 2
*/

To set the function execution context for the applied function, provide a thisArg.

function predicate( value ) {
    return ( value !== value );
}

function sum( value ) {
    this.sum += value;
    this.count += 1;
}

var arr = [ 1, NaN, 2, 3, 4 ];

var context = {
    'sum': 0,
    'count': 0
};

untilEachRight( arr, predicate, sum, context );

var mean = context.sum / context.count;
// returns 3.0

Notes

A collection may be either an Array, Typed Array, or an array-like Object (excluding strings and functions).

The function returns the input collection.

The function does not skip undefined elements.

function predicate( value ) {
    return ( value !== value );
}

function log( value, index ) {
    console.log( '%s: %s', index, value );
}

var arr = [ 1, , , 4 ];

untilEachRight( arr, predicate, log );
/* =>
    3: 4
    2: undefined
    1: undefined
    0: 1
*/

The function provides limited support for dynamic collections (i.e., collections whose length changes during execution).

Examples

var isEven = require( '@stdlib/assert/is-even' ).isPrimitive;
var randu = require( '@stdlib/random/base/randu' );
var floor = require( '@stdlib/math/base/special/floor' );
var untilEachRight = require( '@stdlib/utils/until-each-right' );

var arr;
var i;
var j;

function predicate( value ) {
    return ( value !== value );
}

function log( value, index, collection ) {
    console.log( '%s: %d', index, value );
    i += 1;
    if ( isEven( i ) ) {
        collection.pop();
    } else {
        collection.unshift( i+1 );
    }
}

arr = new Array( 100 );
j = floor( randu()*arr.length );
for ( i = arr.length-1; i >= 0; i-- ) {
    if ( i === j ) {
        arr[ i ] = NaN;
    } else {
        arr[ i ] = i;
    }
}

i = 0;
untilEachRight( arr, predicate, log );

See Also

@stdlib/utils/until-each: until a test condition is true, invoke a function for each element in a collection.

@stdlib/utils/while-each-right: while a test condition is true, invoke a function for each element in a collection, iterating from right to left.


text:
package envoy_admin_v2alpha

import (
	"bytes"
	"errors"
	"fmt"
	"net"
	"net/mail"
	"net/url"
	"regexp"
	"strings"
	"time"
	"unicode/utf8"

	"github.com/gogo/protobuf/types"
)

// ensure the imports are used
var (
	_ = bytes.MinRead
	_ = errors.New("")
	_ = fmt.Print
	_ = utf8.UTFMax
	_ = (*regexp.Regexp)(nil)
	_ = (*strings.Reader)(nil)
	_ = net.IPv4len
	_ = time.Duration(0)
	_ = (*url.URL)(nil)
	_ = (*mail.Address)(nil)
	_ = types.DynamicAny{}
)

// Validate checks the field values on SimpleMetric with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *SimpleMetric) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Type

	// no validation rules for Value

	return nil
}

// SimpleMetricValidationError is the validation error returned by
// SimpleMetric.Validate if the designated constraints aren't met.
type SimpleMetricValidationError struct {
	Field  string
	Reason string
	Cause  error
	Key    bool
}

// Error satisfies the builtin error interface
func (e SimpleMetricValidationError) Error() string {
	cause := ""
	if e.Cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.Cause)
	}

	key := ""
	if e.Key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sSimpleMetric.%s: %s%s",
		key,
		e.Field,
		e.Reason,
		cause)
}

var _ error = SimpleMetricValidationError{}

redpajama_set_name: RedPajamaGithub


text:
namespace remoting {

class AsyncAudioDataSupplier;
struct AudioStreamFormat;

// This is an interface acting as the downstream of AsyncAudioDataSupplier.
class AudioPlaybackSink {
 public:
  AudioPlaybackSink() = default;

  AudioPlaybackSink(const AudioPlaybackSink&) = delete;
  AudioPlaybackSink& operator=(const AudioPlaybackSink&) = delete;

  virtual ~AudioPlaybackSink() = default;

  // Sets the data supplier to be used by the sink to request for more audio
  // data.
  // |supplier| must outlive |this|.
  virtual void SetDataSupplier(AsyncAudioDataSupplier* supplier) = 0;

  // Called whenever the stream format is first received or has been changed.
  virtual void ResetStreamFormat(const AudioStreamFormat& format) = 0;
};

}  // namespace remoting

#endif  // REMOTING_CLIENT_AUDIO_AUDIO_PLAYBACK_SINK_H_


text:
package com.zheng.pay.rpc.service.impl;

import com.zheng.common.annotation.BaseService;
import com.zheng.common.base.BaseServiceImpl;
import com.zheng.pay.dao.mapper.PayMchMapper;
import com.zheng.pay.dao.model.PayMch;
import com.zheng.pay.dao.model.PayMchExample;
import com.zheng.pay.rpc.api.PayMchService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
* PayMchService实现
* Created by shuzheng on 2017/3/29.
*/
@Service
@Transactional
@BaseService
public class PayMchServiceImpl extends BaseServiceImpl<PayMchMapper, PayMch, PayMchExample> implements PayMchService {

    private static final Logger log = LoggerFactory.getLogger(PayMchServiceImpl.class);

    @Autowired
    PayMchMapper payMchMapper;

}


text:
import numpy as np

from .extmath import stable_cumsum
from .fixes import _take_along_axis

def _weighted_percentile(array, sample_weight, percentile=50):
    """Compute weighted percentile

    Computes lower weighted percentile. If `array` is a 2D array, the
    `percentile` is computed along the axis 0.

        .. versionchanged:: 0.24
            Accepts 2D `array`.

    Parameters
    ----------
    array : 1D or 2D array
        Values to take the weighted percentile of.

    sample_weight: 1D or 2D array
        Weights for each value in `array`. Must be same shape as `array` or
        of shape `(array.shape[0],)`.

    percentile: int, default=50
        Percentile to compute. Must be value between 0 and 100.

    Returns
    -------
    percentile : int if `array` 1D, ndarray if `array` 2D
        Weighted percentile.
    """
    n_dim = array.ndim
    if n_dim == 0:
        return array[()]
    if array.ndim == 1:
        array = array.reshape((-1, 1))
    # When sample_weight 1D, repeat for each array.shape[1]
    if (array.shape != sample_weight.shape and
            array.shape[0] == sample_weight.shape[0]):
        sample_weight = np.tile(sample_weight, (array.shape[1], 1)).T
    sorted_idx = np.argsort(array, axis=0)
    sorted_weights = _take_along_axis(sample_weight, sorted_idx, axis=0)

    # Find index of median prediction for each sample
    weight_cdf = stable_cumsum(sorted_weights, axis=0)
    adjusted_percentile = percentile / 100 * weight_cdf[-1]
    percentile_idx = np.array([
        np.searchsorted(weight_cdf[:, i], adjusted_percentile[i])
        for i in range(weight_cdf.shape[1])
    ])
    percentile_idx = np.array(percentile_idx)
    # In rare cases, percentile_idx equals to sorted_idx.shape[0]
    max_idx = sorted_idx.shape[0] - 1
    percentile_idx = np.apply_along_axis(lambda x: np.clip(x, 0, max_idx),
                                         axis=0, arr=percentile_idx)

    col_index = np.arange(array.shape[1])
    percentile_in_sorted = sorted_idx[percentile_idx, col_index]
    percentile = array[percentile_in_sorted, col_index]
    return percentile[0] if n_dim == 1 else percentile


text:
c_str_consts! {
    //Globals
    UTF8_MODE = "UTF8MODE",

    // Basic widget attributes
    TITLE = "TITLE",
    VALUE = "VALUE",
    ACTIVE = "ACTIVE",
    NAME = "NAME",
    VISIBLE = "VISIBLE",

    // Rendering attributes
    RASTERSIZE = "RASTERSIZE",
    POSITION = "POSITION",

    // Layout attributes
    ALIGNMENT_VERT = "ALIGNMENTLIN",
    ALIGNMENT_HORI = "ALIGNMENTCOL",
    ORIENTATION = "ORIENTATION",
    NUMDIV = "numdiv",

    // Specific to `Absolute`
    CX = "CX",
    CY = "CY",

    //Textbox attributes
    MULTILINE = "MULTILINE",
    VISIBLE_COLUMNS = "VISIBLECOLUMNS",
    VISIBLE_LINES = "VISIBLELINES",

    // Progressbar attributes
    DASHED = "DASHED",
    MARQUEE = "MARQUEE",
    MIN = "MIN",
    MAX = "MAX",

    //Timer attribute
    TIME = "TIME",
    RUN = "RUN",

    // Spacing between elements in a container
    GAP = "GAP",

    // Handles
    IMAGE = "IMAGE",

    //Callbacks
    ACTION = "ACTION",
    ACTION_CB = "ACTION_CB",
    VALUE_CHANGED_CB = "VALUECHANGED_CB",
    MAP_CB = "MAP_CB",
}

pub mod values {
    c_str_consts! {
        YES = "YES",
        NO = "NO",
    }

    pub fn bool_yes_no(_bool: bool) -> &'static str {
        match _bool {
            true => YES,
            false => NO,
        }
    }
}


text:
const postcss = require('postcss');

/**
 * @returns {function(...[*]=)}
 */
function transformMdcToLmdc() {
  return (root) => {
    root.walkRules((rule) => {
      if (!rule.selectors) {
        return rule;
      }

      rule.selectors = rule.selectors.map((selector) => selector.replace(/\.mdc-/g, '.lmdc-'));
    });
  };
}

const plugin = postcss.plugin('transform-mdc-to-lmdc', transformMdcToLmdc);
module.exports = plugin;


text:
module HttpApiTools
  VERSION = "0.3.5"
end


text:
'use strict';

angular.module('dandelionApp')
  .config(function ($stateProvider) {
    $stateProvider
      .state('products', {
        url: '/products',
        templateUrl: 'app/products/templates/product-list.html',
        controller: 'ProductsCtrl'
      })
      .state('viewProduct', {
        url: '/products/:id',
        templateUrl: 'app/products/templates/product-view.html',
        controller: 'ProductViewCtrl'
      })
  });


text:
package io.xn.dx.server;

import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

@Path("/")
public class Root
{
    @Inject
    public Root() {

    }

    @GET
    @Produces(MediaType.TEXT_PLAIN)
    public String index()
    {
        return "hello world";
    }

//    @GET
//    @Path("suspend")
//    @Produces("text/plain")
//    public void async(final @Suspended AsyncResponse response,
//                      final @NotNull(message = "time query parameter required") @QueryParam("time") Long time)
//    {
//        Thread t = new Thread()
//        {
//            @Override
//            public void run()
//            {
//                try {
//                    Thread.sleep(time);
//                    response.resume(Response.ok("basic").type(MediaType.TEXT_PLAIN).build());
//                }
//                catch (Exception e) {
//                    log.warn("exception resuming!", e);
//                    response.resume(Response.serverError().type(MediaType.TEXT_PLAIN).entity(e.getMessage()).build());
//                }
//            }
//        };
//        t.start();
//    }
}


text:
BIN = ./node_modules/.bin
TESTS = $(shell ls -S `find test -type f -name "*.test.js" -print`)
REPORTER = spec
TIMEOUT = 30000
MOCHA_OPTS =

install:
	@npm install

test: install
	@NODE_ENV=test $(BIN)/mocha \
		--reporter $(REPORTER) \
		--timeout $(TIMEOUT) \
		--require should \
		$(MOCHA_OPTS) \
		$(TESTS)

test-cov:
	@$(MAKE) test \
		MOCHA_OPTS='--require blanket' \
		REPORTER=travis-cov

test-cov-html:
	@rm -f coverage.html
	@$(MAKE) test \
		MOCHA_OPTS='--require blanket' \
		REPORTER=html-cov \
	> coverage.html
	@ls -lh coverage.html
	@open coverage.html

test-coveralls:
	@$(MAKE) test \
		REPORTER=tap
	@echo TRAVIS_JOB_ID $(TRAVIS_JOB_ID)
	@-$(MAKE) test \
		MOCHA_OPTS='--require blanket' \
		REPORTER=mocha-lcov-reporter \
	| $(BIN)/coveralls

test-all: test test-cov

authors: install
	@$(BIN)/contributors -f plain -o AUTHORS

clean:
	rm -rf node_modules

.PHONY: test


text:
package com.lhf.obexftplib.etc;

public abstract class Log {

    public static int LOG_NONE = 0;
    public static int LOG_INFO = 1;
    public static int LOG_DEBUG = 2;
    public static int logLevel = LOG_INFO;

    public static void info(String msg) {
        info(msg, null);
    }

    public static void info(String msg, Throwable t) {
        if (logLevel >= LOG_INFO) {
            System.out.print(msg);
            if (t != null) {
                if (t.getMessage() != null) {
                    System.out.print(t.getMessage());
                } else if (t.getLocalizedMessage() != null){
                    System.out.print(t.getLocalizedMessage());
                }else{
                    t.printStackTrace();
                }
            }
        }
        System.out.println();
    }

    public static void debug(Class<?> klass, String msg) {
        debug(klass, msg, null);
    }

    public static void debug(Class<?> klass, String msg, Throwable t) {
        if (logLevel >= LOG_DEBUG) {
            System.out.println("[" + klass.getName() + "]" + msg);
            if (t != null) {
                t.printStackTrace();
            }
        }
    }
}


text:
<!DOCTYPE html>

<TITLE>Manpage of TEST</TITLE>
<meta charset="utf-8">
<link rel="stylesheet" href="/css/main.css" type="text/css">

linux manpages

{"type":"documentation"}

TEST

Section: User Commands (1)
Updated: June 2012
Index
Return to Main Contents

NAME

test - check file types and compare values

SYNOPSIS

test

EXPRESSION

test

[

EXPRESSION ]

[

]

[

OPTION

DESCRIPTION

Exit with the status determined by EXPRESSION.

--help

display this help and exit

--version

output version information and exit

An omitted EXPRESSION defaults to false.  Otherwise,
EXPRESSION is true or false and sets exit status.  It is one of:

( EXPRESSION )

EXPRESSION is true

! EXPRESSION

EXPRESSION is false

EXPRESSION1 -a EXPRESSION2

both EXPRESSION1 and EXPRESSION2 are true

EXPRESSION1 -o EXPRESSION2

either EXPRESSION1 or EXPRESSION2 is true

-n STRING

the length of STRING is nonzero

STRING

equivalent to -n STRING

-z STRING

the length of STRING is zero

STRING1 = STRING2

the strings are equal

STRING1 != STRING2

the strings are not equal

INTEGER1 -eq INTEGER2

INTEGER1 is equal to INTEGER2

INTEGER1 -ge INTEGER2

INTEGER1 is greater than or equal to INTEGER2

INTEGER1 -gt INTEGER2

INTEGER1 is greater than INTEGER2

INTEGER1 -le INTEGER2

INTEGER1 is less than or equal to INTEGER2

INTEGER1 -lt INTEGER2

INTEGER1 is less than INTEGER2

INTEGER1 -ne INTEGER2

INTEGER1 is not equal to INTEGER2

FILE1 -ef FILE2

FILE1 and FILE2 have the same device and inode numbers

FILE1 -nt FILE2

FILE1 is newer (modification date) than FILE2

FILE1 -ot FILE2

FILE1 is older than FILE2

-b FILE

FILE exists and is block special

-c FILE

FILE exists and is character special

-d FILE

FILE exists and is a directory

-e FILE

FILE exists

-f FILE

FILE exists and is a regular file

-g FILE

FILE exists and is set-group-ID

-G FILE

FILE exists and is owned by the effective group ID

-h FILE

FILE exists and is a symbolic link (same as -L)

-k FILE

FILE exists and has its sticky bit set

-L FILE

FILE exists and is a symbolic link (same as -h)

-O FILE

FILE exists and is owned by the effective user ID

-p FILE

FILE exists and is a named pipe

-r FILE

FILE exists and read permission is granted

-s FILE

FILE exists and has a size greater than zero

-S FILE

FILE exists and is a socket

-t FD

file descriptor FD is opened on a terminal

-u FILE

FILE exists and its set-user-ID bit is set

-w FILE

FILE exists and write permission is granted

-x FILE

FILE exists and execute (or search) permission is granted

Except for -h and -L, all FILE-related tests dereference symbolic links.
Beware that parentheses need to be escaped (e.g., by backslashes) for shells.
INTEGER may also be -l STRING, which evaluates to the length of STRING.

NOTE: [ honors the --help and --version options, but test does not.
test treats each of those as it treats any other nonempty STRING.

NOTE: your shell may have its own version of test and/or [, which usually supersedes
the version described here.  Please refer to your shell's documentation
for details about the options it supports.

AUTHOR

Written by Kevin Braunsdorf and Matthew Bradburn.

REPORTING BUGS

Report test bugs to bug-coreutils@gnu.org

GNU coreutils home page: <http://www.gnu.org/software/coreutils/>

General help using GNU software: <http://www.gnu.org/gethelp/>

Report test translation bugs to <http://translationproject.org/team/>

COPYRIGHT

Copyright © 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

SEE ALSO

The full documentation for
test

is maintained as a Texinfo manual.  If the
info

and
test

programs are properly installed at your site, the command

info coreutils aqtest invocationaq

should give you access to the complete manual.

Index

NAME

SYNOPSIS

DESCRIPTION

AUTHOR

REPORTING BUGS

COPYRIGHT

SEE ALSO

This document was created by
man2html,
using the manual pages.

Time: 05:29:11 GMT, December 24, 2015


text:
{-# LANGUAGE DeriveGeneric #-}
module Ebitor.Rope.Cursor where

import GHC.Generics

import Data.Aeson (FromJSON, ToJSON)

newtype Cursor = Cursor (Int, Int)
                 deriving (Show, Eq, Generic)

instance FromJSON Cursor
instance ToJSON Cursor

type Position = (Int, Cursor)

instance Ord Cursor where
    compare (Cursor (ln, col)) (Cursor (ln', col'))
        | ln > ln' = GT
        | ln' > ln = LT
        | col > col' = GT
        | col' > col = LT
        | otherwise = EQ

newCursor = Cursor (1, 1)

addToLn :: Int -> Cursor -> Cursor
addToLn i (Cursor (ln, col)) = Cursor (ln + i, col)

addToCol :: Int -> Cursor -> Cursor
addToCol i (Cursor (ln, col)) = Cursor (ln, col + i)

unwrap :: Cursor -> (Int, Int)
unwrap (Cursor c) = c

line :: Cursor -> Int
line = fst . unwrap

column :: Cursor -> Int
column = snd . unwrap

newPosition :: Position
newPosition = (0, newCursor)

positionIndex :: Position -> Int
positionIndex = fst

positionCursor :: Position -> Cursor
positionCursor = snd


text:
""" Test script for the unicodedata module.

    Written by Marc-Andre Lemburg (mal@lemburg.com).

    (c) Copyright CNRI, All Rights Reserved. NO WARRANTY.

"""#"
import unittest, test.test_support
import sha

encoding = 'utf-8'

### Run tests

class UnicodeMethodsTest(unittest.TestCase):

    # update this, if the database changes
    expectedchecksum = 'a37276dc2c158bef6dfd908ad34525c97180fad9'

    def test_method_checksum(self):
        h = sha.sha()
        for i in range(65536):
            char = unichr(i)
            data = [
                # Predicates (single char)
                u"01"[char.isalnum()],
                u"01"[char.isalpha()],
                u"01"[char.isdecimal()],
                u"01"[char.isdigit()],
                u"01"[char.islower()],
                u"01"[char.isnumeric()],
                u"01"[char.isspace()],
                u"01"[char.istitle()],
                u"01"[char.isupper()],

                # Predicates (multiple chars)
                u"01"[(char + u'abc').isalnum()],
                u"01"[(char + u'abc').isalpha()],
                u"01"[(char + u'123').isdecimal()],
                u"01"[(char + u'123').isdigit()],
                u"01"[(char + u'abc').islower()],
                u"01"[(char + u'123').isnumeric()],
                u"01"[(char + u' \t').isspace()],
                u"01"[(char + u'abc').istitle()],
                u"01"[(char + u'ABC').isupper()],

                # Mappings (single char)
                char.lower(),
                char.upper(),
                char.title(),

                # Mappings (multiple chars)
                (char + u'abc').lower(),
                (char + u'ABC').upper(),
                (char + u'abc').title(),
                (char + u'ABC').title(),

                ]
            h.update(u''.join(data).encode(encoding))
        result = h.hexdigest()
        self.assertEqual(result, self.expectedchecksum)

class UnicodeDatabaseTest(unittest.TestCase):

    def setUp(self):
        # In case unicodedata is not available, this will raise an ImportError,
        # but the other test cases will still be run
        import unicodedata
        self.db = unicodedata

    def tearDown(self):
        del self.db

class UnicodeFunctionsTest(UnicodeDatabaseTest):

    # update this, if the database changes
    expectedchecksum = 'cfe20a967a450ebc82ca68c3e4eed344164e11af'

    def test_function_checksum(self):
        data = []
        h = sha.sha()

        for i in range(0x10000):
            char = unichr(i)
            data = [
                # Properties
                str(self.db.digit(char, -1)),
                str(self.db.numeric(char, -1)),
                str(self.db.decimal(char, -1)),
                self.db.category(char),
                self.db.bidirectional(char),
                self.db.decomposition(char),
                str(self.db.mirrored(char)),
                str(self.db.combining(char)),
            ]
            h.update(''.join(data))
        result = h.hexdigest()
        self.assertEqual(result, self.expectedchecksum)

    def test_digit(self):
        self.assertEqual(self.db.digit(u'A', None), None)
        self.assertEqual(self.db.digit(u'9'), 9)
        self.assertEqual(self.db.digit(u'\u215b', None), None)
        self.assertEqual(self.db.digit(u'\u2468'), 9)

        self.assertRaises(TypeError, self.db.digit)
        self.assertRaises(TypeError, self.db.digit, u'xx')
        self.assertRaises(ValueError, self.db.digit, u'x')

    def test_numeric(self):
        self.assertEqual(self.db.numeric(u'A',None), None)
        self.assertEqual(self.db.numeric(u'9'), 9)
        self.assertEqual(self.db.numeric(u'\u215b'), 0.125)
        self.assertEqual(self.db.numeric(u'\u2468'), 9.0)

        self.assertRaises(TypeError, self.db.numeric)
        self.assertRaises(TypeError, self.db.numeric, u'xx')
        self.assertRaises(ValueError, self.db.numeric, u'x')

    def test_decimal(self):
        self.assertEqual(self.db.decimal(u'A',None), None)
        self.assertEqual(self.db.decimal(u'9'), 9)
        self.assertEqual(self.db.decimal(u'\u215b', None), None)
        self.assertEqual(self.db.decimal(u'\u2468', None), None)

        self.assertRaises(TypeError, self.db.decimal)
        self.assertRaises(TypeError, self.db.decimal, u'xx')
        self.assertRaises(ValueError, self.db.decimal, u'x')

    def test_category(self):
        self.assertEqual(self.db.category(u'\uFFFE'), 'Cn')
        self.assertEqual(self.db.category(u'a'), 'Ll')
        self.assertEqual(self.db.category(u'A'), 'Lu')

        self.assertRaises(TypeError, self.db.category)
        self.assertRaises(TypeError, self.db.category, u'xx')

    def test_bidirectional(self):
        self.assertEqual(self.db.bidirectional(u'\uFFFE'), '')
        self.assertEqual(self.db.bidirectional(u' '), 'WS')
        self.assertEqual(self.db.bidirectional(u'A'), 'L')

        self.assertRaises(TypeError, self.db.bidirectional)
        self.assertRaises(TypeError, self.db.bidirectional, u'xx')

    def test_decomposition(self):
        self.assertEqual(self.db.decomposition(u'\uFFFE'),'')
        self.assertEqual(self.db.decomposition(u'\u00bc'), '<fraction> 0031 2044 0034')

        self.assertRaises(TypeError, self.db.decomposition)
        self.assertRaises(TypeError, self.db.decomposition, u'xx')

    def test_mirrored(self):
        self.assertEqual(self.db.mirrored(u'\uFFFE'), 0)
        self.assertEqual(self.db.mirrored(u'a'), 0)
        self.assertEqual(self.db.mirrored(u'\u2201'), 1)

        self.assertRaises(TypeError, self.db.mirrored)
        self.assertRaises(TypeError, self.db.mirrored, u'xx')

    def test_combining(self):
        self.assertEqual(self.db.combining(u'\uFFFE'), 0)
        self.assertEqual(self.db.combining(u'a'), 0)
        self.assertEqual(self.db.combining(u'\u20e1'), 230)

        self.assertRaises(TypeError, self.db.combining)
        self.assertRaises(TypeError, self.db.combining, u'xx')

    def test_normalize(self):
        self.assertRaises(TypeError, self.db.normalize)
        self.assertRaises(ValueError, self.db.normalize, 'unknown', u'xx')
        self.assertEqual(self.db.normalize('NFKC', u''), u'')
        # The rest can be found in test_normalization.py
        # which requires an external file.

    def test_east_asian_width(self):
        eaw = self.db.east_asian_width
        self.assertRaises(TypeError, eaw, 'a')
        self.assertRaises(TypeError, eaw, u'')
        self.assertRaises(TypeError, eaw, u'ra')
        self.assertEqual(eaw(u'\x1e'), 'N')
        self.assertEqual(eaw(u'\x20'), 'Na')
        self.assertEqual(eaw(u'\uC894'), 'W')
        self.assertEqual(eaw(u'\uFF66'), 'H')
        self.assertEqual(eaw(u'\uFF1F'), 'F')
        self.assertEqual(eaw(u'\u2010'), 'A')

class UnicodeMiscTest(UnicodeDatabaseTest):

    def test_decimal_numeric_consistent(self):
        # Test that decimal and numeric are consistent,
        # i.e. if a character has a decimal value,
        # its numeric value should be the same.
        count = 0
        for i in xrange(0x10000):
            c = unichr(i)
            dec = self.db.decimal(c, -1)
            if dec != -1:
                self.assertEqual(dec, self.db.numeric(c))
                count += 1
        self.assert_(count >= 10) # should have tested at least the ASCII digits

    def test_digit_numeric_consistent(self):
        # Test that digit and numeric are consistent,
        # i.e. if a character has a digit value,
        # its numeric value should be the same.
        count = 0
        for i in xrange(0x10000):
            c = unichr(i)
            dec = self.db.digit(c, -1)
            if dec != -1:
                self.assertEqual(dec, self.db.numeric(c))
                count += 1
        self.assert_(count >= 10) # should have tested at least the ASCII digits

def test_main():
    test.test_support.run_unittest(
        UnicodeMiscTest,
        UnicodeMethodsTest,
        UnicodeFunctionsTest
    )

if __name__ == "__main__":
    test_main()


text:
package io.opencensus.contrib.agent.bootstrap;

/**
 * Contains classes that need to be loaded by the bootstrap classloader because they are used from
 * classes loaded by the bootstrap classloader.
 *
 * <p>NB: Do not add direct dependencies on classes that are not loaded by the bootstrap
 * classloader. Keep this package small.
 */


text:
/**********************************

	This handles multi input fields
	in custom meta...

	It allows the user to add multiple
	items in the same meta and pipes
	the items into one input

**********************************/

jQuery(document).ready(function(){
	set_up_form();
	setup_toolbars();
	//jQuery('.multi-input-field').hide();
	jQuery('.multi-input .field-group input').keyup(function(index, row){
		update_all_fields();
	});
});

function set_up_form(){

	// this function grabs any existing multi-input data
	// and creates html fields for them via process_current_fields()

	var $ 				= jQuery;
	var div_selector 	= $('.multi-input input');
	var fields 			= $.parseJSON(div_selector.attr('data-fields'));

	//console.log(div_selector.val());

	$.each(div_selector, function(index, row){
		var field_id = $(row).attr('id');

		process_current_fields({
			field_id 	: field_id,
			element		: row
		});
		//console.log($('.multi-input',this));

		$(this).parent().append(
			'Add New'
		);

	});
}

function add_empty_fields(obj){
	// define the unique id
	var unique 			= obj.unique;
	var clicked_from 	= obj.location ? obj.location : '';

	var $ = jQuery;
	var original_input = $('.multi-input');
	var multi_input_field = $('.multi-input-field').attr('data-fields');

	var fields = $.parseJSON(convert_to_quotes(multi_input_field));
	var inputs = '';
	var field_containers = '';
	var fields_open = '
' + make_toolbar();
	var fields_close = '
';
	var html = '';
	var inputs = '';

	html = html + fields_open;

	for (var key in fields) {
 		var field_obj = fields[key];

		inputs = inputs + '<input type="text" id="'+field_obj.id+'_'+obj.unique+'" placeholder="'+field_obj.title+'" value="" class="'+field_obj.id+'" data-field-id="'+field_obj.id+'" size="30" />
';

	}

	html = html + inputs + fields_close;

	original_input.append( html );

	// if location was specified, move the group there
	if(clicked_from){

		$('.field-group:last').hide().insertAfter( clicked_from ).fadeIn('300');
	}

	jQuery('.multi-input .field-group input').keyup(function(index, row){
		update_all_fields({ index: index });
	});

}

function add_input(obj){
	// not using this but I wanted to keep it around for a little while

	/*
	var $ = jQuery;
	var original_input = $(obj.element);

	var fields = obj.fields;
	var inputs = '';
	var field_containers = '';

	var fields_close = '
';

	var input = '<input type="text" id="'+fields.id+'" placeholder="Link Title" value="'+fields.value+'" class="'+fields.id+'" />
';

	return input;
	*/
	return false;
}

function process_current_fields(obj){
	var $ = jQuery;
	/*
	var required_fields = $.parseJSON($('.multi-input-field').attr('data-fields'));
	console.log(required_fields);
	*/
	var multi_input_field = $('.multi-input-field').val();

	var fields 			= $.parseJSON(convert_to_quotes(multi_input_field));
	var fields_per_group= $.parseJSON($('.multi-input-field').attr('data-fields')).length;
	var total_groups 	= fields ? fields.length / fields_per_group : 0;
	if(fields){
		// first add the empty inputs
		for (var i=0;i<total_groups;i++){
			add_empty_fields({ unique : i });
		}

		// now add the data to those inputs
		var i 					= 0;
		var group_tracker		= 0;

		$.each(fields, function(index, row){

			// find the input
			var input = $('#' + row.id + '_' + group_tracker);

			// make sure the data is filler data (there to keep the form safe)
			var value = row.value != row.id ? row.value : '';

			// add the data to the input
			input.val(value);

			if(i === fields_per_group -1){
				// reached the last item in the group
				// so go to next group
				group_tracker++;
				i = 0;
			} else {
				i++;
			}

		});
	} // end if fields
}

function update_all_fields(){

	var $ 				= jQuery;
	var inputs 			= $('.multi-input input');
	var field_groups	= $('.field-group');
	var master_field	= $('.multi-input-field');
	var string_to_save	= '[';

	// empty the master field
	master_field.val('');

	// iterate through the field groups
	$.each(field_groups, function(index, row){

		// iterate through the inputs in this field group
		$.each($('input',row), function(i, r){

			var field_id 	= $(r).attr('data-field-id');
			var field_value = $(r).val();
			var comma 		= index === 0 && i === 0 ? '' : ',';

			// add this field to the array of fields/values
			// using pipes here so we can submit "escaped" data
			// pipes in the field will later be replaces with quotes
			// so the string can be json_encoded and decoded with php
			if(field_value){
				string_to_save = string_to_save + comma + '{|id|:|'+field_id+'|,|value|:|'+field_value+'|}';
			} else {
				// since an empty value would break or setup (iterations have to match etc...)
				// we'll add the id as a value if one does not exist
				// then we'll hide that when we show it to the user later
				string_to_save = string_to_save + comma + '{|id|:|'+field_id+'|,|value|:|'+field_id+'|}';
			}

		});

		var total_results 	= inputs.length - 1;

	});
	string_to_save = string_to_save + ']';
	master_field.val(master_field.val() + string_to_save);
}

function make_toolbar(){

	var $ = jQuery;

	// make the toolbar that controls each group
	var html = 	'
'+
					'
<button type="button" onClick="return false" class="move-up"> ↑ </button>
'+
					'
<button type="button" onClick="return false" class="move-down"> ↓ </button>
'+
					'
<button type="button" onClick="return false" class="add-group">+</button>
'+
					'
<button type="button" onClick="return false" class="delete-group"> - </button>
'+
				'
';

	return html;
}

function setup_toolbars(){
	jQuery('.move-up').live('click', move_group_up);
	jQuery('.move-down').live('click', move_group_down);
	jQuery('.add-group').live('click', add_group);
	jQuery('.delete-group').live('click', delete_group);
}

function move_group_up(){
	// moves the group up in the order
    var group = jQuery(this).closest('.field-group');
        group.insertBefore(group.prev());

    // update the fields
    update_all_fields();

    // grab current background
    var background = group.css('background-color');

    // change background to give user feedback
    group.animate({ backgroundColor : 'yellow' });

    // now change it back
    group.animate({ backgroundColor : background });

}

function move_group_down(){
	// moves the group down in the order
    var group = jQuery(this).closest('.field-group');
        group.insertAfter(group.next());

    // update the fields
    update_all_fields();

    // grab current background
    var background = group.css('background-color');

    // change background to give user feedback
    group.animate({ backgroundColor : 'yellow' });

    // now change it back
    group.animate({ backgroundColor : background });
}

function add_group(){

	// adds a new group
	add_empty_fields({
		unique		:undefined,
		location 	: jQuery(this).closest('.field-group')
	});
}

function delete_group(){
	// removes a group
	var group = jQuery(this).closest('.field-group');
	group.fadeOut(500, function(){
		group.remove();
	    // update the fields
	    update_all_fields();

	});

}

function convert_to_quotes(string){
	// quotes have to be removed since they
	// will be escaped... this adds them back in

	return string.replace(/(\|)/g,"\"");
}

function convert_from_quotes(string){
	// quotes have to be removed before
	// they go into wordpress... see
	// convert_to_quotes() for the reverse
	// this should be the opposite of that

	return string.replace(/(\")/g,"\|");

}


text:
import {Observable} from '../Observable';

export function _do<T>(sideEffect: (val: T) => any): Observable<T> {

  return Observable.create<T>((observer) => {

    const doObserver = {
      next: (x: T) => {
        try {
          sideEffect(x);
          observer.next(x);
        } catch (e) {
          observer.error(e);
        }
      },
      error: (err: any) => observer.error(err),
      complete: () => observer.complete()
    };

    const subscription = this.subscribe(doObserver);

    return () => {
      subscription.unsubscribe();
    };

  });

}


text:
<!--
  ~ Waltz - Enterprise Architecture
  ~ Copyright (C) 2016, 2017, 2018, 2019 Waltz open source project
  ~ See README.md for more information
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific
  ~
  -->

<databaseChangeLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
                   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"
                   logicalFilePath="db.changelog-1.34.xml">

    <changeSet id="v1-33-tag"
               author="davidwatkins73">
        <tagDatabase tag="v1.33"/> <!-- tag the current db version, i.e. the last  -->
    </changeSet>

    <changeSet id="20210609-5447-1"
               author="woodjes">
        <update tableName="settings">
            <column name="value"
                    value="DEV v1.34"/>
            <where>name='ui.logo.overlay.text'</where>
        </update>
    </changeSet>

    <changeSet id="20210611-5395-1"
               author="alimuza">
        <comment>5395: Database Usage table</comment>
        <createTable tableName="database_usage">
            <column autoIncrement="true"
                    name="id"
                    type="${id.type}">
                <constraints primaryKey="true"
                             primaryKeyName="database_usage_id_pkey"/>
            </column>
            <column name="database_id"
                    type="${id.type}">
                <constraints nullable="false" />
            </column>
            <column name="entity_kind"
                    type="${enum.type}">
                <constraints nullable="false" />
            </column>
            <column name="entity_id"
                    type="${id.type}">
                <constraints nullable="false" />
            </column>
            <column name="environment"
                    type="${enum.type}">
                <constraints nullable="false" />
            </column>
            <column name="last_updated_at"
                    type="TIMESTAMP"
                    defaultValueComputed="${now.value}">
                <constraints nullable="false" />
            </column>
            <column name="last_updated_by"
                    type="${name.type}">
                <constraints nullable="false" />
            </column>
            <column name="provenance"
                    type="${provenance.type}">
                <constraints nullable="false" />
            </column>
        </createTable>
    </changeSet>

    <changeSet id="20210611-5395-2"
               author="alimuza">
        <comment>5395: Database Information new table</comment>
        <createTable tableName="database_information_2">
            <column autoIncrement="true"
                    name="id"
                    type="${id.type}">
                <constraints primaryKey="true"
                             primaryKeyName="database_information_2_pkey"/>
            </column>

            <column name="database_name"
                    type="${name.type}"
                    defaultValue="waltz">
                <constraints nullable="false"/>
            </column>
            <column name="instance_name"
                    type="${name.type}"
                    defaultValue="waltz">
                <constraints nullable="false"/>
            </column>
            <column name="dbms_vendor"
                    type="${name.type}">
                <constraints nullable="false"/>
            </column>
            <column name="dbms_name"
                    type="${name.type}">
                <constraints nullable="false"/>
            </column>
            <column name="dbms_version"
                    type="${code.type}">
                <constraints nullable="false"/>
            </column>
            <column name="external_id"
                    type="${external-id.type}"
                    defaultValue="waltz">
                <constraints nullable="true"/>
            </column>
            <column name="end_of_life_date"
                    type="DATE">
                <constraints nullable="true"/>
            </column>
            <column name="lifecycle_status"
                    type="${enum.type}">
                <constraints nullable="true"/>
            </column>
            <column name="provenance"
                    type="${provenance.type}"
                    defaultValue="waltz">
                <constraints nullable="false"/>
            </column>
        </createTable>
    </changeSet>

    <changeSet id="20210611-5395-3"
               author="alimuza">
        <comment>5395: populate new database information table</comment>
        <sql>
            INSERT INTO database_information_2 (database_name, instance_name, dbms_vendor, dbms_name, dbms_version, external_id, provenance, end_of_life_date, lifecycle_status)
            SELECT DISTINCT database_name, instance_name, dbms_vendor, dbms_name, dbms_version, external_id, provenance, end_of_life_date, lifecycle_status
            FROM database_information
        </sql>
    </changeSet>

    <changeSet id="20210611-5395-4"
               author="alimuza">
        <comment>5395: Migrating data from database information to database usage</comment>
        <sql>
            INSERT INTO database_usage (database_id, entity_kind, entity_id, environment, last_updated_by, provenance)
            SELECT di_new.id, 'APPLICATION', app.id, di.environment, 'admin', di.provenance
            FROM database_information di
            INNER JOIN application app ON di.asset_code = app.asset_code
            INNER JOIN database_information_2 di_new ON di_new.external_id = di.external_id
        </sql>
    </changeSet>

    <changeSet id="20210611-5395-5"
               author="alimuza">
        <comment>5395: Database Information table rename</comment>
        <renameTable  newTableName="database_information_1_34"
                      oldTableName="database_information"/>
        <renameTable  newTableName="database_information"
                      oldTableName="database_information_2"/>
    </changeSet>

    <changeSet id="20210611-5395-6"
               author="alimuza">
        <comment>5395: Added constraint from database usage to database information</comment>
        <addForeignKeyConstraint baseTableName="database_usage"
                                 baseColumnNames="database_id"
                                 constraintName="database_usage_database_id_fk"
                                 onDelete="CASCADE"
                                 referencedTableName="database_information"
                                 referencedColumnNames="id"/>
    </changeSet>

    <changeSet id="20210611-5395-7"
               author="alimuza">
        <comment>5395: Update custom environment usage with database usage references</comment>
        <sql>
            UPDATE custom_environment_usage
            SET entity_id = du.id, entity_kind = 'DATABASE_USAGE'
            FROM custom_environment_usage as ceu
            JOIN database_information_1_34 old_db ON (old_db.id = ceu.entity_id)
            JOIN database_information new_db ON (old_db.external_id = new_db.external_id)
            JOIN application a ON old_db.asset_code = a.asset_code
            JOIN database_usage du ON new_db.id = du.database_id
            WHERE ceu.entity_kind = 'DATABASE';
        </sql>
    </changeSet>

    <!-- 5455: Create flow diagram overlay group tables -->
    <changeSet id="20210609-5455-1"
               author="woodjes">
        <comment>5455: Create flow diagram overlay group tables</comment>
        <createTable tableName="flow_diagram_overlay_group">
            <column name="id"
                    type="${id.type}"
                    autoIncrement="true">
                <constraints nullable="false"
                             primaryKey="true"
                             primaryKeyName="overlay_group_pkey"/>
            </column>
            <column name="flow_diagram_id"
                    type="${id.type}">
                <constraints nullable="false"/>
            </column>
            <column name="name"
                    type="${name.type}">
                <constraints nullable="false"/>
            </column>
            <column name="description"
                    type="${description.type}">
                <constraints nullable="true"/>
            </column>
            <column name="external_id"
                    type="${external-id.type}">
                <constraints nullable="false"/>
            </column>
            <column name="is_default"
                    type="boolean"
                    defaultValueBoolean="false">
                <constraints nullable="false"/>
            </column>
        </createTable>
    </changeSet>

    <changeSet id="20210609-5455-2"
               author="woodjes">
        <comment>5455: Create flow diagram overlay tables</comment>
        <createTable tableName="flow_diagram_overlay_group_entry">
            <column name="id"
                    type="${id.type}"
                    autoIncrement="true">
                <constraints nullable="false"
                             primaryKey="true"
                             primaryKeyName="overlay_group_entry_pkey"/>
            </column>
            <column name="overlay_group_id"
                    type="${id.type}">
                <constraints nullable="false"/>
            </column>
            <column name="entity_id"
                    type="${id.type}">
                <constraints nullable="false"/>
            </column>
            <column name="entity_kind"
                    type="${enum.type}">
                <constraints nullable="false"/>
            </column>
            <column name="symbol"
                    type="${enum.type}">
                <constraints nullable="false"/>
            </column>
            <column name="fill"
                    type="${enum.type}">
                <constraints nullable="false"/>
            </column>
            <column name="stroke"
                    type="${enum.type}">
                <constraints nullable="false"/>
            </column>
        </createTable>
    </changeSet>

    <changeSet id="20210609-5455-3"
               author="woodjes">
        <comment>5455: Create flow diagram overlay tables</comment>
        <addForeignKeyConstraint constraintName="fd_overlay_group_flow_diagram_id_fk"
                                 baseTableName="flow_diagram_overlay_group"
                                 baseColumnNames="flow_diagram_id"
                                 referencedTableName="flow_diagram"
                                 referencedColumnNames="id"
                                 onDelete="CASCADE"/>
    </changeSet>

    <changeSet id="20210609-5455-4"
               author="woodjes">
        <comment>5455: Create flow diagram overlay tables</comment>
        <addForeignKeyConstraint constraintName="fd_overlay_group_entry_fd_overlay_group_id_fk"
                                 baseTableName="flow_diagram_overlay_group_entry"
                                 baseColumnNames="overlay_group_id"
                                 referencedTableName="flow_diagram_overlay_group"
                                 referencedColumnNames="id"
                                 onDelete="CASCADE"/>
    </changeSet>

    <changeSet id="20210614-5466-1"
               author="davidwatkins73">
        <comment>5466: adding support for survey subquestions</comment>
        <addColumn tableName="survey_question">
            <column name="parent_external_id"
                    type="${external-id.type}">
                <constraints nullable="true"/>
            </column>
        </addColumn>
        <addColumn tableName="survey_question">
            <column name="label"
                    type="${name.type}">
                <constraints nullable="true"/>
            </column>
        </addColumn>
    </changeSet>

    <changeSet id="20210616-5455-5"
               author="woodjes">
        <comment>5455: adding editor role to flow diagram</comment>
        <addColumn tableName="flow_diagram">
            <column name="editor_role"
                    type="${enum.type}">
                <constraints nullable="true"/>
            </column>
        </addColumn>
    </changeSet>

    <changeSet id="20210609-5447-2"
               author="woodjes">
        <update tableName="settings">
            <column name="value"
                    value="Prod v1.34"/>
            <where>name='ui.logo.overlay.text'</where>
        </update>
    </changeSet>

    <!--5444: Add auth source id to decorator table-->
    <changeSet id="20210602-5444-1"
               author="woodjes">
        <comment>5444: adding auth source id column to logical flow decorator</comment>
        <addColumn tableName="logical_flow_decorator">
            <column name="auth_source_id"
                    type="${id.type}">
                <constraints nullable="true"/>
            </column>
        </addColumn>
    </changeSet>

    <changeSet id="20210602-5444-2"
               author="woodjes">
        <comment>5444: adding auth source id column to logical flow decorator</comment>
        <addForeignKeyConstraint baseColumnNames="auth_source_id"
                                 baseTableName="logical_flow_decorator"
                                 constraintName="lfd_auth_source_id_fkey"
                                 onDelete="SET NULL"
                                 referencedColumnNames="id"
                                 referencedTableName="authoritative_source"/>
    </changeSet>

</databaseChangeLog>


text:
/*
 * Voicebase V3 API
 * APIs for speech recognition and speech analytics, powering insights every business needs.
 *
 * OpenAPI spec version: 3.0.1
 * Contact: support@voicebase.com
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package com.voicebase.sample.v3client.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.ArrayList;
import com.voicebase.sample.v3client.model.VbFrequency;
import com.voicebase.sample.v3client.model.VbWordTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * VbWord
 */
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-10-12T18:19:19.705-07:00")
public class VbWord {
  @JsonProperty("p")
  private Integer p = null;

  @JsonProperty("c")
  private Double c = null;

  @JsonProperty("s")
  private Long s = null;

  @JsonProperty("e")
  private Long e = null;

  @JsonProperty("frq")
  private java.util.List<VbFrequency> frq = new java.util.ArrayList<VbFrequency>();

  @JsonProperty("m")
  private VbWordTypeEnum m = null;

  @JsonProperty("v")
  private Double v = null;

  @JsonProperty("w")
  private String w = null;

  public VbWord p(Integer p) {
    this.p = p;
    return this;
  }

   /**
   * Get p
   * @return p
  **/
  @ApiModelProperty(example = "null", value = "")
  public Integer getP() {
    return p;
  }

  public void setP(Integer p) {
    this.p = p;
  }

  public VbWord c(Double c) {
    this.c = c;
    return this;
  }

   /**
   * Get c
   * @return c
  **/
  @ApiModelProperty(example = "null", value = "")
  public Double getC() {
    return c;
  }

  public void setC(Double c) {
    this.c = c;
  }

  public VbWord s(Long s) {
    this.s = s;
    return this;
  }

   /**
   * Get s
   * @return s
  **/
  @ApiModelProperty(example = "null", value = "")
  public Long getS() {
    return s;
  }

  public void setS(Long s) {
    this.s = s;
  }

  public VbWord e(Long e) {
    this.e = e;
    return this;
  }

   /**
   * Get e
   * @return e
  **/
  @ApiModelProperty(example = "null", value = "")
  public Long getE() {
    return e;
  }

  public void setE(Long e) {
    this.e = e;
  }

  public VbWord frq(java.util.List<VbFrequency> frq) {
    this.frq = frq;
    return this;
  }

  public VbWord addFrqItem(VbFrequency frqItem) {
    this.frq.add(frqItem);
    return this;
  }

   /**
   * Get frq
   * @return frq
  **/
  @ApiModelProperty(example = "null", value = "")
  public java.util.List<VbFrequency> getFrq() {
    return frq;
  }

  public void setFrq(java.util.List<VbFrequency> frq) {
    this.frq = frq;
  }

  public VbWord m(VbWordTypeEnum m) {
    this.m = m;
    return this;
  }

   /**
   * Get m
   * @return m
  **/
  @ApiModelProperty(example = "null", value = "")
  public VbWordTypeEnum getM() {
    return m;
  }

  public void setM(VbWordTypeEnum m) {
    this.m = m;
  }

  public VbWord v(Double v) {
    this.v = v;
    return this;
  }

   /**
   * Get v
   * @return v
  **/
  @ApiModelProperty(example = "null", value = "")
  public Double getV() {
    return v;
  }

  public void setV(Double v) {
    this.v = v;
  }

  public VbWord w(String w) {
    this.w = w;
    return this;
  }

   /**
   * Get w
   * @return w
  **/
  @ApiModelProperty(example = "null", value = "")
  public String getW() {
    return w;
  }

  public void setW(String w) {
    this.w = w;
  }

  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    VbWord vbWord = (VbWord) o;
    return Objects.equals(this.p, vbWord.p) &&
        Objects.equals(this.c, vbWord.c) &&
        Objects.equals(this.s, vbWord.s) &&
        Objects.equals(this.e, vbWord.e) &&
        Objects.equals(this.frq, vbWord.frq) &&
        Objects.equals(this.m, vbWord.m) &&
        Objects.equals(this.v, vbWord.v) &&
        Objects.equals(this.w, vbWord.w);
  }

  @Override
  public int hashCode() {
    return Objects.hash(p, c, s, e, frq, m, v, w);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class VbWord {\n");

    sb.append("    p: ").append(toIndentedString(p)).append("\n");
    sb.append("    c: ").append(toIndentedString(c)).append("\n");
    sb.append("    s: ").append(toIndentedString(s)).append("\n");
    sb.append("    e: ").append(toIndentedString(e)).append("\n");
    sb.append("    frq: ").append(toIndentedString(frq)).append("\n");
    sb.append("    m: ").append(toIndentedString(m)).append("\n");
    sb.append("    v: ").append(toIndentedString(v)).append("\n");
    sb.append("    w: ").append(toIndentedString(w)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}


text:
import extend = require("extend");
import got from "got";
import * as http from "http";
import * as https from "https";
import url = require("url");
import { Api } from "./Api";
import { ApiRequester } from "./ApiRequester";
import { Service } from "./Service";

/**
 * Object which represents a z/OS Connect EE server.
 *
 * Can be used to retrieve and create artifacts on the server.
 */
export class ZosConnect {

  private options: {};
  private uri: string;

  /**
   * Establish a connection to the server ready to work with APIs, Services and API Requesters.
   *
   * @param options A {@link http.RequestOptions}|{@link https.RequestOptions} which describes the
   * connection to the server
   */
  constructor(uri: string, options: http.RequestOptions | https.RequestOptions) {
    if (options === null || options === undefined) {
      throw new Error("An options object is required");
    }

    if (uri === null || uri === undefined) {
      throw new Error("Required uri or url not specified");
    }

    this.uri = uri;
    this.options = extend(this.options, options);
    if ("rejectUnauthorized" in this.options) {
      this.options = Object.assign(this.options,
        {https: {rejectUnauthorized: (options as https.RequestOptions).rejectUnauthorized}});
      // tslint:disable-next-line:no-string-literal
      delete this.options["rejectUnauthorized"];
    }
    if ("auth" in this.options) {
      const parts = (options as https.RequestOptions).auth.split(/:/);
      this.options = Object.assign(this.options, {username : parts[0]});
      this.options = Object.assign(this.options, {password : parts[1]});
      // tslint:disable-next-line:no-string-literal
      delete this.options["auth"];
    }
  }

  /**
   * Retrieve all the Services that are installed in the server.
   *
   * @returns An array of all the Service objects.
   */
  public async getServices(): Promise<Service[]> {
    let opOptions = {};
    opOptions = extend(opOptions, this.options);
    const requestUri = this.uri + "/zosConnect/services";

    const json = JSON.parse((await got(requestUri, opOptions)).body);
    const services: Service[] = [];
    for (const service of json.zosConnectServices) {
      let serviceOptions = {};
      serviceOptions = extend(serviceOptions, this.options);
      const serviceOptionsUri = requestUri + `/${service.ServiceName}`;
      services.push(new Service(serviceOptionsUri, serviceOptions, service.ServiceName, service.ServiceDescription,
        service.ServiceProvider));
    }
    return services;
  }

  /**
   * Retrieve the named Service from the server.
   *
   * @param serviceName The name of the service.
   * @returns The {@link Service}
   */
  public async getService(serviceName: string): Promise<Service> {
    let opOptions = {};
    opOptions = extend(opOptions, this.options);
    const requestUri = this.uri + `/zosConnect/services/${serviceName}`;

    const serviceData = JSON.parse((await got(requestUri, opOptions)).body);
    const invokeUrl = url.parse(serviceData.zosConnect.serviceInvokeURL);
    return new Service(requestUri, opOptions, serviceName, serviceData.zosConnect.serviceDescription,
      serviceData.zosConnect.serviceProvider);
  }

  /**
   * Retrieve all the APIs that are intalled in the server.
   *
   * @returns An array of all the API objects.
   */
  public async getApis(): Promise<Api[]> {
    let opOptions = {};
    opOptions = extend(opOptions, this.options);
    const requestUri = this.uri + "/zosConnect/apis";
    const json = JSON.parse((await got(requestUri, opOptions)).body);
    const apis = [];
    for (const api of json.apis) {
      let apiOptions = {};
      apiOptions = extend(apiOptions, this.options);
      const apiUri = requestUri + `/${api.name}`;
      apis.push(new Api(apiUri, apiOptions, api.name, api.version, api.description));
    }
    return apis;

  }

  /**
   * Retrieve the named API from the server.
   *
   * @param apiName The name of the API to retrieve.
   * @returns The {@link Api}
   */
  public async getApi(apiName: string): Promise<Api> {
    let opOptions = {};
    opOptions = extend(opOptions, this.options);
    const requestUri = this.uri + `/zosConnect/apis/${apiName}`;
    const json = JSON.parse((await got(requestUri, opOptions)).body);
    const apiUrl = url.parse(json.apiUrl);
    return new Api(requestUri, opOptions, apiName, json.version, json.description);
  }

  /**
   * Install a new API.
   *
   * @param aarFile The AAR file to install.
   * @returns The {@link Api} that was installed
   */
  public async createApi(aarFile: Buffer): Promise<Api> {
    let opOptions = {};
    let requestOptions = {} as https.RequestOptions;
    requestOptions = extend(requestOptions, this.options);
    const requestUri = this.uri + "/zosConnect/apis";
    requestOptions.method = "POST";
    // tslint:disable-next-line:no-string-literal
    requestOptions["body"] = aarFile;
    requestOptions.headers = {
      "Content-Type": "application/zip",
    };
    opOptions = extend(opOptions, requestOptions);
    const json = JSON.parse((await got(requestUri, opOptions)).body);
    const apiUrl = url.parse(json.apiUrl);
    return new Api(requestUri + json.name, opOptions, json.name, json.version, json.description);
  }

  /**
   * Install a new Service.
   *
   * @param sarFile The SAR file to install.
   * @returns The {@link Service} that was installed.
   */
  public async createService(sarFile: Buffer): Promise<Service> {
    let opOptions = {};
    let requestOptions = {} as https.RequestOptions;
    requestOptions = extend(requestOptions, this.options);
    const requestUri = this.uri + "/zosConnect/services";
    requestOptions.method = "POST";
    // tslint:disable-next-line:no-string-literal
    requestOptions["body"] = sarFile;
    requestOptions.headers = {
      "Content-Type": "application/zip",
    };
    opOptions = extend(opOptions, requestOptions);
    const serviceData = JSON.parse((await got(requestUri, opOptions)).body);
    return new Service(requestUri + serviceData.zosConnect.serviceName, opOptions, serviceData.zosConnect.serviceName,
      serviceData.zosConnect.serviceDescription, serviceData.zosConnect.serviceProvider);
  }

  /**
   * Retrieve all the API Requsters installed in the server.
   *
   * @returns An array of the API Requester objects.
   */
  public async getApiRequesters(): Promise<ApiRequester[]> {
    let opOptions = {};
    opOptions = extend(opOptions, this.options);
    const requestUri = this.uri + "/zosConnect/apiRequesters";
    const json = JSON.parse((await got(requestUri, opOptions)).body);
    const apis = [];
    for (const apiRequester of json.apiRequesters) {
      let apiRequesterOptions = {};
      apiRequesterOptions = extend(apiRequesterOptions, this.options);
      const apiRequesterUri = requestUri + `/${apiRequester.name}`;
      apis.push(new ApiRequester(apiRequesterUri, apiRequesterOptions, apiRequester.name, apiRequester.version,
        apiRequester.description, apiRequester.connectionRef, apiRequester.status));
    }
    return apis;
  }

  /**
   * Retrieve the named API Requester.
   * @param name The name of the API Requester.
   * @returns The {@link ApiRequester}
   */
  public async getApiRequester(name: string): Promise<ApiRequester> {
    let opOptions = {};
    opOptions = extend(opOptions, this.options);
    const requestUri = this.uri + `/zosConnect/apiRequesters/${name}`;
    const json = JSON.parse((await got(requestUri, opOptions)).body);
    return new ApiRequester(requestUri, opOptions, json.name, json.version, json.description, json.connection,
      json.status);
  }

  /**
   * Install a new API Requester.
   * @param araFile The ARA file.
   * @returns The {@link ApiRequester} that was installed.
   */
  public async createApiRequester(araFile: Buffer): Promise<ApiRequester> {
    let opOptions = {};
    let requestOptions = {} as https.RequestOptions;
    requestOptions = extend(requestOptions, this.options);
    const requestUri = this.uri + "/zosConnect/apiRequesters";
    requestOptions.method = "POST";
    // tslint:disable-next-line:no-string-literal
    requestOptions["body"] = araFile;
    requestOptions.headers = {
      "Content-Type": "application/zip",
    };
    opOptions = extend(opOptions, requestOptions);
    const apiRequester = JSON.parse((await got(requestUri, opOptions)).body);
    const apiRequesterUri = requestUri + "/" + apiRequester.name;
    return new ApiRequester(apiRequesterUri, opOptions, apiRequester.name, apiRequester.version,
      apiRequester.description, apiRequester.connection, apiRequester.status);
  }
}


text:
use strict;
use lib "./lib/perl5/";

=head1 NAME

callAll_test.pl - A SAMP Test Client

=head1 SYNOPSIS

  % ./notifyAll_test.pl [-port 8003]

=head1 DESCRIPTION

This is a simple SAMP client which will register itself with a SAMP Hub and
call callAll( ) in the Hub periodlically. By default it will generate
coord.pointAt messages.

This application implements a version of the protocol defined by the Standard
Profile XML-RPC API as specified in the IVOA Working Draft document.

=cut

use vars qw/ $VERSION $host $port $pid /;
'$Revision: 1.22 $ ' =~ /.*:\s(.*)\s\$/ && ($VERSION = $1);

use Carp;
use Getopt::Long;
use Socket;
use Net::Domain qw(hostname hostdomain);

use SAMP::Data;
use SAMP::Client;
use SAMP::Client::Util;

use sigtrap qw/ die normal-signals error-signals /;

$SIG{INT} = sub {
   print "Trapped SIGINT\n";
   exit;
};

$SIG{TERM} = sub {
   print "Trapped SIGTERM\n";
   exit;
};

# C O M MA N D   L I N E -------------------------------------------------------

print "Testbed SAMP CallAll Client v$VERSION\n\n";

# Handle command line options
GetOptions( "port=s"  => \$port );

unless ( defined $port ) {
   $port = 8004;
}

unless ( defined $host ) {
   # localhost.localdoamin
   $host = inet_ntoa(scalar(gethostbyname(hostname())));
}

my %metadata;
$metadata{"samp.name"} = "callAll";
$metadata{"samp.description.text"} = "This is a SAMP test client that periodically calls callAll.";
$metadata{"samp.description.html"} = "
This is a SAMP test client that periodically calls callAll.
";
$metadata{"samp.icon.url"} =  "http://www.babilim.co.uk/png/babilim_logo.png";
$metadata{$metadata{"samp.name"}.".version"} = $VERSION;
SAMP::Client::metadata( %metadata );

# H U B   D I S C O V E R Y ----------------------------------------------------

my @childs;
while( 1 ) {

   SAMP::Client::Util::hub_discovery( );

# X M L - R P C  D A E M O N -----------------------------------------------------

   print "Forking server...\n";
   $pid = SAMP::Client::Util::fork_server( $host, $port );
   push @childs, $pid;

   print "Waiting for server to start...\n";
   sleep(5);

# R E G I S T E R   C A L L B A C K  A D D R E S S  W I T H  H U B -------------

   print "Sending XMLRPC Callback address to Hub...\n";
   my $address = SAMP::Data::string( "http://$host:$port" );
   my $status = SAMP::Client::Util::send_xmlrpc_callback( $address );
   if ( $status ) {
      print "Sucessfully registered callback address with Hub\n";
   } else {
      print "Problems registering callback address with Hub. Hub down?\n";
   }

# R E G I S T E R   M - T Y P E S  W I T H  H U B -----------------------------

   print "Sending list of MTypes to Hub...\n";
   my @mtypes;
   push @mtypes, "app.event.starting";
   push @mtypes, "app.event.stopping";

   my $data = SAMP::Data::list( @mtypes );
   my $status = SAMP::Client::Util::send_mtypes( $data );
   if ( $status ) {
      print "Sucessfully registered MTypes with Hub\n";
   } else {
      print "Problems registering MTypes with Hub. Hub down?\n";
   }

   print "Done registering with the hub, waiting to handle...\n";

# H E A R T B E A T -----------------------------------------------------------

   print "Forking heartbeat...\n";
   if ($pid = fork) {
       print "Continuing... pid = $pid\n";
   } elsif ( defined $pid && $pid == 0 ) {
       print "Forking heartbeat process... pid = $pid\n";
       while( 1 ) {
          sleep(10);
          print "\nHeartbeat at " . SAMP::Util::time_in_UTC() . "\n";

	  my $status;
          if ( SAMP::Discovery::hub_running( ) ) {
	     print "Calling callAll( coord.pointAt ) in Hub\n";
             my $rpc = new XMLRPC::Lite();
             my $url = SAMP::Discovery::get_xmlrpc_url( );
             $rpc->proxy( $url );

             my %message;
	     $message{mtype} = SAMP::Data::string( "coord.pointAt" );
	     my %params = ( "ra" => "180.0", "dec" => "-45.0" );
	     $message{params} = SAMP::Data::map( %params );
	     print "Passing RA = $params{ra}, Dec = $params{dec} to Hub\n";

             my ( $return, $status );
             eval{ $return = $rpc->call( 'samp.hub.callAll',
      			SAMP::Client::private_key( ),
			SAMP::Client::Util::generate_msg_id( ),
			\%message ); };
             unless ( $@ || $return->fault() ) {
                $status = $return->result();
             }

          } else {
	     print "Hub no longer running. Exiting...\n";
	     exit(0);
	  }

       }
   }
   push @childs, $pid;

# M A I N   L O O P -----------------------------------------------------------

   print "Main thread waiting for harvest at " . SAMP::Util::time_in_UTC() . "\n";
   foreach ( @childs ) {
      waitpid($_, 0);
      print "Child process $_ has died\n";
   }
   undef @childs;
}

# C L E A N   U P -------------------------------------------------------------

END {

   # only unregister if we're the parent process
   if( defined $pid && $pid != 0 ) {
      print "Un-registering with Hub...\n";
      SAMP::Client::Util::unregister();
      print "Parent process exiting...\n";
   } else {
      print "Child process exiting...\n";
   }
   exit;
}

=back

=head1 REVISION

$Id: samp_client.pl,v 1.22 2008/03/17 17:23:31 aa Exp $

=head1 AUTHORS

Alasdair Allan E<lt>alasdair@babilim.co.ukE<gt>

=head1 COPYRIGHT

Copyright (C) 2008 Babilim Light Industries. All Rights Reserved.

=cut

# S A M P : : C L I E N T ------------------------------------------------------

package samp::client;
use base ( "SAMP::Client" );

#1;


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

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>tesseract: /home/stweil/src/github/tesseract-ocr/tesseract/textord/bbgrid.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

tesseract
    4.00.00dev

Namespaces |
Functions

bbgrid.cpp File Reference

#include "bbgrid.h"

#include "helpers.h"

#include "ocrblock.h"

Go to the source code of this file.

Namespaces

  	tesseract

Functions

Pix * 	tesseract::GridReducedPix (const TBOX &box, int gridsize, ICOORD bleft, int *left, int *bottom)

Pix * 	tesseract::TraceOutlineOnReducedPix (C_OUTLINE *outline, int gridsize, ICOORD bleft, int *left, int *bottom)

Pix * 	tesseract::TraceBlockOnReducedPix (BLOCK *block, int gridsize, ICOORD bleft, int *left, int *bottom)

textord

bbgrid.cpp

Generated on Wed Mar 28 2018 19:53:41 for tesseract by

     1.8.13


text:
Rails.application.routes.draw do

  devise_for :admins

  mount Pistoncms::Engine => '/', :as => 'pistoncms'

end


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
	<string name="app_name">X_Gyroscope.Droid</string>
</resources>


text:
<?php
class StatusTable_Model extends CI_Model {

	public function __construct() {
		$this -> load -> database();
	}

	function getLockedChequeByPF($pfIndex, $chequedate) {
		$this -> db -> where('lock_pf', $pfIndex);
		$this -> db -> where('chequedate', $chequedate);
		$this -> db -> where('status_flag', 'NOW');
		$query = $this -> db -> get('status_table');
		return $query -> result();
	}

	function changeStatusofCheque($cheque_number, $micr_code, $account_number, $tc, $cheque_date, $staus_value) {
		if ($staus_value === '') {
			return FALSE;
		}
		$this -> db -> where('CHEQUENO', $cheque_number) -> where('MICRCODE', $micr_code) -> where('TC', $tc) -> where('ACCOUNTNO', $account_number) -> where('CHEQUEDATE', $cheque_date) -> set("STATUS_FLAG", $staus_value);
		return $this -> db -> update('status_table');
		//return TRUE;
	}

	function getPendingChequeByPF($pfIndex, $chequedate, $sequence) {
		//Finding the HVT Instrument that is pending
		$sqlQuery = "select accountno, sum(amount) from ccpc_hvt_instruments_calling
				where accountno in(
				SELECT accountno FROM `status_flag_values` sf, status_table st WHERE
				st.chequedate = '$chequedate' and st.lock_pf = '$pfIndex'
				and sf.status_type = 'pending' and
				sf.status_flag = st.status_flag
				group by accountno)
				and chequedate = '$chequedate'
				group by accountno order by sum(amount) desc LIMIT $sequence,1";

		$query = $this -> db -> query($sqlQuery);

		if ($query -> num_rows() > 0) {
			$topAccountno = $query -> row() -> accountno;
			$sqlQuery = "SELECT st.* FROM `status_flag_values` sf, status_table st WHERE
							st.chequedate = '$chequedate' and
							st.lock_pf = '$pfIndex' and
							sf.status_type = 'pending' and
							sf.status_flag = st.status_flag and
							st.accountno = '$topAccountno'";
			$queryST = $this -> db -> query($sqlQuery);
			return $queryST -> result();
		} else {
			return FALSE;
		}
	}

	function getNumberof_pending_chequeSets_byPF($pfIndex, $chequedate) {
		$sqlQuery = "SELECT count(distinct(accountno)) as 'NO_PENDING' FROM `status_flag_values` sf, status_table st WHERE
				st.chequedate = '$chequedate' and st.lock_pf = '$pfIndex'
				and sf.status_type = 'pending' and
				sf.status_flag = st.status_flag";
		return $this->db->query($sqlQuery)->row()->NO_PENDING;
	}

}


text:
package org.hoteia.qalingo.core.web.mvc.controller.common;

import java.util.Locale;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.hoteia.qalingo.core.domain.enumtype.BoUrls;
import org.hoteia.qalingo.core.i18n.enumtype.ScopeWebMessage;
import org.hoteia.qalingo.core.pojo.RequestData;
import org.hoteia.qalingo.core.web.mvc.controller.AbstractBackofficeQalingoController;
import org.hoteia.qalingo.core.web.mvc.viewbean.SeoDataViewBean;
import org.hoteia.qalingo.core.web.servlet.ModelAndViewThemeDevice;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 *
 */
@Controller("faqController")
public class FaqController extends AbstractBackofficeQalingoController {

	@RequestMapping(BoUrls.FAQ_URL)
	public ModelAndView searchEngineSetting(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
		ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.FAQ.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);

        return modelAndView;
	}

    @Override
    protected SeoDataViewBean initSeo(final HttpServletRequest request, final Model model) throws Exception {
        SeoDataViewBean seoDataViewBean = super.initSeo(request, model);
        final RequestData requestData = requestUtil.getRequestData(request);
        final Locale locale = requestData.getLocale();
        final String pageKey = BoUrls.FAQ.getKey();
        final String pageTitle = getSpecificMessage(ScopeWebMessage.SEO, getMessageTitleKey(pageKey), locale);
        seoDataViewBean.setPageTitle(pageTitle);
        return seoDataViewBean;
    }

}


text:
#import <Kiwi/Kiwi.h>
#import "MMAssert.h"

SPEC_BEGIN(MMAssertSpec)

describe(@"Assertions", ^{

    context(@"MMAssert", ^{
        context(@"when called with a true expression", ^{

            it(@"should do nothing", ^{
                BOOL tester = NO;

                MMAssert(YES);

                tester = YES;
                [[theValue(tester) should] beTrue];
            });
        });

        context(@"when called with a false expression", ^{
            context(@"without a description", ^{
                it(@"should throw an exception with the default reason", ^{

                    id loggerMock = [KWMock nullMockForClass:[MMLogger class]];
                    // TODO: Figure out how to capture the reason
                    // Then, we can test if the reason ends with __PRETTY_FUNCTION__.
                    KWCaptureSpy *spy = [loggerMock captureArgument:@selector(error:) atIndex:0];

                    [MMLogger stub:@selector(sharedLogger) andReturn:loggerMock];
                    [[loggerMock should] receive:@selector(error:) withCount:1 arguments:any()];

                    [[theBlock(^{
                        MMAssert(NO);
                    }) should] raiseWithName:NSInternalInconsistencyException];

                    NSString *reason = spy.argument;

                    [[reason should] equal:@"%@"];
                });
            });

            context(@"with a description", ^{
                it(@"should throw an exception with reason containing the supplied description", ^{

                    id loggerMock = [KWMock nullMockForClass:[MMLogger class]];
                    // TODO: Figure out how to capture the reason
                    // Then, we can test if the reason ends with the suppplied description
                    KWCaptureSpy *spy = [loggerMock captureArgument:@selector(error:) atIndex:0];

                    [MMLogger stub:@selector(sharedLogger) andReturn:loggerMock];
                    [[loggerMock should] receive:@selector(error:) withCount:1 arguments:any()];

                    [[theBlock(^{
                        MMAssert(NO, "Oops!");
                    }) should] raiseWithName:NSInternalInconsistencyException];

                    NSString *reason = spy.argument;

                    [[reason should] equal:@"%@"];
                });
            });
        });

    });

    context(@"MMParameterAssert", ^{
        context(@"when called with a true expression", ^{

            it(@"should do nothing", ^{
                BOOL tester = NO;

                MMParameterAssert(YES);

                tester = YES;
                [[theValue(tester) should] beTrue];
            });
        });

        context(@"when called with a false expression", ^{
            it(@"should throw an exception with the default reason", ^{

                id loggerMock = [KWMock nullMockForClass:[MMLogger class]];
                // TODO: Figure out how to capture the reason
                // Then, we can test if the reason ends with __PRETTY_FUNCTION__.
                KWCaptureSpy *spy = [loggerMock captureArgument:@selector(error:) atIndex:0];

                [MMLogger stub:@selector(sharedLogger) andReturn:loggerMock];
                [[loggerMock should] receive:@selector(error:) withCount:1 arguments:any()];

                [[theBlock(^{
                    MMParameterAssert(NO);
                }) should] raiseWithName:NSInternalInconsistencyException];

                NSString *reason = spy.argument;

                [[reason should] equal:@"%@"];
            });
        });

    });
});

SPEC_END


text:
/* merge - three-way file merge */

/* Copyright 1991, 1992, 1993, 1994, 1995 Paul Eggert
   Distributed under license by the Free Software Foundation, Inc.

This file is part of RCS.

RCS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

RCS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with RCS; see the file COPYING.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Report problems and direct all questions to:

    rcs-bugs@cs.purdue.edu

*/

#include "rcsbase.h"

static void badoption P((char const*));

static char const usage[] =
 "\nmerge: usage: merge [-AeEpqxX3] [-L lab [-L lab [-L lab]]] file1 file2 file3";

	static void
badoption(a)
	char const *a;
{
	error("unknown option: %s%s", a, usage);
}

mainProg(mergeId, "merge", "$FreeBSD$")
{
	register char const *a;
	char const *arg[3], *label[3], *edarg = 0;
	int labels, tostdout;

	labels = 0;
	tostdout = false;

	for (;  (a = *++argv)  &&  *a++ == '-';  --argc) {
		switch (*a++) {
			case 'A': case 'E': case 'e':
				if (edarg  &&  edarg[1] != (*argv)[1])
					error("%s and %s are incompatible",
						edarg, *argv
					);
				edarg = *argv;
				break;

			case 'p': tostdout = true; break;
			case 'q': quietflag = true; break;

			case 'L':
				if (3 <= labels)
					faterror("too many -L options");
				if (!(label[labels++] = *++argv))
					faterror("-L needs following argument");
				--argc;
				break;

			case 'V':
				printf("RCS version %s\n", RCS_version_string);
				exitmain(0);

			default:
				badoption(a - 2);
				continue;
		}
		if (*a)
			badoption(a - 2);
	}

	if (argc != 4)
		faterror("%s arguments%s",
			argc<4 ? "not enough" : "too many",  usage
		);

	/* This copy keeps us `const'-clean.  */
	arg[0] = argv[0];
	arg[1] = argv[1];
	arg[2] = argv[2];

	for (;  labels < 3;  labels++)
		label[labels] = arg[labels];

	if (nerror)
		exiterr();
	exitmain(merge(tostdout, edarg, label, arg));
}

#if RCS_lint
#	define exiterr mergeExit
#endif
	void
exiterr()
{
	tempunlink();
	_exit(DIFF_TROUBLE);
}


text:
Polyfill to remove click delays on browsers with touch UIs. Packaged for ClojureScript.

## Usage

Add

```clojure
[dmohs/fastclick-cljs-packaged "1.0.6"]
```

to your `project.clj` or `build.boot` file, then import FastClick into your ClojureScript namespace and enable it for the document body:

```clojure
(ns my-app
    (:require FastClick))

(js/FastClick.attach (.-body js/document))
```


text:
local SpatialAveragePooling, parent = torch.class('nn.SpatialAveragePooling', 'nn.Module')

function SpatialAveragePooling:__init(kW, kH, dW, dH, padW, padH)
   parent.__init(self)

   self.kW = kW
   self.kH = kH
   self.dW = dW or 1
   self.dH = dH or 1
   self.padW = padW or 0
   self.padH = padH or 0
   self.ceil_mode = false
   self.count_include_pad = true
   self.divide = true
end

function SpatialAveragePooling:ceil()
   self.ceil_mode = true
   return self
end

function SpatialAveragePooling:floor()
   self.ceil_mode = false
   return self
end

function SpatialAveragePooling:setCountIncludePad()
   self.count_include_pad = true
   return self
end

function SpatialAveragePooling:setCountExcludePad()
   self.count_include_pad = false
   return self
end

local function backwardCompatible(self)
   if self.ceil_mode == nil then
      self.ceil_mode = false
      self.count_include_pad = true
      self.padH = 0
      self.padW = 0
   end
end

function SpatialAveragePooling:updateOutput(input)
   backwardCompatible(self)
   input.THNN.SpatialAveragePooling_updateOutput(
      input:cdata(),
      self.output:cdata(),
      self.kW, self.kH,
      self.dW, self.dH,
      self.padW, self.padH,
      self.ceil_mode,
      self.count_include_pad
   )
   -- for backward compatibility with saved models
   -- which are not supposed to have "divide" field
   if not self.divide then
     self.output:mul(self.kW*self.kH)
   end
   return self.output
end

function SpatialAveragePooling:updateGradInput(input, gradOutput)
   if self.gradInput then
      input.THNN.SpatialAveragePooling_updateGradInput(
         input:cdata(),
         gradOutput:cdata(),
         self.gradInput:cdata(),
         self.kW, self.kH,
         self.dW, self.dH,
         self.padW, self.padH,
         self.ceil_mode,
         self.count_include_pad
      )
      -- for backward compatibility
      if not self.divide then
         self.gradInput:mul(self.kW*self.kH)
      end
      return self.gradInput
   end
end

function SpatialAveragePooling:__tostring__()
   local s = string.format('%s(%dx%d, %d,%d', torch.type(self),
                            self.kW, self.kH, self.dW, self.dH)
   if (self.padW or self.padH) and (self.padW ~= 0 or self.padH ~= 0) then
      s = s .. ', ' .. self.padW .. ','.. self.padH
   end
   s = s .. ')'
   return s
end


text:
<animated-vector
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:aapt="http://schemas.android.com/aapt"
  android:drawable="@drawable/vd_pathmorph_crosstick_tick">

  <target android:name="tickPath">
    <aapt:attr name="android:animation">
      <objectAnimator
        android:duration="@integer/crosstick_duration"
        android:interpolator="@android:interpolator/fast_out_slow_in"
        android:propertyName="pathData"
        android:valueFrom="@string/path_tick"
        android:valueTo="@string/path_cross"
        android:valueType="pathType"/>
    </aapt:attr>
  </target>

  <target android:name="crossTickGroup">
    <aapt:attr name="android:animation">
      <objectAnimator
        android:duration="@integer/crosstick_duration"
        android:interpolator="@android:interpolator/fast_out_slow_in"
        android:propertyName="rotation"
        android:valueFrom="0"
        android:valueTo="180"/>
    </aapt:attr>
  </target>

</animated-vector>


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

//we need to call PHP's session object to access it through CI
class Main extends CI_Controller {

   function __construct()
    {
        // this is your constructor
        parent::__construct();
        $this->load->helper('form');
    	$this->load->model('core'); // load model
    	$this->load->model('towns'); // load model
    }
 function index()
 {
   if($this->session->userdata('logged_in'))
   {
     $session_data = $this->session->userdata('logged_in');
     $data['fname'] = $session_data['fname'];
     $data['lname'] = $session_data['lname'];
     $data['level'] = $session_data['level'];
   }
   else
   {
     //If no session, redirect to login page
     redirect('login');
   }
 }

 function logout()
 {
   // Unset User Data
        $this->session->unset_userdata('logged_in');
        $this->session->unset_userdata('user_id');
        $this->session->unset_userdata('username');
        $this->session->sess_destroy();
        // Set Message
        $this->session->set_flashdata('logged_out','You have been Logged Out');
        $this->output->set_header("Cache-Control: no-store, no-cache, must-revalidate, no-transform, max-age=0, post-check=0, pre-check=0");
        $this->output->set_header("Pragma: no-cache");
        redirect('login', 'refresh');
 }

}


text:
<?php

class mysql {

    //definicion de la clase abstracta

    private $conection =-1;

    private $user="";

    private $pass="";

    private $dbname="";

    private $host="server";

    //private $port=5432;

    private $sql="";

    private $connect="";

    //metodos de la clase abstracta

    function __construct($user="user",$pass="pass",$dbname="dbname"){
	    $this->user=$user;
	    $this->pass=$pass;
	    $this->dbname=$dbname;
    }

    private function get($item){
	    return $this->$item;
    }

    private function set($item,$data){
	    $this->$item=$data;
    }

    protected function Conectar(){
	    $this->connect = new mysqli($this->host, $this->user, $this->pass, $this->dbname);
	$this->conection = 1;
    }

    protected function Desconectar(){
	$this->conection = -1;
	$this->connect->close();
    }

    protected function Ejecutar_consulta(){
	    if($this->conection == -1){
		    throw new Exception("mysql->Ejecutar_consulta(): No hay una conexion abierta");
		    return FALSE;
	    }else{
		    if(strcmp($this->sql, "") == 0){
			    throw new Exception("mysql->Ejecutar_consulta(): No hay consulta");
			    return FALSE;
		    }else{
			    if($this->valida_select()){
				    $resultset=$this->connect->query($this->get_Sql());
				    if($resultset != FALSE){
					    if($resultset->num_rows>0){
						    return $this->convertir_matriz($resultset);
$resultset->close();
					    }else{
						    return FALSE;
					    }
				    }else{
					    throw new Exception("mysql->Ejecutar_consulta(): No se ejecuto la consulta");
				    }

			    }else{
				    throw new Exception("mysql->Ejecutar_consulta(): No es una consulta SELECT");
				    return FALSE;
			    }
		    }
	    }
    }

    private function convertir_matriz($resultset){
	    if($resultset != FALSE){
		    $i=0;
		    $j=0;
		    $array=NULL;
		    while($row=$resultset->fetch_row()){
			    foreach ($row as $data) {
				    $array[$i][$j]=$data;
				    $j++;
			    }
			    $i++;
			    $j=0;
		    }
		    return $array;
	    }else{
		    return FALSE;
	    }
    }

    private function valida_select(){
	    if(strcmp($this->get_Sql(), "") == 0){
		    return FALSE;
	    }else{
		    $select=substr($this->sql, 0, 6);
		    if(strcasecmp($select, "SELECT") == 0){
			    return TRUE;
		    }else{
			    return FALSE;
		    }
	    }
    }

    protected function Ejecutar_comando(){
	    if($this->conection == -1){
			    throw new Exception("mysql->Ejecutar_comando(): No hay conexion");
			    return FALSE;
	    }else{
		    if(strcmp($this->sql, "") == 0){
			    throw new Exception("mysql->Ejecutar_comando(): No hay consulta");
			    return FALSE;
		    }else{
			    $command=$this->connect->query($this->get_Sql());
			    if($command != FALSE){
				    return $this->connect->affected_rows;
			    }
			    else{
				    throw new Exception("mysql->Ejecutar_comando(): No se ejecuto correctamente el comando");
				    return FALSE;
			    }
		    }
	    }
    }

    public function get_Sql(){
	    return $this->get("sql");
    }

    public function set_Sql($data=""){
	    $this->set("sql", $data);
    }

}
?>


text:
package moe.nightfall.srails.common

import moe.nightfall.srails.common.init.Blocks
import moe.nightfall.srails.common.tileentity.effect.EffectOnTick
import net.minecraft.block.Block
import net.minecraft.item.Item
import net.minecraftforge.common.MinecraftForge
import net.minecraftforge.fml.common.event.{FMLInitializationEvent, FMLPostInitializationEvent, FMLPreInitializationEvent}
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.TickEvent

private[srails] class Proxy {

  def preInit(e: FMLPreInitializationEvent) {
    MinecraftForge.EVENT_BUS.register(this);
    Blocks.init()

  }

  def init(e: FMLInitializationEvent) {

  }

  def postInit(e: FMLPostInitializationEvent) {

  }

  def registerModel(instance: Item, id: String) {}

  def registerModel(instance: Block, id: String) {}

  val isClient = false

  @SubscribeEvent
  def onTickEvent(event: TickEvent): Unit = {
    EffectOnTick.onTickEvent(event)
  }

}


text:
<?php
	/*
	 * This sample will show all SYSTEM processes.
	 * MQWeb runs on localhost and is listening on port 8081.
	 */
	$url = "http://localhost:8081/api/process/inquire/PIGEON/SYSTEM*";

	$curl = curl_init();
	curl_setopt($curl, CURLOPT_URL, $url);
	curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

	if ( ($response = curl_exec($curl)) === false )	{
		$err = curl_error($curl);
		echo "An HTTP error occurred while getting process information: $err\n";
	}
	else {
		$json = json_decode($response);
		if ( isset($json->error) ) {
			echo "An MQ error occurred while inquiring processes.\n";
			echo "Reason Code: {$json->error->reason->code} - {$json->error->reason->desc}\n";
		}
		else {
			if ( isset($json->data) && count($json->data) > 0 ) {
				foreach($json->data as $process)
				{
					echo $process->ProcessName->value;
					echo "\n";
				}
			}
			else
			{
				echo "No processes found\n";
			}
		}
	}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Nav2API - The Navigation library: WFAPI::NetworkInterface Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">

Main Page

Classes

Files

Related Pages

Class List

Class Hierarchy

Class Members

WFAPI::NetworkInterface

WFAPI::NetworkInterface Class Reference
#include <NetworkInterface.h>

Inheritance diagram for WFAPI::NetworkInterface:[legend]Collaboration diagram for WFAPI::NetworkInterface:[legend]List of all members.

Public Member Functions

 	NetworkInterface ()

virtual 	~NetworkInterface ()

void 	addNetworkListener (NetworkListener *listener)

SynchronousStatus 	clearNetworkLinkID ()

SynchronousStatus 	getKeepLinkUp (bool &val)

SynchronousStatus 	getNetworkLinkID (NetworkLinkID &networkLinkID)

void 	removeNetworkListener (NetworkListener *listener)

SynchronousStatus 	setKeepLinkUp (bool newVal)

SynchronousStatus 	setNetworkLinkID (const NetworkLinkID &networkLinkID)

AsynchronousStatus 	testServerConnection ()

NetworkInterfaceImpl * 	getImpl ()

Detailed Description

Interface class for network.

Constructor & Destructor Documentation

          WFAPI::NetworkInterface::NetworkInterface
          (

           )

Constructor.

          virtual WFAPI::NetworkInterface::~NetworkInterface
          (

           )
           [virtual]

Destructor.

Member Function Documentation

          void WFAPI::NetworkInterface::addNetworkListener
          (
          NetworkListener *
           listener
           )

Add a listener for network events.

See also:

NetworkListener

Parameters:

	listener 	The NetworkListener to add. It may not be deleted until it is removed by calling removeNetworkListener.

          SynchronousStatus WFAPI::NetworkInterface::clearNetworkLinkID
          (

           )

Remove any set NetworkLinkID and returns StatusCode::OK if the operation was successful.

Returns:

The status of the operation.

          NetworkInterfaceImpl* WFAPI::NetworkInterface::getImpl
          (

           )

Internal function.

          SynchronousStatus WFAPI::NetworkInterface::getKeepLinkUp
          (
          bool &
           val
           )

Get if it is set that the network link layer is to be keept up or not.

Parameters:

	val 	Set if to keep network link up or not.

Returns:

The status of the operation, statusCode::OK if the operation was successful.

          SynchronousStatus WFAPI::NetworkInterface::getNetworkLinkID
          (
          NetworkLinkID &
           networkLinkID
           )

Get the currently set NetworkLinkID.

Parameters:

	networkLinkID 	Set to the current NetworkLinkID.

Returns:

The status of the operation, statusCode::OK if the operation was successful.

          void WFAPI::NetworkInterface::removeNetworkListener
          (
          NetworkListener *
           listener
           )

Remove a listener.

Parameters:

	listener 	The NetworkListener to remove. It should now be deleted by caller, unless caller keeps it around for later use.

          SynchronousStatus WFAPI::NetworkInterface::setKeepLinkUp
          (
          bool
           newVal
           )

Set if to keep the network link layer up or dissconnect it if it is not used.

Parameters:

	newVal 	If to keep network link up.

Returns:

The status of the operation, statusCode::OK if the operation was successful.

          SynchronousStatus WFAPI::NetworkInterface::setNetworkLinkID
          (
          const NetworkLinkID &
           networkLinkID
           )

Set the current NetworkLinkID.

Parameters:

	networkLinkID 	The new current NetworkLinkID.

Returns:

The status of the operation, statusCode::OK if the operation was successful.

          AsynchronousStatus WFAPI::NetworkInterface::testServerConnection
          (

           )

This asynchronous function starts a test of the connection to the server using the current NetworkLinkID, when operation is done the added NetworkListeners will get a callback with the RequestID returned by this call.

Returns:

The status and if status is OK the RequestID that will be returned in the NetworkListeners testServerConnectionReply function.

The documentation for this class was generated from the following file:

NetworkInterface.h

<address style="align: right;">Generated on Mon Jun 28 20:50:17 2010 for Nav2API - The Navigation library by

 1.4.7 </address>


text:
package manager

import "github.com/pkg/errors"

//InstanceManager manages the instances of a module
type InstanceManager struct {
	manager
	factoryManager FactoryManager
	factory        InstanceFactory
	mod            Module
}

//CreateInstanceManager create and empty instance manager
func CreateInstanceManager(parent Module, factoryManager FactoryManager) *InstanceManager {
	return &InstanceManager{
		manager:        newManager(),
		factoryManager: factoryManager,
		factory:        factoryManager.GetInstanceFactory(),
		mod:            parent,
	}
}

//AddInstance add an instance to a module
func (im InstanceManager) AddInstance(source Module, name string) error {
	newInstance := im.factory.CreateInstance(source, im.mod, name, im.factoryManager)
	err := im.add(name, newInstance)
	if err != nil {
		return errors.Wrap(err, "Could not add instance")
	}

	portList, err := source.GetPortManager().ListPorts()
	if err != nil {
		return errors.Wrap(err, "Could not get port list of source module")
	}

	for _, port := range portList {
		pm := newInstance.GetPinManager()
		err = pm.addPin(port.Name(), port.Direction())
		if err != nil {
			return errors.Wrap(err, "Could not add pin to new instance")
		}
	}
	source.AddInstantiation(newInstance)

	return nil
}

//ListInstances returns the list of instances in a module
func (im InstanceManager) ListInstances() ([]Instance, error) {
	ol, err := im.list()
	if err != nil {
		return nil, errors.Wrap(err, "Could not list instances")
	}

	rv := make([]Instance, len(ol))
	for i, inst := range ol {
		rv[i] = inst.(Instance)
	}
	return rv, nil
}

//GetInstanceByName returns the instance with the specified name or nil
func (im InstanceManager) GetInstanceByName(name string) (Instance, error) {
	modIface := im.getByName(name)
	if modIface == nil {
		return nil, errors.New("Could not find instance")
	}
	return modIface.(Instance), nil
}

//DeleteInstance removes an instance in a module
func (im InstanceManager) DeleteInstance() error {
	//TODO
	panic("NotImplemented")
}