text:
using System;
using System.Collections.Generic;
using Umbraco.Core.Logging;
using Umbraco.Core.ObjectResolution;

namespace Umbraco.Web.Mvc
{
	/// <summary>
	/// A resolver for storing IFilteredControllerFactories
	/// </summary>
	public sealed class FilteredControllerFactoriesResolver : ManyObjectsResolverBase<FilteredControllerFactoriesResolver, IFilteredControllerFactory>
	{
	    /// <summary>
	    /// Constructor
	    /// </summary>
	    /// <param name="logger"></param>
	    /// <param name="factories"></param>
	    /// <param name="serviceProvider"></param>
	    internal FilteredControllerFactoriesResolver(IServiceProvider serviceProvider, ILogger logger, IEnumerable<Type> factories)
            : base(serviceProvider, logger, factories)
		{

		}

		public IEnumerable<IFilteredControllerFactory> Factories
		{
			get { return Values; }
		}
	}
}


text:
package com.fanbuting.web;

import com.fanbuting.entity.TokenBean;
import com.fanbuting.service.SystemService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ResourceLoader;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

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

@RestController
public class SiteMassageController {
	private static final Logger LOG = LoggerFactory.getLogger(SiteMassageController.class);

	@Autowired
	private SystemService systemService;

	@RequestMapping(method = RequestMethod.GET, value = "/service/rest/v1/message/siteMessage")
	public String getSiteMessage(@RequestParam(value = "readFlag", defaultValue="0") Integer readFlag,
							   @RequestParam("pageIndex") Integer pageIndex) {
		return systemService.getSiteMessage(readFlag, pageIndex).toString();
	}

	@RequestMapping(method = RequestMethod.POST, value = "/service/rest/v1/message/siteMessage")
	public String setSiteMessageReadFlag(@RequestParam("messageId") Long messageId,
								 @RequestParam("readFlag") Integer readFlag,
								 @RequestAttribute(value="tokenBean") TokenBean tb)
	{
		return systemService.setSiteMessageReadFlag(tb, messageId, readFlag).toString();
	}
}

redpajama_set_name: RedPajamaGithub


text:
<?php
/*
Template Name: Shop Page
*/

get_header(); ?>

<?php echo get_the_title(); ?>

	<?php while(have_posts()):the_post()?>
		<?php the_content(); ?>
	<?php endwhile; ?>

<?php get_footer(); ?>


text:
id: 5900f4e81000cf542c50fffb
title: 'Problema 380: Labirintos fantásticos!'
challengeType: 5
forumTopicId: 302044
dashedName: problem-380-amazing-mazes
---

# --description--

Um labirinto $m×n$ é uma grade retangular $m×n$ com paredes colocadas entre as células da malha de forma que haja exatamente um caminho do quadrado superior esquerdo para qualquer outro quadrado. Os exemplos a seguir são de um labirinto 9×12 e de um labirinto 15×20:

<img class="img-responsive center-block" alt="labirinto 9x12 e labirinto 15x20" src="https://cdn.freecodecamp.org/curriculum/project-euler/amazing-mazes.gif" style="background-color: white; padding: 10px;" />

Considere $C(m, n)$ como o número de labirintos distintos $m×n$. Os labirintos que podem ser criados por rotação e reflexão de outro labirinto são considerados distintos.

Pode-se verificar que $C(1, 1) = 1$, $C(2, 2) = 4$, $C(3, 4) = 2415$ e $C(9, 12) = 2.5720\mathrm{e}\\,46$ (na notação científica, arredondado para 5 algarismos significantes).

Encontre $C(100, 500)$ e escreva sua resposta em uma string em notação científica arredondada para 5 algarismos significativos.

Ao dar sua resposta, use letra minúscula para separar a mantissa e o expoente. Ex: se a resposta for 1234567891011, o formato da resposta deve ser a string `1.2346e12`.

# --hints--

`amazingMazes()` deve retornar uma string.

```js
assert(typeof amazingMazes() === 'string');
```

`amazingMazes()` deve retornar a string `6.3202e25093`.

```js
assert.strictEqual(amazingMazes(), '6.3202e25093');
```

# --seed--

## --seed-contents--

```js
function amazingMazes() {

  return true;
}

amazingMazes();
```

# --solutions--

```js
// solution required
```


text:
import {updateConfig, websocketInit} from "./common/actions";

import "@babel/polyfill";
require('es6-promise').polyfill();

import 'isomorphic-fetch';
import * as ReactDOM from 'react-dom'
import Router from './router';

import './assets/app.css';
import {fetchProblems, startFetchingProblems} from "./problems/actions";
import {checkSessionStatus, fetchUsers} from "./users/actions";
import {fetchSubmissionStats} from "./submissions/actions";
import {fetchRanking, fetchRankingStartDate} from "./ranking/actions";
import {store} from "./common";

ReactDOM.render(
    Router,
    document.getElementById('app')
);

websocketInit();
store.dispatch<any>(updateConfig());
store.dispatch(startFetchingProblems());
store.dispatch<any>(fetchProblems());
store.dispatch<any>(fetchUsers());
store.dispatch<any>(fetchSubmissionStats());
store.dispatch<any>(fetchRanking());
store.dispatch<any>(fetchRankingStartDate());
store.dispatch<any>(checkSessionStatus());


text:
from contextlib import nullcontext as does_not_raise
from datetime import datetime
import json

import click
from click.testing import CliRunner
from click.exceptions import BadParameter
import pytest

from planet.cli import types

@pytest.mark.parametrize("input,expectation, expected",
                         [('a', does_not_raise(), ['a']),
                          ('a,b', does_not_raise(), ['a', 'b']),
                          ('a, b', does_not_raise(), ['a', 'b']),
                          ('a,,', pytest.raises(BadParameter), None),
                          ('', pytest.raises(BadParameter), None),
                          (['a'], does_not_raise(), ['a'])])  # yapf: disable
def test_cli_CommaSeparatedString(input, expectation, expected):
    with expectation:
        res = types.CommaSeparatedString().convert(input, None, None)

    if expected:
        assert res == expected

@pytest.mark.parametrize("input, expectation, expected",
                         [
                             ('1.0', does_not_raise(), [1.0]),
                             ('1,2.5', does_not_raise(), [1.0, 2.5]),
                             ('1, 2.5', does_not_raise(), [1.0, 2.5]),
                             ('foo, bar', pytest.raises(BadParameter), None),
                             ('1,,', pytest.raises(BadParameter), None),
                             ([1.0, 2.0], does_not_raise(), [1.0, 2.0]),
                         ])
def test_cli_CommaSeparatedFloat(input, expectation, expected):
    with expectation:
        res = types.CommaSeparatedFloat().convert(input, None, None)

    if expected:
        assert res == expected

@pytest.fixture(params=["stdin", "str", "file"])
def json_input_test_params(request, write_to_tmp_json_file):

    def _func(input_json):
        if request.param == 'file':
            filename = write_to_tmp_json_file(input_json, 'tmp.json')
            arg = str(filename)
            input = None
        elif request.param == 'str':
            arg = json.dumps(input_json)
            input = None
        elif request.param == 'stdin':
            arg = '-'
            input = json.dumps(input_json)

        return arg, input

    return _func

def test_cli_JSON_inputs(json_input_test_params):
    """Confirm that file, stdin, and str inputs are all supported"""

    @click.option('--foo', type=types.JSON())
    @click.command()
    def test(foo):
        click.echo(json.dumps(foo))

    test_json = {'a': 'b'}
    arg, input = json_input_test_params(test_json)
    result = CliRunner().invoke(test, args=[f'--foo={arg}'], input=input)
    assert result.exit_code == 0
    assert json.loads(result.output) == test_json

parametrize_json = pytest.mark.parametrize(
    "input, expectation, expected",
    [
        ('{"a":["b", "c"], "c":5}',
         does_not_raise(), {
             'a': ['b', 'c'], 'c': 5
         }),
        ('["b", {"c":5}]', does_not_raise(), ['b', {
            'c': 5
        }]),
        ('{"a":"b", foo:bar}', pytest.raises(BadParameter), None),
        ('{}', pytest.raises(BadParameter), None),
    ])

@parametrize_json
def test_cli_JSON_str(input, expectation, expected):
    with expectation:
        res = types.JSON().convert(input, None, None)

    if expected:
        assert res == expected

@parametrize_json
def test_cli_JSON_file_content(input, expectation, expected, tmp_path):
    filename = tmp_path / 'temp.json'
    with open(filename, 'w') as fp:
        fp.write(input)

    with expectation:
        res = types.JSON().convert(str(filename), None, None)

    if expected:
        assert res == expected

def test_cli_JSON_file_doesnotexist():
    with pytest.raises(BadParameter):
        types.JSON().convert('nonexistant.json', None, None)

@pytest.mark.parametrize("input, expectation",
                         [('gt', does_not_raise()), ('lt', does_not_raise()),
                          ('foobar', pytest.raises(BadParameter))])
def test_cli_Comparison(input, expectation):
    with expectation:
        res = types.Comparison().convert(input, None, None)
        assert res == input

@pytest.mark.parametrize("input, expectation",
                         [('gt', does_not_raise()),
                          ('lt', pytest.raises(BadParameter)),
                          ('foobar', pytest.raises(BadParameter))])
def test_cli_GTComparison(input, expectation):
    with expectation:
        res = types.GTComparison().convert(input, None, None)
        assert res == input

@pytest.mark.parametrize(
    "input, expectation, expected",
    [('2020-02-02', does_not_raise(), datetime(2020, 2, 2)),
     ('2021-02-03T01:40:07.359Z',
      does_not_raise(),
      datetime(2021, 2, 3, 1, 40, 7, 359000)),
     ('2022', pytest.raises(BadParameter), None),
     (datetime(2020, 2, 2), does_not_raise(), datetime(2020, 2, 2))])
def test_cli_DateTime(input, expectation, expected):
    with expectation:
        res = types.DateTime().convert(input, None, None)

    if expected:
        assert res == expected


text:
<?php
namespace Acme\App\Router;

use Aura\Router\Exception\RouteNotFound as AuraRouteNotFound;
use Aura\Router\Route;
use Aura\Router\RouterContainer;
use Aura\Router\Rule\Accepts;
use Aura\Router\Rule\Allows;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerAwareTrait;
use Psr\Log\LoggerInterface;
use Sumeko\Http\Exception as HttpException;
use Sumeko\Http\Exception\MethodNotAllowedException;
use Sumeko\Http\Exception\NotAcceptableException;
use Sumeko\Http\Exception\NotFoundException;

class Router implements RequestHandlerInterface, LoggerAwareInterface
{
    use LoggerAwareTrait;

    /**
     * @var RouterContainer
     */
    protected $routes;

    /**
     * @var ActionDispatcher
     */
    protected $dispatcher;

    /**
     * Router constructor.
     *
     * @param callable[] $controllerFactories
     * @param ResponseFactoryInterface $responseFactory
     * @param string|null $pathPrefix
     */
    public function __construct(
        array $controllerFactories,
        ResponseFactoryInterface $responseFactory,
        ?string $pathPrefix = null
    )
    {
        $this->routes = new RouterContainer($pathPrefix);

        $controllerProvider = new ControllerProvider($controllerFactories);
        $this->dispatcher = new ActionDispatcher($controllerProvider, $responseFactory);
    }

    /**
     * @return RouterContainer
     */
    public function getRoutes(): RouterContainer
    {
        return $this->routes;
    }

    /**
     * @return ActionDispatcher
     */
    public function getDispatcher(): ActionDispatcher
    {
        return $this->dispatcher;
    }

    /**
     * @inheritdoc
     * @throws HttpException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        assert($this->logger instanceof LoggerInterface);
        $this->routes->setLoggerFactory(function () {
            return $this->logger;
        });

        $matcher = $this->routes->getMatcher();
        $route = $matcher->match($request);

        if (!$route) {
            $failedRoute = $matcher->getFailedRoute();
            throw $this->createHttpExceptionFromFailedRoute($failedRoute);
        }

        $params = $this->dispatcherParams($route);

        $params['request'] = $request;

        return $this->dispatcher->dispatch($params);
    }

    /**
     * @param string $name
     * @param array $data
     * @param bool $raw
     * @return string
     * @throws NoSuchRouteException
     */
    public function uriTo(string $name, array $data = [], $raw = false): string
    {
        $generator = $this->routes->getGenerator();
        try {
            if ($raw) {
                $path = $generator->generateRaw($name, $data);
            } else {
                $path = $generator->generate($name, $data);
            }
            if ($path === false) {
                throw new NoSuchRouteException($name . " not found");
            }
            return $path;
        } catch (AuraRouteNotFound $e) {
            throw new NoSuchRouteException($name . " not found");
        }
    }

    private function dispatcherParams(Route $route)
    {
        if (is_callable($route->handler)) {
            $params = [
                'controller' => $route->handler
            ];
        } else {
            list($controller, $action) = $this->guessControllerAndActionFromName($route->handler);
            $params = [
                'controller' => $controller,
                'action' => $action,
            ];
        }

        foreach ($route->attributes as $k => $v) {
            $params[$k] = $v;
        }

        return $params;
    }

    private function guessControllerAndActionFromName(string $name): array
    {
        if (($sep = strpos($name, ':')) !== false) {
            $name = substr($name, 0, $sep);
        }
        $elements = explode(".", $name);
        if (count($elements) < 2) {
            throw new \UnexpectedValueException('Bad route name: ' . $name);
        }

        $action = array_pop($elements);
        $controller = implode('.', $elements);
        return [$controller, $action];
    }

    private function createHttpExceptionFromFailedRoute(Route $route)
    {
        if ($route) {
            switch ($route->failedRule) {
                case Allows::class:
                    // 405 METHOD NOT ALLOWED
                    return new MethodNotAllowedException();
                case Accepts::class:
                    // 406 NOT ACCEPTABLE
                    return new NotAcceptableException();
            }
        }

        // 404 NOT FOUND
        return new NotFoundException();
    }
}


text:
<?php

class PreferenceController extends DefaultPreferencePage {
	protected function getPreferenceGroup($type) {
		$groups = $this->getGroups();
		if (isset ($groups [ $type ])) {
			$cfg = $groups [ $type ];

			return $cfg->getPreferenceGroup();
		}

		return new WeixinPreferencesForm ();
	}

	protected function getCurrentURL() {
		return tourl('weixin/preference', false);
	}

	protected function getForm($type, $data = array()) {
		$groups = $this->getGroups();
		if (isset ($groups [ $type ])) {
			$cfg = $groups [ $type ];

			return $cfg->getForm();
		}

		return new WeixinPreferencesForm ();
	}

	protected function icando($user) {
		return icando('weixin:system/preference', $user);
	}

	/**
	 * 重写父类方法,保存数组
	 *
	 * @author DQ
	 * @date   2016年2月15日 下午5:30:10
	 *
	 * @param
	 *
	 * @return
	 *
	 */
	public function index_post($_g = 'base') {
		if (!$this->icando($this->user)) {
			Response::showErrorMsg('你无权进行' . $this->getTitle());
		}
		$data ['groups'] = $this->getGroups();
		if (!isset ($data ['groups'] [ $_g ])) {
			Response::respond(404);
		}
		$form = $this->getForm($_g);

		$cfgs = $form->valid();
		if ($cfgs) {
			$data ['customEnabled'] = $this->supportCustomField();
			$cfields                = array();
			if ($data ['customEnabled']) {
				$cfields = dbselect('value')->from('{preferences}')->where(array('name' => 'custom_fields', 'preference_group' => $data ['customEnabled']))->get('value');
				if ($cfields) {
					$cfields = @unserialize($cfields);
				}
				if ($cfields === false) {
					$cfields = array();
				}
			}

			$time  = time();
			$uid   = $this->user->getUid();
			$datas = array();
			$pg    = $this->getPreferenceGroup($_g);
			$cfgs  = apply_filter('before_save_preference_' . $pg, $cfgs);
			foreach ($cfgs as $name => $value) {
				if (isset ($cfields [ $name ])) {
					$hook = 'alter_' . $cfields [ $name ] ['type'] . '_field_value';
					if (has_hook($hook)) {
						$value = apply_filter($hook, $value, $name);
					}
				}
				$data                      = array();
				$data ['preference_group'] = $pg;
				$data ['name']             = $name;
				$cfg                       = dbselect('preference_id,value')->from('{preferences}')->where($data)->get();
				if ($cfg && $cfg ['value'] != $value) {
					//updata
					$data ['value']       = is_array($value) ? implode(',', $value) : $value;
					$data ['update_time'] = $time;
					$data ['user_id']     = $uid;
					unset ($cfg ['value']);
					dbupdate('{preferences}')->set($data)->where($cfg)->exec();
				} else if (!$cfg) {
					$data ['value'] = is_array($value) ? implode(',', $value) : $value;

					$data ['update_time'] = $time;
					$data ['user_id']     = $uid;
					$datas []             = $data;
				}
			}
			if ($datas) {
				dbinsert($datas, true)->into('{preferences}')->exec();
			}

			$rtn = apply_filter('on_preference_' . $pg . '_saved', NuiAjaxView::refresh("设置已保存."), $cfgs);
			RtCache::delete('system_preferences');
			cfg('', '', true);

			return $rtn;
		} else {
			return NuiAjaxView::validate(get_class($form), '数据格式不正确,请重新填写.', $form->getErrors());
		}
	}

	protected function getTitle() {
		return '微信接口设置';
	}

	protected function getGroups() {
		$groups = apply_filter('get_weixin_preference_group', array('base' => new PreferenceConfig ('接入设置', 'weixin', new WeixinPreferencesForm ()), 'share' => new PreferenceConfig ('分享设置', 'weixin', new WeixinSharePreferencesForm())));

		return $groups;
	}
}


text:
import * as React from 'react';

import CarouselItem from './CarouselItem';
import CarouselCaption from './CarouselCaption';

import { ReplaceProps, SelectCallback } from './helpers';

interface CarouselProps {
  bsPrefix?: string;
  slide?: boolean;
  fade?: boolean;
  wrap?: boolean;
  indicators?: boolean;
  interval?: number;
  controls?: boolean;
  pauseOnHover?: boolean;
  keyboard?: boolean;
  onSelect?: (eventKey: any, direction: 'prev' | 'next', event: object) => void;
  onSlideEnd?: () => void;
  activeIndex?: number;
  prevIcon?: React.ReactNode;
  prevLabel?: string;
  nextIcon?: React.ReactNode;
  nextLabel?: string;
}

declare class Carousel extends React.Component<
  ReplaceProps<'div', CarouselProps>
> {
  static Item: typeof CarouselItem;
  static Caption: typeof CarouselCaption;
}

export default Carousel;


text:
Package ab
===

[![GoDoc](https://godoc.org/github.com/Preetam/libab/go/ab?status.svg)](https://godoc.org/github.com/Preetam/libab/go/ab)


text:
@interface AppDelegate ()
@property (nonatomic,strong) SBNotificationHub *hub;
@property (nonatomic,strong) NSData *token;
@end
@implementation AppDelegate
@synthesize hub,token;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.
    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];

#warning Did you change the connection string and the hub name ?
    hub = [[SBNotificationHub alloc] initWithConnectionString:@"<CONNECTION STRING>" notificationHubPath:@"<HUB NAME>"];

    return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application
{
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application
{
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application
{
    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application
{
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
    token = deviceToken;

    [hub registerNativeWithDeviceToken:deviceToken tags:nil  completion:^(NSError *error) {
        if (error)
        {
            NSLog(@"error registerNativeWithDeviceToken: \n %@",error.localizedDescription);
        } else
        {
            UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"Device registado no NotificationHUB"  delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];

            [alert show];
            NSLog(@"success registerNativeWithDeviceToken");
        }
    }];
}

-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Remote notification" message:[[userInfo objectForKey:@"aps"] objectForKey:@"alert"]  delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];

    [alert show];
}

-(void)registerInNotificationHUBWithTags:(NSSet*)tags
{
    if (!hub)
    {
#warning Did you change the connection string and the hub name ?
        hub = [[SBNotificationHub alloc] initWithConnectionString:@"<CONNECTION STRING>" notificationHubPath:@"<HUB NAME>"];
    }

    [hub registerNativeWithDeviceToken:token tags:tags completion:^(NSError *error) {
        if (error)
        {
            NSLog(@"error register for notifications: \n %@",error.localizedDescription);
        } else
        {
            UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"Registo alterado no NotificationHUB"  delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];

            [alert show];

            NSLog(@"Success");

        }
    }];
}
@end


text:
<TITLE>Review for Shining Through (1992)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Shining Through (1992)

reviewed by
Sandra J. Grossmann

                           SHINING THROUGH
                   A film review by Sandy Grossmann
                 Copyright 1992 by Sandra J. Grossmann

Cast:        Michael Douglas, Melanie Griffith, Liam Neeson, Joely Richardson,
             John Gielgud
Screenplay:  David Seltzer, based on Susan Isaacs' novel
Director:    David Seltzer
Length:      2 hours 10 minutes

     Let me put it this way.  I didn't pay to see this film, and I had
an enjoyable pre-film conversation with the person who sat next to me.
Those were the highlights of the evening.

     The film does have entertainment value, but probably not what
Seltzer had in mind.  Oh, it's stylish, all right, the look of the
forties is well- produced, and occasional images remind you it's a
big-screen movie.  But the characters? the dialog? the *plot*?  Who
could've conceived of anything this stupid?

     Melanie Griffith forgot to play a new character, but it doesn't
matter.  She plays the same Working Girl except her hairstyle is
different and her name is Linda.

     Her boss is Ed (Michael Douglas), who may or may not be a spy for
the U.S.  Oh, hell, of course he's a spy.  And of course she falls in
love with him.  Anyway, once Pearl Harbor is attacked, he moves on to
more important work while she is shunted into the typing pool until he
returns, in full uniform, at which time Linda works for him again.

     This time, though, Ed has a problem.  One of his agents in Nazi
Germany can't exactly work any longer.  What is Ed to do?  *Who* can
replace this agent?  Why, Linda has an idea.  Since she speaks
"perfect" low-class  German (compliments of her Berliner grandparents),
Linda suggests to Ed that she can infiltrate the very heart of Berlin's
Nazi society by becoming a cook for a high-ranking Nazi officer so that
she can photograph secret plans and smuggle the microfilm out of Nazi
Germany.  And Ed, a full colonel in the OSS, agrees that she's his best
bet, so he makes the arrangements and off she goes.  Wait.  Did I
mention she's "half Jewish?"  (Her very words...)  And did I tell you
she only has a week or two to (a) infiltrate, (b) take advantage of an
unguarded moment, (c) get the stuff, and (d) slip out of Germany before
her papers will "expire"?

     If you think the plot up to now sounds preposterous, well, you
ain't seen nothin' yet.  I won't go into all the details (I've already
tortured you enough), but suffice it to say that the latter part of the
movie makes the first part sound reasonable.

     OK, so the plot's ridiculous.  Movies are more than mere plots,
though.  How about the cinematography?  It's very nice--good work by
Jan de Bont.  How about the sound?  It's fine, nothing special, but
fine.  How about the acting?  Uhm...

     Michael Douglas actually does a nice job for more than half the
movie, and it's really not his fault that his character is totally
impossible and stupidly written.  And John Gielgud is on-screen for no
more than about four minutes total, so I doubt this will tarnish his
reputation.  Joely Richardson does a good job all the way through.
Liam Neeson (who plays a high-ranking Nazi) does an OK-but-nothing-`
special job.  But Melanie Griffith sets new lows for mediocrity.

     Aside from the fact that she has no feeling for the 40's style and
conducts herself in a strictly modern fashion, she simply fails to
convey emotion.  Her voice is flat, her face is flat, and her delivery
makes Clint Eastwood look like Olivier.  Even worse, the film is told
in flashbacks, and guess who narrates.  Fortunately, some of the
narration is so bad that the film accidentally becomes entertaining.

     If ever a budding screenwriter wanted lessons on why flashback is a
dangerous device, well, here's an instructive movie.  Another lesson
this film carries is that relying exclusively on mood and style is
unprofitable.  So this movie isn't a total waste: it teaches what not
to do.  The studios, though, will probably interpret the audience's
lukewarm acceptance as a sign that no one is interested in period
pieces, and it'll be that much harder for a good "retro" screenplay to
get the go-ahead.

     I recommend not seeing this film until it reaches video.  It's
instructive enough (and pretty enough) to warrant a rental, but it's
not even worth matinee prices now.

Sandy Grossmann          sandyg@sail.labs.tek.com

.

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text: export { default } from 'dsember-core/authenticators/dspace';


text:
@echo off

set BUILD_DIR=%1
set CACHE_DIR=%2

echo WOO
cmd /C set
echo always-detects-buildpack > %BUILD_DIR%\compiled
echo always-detects-buildpack > %CACHE_DIR%\compiled


text:
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Our big ass cashcow.</title>

Cashcow

You know what is important and what provides you with the best experience and value your business needs: Cashcow!

Some contact information about how to get in touch with us.


text:
#ifndef __ARCH_ARM_SRC_STM32L4_HARDWARE_STM32L4_EXTI_H
#define __ARCH_ARM_SRC_STM32L4_HARDWARE_STM32L4_EXTI_H

/************************************************************************************
 * Included Files
 ************************************************************************************/

#include <tinyara/config.h>
#include "chip.h"

/************************************************************************************
 * Pre-processor Definitions
 ************************************************************************************/

#define STM32L4_NEXTI1         31
#define STM32L4_EXTI1_MASK     0xffffffff
#define STM32L4_NEXTI2         9
#define STM32L4_EXTI2_MASK     0x000001ff

#define STM32L4_EXTI1_BIT(n)        (1 << (n))
#define STM32L4_EXTI2_BIT(n)        (1 << (n))

/* Register Offsets *****************************************************************/

#define STM32L4_EXTI1_OFFSET       0x0000  /* Offset to EXTI1 registers */
#define STM32L4_EXTI2_OFFSET       0x0020  /* Offset to EXTI2 registers */

#define STM32L4_EXTI_IMR_OFFSET    0x0000  /* Interrupt mask register */
#define STM32L4_EXTI_EMR_OFFSET    0x0004  /* Event mask register */
#define STM32L4_EXTI_RTSR_OFFSET   0x0008  /* Rising Trigger selection register */
#define STM32L4_EXTI_FTSR_OFFSET   0x000c  /* Falling Trigger selection register */
#define STM32L4_EXTI_SWIER_OFFSET  0x0010  /* Software interrupt event register */
#define STM32L4_EXTI_PR_OFFSET     0x0014  /* Pending register */

/* Register Addresses ***************************************************************/

#define STM32L4_EXTI1_BASE       (STM32L4_EXTI_BASE+STM32L4_EXTI1_OFFSET)
#define STM32L4_EXTI2_BASE       (STM32L4_EXTI_BASE+STM32L4_EXTI2_OFFSET)

#define STM32L4_EXTI1_IMR        (STM32L4_EXTI1_BASE+STM32L4_EXTI_IMR_OFFSET)
#define STM32L4_EXTI1_EMR        (STM32L4_EXTI1_BASE+STM32L4_EXTI_EMR_OFFSET)
#define STM32L4_EXTI1_RTSR       (STM32L4_EXTI1_BASE+STM32L4_EXTI_RTSR_OFFSET)
#define STM32L4_EXTI1_FTSR       (STM32L4_EXTI1_BASE+STM32L4_EXTI_FTSR_OFFSET)
#define STM32L4_EXTI1_SWIER      (STM32L4_EXTI1_BASE+STM32L4_EXTI_SWIER_OFFSET)
#define STM32L4_EXTI1_PR         (STM32L4_EXTI1_BASE+STM32L4_EXTI_PR_OFFSET)

#define STM32L4_EXTI2_IMR        (STM32L4_EXTI2_BASE+STM32L4_EXTI_IMR_OFFSET)
#define STM32L4_EXTI2_EMR        (STM32L4_EXTI2_BASE+STM32L4_EXTI_EMR_OFFSET)
#define STM32L4_EXTI2_RTSR       (STM32L4_EXTI2_BASE+STM32L4_EXTI_RTSR_OFFSET)
#define STM32L4_EXTI2_FTSR       (STM32L4_EXTI2_BASE+STM32L4_EXTI_FTSR_OFFSET)
#define STM32L4_EXTI2_SWIER      (STM32L4_EXTI2_BASE+STM32L4_EXTI_SWIER_OFFSET)
#define STM32L4_EXTI2_PR         (STM32L4_EXTI2_BASE+STM32L4_EXTI_PR_OFFSET)

/* Register Bitfield Definitions ****************************************************/

/* EXTI lines > 15 are associated with internal devices: */

#define EXTI1_PVD_LINE            (1 << 16) /* EXTI line 16 is connected to the PVD output */
#define EXTI1_OTGFS_WAKEUP        (1 << 17) /* EXTI line 17 is connected to the USB OTG FS Wakeup event */
#define EXTI1_RTC_ALARM           (1 << 18) /* EXTI line 18 is connected to the RTC Alarm event */
#define EXTI1_RTC_TAMPER          (1 << 19) /* EXTI line 19 is connected to the RTC Tamper and TimeStamp events */
#define EXTI1_RTC_WAKEUP          (1 << 20) /* EXTI line 20 is connected to the RTC Wakeup event */
#define EXTI1_COMP1               (1 << 21) /* EXTI line 21 is connected to the COMP1 (comparator) output */
#define EXTI1_COMP2               (1 << 22) /* EXTI line 22 is connected to the COMP2 (comparator) output */
#define EXTI1_I2C1                (1 << 23) /* EXTI line 23 is connected to the I2C1 wakeup */
#define EXTI1_I2C2                (1 << 24) /* EXTI line 24 is connected to the I2C2 wakeup */
#define EXTI1_I2C3                (1 << 25) /* EXTI line 25 is connected to the I2C3 wakeup */
#define EXTI1_USART1              (1 << 26) /* EXTI line 26 is connected to the USART1 wakeup */
#define EXTI1_USART2              (1 << 27) /* EXTI line 27 is connected to the USART2 wakeup */
#define EXTI1_USART3              (1 << 28) /* EXTI line 28 is connected to the USART3 wakeup */
#define EXTI1_UART4               (1 << 29) /* EXTI line 29 is connected to the UART4 wakeup */
#define EXTI1_UART5               (1 << 30) /* EXTI line 30 is connected to the UART5 wakeup */
#define EXTI1_LPUART1             (1 << 31) /* EXTI line 31 is connected to the LPUART1 wakeup */
#define EXTI2_LPTIM1              (1 <<  0) /* EXTI line 32 is connected to LPTIM1 */
#define EXTI2_LPTIM2              (1 <<  1) /* EXTI line 33 is connected to LPTIM2 */
#define EXTI2_SWPMI1              (1 <<  2) /* EXTI line 34 is connected to the SWPMI1 wakeup */
#define EXTI2_PVM1                (1 <<  3) /* EXTI line 35 is connected to the PVM1 wakeup */
#define EXTI2_PVM2                (1 <<  4) /* EXTI line 36 is connected to the PVM2 wakeup */
#define EXTI2_PVM3                (1 <<  5) /* EXTI line 37 is connected to the PVM3 wakeup */
#define EXTI2_PVM4                (1 <<  6) /* EXTI line 38 is connected to the PVM4 wakeup */
#define EXTI2_LCD                 (1 <<  7) /* EXTI line 39 is connected to the LCD wakeup */
#define EXTI2_I2C4                (1 <<  8) /* EXTI line 40 is connected to the I2C4 wakeup */

/* Interrupt mask register */

#define EXTI_IMR1_BIT(n)          STM32L4_EXTI1_BIT(n) /* 1=Interrupt request from line x is not masked */
#define EXTI_IMR1_SHIFT           (0)               /* Bits 0-X: Interrupt Mask for all lines */
#define EXTI_IMR1_MASK            STM32L4_EXTI1_MASK

#define EXTI_IMR2_BIT(n)          STM32L4_EXTI2_BIT(n) /* 1=Interrupt request from line x is not masked */
#define EXTI_IMR2_SHIFT           (0)               /* Bits 0-X: Interrupt Mask for all lines */
#define EXTI_IMR2_MASK            STM32L4_EXTI2_MASK

/* Event mask register */

#define EXTI_EMR1_BIT(n)          STM32L4_EXTI1_BIT(n) /* 1=Event request from line x is not mask */
#define EXTI_EMR1_SHIFT           (0)               /* Bits Bits 0-X:  Event Mask for all lines */
#define EXTI_EMR1_MASK            STM32L4_EXTI1_MASK

#define EXTI_EMR2_BIT(n)          STM32L4_EXTI2_BIT(n) /* 1=Event request from line x is not mask */
#define EXTI_EMR2_SHIFT           (0)               /* Bits Bits 0-X:  Event Mask for all lines */
#define EXTI_EMR2_MASK            STM32L4_EXTI2_MASK

/* Rising Trigger selection register */

#define EXTI_RTSR1_BIT(n)         STM32L4_EXTI1_BIT(n) /* 1=Rising trigger enabled (for Event and Interrupt) for input line */
#define EXTI_RTSR1_SHIFT          (0)               /* Bits 0-X: Rising trigger event configuration bit for all lines */
#define EXTI_RTSR1_MASK           STM32L4_EXTI1_MASK

#define EXTI_RTSR2_BIT(n)         STM32L4_EXTI2_BIT(n) /* 1=Rising trigger enabled (for Event and Interrupt) for input line */
#define EXTI_RTSR2_SHIFT          (0)               /* Bits 0-X: Rising trigger event configuration bit for all lines */
#define EXTI_RTSR2_MASK           STM32L4_EXTI2_MASK

/* Falling Trigger selection register */

#define EXTI_FTSR1_BIT(n)         STM32L4_EXTI1_BIT(n)  /* 1=Falling trigger enabled (for Event and Interrupt) for input line */
#define EXTI_FTSR1_SHIFT          (0)                /* Bits 0-X: Falling trigger event configuration bitfor all lines */
#define EXTI_FTSR1_MASK           STM32L4_EXTI1_MASK

#define EXTI_FTSR2_BIT(n)         STM32L4_EXTI2_BIT(n)  /* 1=Falling trigger enabled (for Event and Interrupt) for input line */
#define EXTI_FTSR2_SHIFT          (0)                /* Bits 0-X: Falling trigger event configuration bitfor all lines */
#define EXTI_FTSR2_MASK           STM32L4_EXTI2_MASK

/* Software interrupt event register  */

#define EXTI_SWIER1_BIT(n)        STM32L4_EXTI1_BIT(n)  /* 1=Sets the corresponding pending bit in EXTI_PR */
#define EXTI_SWIER1_SHIFT         (0)                /* Bits 0-X: Software Interrupt for all lines */
#define EXTI_SWIER1_MASK          STM32L4_EXTI1_MASK

#define EXTI_SWIER2_BIT(n)        STM32L4_EXTI2_BIT(n)  /* 1=Sets the corresponding pending bit in EXTI_PR */
#define EXTI_SWIER2_SHIFT         (0)                /* Bits 0-X: Software Interrupt for all lines */
#define EXTI_SWIER2_MASK          STM32L4_EXTI2_MASK

/* Pending register */

#define EXTI_PR1_BIT(n)           STM32L4_EXTI1_BIT(n)  /* 1=Selected trigger request occurred */
#define EXTI_PR1_SHIFT            (0)                /* Bits 0-X: Pending bit for all lines */
#define EXTI_PR1_MASK             STM32L4_EXTI1_MASK

#define EXTI_PR2_BIT(n)           STM32L4_EXTI2_BIT(n)  /* 1=Selected trigger request occurred */
#define EXTI_PR2_SHIFT            (0)                /* Bits 0-X: Pending bit for all lines */
#define EXTI_PR2_MASK             STM32L4_EXTI2_MASK

#endif /* __ARCH_ARM_SRC_STM32L4_HARDWARE_STM32L4_EXTI_H */


text:
package com.app.nfsclient.protocol.xfile;

/**
 * This is an abstract class to intended to be extended with
 * filesystem-specific methods.
 *

 * An XFileExtensionAccessor class must be associated with an
 * XFileAccessor. An XFileExtensionAccessor can be used to
 * provide access to filesystem-specific methods that are not
 * defined within the XFileAccessor interface.
 * A subclass of XFileExtensionAccessor must be declared as:
 *

 *     import com.sun.xfile.*;
 *

 *     public class XFileExtensionAccessor extends com.sun.xfile.XFileExtensionAccessor {
 *      :
 *
 *

 *

 * An XFileExtensionAccessor class is loaded when the
 * XFile.getExtensionAccessor() method is invoked.  The
 * class loading process is identical to that of an
 * XFileAccessor except for the final component of the package
 * name: "XFileExtensionAccessor" instead of "XFileAccessor".
 *

 * An application that needs to use the methods within the
 * XFileExtensionAccessor must cast the result of XFile.getExtensionAccessor.
 *

 *    import com.sun.xfile.*;
 *

 *    XFile xf = new XFile("ftp://server/path");
 *    com.acme.ftp.XFileExtensionAccessor xftp =
 *        (com.acme.ftp.XFileExtensionAccessor) xf.getExtensionAccessor();
 *    xftp.login();
 *      :
 *

 *
 *
 * @author  Brent Callaghan
 * @see     com.sun.xfile.XFile#getExtensionAccessor()
 * @see     com.sun.xfile.XFileAccessor
 */
public abstract class XFileExtensionAccessor {

    private XFile xf;

    /*
     * Constructor for the XFileExtensionAccessor.
     *
     * Invoked by the XFile class when its getExtensionAccessor
     * method is called.  The XFile argument of
     * the constructor provides context for the methods
     * within the class.
     */
    public XFileExtensionAccessor(XFile xf) {
        this.xf = xf;
    }
}


text:
static const double kMinusInfinity = -std::numeric_limits<double>::infinity();
static const double kPlusInfinity = std::numeric_limits<double>::infinity();

struct MERTPoint {
  MERTPoint() : x(), m(), b(), edge() {}
  MERTPoint(double _m, double _b) :
    x(kMinusInfinity), m(_m), b(_b), edge() {}
  MERTPoint(double _x, double _m, double _b, const boost::shared_ptr<MERTPoint>& p1_, const boost::shared_ptr<MERTPoint>& p2_) :
    x(_x), m(_m), b(_b), p1(p1_), p2(p2_), edge() {}
  MERTPoint(double _m, double _b, const Hypergraph::Edge& edge) :
    x(kMinusInfinity), m(_m), b(_b), edge(&edge) {}

  double x;                   // x intersection with previous segment in env, or -inf if none
  double m;                   // this line's slope
  double b;                   // intercept with y-axis

  // we keep a pointer to the "parents" of this segment so we can reconstruct
  // the Viterbi translation corresponding to this segment
  boost::shared_ptr<MERTPoint> p1;
  boost::shared_ptr<MERTPoint> p2;

  // only MERTPoints created from an edge using the ConvexHullWeightFunction
  // have rules
  // TRulePtr rule;
  const Hypergraph::Edge* edge;

  // recursively recover the Viterbi translation that will result from setting
  // the weights to origin + axis * x, where x is any value from this->x up
  // until the next largest x in the containing ConvexHull
  void ConstructTranslation(std::vector<WordID>* trans) const;
  void CollectEdgesUsed(std::vector<bool>* edges_used) const;
};

// this is the semiring value type,
// it defines constructors for 0, 1, and the operations + and *
struct ConvexHull {
  // create semiring zero
  ConvexHull() : is_sorted(true) {}  // zero
  // for debugging:
  ConvexHull(const std::vector<boost::shared_ptr<MERTPoint> >& s) : points(s) { Sort(); }
  // create semiring 1 or 0
  explicit ConvexHull(int i);
  ConvexHull(int n, MERTPoint* point) : is_sorted(true), points(n, boost::shared_ptr<MERTPoint>(point)) {}
  const ConvexHull& operator+=(const ConvexHull& other);
  const ConvexHull& operator*=(const ConvexHull& other);
  bool IsMultiplicativeIdentity() const {
    return size() == 1 && (points[0]->b == 0.0 && points[0]->m == 0.0) && (!points[0]->edge) && (!points[0]->p1) && (!points[0]->p2); }
  const std::vector<boost::shared_ptr<MERTPoint> >& GetSortedSegs() const {
    if (!is_sorted) Sort();
    return points;
  }
  size_t size() const { return points.size(); }

 private:
  bool IsEdgeEnvelope() const {
    return points.size() == 1 && points[0]->edge; }
  void Sort() const;
  mutable bool is_sorted;
  mutable std::vector<boost::shared_ptr<MERTPoint> > points;
};
std::ostream& operator<<(std::ostream& os, const ConvexHull& env);

struct ConvexHullWeightFunction {
  ConvexHullWeightFunction(const SparseVector<double>& ori,
                           const SparseVector<double>& dir) : origin(ori), direction(dir) {}
  const ConvexHull operator()(const Hypergraph::Edge& e) const;
  const SparseVector<double> origin;
  const SparseVector<double> direction;
};

#endif


text:
package jat.matvec.io.gui.plotTools;

import java.awt.Color;

public class PlotAttributes {

  public static int PIXEL = 0;
  public static int DOT = 1;
  public static int LINE = 2;
  public static int DOTLINE = 3;
  public static int BAR = 4;
  public static int DOTBAR = 5;
  public static int HIST = 6;
  public static int GRID = 7;

  private int numberOfElements = 6;

  public static int dotSize = 8;

  public String[] legend = {"X","Y","Z"};
  public Color[] colorList = {Color.blue,Color.red,Color.green,Color.yellow,Color.pink,Color.orange};
  public int[] typeList = {DOT,DOT,DOT,DOT,DOT,DOT};

  public PlotAttributes() {
  }

  public PlotAttributes(String[] leg) {
    setLegend(leg);
  }

  public PlotAttributes(Color[] col) {
    setColorList(col);
  }

  public PlotAttributes(int[] typ) {
    setTypeList(typ);
  }

  public void setLegend(String[] args) {
    legend = new String[args.length];
    for (int i =0;i<args.length;i++) {
      legend[i] = args[i];
    }
  }

  public void setColorList(Color[] args) {
    colorList = new Color[args.length];
    for (int i =0;i<args.length;i++) {
      colorList[i] = args[i];
    }
  }

  public void setTypeList(int[] args) {
    typeList = new int[args.length];
    for (int i =0;i<args.length;i++) {
      typeList[i] = args[i];
    }
  }

  public void setTypeList(int arg) {
    typeList = new int[numberOfElements];
    for (int i =0;i<numberOfElements;i++) {
      typeList[i] = arg;
    }
  }
}


text:
      <button class="btn fetchCollection btn-default">

      </button>
      <button class="btn openCreateDialog btn-success">Create </button>

Common

Openstack

Chef

EC2

    ServerName
    ID


text:
#region Licence

#endregion

namespace Paramore.Brighter.MessagingGateway.RMQ
{
    /// <summary>
    /// Class HeaderNames.{CC2D43FA-BBC4-448A-9D0B-7B57ADF2655C}
    /// </summary>
    public class HeaderNames
    {
        /// <summary>
        /// The messag e_ type{CC2D43FA-BBC4-448A-9D0B-7B57ADF2655C}
        /// </summary>
        public const string MESSAGE_TYPE = "MessageType";
        /// <summary>
        /// The messag e_ identifier{CC2D43FA-BBC4-448A-9D0B-7B57ADF2655C}
        /// </summary>
        public const string MESSAGE_ID = "MessageId";
        /// <summary>
        /// The correlation id
        /// </summary>
        public const string CORRELATION_ID = "CorrelationId";
        /// <summary>
        /// The topic{CC2D43FA-BBC4-448A-9D0B-7B57ADF2655C}
        /// </summary>
        public const string TOPIC = "Topic";
        /// <summary>
        /// The handle d_ count{CC2D43FA-BBC4-448A-9D0B-7B57ADF2655C}
        /// </summary>
        public const string HANDLED_COUNT = "HandledCount";
        /// <summary>
        /// The milliseconds to delay the message by (requires plugin rabbitmq_delayed_message_exchange)
        /// </summary>
        public const string DELAY_MILLISECONDS = "x-delay";
        /// <summary>
        /// The milliseconds the message was instructed to be delayed for (sent as negative) (requires plugin rabbitmq_delayed_message_exchange)
        /// </summary>
        public const string DELAYED_MILLISECONDS = "x-delay";
        /// <summary>
        /// Indicates the original id of this message given a historic scenario (e.g. re-queueuing).
        /// </summary>
        public const string ORIGINAL_MESSAGE_ID = Message.OriginalMessageIdHeaderName;
        /// <summary>
        /// Tag used to identify this message in the sequence against its Id (used to perform multiple ack against Id upto Tag).
        /// </summary>
        public const string DELIVERY_TAG = Message.DeliveryTagHeaderName;
    }
}


text:
<!DOCTYPE html>
<link rel="help" src="https://drafts.csswg.org/scroll-animations-1/#scroll-timelines">
<link rel="help" src="https://drafts.csswg.org/scroll-animations-1/#avoiding-cycles">


text:
'use strict';

const fileManager = require('./fileManager');
const settingsManager = require('./settingsManager');
const helpers = require('hydrogen-helpers');
global.app = new helpers.ApplicationWrapper(__dirname);
global.organic = require('electron').app;

let window = null;

app.on('window-all-closed', () => {
  if (process.platform !== 'darwin') app.quit();
});
app.on('quit', () => {
  fileManager.appWillClose();
});

organic.setPath('userData', `${app.getPath('appData')}/Hydrogen IDE`);

app.on('ready', () => {
  window = new helpers.BrowserWindow(app, {
    icon: `${__dirname}/icons/hicolor/512x512@2x/apps/hydrogen-ide.png`
  });

  app.main.__addFunction('getHighlighters', (cb) => settingsManager.getHighlighters((err, hl) => cb(err, hl)));

  window.loadView('index');
  window.on('closed', () => window = null);
  app.loadMenu('menu.json', 'menuCommands');
  settingsManager.checkDirs((err) => {
    if (err) return app.web.createToast(`Could not create settings directories: ${err.message}`);
    settingsManager.checkModules((err) => {
      if (err) return app.web.createToast(`Could not update application modules: ${err.message}`);
    });
  });
});


text: Info Panel


text:
@protocol ApplicationCommands;
@protocol BrowsingDataCommands;
class Browser;
@protocol ClearBrowsingDataUIDelegate;

// TableView for clearing browsing data (including history,
// cookies, caches, passwords, and autofill).
@interface ClearBrowsingDataTableViewController
    : SettingsRootTableViewController <UIAdaptivePresentationControllerDelegate>

// Initializers. `browser` can't be nil.
- (instancetype)initWithBrowser:(Browser*)browser NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithStyle:(UITableViewStyle)style NS_UNAVAILABLE;

// Prepares view controller so that -dismissViewControllerAnimated dismisses it.
// Call this method before dismissing view controller.
- (void)prepareForDismissal;

// Local Dispatcher for this ClearBrowsingDataTableView.
@property(nonatomic, weak) id<ClearBrowsingDataUIDelegate> delegate;

// The dispatcher used by this ViewController.
@property(nonatomic, weak) id<ApplicationCommands, BrowsingDataCommands>
    dispatcher;

@end

#endif  // IOS_CHROME_BROWSER_UI_SETTINGS_CLEAR_BROWSING_DATA_CLEAR_BROWSING_DATA_TABLE_VIEW_CONTROLLER_H_


text:
package team.birdhead.eventdispatcher.onoptionsitemselected;

import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.TypeName;

import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;

import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.Modifier;
import javax.lang.model.type.TypeKind;
import javax.lang.model.type.TypeMirror;
import javax.lang.model.util.Elements;
import javax.lang.model.util.Types;

import team.birdhead.eventdispatcher.EventDispatcher;
import team.birdhead.eventdispatcher.OnOptionsItemSelected;
import team.birdhead.eventdispatcher.lib.IfControlFlowHelper;
import team.birdhead.eventdispatcher.lib.Validator;

class OnOptionsItemSelectedDispatcher extends EventDispatcher<OnOptionsItemSelectedHandler> {

    private static final String PARAMETER_TARGET = "target";
    private static final String PARAMETER_MENU_ITEM = "item";

    OnOptionsItemSelectedDispatcher(ProcessingEnvironment processingEnv) {
        super(processingEnv);
    }

    @Override
    protected Map<String, TypeMirror> createExpectedParameters(ProcessingEnvironment processingEnv) {
        final Elements elements = processingEnv.getElementUtils();
        final Map<String, TypeMirror> expectedParameters = new LinkedHashMap<>();
        expectedParameters.put(PARAMETER_MENU_ITEM, elements.getTypeElement("android.view.MenuItem").asType());
        return expectedParameters;
    }

    @Override
    protected Validator createValidator(ProcessingEnvironment processingEnv, Map<String, TypeMirror> expectedParameters) {
        final Types types = processingEnv.getTypeUtils();
        return new Validator(types, types.getPrimitiveType(TypeKind.BOOLEAN), expectedParameters.values());
    }

    @Override
    protected OnOptionsItemSelectedHandler createEventHandler(ExecutableElement element) {
        final String methodName = getMethodName(element);
        final Collection<String> parameterNames = getParameterNames(element);
        final OnOptionsItemSelected annotation = element.getAnnotation(OnOptionsItemSelected.class);
        return new OnOptionsItemSelectedHandler(methodName, parameterNames, annotation.value());
    }

    @Override
    public MethodSpec createMethod(TypeMirror target, Map<String, TypeMirror> expectedParameters) {
        final MethodSpec.Builder builder = MethodSpec.methodBuilder("onOptionsItemSelected")
                .addModifiers(Modifier.STATIC)
                .addParameter(TypeName.get(target), PARAMETER_TARGET)
                .addParameter(TypeName.get(expectedParameters.get(PARAMETER_MENU_ITEM)), PARAMETER_MENU_ITEM)
                .returns(boolean.class);

        final IfControlFlowHelper helper = new IfControlFlowHelper(builder);
        for (OnOptionsItemSelectedHandler handler : handlers) {
            helper.addControlFlow(handler.getConditionStatement());
            helper.addStatement(handler.getStatement(PARAMETER_TARGET));
        }

        helper.addAlternativeStatement("return false");
        helper.endControlFlow();

        return builder.build();
    }
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0" name="viewport">

  <title>Portfolio Details - iPortfolio Bootstrap Template</title>
  <meta content="" name="description">
  <meta content="" name="keywords">

  <link href="assets/img/favicon.png" rel="icon">
  <link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">

  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">

  <link href="assets/vendor/aos/aos.css" rel="stylesheet">
  <link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
  <link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
  <link href="assets/vendor/glightbox/css/glightbox.min.css" rel="stylesheet">
  <link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet">

  <link href="assets/css/style.css" rel="stylesheet">

Alex Smith

 Home

 About

 Resume

 Portfolio

 Services

 Contact

Portfoio Details

Home

Portfoio Details

Project information

Category: Web design

Client: ASU Company

Project date: 01 March, 2020

Project URL: www.example.com

This is an example of portfolio detail

                Autem ipsum nam porro corporis rerum. Quis eos dolorem eos itaque inventore commodi labore quia quia. Exercitationem repudiandae officiis neque suscipit non officia eaque itaque enim. Voluptatem officia accusantium nesciunt est omnis tempora consectetur dignissimos. Sequi nulla at esse enim cum deserunt eius.

        © Copyright iPortfolio

        Designed by BootstrapMade


text:
import { isString, Json } from 'angular2/src/facade/lang';
import { BaseException } from 'angular2/src/facade/exceptions';
import { isJsObject } from './http_utils';
/**
 * Creates `Response` instances from provided values.
 *
 * Though this object isn't
 * usually instantiated by end-users, it is the primary object interacted with when it comes time to
 * add data to a view.
 *
 * ### Example
 *
 * ```
 * http.request('my-friends.txt').subscribe(response => this.friends = response.text());
 * ```
 *
 * The Response's interface is inspired by the Response constructor defined in the [Fetch
 * Spec](https://fetch.spec.whatwg.org/#response-class), but is considered a static value whose body
 * can be accessed many times. There are other differences in the implementation, but this is the
 * most significant.
 */
export class Response {
    constructor(responseOptions) {
        this._body = responseOptions.body;
        this.status = responseOptions.status;
        this.statusText = responseOptions.statusText;
        this.headers = responseOptions.headers;
        this.type = responseOptions.type;
        this.url = responseOptions.url;
    }
    /**
     * Not yet implemented
     */
    // TODO: Blob return type
    blob() { throw new BaseException('"blob()" method not implemented on Response superclass'); }
    /**
     * Attempts to return body as parsed `JSON` object, or raises an exception.
     */
    json() {
        var jsonResponse;
        if (isJsObject(this._body)) {
            jsonResponse = this._body;
        }
        else if (isString(this._body)) {
            jsonResponse = Json.parse(this._body);
        }
        return jsonResponse;
    }
    /**
     * Returns the body as a string, presuming `toString()` can be called on the response body.
     */
    text() { return this._body.toString(); }
    /**
     * Not yet implemented
     */
    // TODO: ArrayBuffer return type
    arrayBuffer() {
        throw new BaseException('"arrayBuffer()" method not implemented on Response superclass');
    }
}
//# sourceMappingURL=static_response.js.map


text:
#ifndef __BallTracer_h__
#define __BallTracer_h__

class BallTracer : public CCNode
{
	public :

		static BallTracer*		create ( const CCPoint& tTouchLoaction, const CCPoint& tBallLocation );

	public :

		virtual KDbool			initWithTouchLocation ( const CCPoint& tTouchLoaction, const CCPoint& tBallLocation );

		virtual KDvoid			update ( KDfloat fDelta );

		virtual KDvoid			setTouchLocation ( const CCPoint& tTouchLoaction );

	private :

		KDvoid					addBallShadow ( KDvoid );

	protected :

	    CCSpriteBatchNode*		m_pBatch;
	    KDfloat					m_fBallWidth;
		CCPoint					m_tBallLocation;
		CCPoint					m_tTouchLocation;
};

#endif	// __BallTracer_h__


text:
import Marty from 'marty';

class UserHttpAPI extends Marty.HttpStateSource {
    constructor(options) {
        super(options);
        this.baseUrl = 'http://localhost:3000';
    }
    getUsers() {
        return this.get('/users');
    }
    createUser(user) {
        return this.post({
            url: '/users',
            body: user
        });
    }
}

export default UserHttpAPI;


text:
<?php

namespace Drupal\fapi_example\Form;

use Drupal\Core\Form\FormStateInterface;

/**
 * Implements the state demo form controller.
 *
 * This example demonstrates using the #state property to bind the visibility of
 * a form element to the value of another element in the form. In the example,
 * when the user checks the "Need Special Accommodation" checkbox, additional
 * form elements are made visible.
 *
 * The submit handler for this form is implemented by the
 * \Drupal\fapi_example\Form\DemoBase class.
 *
 * @see \Drupal\Core\Form\FormBase
 * @see \Drupal\fapi_example\Form\DemoBase
 */
class StateDemo extends DemoBase {

  /**
   * Build the simple form.
   *
   * @inheritdoc
   */
  public function buildForm(array $form, FormStateInterface $form_state) {
    $form['needs_accommodation'] = [
      '#type' => 'checkbox',
      '#title' => 'Need Special Accommodations?',
    ];

    // The #states property used here binds the visibility of the of the
    // container element to the value of the needs_accommodation checkbox above.
    $form['accommodation'] = [
      '#type' => 'container',
      '#attributes' => [
        'class' => 'accommodation',
      ],
      '#states' => [
        'invisible' => [
          'input[name="needs_accommodation"]' => ['checked' => FALSE],
        ],
      ],
    ];

    $form['accommodation']['diet'] = [
      '#type' => 'textfield',
      '#title' => t('Dietary Restrictions'),
    ];

    // Add a submit button that handles the submission of the form.
    $form['actions']['submit'] = [
      '#type' => 'submit',
      '#value' => $this->t('Submit'),
    ];

    return $form;
  }

  /**
   * Getter method for Form ID.
   *
   * @inheritdoc
   */
  public function getFormId() {
    return 'fapi_example_state_demo';
  }

  /**
   * Implements submitForm callback.
   *
   * @inheritdoc
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    // Find out what was submitted.
    $values = $form_state->getValues();
    if ($values['needs_accommodation']) {
      drupal_set_message($this->t('Dietary Restriction Requested: %diet', ['%diet' => $values['diet']]));
    }
  }

}


text:
package nobots

import (
	// stdlib
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
	"strings"
)

type NobotsPlugin struct {
	documentationUrl  string
	importLine        string
	pluginDescription string
	pluginName        string
	sourcesUrl        string
}

// Get plugin description. Short one :).
func (np *NobotsPlugin) GetPluginDescription() string {
	return np.pluginDescription
}

// Get plugin documentation URL.
func (np *NobotsPlugin) GetPluginDocumentationURL() string {
	return np.documentationUrl
}

// Get plugin's import line.
// This line will be used to replace plugins initialization placehodler
// in Caddy's run.go.
func (np *NobotsPlugin) GetPluginImportLine() string {
	return np.importLine
}

// Get plugin name.
func (np *NobotsPlugin) GetPluginName() string {
	return np.pluginName
}

// Get plugin's sources URL, for using with Builder.
func (np *NobotsPlugin) GetPluginSourcesURL() string {
	return np.sourcesUrl
}

// Plugin initialization.
func (np *NobotsPlugin) Initialize() {
	np.pluginName = "nobots"
	np.pluginDescription = "Protect your website against web crawlers and bots."
	np.sourcesUrl = "https://github.com/Xumeiquer/nobots"
	np.documentationUrl = "https://caddyserver.com/docs/http.nobots"
	np.importLine = "github.com/Xumeiquer/nobots"
}

// Installation
func (np *NobotsPlugin) Install(workspace_path string) {
	// Do nothing if user don't want to install this plugin.
	if !ctx.Flags.BUILD_WITH_NOBOTS {
		return
	}

	// Path to run.go.
	rungo := filepath.Join(workspace_path, "src", "github.com", "mholt", "caddy", "caddy", "caddymain", "run.go")
	// Read file.
	fh_bytes, err := ioutil.ReadFile(rungo)
	if err != nil {
		ctx.Log.Fatalf("Cannot open run.go: %s", err.Error())
	}
	fh := string(fh_bytes)

	ctx.Log.Printf("Installing plugin: %s", np.GetPluginName())

	err1 := ctx.CmdWorker.Execute(fmt.Sprintf("go get -d -u %s", np.GetPluginImportLine()))
	if err1 != nil {
		ctx.Log.Fatalf("Failed to get plugin's sources: %s", err1.Error())
	}

	// Replace default "This is where other plugins get plugged in (imported)"
	// line with plugin import.
	replace_to := fmt.Sprintf("_ \"%s\"\n\t// This is where other plugins get plugged in (imported)", np.GetPluginImportLine())
	fh = strings.Replace(fh, "// This is where other plugins get plugged in (imported)", replace_to, 1)
	// Write file.
	ioutil.WriteFile(rungo, []byte(fh), os.ModePerm)
}


text:
<?php

namespace SebastianBergmann\Environment;

use PHPUnit_Framework_TestCase;

class RuntimeTest extends PHPUnit_Framework_TestCase
{
    /**
     * @var \SebastianBergmann\Environment\Runtime
     */
    private $env;

    protected function setUp()
    {
        $this->env = new Runtime;
    }

    /**
     * @covers \SebastianBergmann\Environment\Runtime::canCollectCodeCoverage
     * @uses   \SebastianBergmann\Environment\Runtime::hasXdebug
     * @uses   \SebastianBergmann\Environment\Runtime::isHHVM
     * @uses   \SebastianBergmann\Environment\Runtime::isPHP
     */
    public function testAbilityToCollectCodeCoverageCanBeAssessed()
    {
        $this->assertInternalType('boolean', $this->env->canCollectCodeCoverage());
    }

    /**
     * @covers \SebastianBergmann\Environment\Runtime::getBinary
     * @uses   \SebastianBergmann\Environment\Runtime::isHHVM
     */
    public function testBinaryCanBeRetrieved()
    {
        $this->assertInternalType('string', $this->env->getBinary());
    }

    /**
     * @covers \SebastianBergmann\Environment\Runtime::isHHVM
     */
    public function testCanBeDetected()
    {
        $this->assertInternalType('boolean', $this->env->isHHVM());
    }

    /**
     * @covers \SebastianBergmann\Environment\Runtime::isPHP
     * @uses   \SebastianBergmann\Environment\Runtime::isHHVM
     */
    public function testCanBeDetected2()
    {
        $this->assertInternalType('boolean', $this->env->isPHP());
    }

    /**
     * @covers \SebastianBergmann\Environment\Runtime::hasXdebug
     * @uses   \SebastianBergmann\Environment\Runtime::isHHVM
     * @uses   \SebastianBergmann\Environment\Runtime::isPHP
     */
    public function testXdebugCanBeDetected()
    {
        $this->assertInternalType('boolean', $this->env->hasXdebug());
    }

    /**
     * @covers \SebastianBergmann\Environment\Runtime::getNameWithVersion
     * @uses   \SebastianBergmann\Environment\Runtime::getName
     * @uses   \SebastianBergmann\Environment\Runtime::getVersion
     * @uses   \SebastianBergmann\Environment\Runtime::isHHVM
     * @uses   \SebastianBergmann\Environment\Runtime::isPHP
     */
    public function testNameAndVersionCanBeRetrieved()
    {
        $this->assertInternalType('string', $this->env->getNameWithVersion());
    }

    /**
     * @covers \SebastianBergmann\Environment\Runtime::getName
     * @uses   \SebastianBergmann\Environment\Runtime::isHHVM
     */
    public function testNameCanBeRetrieved()
    {
        $this->assertInternalType('string', $this->env->getName());
    }

    /**
     * @covers \SebastianBergmann\Environment\Runtime::getVersion
     * @uses   \SebastianBergmann\Environment\Runtime::isHHVM
     */
    public function testVersionCanBeRetrieved()
    {
        $this->assertInternalType('string', $this->env->getVersion());
    }

    /**
     * @covers \SebastianBergmann\Environment\Runtime::getVendorUrl
     * @uses   \SebastianBergmann\Environment\Runtime::isHHVM
     */
    public function testVendorUrlCanBeRetrieved()
    {
        $this->assertInternalType('string', $this->env->getVendorUrl());
    }
}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.containerinstance.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The container group encryption properties. */
@Fluent
public final class EncryptionProperties {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(EncryptionProperties.class);

    /*
     * The keyvault base url.
     */
    @JsonProperty(value = "vaultBaseUrl", required = true)
    private String vaultBaseUrl;

    /*
     * The encryption key name.
     */
    @JsonProperty(value = "keyName", required = true)
    private String keyName;

    /*
     * The encryption key version.
     */
    @JsonProperty(value = "keyVersion", required = true)
    private String keyVersion;

    /**
     * Get the vaultBaseUrl property: The keyvault base url.
     *
     * @return the vaultBaseUrl value.
     */
    public String vaultBaseUrl() {
        return this.vaultBaseUrl;
    }

    /**
     * Set the vaultBaseUrl property: The keyvault base url.
     *
     * @param vaultBaseUrl the vaultBaseUrl value to set.
     * @return the EncryptionProperties object itself.
     */
    public EncryptionProperties withVaultBaseUrl(String vaultBaseUrl) {
        this.vaultBaseUrl = vaultBaseUrl;
        return this;
    }

    /**
     * Get the keyName property: The encryption key name.
     *
     * @return the keyName value.
     */
    public String keyName() {
        return this.keyName;
    }

    /**
     * Set the keyName property: The encryption key name.
     *
     * @param keyName the keyName value to set.
     * @return the EncryptionProperties object itself.
     */
    public EncryptionProperties withKeyName(String keyName) {
        this.keyName = keyName;
        return this;
    }

    /**
     * Get the keyVersion property: The encryption key version.
     *
     * @return the keyVersion value.
     */
    public String keyVersion() {
        return this.keyVersion;
    }

    /**
     * Set the keyVersion property: The encryption key version.
     *
     * @param keyVersion the keyVersion value to set.
     * @return the EncryptionProperties object itself.
     */
    public EncryptionProperties withKeyVersion(String keyVersion) {
        this.keyVersion = keyVersion;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (vaultBaseUrl() == null) {
            throw logger
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property vaultBaseUrl in model EncryptionProperties"));
        }
        if (keyName() == null) {
            throw logger
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property keyName in model EncryptionProperties"));
        }
        if (keyVersion() == null) {
            throw logger
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property keyVersion in model EncryptionProperties"));
        }
    }
}


text:
Rails.application.configure do
  # Settings specified here will take precedence over those in config/application.rb.

  # The test environment is used exclusively to run your application's
  # test suite. You never need to work with it otherwise. Remember that
  # your test database is "scratch space" for the test suite and is wiped
  # and recreated between test runs. Don't rely on the data there!
  config.cache_classes = true

  # Do not eager load code on boot. This avoids loading your whole application
  # just for the purpose of running a single test. If you are using a tool that
  # preloads Rails for running tests, you may have to set it to true.
  config.eager_load = false

  # Configure static file server for tests with Cache-Control for performance.
  config.serve_static_files   = true
  config.static_cache_control = 'public, max-age=3600'

  # Show full error reports and disable caching.
  config.consider_all_requests_local       = true
  config.action_controller.perform_caching = false

  # Raise exceptions instead of rendering exception templates.
  config.action_dispatch.show_exceptions = false

  # Disable request forgery protection in test environment.
  config.action_controller.allow_forgery_protection = false

  # Tell Action Mailer not to deliver emails to the real world.
  # The :test delivery method accumulates sent emails in the
  # ActionMailer::Base.deliveries array.
  config.action_mailer.delivery_method = :test

  # Randomize the order test cases are executed.
  config.active_support.test_order = :random

  # Print deprecation notices to the stderr.
  config.active_support.deprecation = :stderr

  # Raises error for missing translations
  # config.action_view.raise_on_missing_translations = true

  # Where the email will come from
  config.action_mailer.default_url_options = { :host => 'localhost:3000' }

  # Set this variable to change the displayed name of the site.
  config.name = "Site Name"

  # The host new injectible links should be created on.
  # You should generally set this to the domain of your server
  config.link_domain_host = "localhost:3000"

  config.action_mailer.default_url_options = { :host => 'localhost' }

  # Required protocol, choose "http" or "https"
  config.required_protocol = "http"

  # Don't send invitations to users by default.
  # Setting this to false will send users
  # accounts when they sign up for invitations,
  # while setting it to true will send them
  # a message that the system is currently in closed Alpha.
  config.send_invitations = false

end


text:
"""
    File: readTable.py

    Author: William J. Bosl
    Children's Hospital Boston
    300 Longwood Avenue
    Boston, MA 02115
    Email: william.bosl@childrens.harvard.edu
    Web: http://chip.org

    Copyright (C) 2011 William Bosl, Children's Hospital Boston Informatics Program (CHIP)
    http://chip.org.

    Purpose:

    This file is part of a Django-based SMArt application that implements
    a two-step test for medication adherence. It is intended to be used as
    a SMArt web application within the context of a SMArt container. See
    http://www.smartplatforms.org/ for detailed information about SMArt applications.

    This is a general table reading function. The assumption is that each row contains
    coefficients for a model. The columns headed by the keyword 'label' determine which
    is appropriate for a given model. The coefficients are in the columns headed by 'coeff'.
    Any line that starts with '#' in the data file is ignored.

    License information should go here.

    $Log: readTable.py,v $
"""

import string
import sys

class ReadTable():

	#=============================================================================
    # We only want to read the database once, so do it at initiation
	#=============================================================================
    def __init__(self, datafilename):
        # Read the data from the datafile or database
        try:
            datafile = open(datafilename)
        except:
            print "Can't open datafile: ", datafilename
            return

        # Read in all data lines: skip blank lines and those that begin with '#'
        self.lines = datafile.readlines()
        datafile.close()

	#=============================================================================
	# Here's where the table is actually read
	#=============================================================================
    def read(self):
        lines = self.lines
        datalines = []
        for line in lines:
            if line[0] == '#':
                continue
            elif not line.strip():
                continue
            else:
                datalines.append( string.split(line.lower()) )

        table = {}

        for line in datalines:
            n = len(line)
            key = line[0]
            age = line[1]
            if not table.has_key(key):
                table[key] = {}

            table[key][age] = []
            for i in range(2,n):
                table[key][age].append(line[i])

        return table

#=============================================================================
# main for testing purposes
#=============================================================================
if __name__ == "__main__":

    if(len(sys.argv) != 2):
        print "Usage:  python readData.py filename"
        sys.exit()
    else:
        filename = sys.argv[1]
    data = readTable.read(filename)

    for v1 in data:
        for v2 in data[v1]:
            print "data[%s][%s] = " %(v1,v2), data[v1][v2]


text:
"""
Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.

This program and the accompanying materials are made available under
the terms of the under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

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

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

from datetime import datetime
from time import sleep
import os
import fnmatch

import unittest2 as unittest
from tinctest.models.scenario import ScenarioTestCase
from mpp.models import SQLConcurrencyTestCase

t_prefix = 'mpp.models.regress.sql_related.regress_sql_concurrency_test_case.regress_sql_scenario_test_case.'
@unittest.skip('mock')
class MockSQLScenaioTestCase(ScenarioTestCase):
    """

    @description test case with metadata
    @created 2012-07-05 12:00:00
    @modified 2012-07-05 12:00:02
    @tags orca hashagg
    """
    def __init__(self, methodName):
        super(MockSQLScenaioTestCase, self).__init__(methodName)

        from mpp.models.regress.sql_related.regress_sql_concurrency_test_case.regress_sql_scenario_test_case import MockSQLConcurrencyTestCase as mctc
        mctc.__unittest_skip__ = False

    def test_serial_execution(self):
        test_case_list = []
        test_case_list.append(t_prefix+'MockSQLConcurrencyTestCase.test_query02')
        self.test_case_scenario.append(test_case_list)

@unittest.skip('mock')
class MockSQLConcurrencyTestCase(SQLConcurrencyTestCase):
    """

    @description test case with metadata
    @created 2012-07-05 12:00:00
    @modified 2012-07-05 12:00:02
    @tags orca hashagg
    @concurrency 2
    @iterations 1
    """
    def __init__(self, methodName):
        super(MockSQLConcurrencyTestCase, self).__init__(methodName)

    def setUp(self):
        pass

        self.tested = True
        self.assertTrue(self.tested)

    def test_explicit_definition(self):
        sleep(1)

    def test_failure(self):
        self.fail("Just like that !")

class ScenarioTestCaseTests(unittest.TestCase):
    def test_construction(self):
        tinc_test_case = MockSQLScenaioTestCase('test_serial_execution')
        self.assertEqual(tinc_test_case.name, 'MockSQLScenaioTestCase.test_serial_execution')
        self.assertEqual(tinc_test_case.author, "balasr3")
        self.assertEqual(tinc_test_case.description, "test case with metadata")
        self.assertEqual(tinc_test_case.created_datetime, datetime.strptime('2012-07-05 12:00:00', '%Y-%m-%d %H:%M:%S'))
        self.assertEqual(tinc_test_case.modified_datetime, datetime.strptime('2012-07-05 12:00:02', '%Y-%m-%d %H:%M:%S'))
        self.assertEqual(len(tinc_test_case.tags), 2)
        self.assertEqual(len(tinc_test_case.test_case_scenario), 0)
        self.assertTrue(tinc_test_case.fail_fast)

    def test_sanity_run(self):
        tinc_test_case = MockSQLScenaioTestCase('test_serial_execution')
        tinc_test_case.__class__.__unittest_skip__ = False
        tinc_test_case.run()
        self.assertEqual(len(tinc_test_case.test_case_scenario), 1)
        self.assertEqual(len(tinc_test_case.test_case_scenario[0][0]), 1)

        # Cleanup
        if os.path.exists('output'):
            for file in os.listdir('output'):
                path = os.path.join('output', file)
                if fnmatch.fnmatch(file, 'query02*.*'):
                    os.remove(os.path.join('output', file))


text:
{
"use strict";

const Component = require('./Component.js', 'DEDA.Component');

/**
 * The component manager handles registering and un-registering components as well as creating, initializing and unloading components within a single node.
 * The component manager is a component itself and is accessible vial the event bus locally and remotely.
 *
 * @prop {Map.Component} factory - This is a map of all registered modules/components that can be created. A component class must be registered before it can be created.
 * @prop {Array.Component} components - This is a list of all created components within this application node.
 *
 * @class
 * @memberof DEDA
 */
class ComponentManager extends Component
{
    /**
     * Creates and initializes a new component manager.
     * @constructors
     */
    constructor()
    {
        super(...arguments);
        this.factory = new Map();
        this.components = new Map();
    }

    /**
     * Returns the default options of this components.
     */
    static getDefaultOptions()
    {
        return {
            // The component initialization timeout before it is forced to initialize and moves on.
            initTimeout: 500,
            unloadTimeout: 1000
        }
    }

    /**
     * This method registers a component class with this manager.
     * This makes the given component available to be created within the application.
     * The component unique name `fullyQualifiedName` is used to create an instance of this component with defined settings.
     *
     * @param {Component} component - The component class object to add to this component manager.
     *
     * @fires {DEDA.Core.Event#../Component/Registered}
     */
    register(component, options)
    {
        options = Object.assign({warnIfExits: true}, options);

        // If component is a string then require it first.
        if (typeof(component) === 'string') component = require(component);

        //
        if (!component.hasOwnProperty('fullyQualifiedName')) return this.deda.log.error(`The component is missing property 'fullyQualifiedName'`);

        // If we are given an array of components to register then traverse the array and register the components.
        if (Array.isArray(component)) { for (let cmp of component) this.register(cmp); return; }

        // @TODO: If the component is not a DEDA.Component or a subclass of it then log error.

        // If the component has a fully qualified name then use it, otherwise use the class name as the type.
        let fullyQualifiedName = (component.hasOwnProperty('fullyQualifiedName') ? component.fullyQualifiedName : component.name);

        // If the item already exist then log error.
        if (options.warnIfExits && this.factory.has(fullyQualifiedName)) this.deda.log.warn(`Adding a component that already exists: ${fullyQualifiedName}`);

        // Add the component to the factory list.
        this.factory.set(fullyQualifiedName, component);

        // Send an event to say that a component has been registered.
        this.deda.trigger(this, '../Component/Registered', fullyQualifiedName);
    }

    /**
     * Removes the given component from the registry list so that it can not be created using the create/add method.
     *
     * This is helpful for dynamically updating existing components with a newer version without having to restart the application.
     *
     * @param {string} fullyQualifiedName - This is the fully qualified name of the component to unregister.
     *
     * @fires {DEDA.Core.Event#../Component/Unregistered}
     */
    unregister(fullyQualifiedName)
    {
        // If the component exists then remove it from the component factory.
        if (this.factory.has(fullyQualifiedName)) this.factory.remove(fullyQualifiedName);

         // If the component does not exist then log warning.
        else this.deda.log.warn(`Trying to unregister a component that does not exist: ${fullyQualifiedName}`);

        // Send an event to notify listeners that a component has been unregistered.
        this.deda.trigger(this, '../Component/Unregistered', fullyQualifiedName);
    }

    /**
     * Returns the created component with the given local ID or null if the component does not exist.
     *
     * @param {string} id
     */
    get(id)
    {
        return this.components.get(id);
    }

    /**
     * Creates and adds a new component(s) using the given config. The configs must contain fully-qualified-name or `type` of the component to create.
     * If `id` is specified then it is used otherwise a random Id is generated. The rest of the options depends on the component itself.
     * See `getOptionDesc()` or `getDefaultOptions()` of a component to get a list of all possible options along with the default values.
     *
     * @param {(object[] | object)} configs - This can be an single config object or an array of configs. If it is an array then creates all the components within the list.
    *
     * @fires {DEDA.Core.Event#../Component/Added} - the event data contains the created component id.
     */
    add(configs)
    {
        // If we are given an array of configs then traverse them and create each component one at a time.
        if (Array.isArray(configs))
        {
            let components = [];
            for (let config of configs) components = components.concat(this.add(config));
            return components;
        }

        // Try to find the component within the factory. If not found then report error.
        if (!this.factory.has(configs.type)) return this.deda.log.error(`Trying to create a component that does not exist: ${configs.type}`);

        // Create a new component instance and add it to the list created components and add it to this manager.
        let componentClass = this.factory.get(configs.type);
        let component = new componentClass(this.deda, configs);

        // Check if the component ID already exists. If so then log error.
        if (this.components.has(component.id))
        {
            // TODO: consider unloading a component if it already exists.
            this.deda.log.error(`Adding a component with ID that already exists: ${component.id}`);
            return this.components.get(component.id);
        }

        // Add the component to the component manager. Log the action for debugging purposes. Send event of added component.
        this.components.set(component.id, component);
        this.deda.log.debug(`Creating component: ${configs.type}-${configs.id}`);
        this.deda.trigger(this, '../Component/Added', component.id);

        // Return the created component.
        return component;
    }

    /**
     * Removes the component with the specified name/id and all it's children components. Uninitialize the component before removing it then triggered a component unload event.
     *
     * @param {string} id - The id of the component to remove.
     * @param {callback} onFinish - Callback function when the component is uninitialized and removed.
     * @returns Return a promise that is resolved when all children components and the given component is removed.
     */
    remove(id)
    {
        // Create and return the promise.
        return new Promise( (resolve, reject)=>{

            // If the component id does not exist then log error.
            if (!this.components.has(id))
            {
                const message = `Trying to remove a component that does not exist: ${id}`;
                this.deda.log.error(message);
                return reject(message);
            }

            // Get the component. Call the component uninstall method. Remove the app and bus.
            var timer = -1;
            let component = this.components.get(id);

            // Remove any child components.
            let promises = [];
            if (Array.isArray(component.config.components)) for (let config of component.config.components) promises.push(this.remove(config.id));

            // This method is called after the component is uninitialized or when the timer runs out.
            const unload = ()=>{

                // Clear the timer since the method was successfull.
                clearTimeout(timer);

                // Unsubscribe to all events and delete/remove it from the component's list.
                this.deda.unsubscribeToAll(component);
                this.components.delete(id);

                // Send event regarding component removed.
                this.deda.trigger(this, '../Component/Unloaded', component.id);

                // Resolve the promise once done.
                resolve();
            };

            // Once the children have been removed then remove this component.
            Promise.all(promises).then( values=>{

                // TODO: fix this, add timer.
                timer = setTimeout(()=>unload(), this.options.unloadTimeout);

                // Call the component unload method.
                component.$Unload(unload);

            }).catch( error=>reject(error) );
        });
    }

    /**
     * Removes and reloads the given component from the package URL. This can be used to update a component code without having to restart the application
     * since all package code are reloaded from the source files. Reloading a component will also reload all the it's sub-components.
     *
     * @unstable - This code works for basic components but is still under development.
     *
     * @param {string} id  - The id of the component to remove.
     * @param {callback} onFinish - Callback function when the component and it's sub components are reloaded.
     *
     * @todo return a promise that is resolved when the component and it's sub components are reloaded.
     */
    reload(id)
    {
        return new Promise( (resolve, reject)=>{

            // Get the component with the given ID. If not found then return with error.
            let component = this.components.get(id);
            if (!component)
            {
                const message = this.deda.i18n(`Trying to reload a component that does not exist: $[1]`, id)
                this.deda.log.error(message);
                return reject(message);
            }

            // Store the component, configuration, and options.
            let config = JSON.parse(JSON.stringify(component.config));
            //config.options = JSON.parse(JSON.stringify(component.options));

            // Store the package URL which will be used for reload the package of the given component.
            const packageURL = component.constructor.Package.urlPackage;

            // Remove the component and wait for it and all it's sub-components to be removed.
            this.remove(component.id).then( ()=>{

                // Load the application package.
                loader.addPackageURL(packageURL, {forceReload: true}).then( (pkg)=>{

                    // Register any new components.
                    module.registerComponents( this, {warnIfExits: false});

                    // Get all the components and sub component configs and create them.
                    const components = this.add(config);

                    // Trigger the initialize event.
                    this.deda.componentManager.initialize(components).then(()=>{

                        // Call the initialized event to tell everyone that all the components have been initialized.
                        //app.trigger(app, '../Init/Finished', {});

                    }).catch ( error=>reject(error) );

                }).catch( (error)=>{ this.deda.log.error(i18n(`The specified module does not exist: $[1]`, url)); reject(error); } );

            }).catch( error=>reject(error) );
        });
    }

    /**
     * This method initializes the given component(s) within this bus.
     * Initialization structure and order is important, sub components are only initialized when all parent components are initialized.
     *
     * This method returns a promise that is resolved when the given component and all it's sub-components are initialized.
     *
     * A component is initialized only when the `onFinish` method is called form the $Init method [$Init(onFinish)]. If the implementation does not call
     * the onFinish method then this could be a problem for resolving all the promises. To solve this issue a set timeout triggers an automatic
     * resolved for the component.
     *
     * Components can cancel the default timeout by call the onFinish early and passing it (false) as a parameter. This will let the component
     * take as much time as it needs. But when the overall timeout is reached the $Init is considered as failed and it's promise is rejected.
     *
     * The overall timeout should be set to a reasonable user acceptable wait time for an application to load. This may differ from one application to another.
     *
     * @param {DEDA.Component | [DEDA.Component]} component - The component(s) to initialize.
     * @returns Returns a promise that is resolved when all components and sub-components are initialized.
     *
     * @todo: if the component has children then a timeout would result in a rejection even though it was the first time. Components with children must call the onFinish event when they are done initializing.
     */
    initialize(component)
    {
        // If we are given an array of components then create an array of promises.
        if (Array.isArray(component))
        {
            let promises = new Array();
            for (let cmp of component) promises.push( this.initialize(cmp) );
            return Promise.all(promises);
        }

        // Create a promise that will resolve or reject based on the initialization results.
        return new Promise( (resolve, reject)=>{

            const name = (component && component.options ? component.options.id : (component && component.constructor ? component.constructor.name : 'Unknown'));
            let initTimer = 0;
            let initCounter = 0;

            // When the timer expires this will automatically resolve the method or reject if the timer has been reset at least once.
            const onTimeout = ()=>{
                if (initCounter > 0) reject(`Component initialization timed out: ${name}`);
                else initChildren();
            };

            // This is the onFinish method that informs the promise that it is done initializing.
            // If the waitMore parameters is passed in then the timer is reset and the global timer started.
            // This means components can keep calling this method to push the timer further and further.
            const onFinish = (waitMore)=>{

                // Clear the current timeout.
                clearTimeout(initTimer);

                // If we need to wait some more then restart the timer.
                if (waitMore)
                {
                    initTimer = setTimeout( ()=>onTimeout(), this.options.initTimeout );
                    initCounter++;
                }
                // Otherwise we are done, resolve the init promise.
                else initChildren();
            }

            // Initialize th children of this component, this returns a promise, The entire component is only initialize when all it's children are initialize.
            // NOTE: the init timeout is only for this component. Each sub component has it's own init timeout.
            const initChildren = ()=>{

                // The the component does not have sub-components then we are done, just return.
                if (!Array.isArray(component.config.components)) return resolve();

                // Otherwise traverse the children and initialize them all.
                const childrenComponents = this.add(component.config.components);
                this.initialize(childrenComponents).then( ()=>resolve(component) ).catch( (message)=>reject(message) );
            }

            try {
                // Start the timer initialize the component.
                initTimer = setTimeout( ()=>onTimeout(), this.options.initTimeout );
                component.$Init( (waitMore)=>onFinish(waitMore) );
            }
            // Catch any errors during initialization so that other components will not halted if one fails ot initialize.
            // This will also handle invalid components or components that don't have the $Init method.
            catch(error) {
                // If an exception occurred during initialization then log the error and reject the promise.
                console.error(error);
                reject(error);
            }
        });
    }

}

// Export the class and it's namespace.name or fully-qualified-name.
ComponentManager.fullyQualifiedName = 'DEDA.ComponentManager';
module.exports = ComponentManager;
}


text:
"""
ip/__init__.py

Created by Thomas Mangin on 2010-01-15.
Copyright (c) 2009-2015 Exa Networks. All rights reserved.
"""

import socket

from exabgp.protocol.family import AFI
from exabgp.protocol.family import SAFI

# =========================================================================== IP
#

class IP (object):
	afi = None  # here for the API
	_known = dict()

	_UNICAST = SAFI(SAFI.unicast)
	_MULTICAST = SAFI(SAFI.multicast)

	_multicast_range = set(range(224,240))  # 239

	__slots__ = ['ip','packed']

	def __init__ (self):
		raise Exception("You should use IP.create() to use IP")

	def init (self, ip, packed):
		self.ip = ip
		self.packed = packed
		return self

	@staticmethod
	def pton (ip):
		return socket.inet_pton(IP.toaf(ip),ip)

	@staticmethod
	def ntop (data):
		return socket.inet_ntop(socket.AF_INET if len(data) == 4 else socket.AF_INET6,data)

	@staticmethod
	def toaf (ip):
		# the orders matters as ::FFFF:<ipv4> is an IPv6 address
		if ':' in ip:
			return socket.AF_INET6
		if '.' in ip:
			return socket.AF_INET
		raise Exception('unrecognised ip address %s' % ip)

	@staticmethod
	def toafi (ip):
		# the orders matters as ::FFFF:<ipv4> is an IPv6 address
		if ':' in ip:
			return AFI.ipv6
		if '.' in ip:
			return AFI.ipv4
		raise Exception('unrecognised ip address %s' % ip)

	@staticmethod
	def tosafi (ip):
		if ':' in ip:
			# XXX: FIXME: I assume that ::FFFF:<ip> must be treated unicast
			# if int(ip.split(':')[-1].split('.')[0]) in IP._multicast_range:
			return SAFI.unicast
		elif '.' in ip:
			if int(ip.split('.')[0]) in IP._multicast_range:
				return SAFI.multicast
			return SAFI.unicast
		raise Exception('unrecognised ip address %s' % ip)

	def ipv4 (self):
		return True if len(self.packed) == 4 else False

	def ipv6 (self):
		return False if len(self.packed) == 4 else True

	@staticmethod
	def length (afi):
		return 4 if afi == AFI.ipv4 else 16

	def pack (self):
		return self.packed

	def __repr__ (self):
		return self.ip

	def __eq__ (self, other):
		return self.packed == other.packed

	def __neq__ (self, other):
		return self.packed != other.packed

	def __lt__ (self, other):
		return self.packed < other.packed

	def __le__ (self, other):
		return self.packed <= other.packed

	def __gt__ (self, other):
		return self.packed > other.packed

	def __ge__ (self, other):
		return self.packed >= other.packed

	def __hash__ (self):
		return hash(str(self.__class__.__name__) + self.packed)

	@classmethod
	def klass (cls, ip):
		# the orders matters as ::FFFF:<ipv4> is an IPv6 address
		if ':' in ip:
			afi = IPv6.afi
		elif '.' in ip:
			afi = IPv4.afi
		else:
			raise Exception('can not decode this ip address : %s' % ip)
		if afi in cls._known:
			return cls._known[afi]

	@classmethod
	def create (cls, ip, data=None,klass=None):
		if klass:
			return klass(ip,data)
		return cls.klass(ip)(ip,data)

	@classmethod
	def register (cls):
		cls._known[cls.afi] = cls

	@classmethod
	def unpack (cls, data, klass=None):
		return cls.create(IP.ntop(data),data,klass)

# ==================================================================== NoNextHop
#

class _NoNextHop (object):
	packed = ''

	def pack (self, data, negotiated=None):
		return ''

	def __str__ (self):
		return 'no-nexthop'

NoNextHop = _NoNextHop()

# ========================================================================= IPv4
#

class IPv4 (IP):
	# lower case to match the class Address API
	afi = AFI.ipv4

	__slots__ = []

	def __init__ (self, ip, packed=None):
		self.init(ip,packed if packed else IP.pton(ip))

	def __len__ (self):
		return 4

	def unicast (self):
		return not self.multicast()

	def multicast (self):
		return ord(self.packed[0]) in set(range(224,240))  # 239 is last

	def ipv4 (self):
		return True

	def ipv6 (self):
		return False

	@staticmethod
	def pton (ip):
		return socket.inet_pton(socket.AF_INET,ip)

	@staticmethod
	def ntop (data):
		return socket.inet_ntop(socket.AF_INET,data)

	# klass is a trick for subclasses of IP/IPv4 such as NextHop / OriginatorID
	@classmethod
	def unpack (cls, data, klass=None):
		ip = socket.inet_ntop(socket.AF_INET,data)
		if klass:
			return klass(ip,data)
		return cls(ip,data)

IPv4.register()

# ========================================================================= IPv6
#

class IPv6 (IP):
	# lower case to match the class Address API
	afi = AFI.ipv6

	__slots__ = []

	def __init__ (self, ip, packed=None):
		self.init(ip,packed if packed else socket.inet_pton(socket.AF_INET6,ip))

	def __len__ (self):
		return 16

	def ipv4 (self):
		return False

	def ipv6 (self):
		return True

	def unicast (self):
		return True

	def multicast (self):
		return False

	@staticmethod
	def pton (ip):
		return socket.inet_pton(socket.AF_INET6,ip)

	@staticmethod
	def ntop (data):
		return socket.inet_ntop(socket.AF_INET6,data)

	@classmethod
	def unpack (cls, data, klass=None):
		ip6 = socket.inet_ntop(socket.AF_INET6,data)
		if klass:
			return klass(ip6)
		return cls(ip6)

IPv6.register()


text:
Assuming the port-specific theme draws focus rings, this test can be used to ensure that a focus ring is drawn for a hyperlink. This test PASSED if a focus ring is drawn around the hyperlink (below).

Hyperlink