text:
describe('DrawTool', function () {
    var container, eventContainer;
    var map;

    var center = new maptalks.Coordinate(118.846825, 32.046534);

    function drawLine(drawTool) {
        var center = map.getCenter();

        var domPosition = GET_PAGE_POSITION(container);
        var point = map.coordinateToContainerPoint(center).add(domPosition);

        happen.mousedown(eventContainer, {
            'clientX':point.x,
            'clientY':point.y
        });
        happen.click(eventContainer, {
            'clientX':point.x,
            'clientY':point.y
        });
        for (var i = 0; i < 10; i++) {
            happen.mousemove(eventContainer, {
                'clientX':point.x + i,
                'clientY':point.y + i
            });
        }
        happen.mousedown(eventContainer, {
            'clientX':point.x + 10,
            'clientY':point.y
        });
        happen.click(eventContainer, {
            'clientX':point.x + 10,
            'clientY':point.y
        });

        var geojson1 = drawTool.getCurrentGeometry().toGeoJSON();

        happen.mousedown(eventContainer, {
            'clientX':point.x,
            'clientY':point.y + 10
        });
        happen.click(eventContainer, {
            'clientX':point.x,
            'clientY':point.y + 10
        });

        var geojson2 = drawTool.getCurrentGeometry().toGeoJSON();

        drawTool.undo();
        expect(drawTool.getCurrentGeometry().toGeoJSON()).to.be.eqlGeoJSON(geojson1);

        drawTool.redo();
        expect(drawTool.getCurrentGeometry().toGeoJSON()).to.be.eqlGeoJSON(geojson2);

        happen.dblclick(eventContainer, {
            'clientX':point.x - 1,
            'clientY':point.y + 5
        });
    }

    function dragDraw() {
        var center = map.getCenter();

        var domPosition = GET_PAGE_POSITION(container);
        var point = map.coordinateToContainerPoint(center).add(domPosition);
        happen.mousedown(eventContainer, {
            'clientX':point.x,
            'clientY':point.y
        });
        for (var i = 0; i < 10; i++) {
            happen.mousemove(eventContainer, {
                'clientX':point.x - i,
                'clientY':point.y - i
            });
        }
        happen.mouseup(eventContainer, {
            'clientX':point.x - 10,
            'clientY':point.y - 10
        });
    }

    function dragDrawByTouch() {
        var center = map.getCenter();

        var domPosition = GET_PAGE_POSITION(container);
        var point = map.coordinateToContainerPoint(center).add(domPosition);
        happen.touchstart(eventContainer, {
            'clientX':point.x,
            'clientY':point.y
        });
        for (var i = 0; i < 10; i++) {
            happen.touchmove(eventContainer, {
                'clientX':point.x - i,
                'clientY':point.y - i
            });
        }
        happen.touchend(eventContainer, {
            'clientX':point.x - 10,
            'clientY':point.y - 10
        });
    }

    function drawPoint() {
        var center = map.getCenter();

        var domPosition = GET_PAGE_POSITION(container);
        var point = map.coordinateToContainerPoint(center).add(domPosition);
        happen.mousedown(eventContainer, {
            'clientX':point.x,
            'clientY':point.y
        });
        happen.click(eventContainer, {
            'clientX':point.x,
            'clientY':point.y
        });
    }

    function drawRegularShape () { // ['circle', 'ellipse', 'rectangle']
        var center = map.getCenter();
        var domPosition = GET_PAGE_POSITION(container);
        var point = map.coordinateToContainerPoint(center).add(domPosition);
        happen.mousedown(eventContainer, {
            'clientX':point.x,
            'clientY':point.y
        });
        happen.click(eventContainer, {
            'clientX':point.x,
            'clientY':point.y
        });
        for (var i = 0; i < 10; i++) {
            happen.mousemove(eventContainer, {
                'clientX':point.x + i,
                'clientY':point.y + i
            });
        }
        happen.mousedown(eventContainer, {
            'clientX':point.x - 1,
            'clientY':point.y + 5
        });
        happen.click(eventContainer, {
            'clientX':point.x - 1,
            'clientY':point.y + 5
        });
    }
    beforeEach(function () {
        var setups = COMMON_CREATE_MAP(center);
        container = setups.container;
        map = setups.map;
        eventContainer = map._panels.canvasContainer;

    });

    afterEach(function () {
        map.remove();
        REMOVE_CONTAINER(container);
    });
    describe('draw geometries', function () {
        it('throw exception with an undefined mode', function () {
            expect(function () {
                new maptalks.DrawTool({
                });
            }).to.throwException();
        });

        it('throw exception with an invalid mode', function () {
            expect(function () {
                new maptalks.DrawTool({
                    mode : 'invalidMode'
                });
            }).to.throwException();
        });

        it('can draw a marker', function (done) {
            function drawEnd(param) {
                expect(param.geometry instanceof maptalks.Marker).to.be.ok();
                var markerCoord = param.geometry.getCoordinates();
                expect(markerCoord.x).to.be.approx(map.getCenter().x, 1E-4);
                expect(markerCoord.y).to.be.approx(map.getCenter().y, 1E-4);
                done();
            }
            var drawTool = new maptalks.DrawTool({
                mode : 'Point',
                symbol : {
                    'markerPlacement':'point',
                    'markerFile'   : 'images/control/2.png',
                    'markerRotation' : 30,
                    'markerWidth'  : 20,
                    'markerHeight' : 20,
                    'markerOpacity': 1,
                    'markerDx'     : 0,
                    'markerDy'     : 0
                }
            });
            drawTool.addTo(map);
            drawTool.on('drawend', drawEnd);
            drawPoint();
        });

        it('can draw linestring', function (done) {
            function drawEnd(param) {
                expect(param.geometry instanceof maptalks.LineString).to.be.ok();
                expect(param.geometry.getLength()).to.above(0);
                done();
            }
            var drawTool = new maptalks.DrawTool({
                mode : 'LineString'
            });
            drawTool.addTo(map);
            drawTool.on('drawend', drawEnd);
            drawLine(drawTool);
        });

        it('can draw Polygon', function (done) {
            function drawEnd(param) {
                expect(param.geometry instanceof maptalks.Polygon).to.be.ok();
                expect(param.geometry.getArea()).to.above(0);
                done();
            }
            var drawTool = new maptalks.DrawTool({
                mode : 'Polygon'
            });
            drawTool.addTo(map);
            drawTool.on('drawend', drawEnd);
            drawLine(drawTool);
        });

        it('can draw circle', function (done) {
            function drawEnd(param) {
                expect(param.geometry instanceof maptalks.Circle).to.be.ok();
                expect(param.geometry.getRadius()).to.above(0);
                done();
            }
            var drawTool = new maptalks.DrawTool({
                mode : 'Circle'
            });
            drawTool.addTo(map);
            drawTool.on('drawend', drawEnd);
            drawRegularShape();
        });

        it('can draw Rectangle', function (done) {
            map.setBearing(50);
            var first;
            function drawStart(param) {
                first = param.coordinate;
            }
            function drawEnd(param) {
                expect(param.geometry instanceof maptalks.Polygon).to.be.ok();
                var coordinates = param.geometry.getCoordinates()[0];
                expect(coordinates.length === 5).to.be.ok();
                expect(coordinates[0].toArray()).not.to.be.eql(coordinates[1].toArray());
                expect(coordinates[1].toArray()).not.to.be.eql(coordinates[2].toArray());
                expect(coordinates[2].toArray()).not.to.be.eql(coordinates[3].toArray());
                expect(coordinates[0].toArray()).to.be.eql(coordinates[0].toArray());
                done();
            }
            var drawTool = new maptalks.DrawTool({
                mode : 'Rectangle'
            });
            drawTool.addTo(map);
            drawTool.on('drawend', drawEnd);
            drawTool.on('drawstart', drawStart);
            drawRegularShape();
        });

        it('can draw Ellipse', function (done) {
            function drawEnd(param) {
                expect(param.geometry instanceof maptalks.Ellipse).to.be.ok();
                expect(param.geometry.getWidth()).to.above(0);
                expect(param.geometry.getHeight()).to.above(0);
                done();
            }
            var drawTool = new maptalks.DrawTool({
                mode : 'Ellipse'
            });
            drawTool.addTo(map);
            drawTool.on('drawend', drawEnd);
            drawRegularShape();
        });

        it('can draw FreeHandLinestring', function (done) {
            function drawEnd(param) {
                expect(param.geometry instanceof maptalks.LineString).to.be.ok();
                expect(param.geometry.getLength()).to.above(0);
                done();
            }
            var drawTool = new maptalks.DrawTool({
                mode : 'FreeHandLinestring'
            });
            drawTool.addTo(map);
            drawTool.on('drawend', drawEnd);
            dragDraw(drawTool);
        });

        it('can draw FreeHandLinestring with touch', function (done) {
            function drawEnd(param) {
                expect(param.geometry instanceof maptalks.LineString).to.be.ok();
                expect(param.geometry.getLength()).to.above(0);
                done();
            }
            var drawTool = new maptalks.DrawTool({
                mode : 'FreeHandLinestring'
            });
            drawTool.addTo(map);
            drawTool.on('drawend', drawEnd);
            dragDrawByTouch(drawTool);
        });

        it('can draw FreeHandPolygon', function (done) {
            function drawEnd(param) {
                expect(param.geometry instanceof maptalks.Polygon).to.be.ok();
                expect(param.geometry.getArea()).to.above(0);
                done();
            }
            var drawTool = new maptalks.DrawTool({
                mode : 'FreeHandPolygon'
            });
            drawTool.addTo(map);
            drawTool.on('drawend', drawEnd);
            dragDraw(drawTool);
        });

        it('can draw FreeHandRectangle', function (done) {
            var first;
            function drawStart(param) {
                first = param.coordinate;
            }
            function drawEnd(param) {
                expect(param.geometry instanceof maptalks.Polygon).to.be.ok();
                var coordinates = param.geometry.getCoordinates()[0];
                expect(coordinates.length === 5).to.be.ok();
                done();
            }
            var drawTool = new maptalks.DrawTool({
                mode : 'FreeHandRectangle'
            });
            drawTool.addTo(map);
            drawTool.on('drawend', drawEnd);
            drawTool.on('drawstart', drawStart);
            dragDraw(drawTool);
        });

        it('can draw FreeHandCircle', function (done) {
            function drawEnd(param) {
                expect(param.geometry instanceof maptalks.Circle).to.be.ok();
                expect(param.geometry.getRadius()).to.above(0);
                done();
            }
            var drawTool = new maptalks.DrawTool({
                mode : 'FreeHandCircle'
            });
            drawTool.addTo(map);
            drawTool.on('drawend', drawEnd);
            dragDraw(drawTool);
        });

        it('can draw FreeHandEllipse', function (done) {
            function drawEnd(param) {
                expect(param.geometry instanceof maptalks.Ellipse).to.be.ok();
                expect(param.geometry.getWidth()).to.above(0);
                expect(param.geometry.getHeight()).to.above(0);
                done();
            }
            var drawTool = new maptalks.DrawTool({
                mode : 'FreeHandEllipse'
            });
            drawTool.addTo(map);
            drawTool.on('drawend', drawEnd);
            dragDraw(drawTool);
        });
    });

    describe('common methods', function () {
        it('enable/disable', function () {
            var drawTool = new maptalks.DrawTool({
                mode: 'LineString',
                symbol: {
                    strokeSymbol: {
                        stroke: '#ff0000',
                        'stroke-width': 3,
                        opacity: 0.6
                    }
                }
            });
            drawTool.addTo(map);

            expect(function () {
                drawTool.disable();
                drawTool.enable();
            }).to.not.throwException();
        });

        it('setMode', function (done) {
            function drawEnd(param) {
                expect(param.geometry instanceof maptalks.Ellipse).to.be.ok();
                expect(param.geometry.getWidth()).to.above(0);
                expect(param.geometry.getHeight()).to.above(0);
                done();
            }
            var drawTool = new maptalks.DrawTool({
                mode : 'Rectangle'
            });
            drawTool.addTo(map);
            drawTool.setMode('Ellipse');
            drawTool.on('drawend', drawEnd);
            drawRegularShape();
        });

        it('setMode after disable', function () {
            var drawTool = new maptalks.DrawTool({
                mode : 'Rectangle'
            });
            drawTool.addTo(map);
            drawTool.disable();
            var spy = sinon.spy(drawTool, '_switchEvents');
            drawTool.setMode('Ellipse');

            expect(spy.callCount).to.be(1);
        });

        it('setSymbol', function (done) {
            function drawEnd(param) {
                expect(param.geometry instanceof maptalks.Ellipse).to.be.ok();
                expect(param.geometry.getWidth()).to.above(0);
                expect(param.geometry.getHeight()).to.above(0);
                done();
            }
            var drawTool = new maptalks.DrawTool({
                mode: 'Ellipse'
            });
            drawTool.addTo(map);
            var symbol = {
                'lineColor': '#ff0000',
                'lineWidth': 3
            };
            drawTool.setSymbol(symbol);
            drawTool.on('drawend', drawEnd);
            drawRegularShape();
        });

        it('getSymbol', function () {
            var drawTool = new maptalks.DrawTool({
                mode: 'LineString'
            });
            drawTool.addTo(map);

            expect(drawTool.getSymbol()).to.not.be(null);
        });
    });

});


text:
import React from 'react';
import { fromJS } from 'immutable';
import { mount } from 'enzyme';
import Wrangle from '../Wrangle';

function getStore(wrapper) {
  return wrapper.instance().getChildContext().wrangleStore;
}

describe('Wrangle', () => {
  it('configures childContext and initializes state', () => {
    const state = fromJS({ foo: 'bar' });
    const wrangle = mount(<Wrangle initialState={state} />);
    const store = getStore(wrangle);

    expect(store.getPath('foo')).toBe('bar');
  });

  it('calls onMissingPaths on next animation frame', () => {
    jest.useFakeTimers();
    const onMissingPaths = jest.fn();
    const wrangle = mount(<Wrangle onMissingPaths={onMissingPaths} />);
    const store = getStore(wrangle);
    store.getPath('foo');
    store.getPath('bar');

    expect(onMissingPaths).not.toHaveBeenCalled();
    jest.runAllTimers();
    expect(onMissingPaths).toHaveBeenCalledWith(store, ['foo', 'bar']);
  });

  it('calls onStoreChange when store changes', () => {
    const onStoreChange = jest.fn();
    const wrangle = mount(<Wrangle onStoreChange={onStoreChange} />);
    const store = getStore(wrangle);
    store.setPath('foo', 'bar');

    expect(onStoreChange).toHaveBeenCalledWith(store, { foo: 'bar' });
  });
});

redpajama_set_name: RedPajamaGithub


text:
@interface MyCalendarItem : UIView

- (void)createCalendarViewWith:(NSDate *)date;
- (NSDate *)nextMonth:(NSDate *)date;
- (NSDate *)lastMonth:(NSDate *)date;

@property (nonatomic, strong) NSDate *date;
@property (nonatomic, strong) NSDictionary *fileDateDic;

@property (nonatomic, copy) void(^calendarBlock)(NSInteger day, NSInteger month, NSInteger year);

@end


text:
using System;

namespace Prism.Modularity
{
    public class ModuleInfo
    {
        /// <summary>
        /// Specifies on which stage the Module will be initialized.
        /// </summary>
        public InitializationMode InitializationMode { get; set; }

        /// <summary>
        /// Gets or sets the name of the module.
        /// </summary>
        /// <value>The name of the module.</value>
        public string ModuleName { get; set; }

        /// <summary>
        /// Gets or sets the state of the <see cref="ModuleInfo"/> with regards to the module loading and initialization process.
        /// </summary>
        public ModuleState State { get; internal set; }

        /// <summary>
        /// Gets or sets the module <see cref="Type"/>.
        /// </summary>
        /// <value>The type of the module.</value>
        public Type ModuleType { get; set; }

        /// <summary>
        /// Initializes a new empty instance of <see cref="ModuleInfo"/>.
        /// </summary>
        public ModuleInfo()
        {
        }

        /// <summary>
        /// Initializes a new instance of <see cref="ModuleInfo"/>.
        /// </summary>
        /// <param name="moduleType">The module's type.</param>
        public ModuleInfo(Type moduleType)
        {
            ModuleType = moduleType;
        }

        /// <summary>
        /// Initializes a new instance of <see cref="ModuleInfo"/>.
        /// </summary>
        /// <param name="moduleName">The module's name.</param>
        /// <param name="moduleType">The module's type.</param>
        public ModuleInfo(string moduleName, Type moduleType) :
            this(moduleType)
        {
            ModuleName = moduleName;
        }

        /// <summary>
        /// Initializes a new instance of <see cref="ModuleInfo"/>.
        /// </summary>
        /// <param name="moduleName">The module's name.</param>
        /// <param name="moduleType">The module's type.</param>
        /// <param name="initializationMode">The module's <see cref="InitializationMode"/>.</param>
        public ModuleInfo(string moduleName, Type moduleType, InitializationMode initializationMode) : this (moduleName, moduleType)
        {
            InitializationMode = initializationMode;
        }
    }
}


text:
<!DOCTYPE html>
<html>
	<head>
		<base href="../../../../../../">
		<title>QUnit Generic TestSuite for sap.ui.webc.common</title>
		<script
			src="resources/sap/ui/test/starter/createSuite.js"
			data-sap-ui-testsuite="test-resources/sap/ui/webc/common/qunit/testsuite.generic.qunit"
			data-sap-ui-delay="-1"
		></script>
	</head>
	<body>
	</body>
</html>


text:
from enum import Enum

class Language(Enum):
    english = 'en'
    turkish = 'tr'


text:
Zachowaj ustawienia podczas restartu

Ustawia dla napêdu znacznik keep_settings_over_reset.

Gdy ten znacznik jest ustawiony, sterownik zachowa ustawienia opcji
Korzystanie z DMA, Niemaskowanie przerwañ
i Odczyty i zapisy wielosektorowe po miêkkim restarcie,
(jak te¿ siê dzieje w przypadku wyst±pienia b³êdu).

Nie wszystkie napêdy wspieraj± tê w³a¶ciwo¶æ.


text:
[![version](https://img.shields.io/pypi/v/pyk.svg)](https://pypi.python.org/pypi/pyk/)
[![downloads](https://img.shields.io/pypi/dm/pyk.svg)](https://pypi.python.org/pypi/pyk/")
[![build status](https://travis-ci.org/kubernauts/pyk.svg?branch=master)](https://travis-ci.org/kubernauts/pyk)

This is a simple, yet useful toolkit that supports you in writing microservices-style apps with Kubernetes.

The pyk toolkit is meant to be used by tools such as [kploy](https://github.com/kubernauts/kploy) or from your own app.
It is manifest-oriented, that is, it expects the resource definitions in YAML files; currently pyk's API is as follows:

- execute an arbitrary [operation](http://kubernetes.io/v1.1/docs/api-reference/v1/operations.html) and return the resource, if any:  `execute_operation(method='GET', ops_path='', payload='')`
- return a description of a resource: `describe_resource(resource_path)`
- delete a resource: `delete_resource(resource_path)`
- create a Replication Controller (RC): `create_rc(manifest_filename, namespace='default')`
- scale a RC: `scale_rc(manifest_filename, namespace='default', num_replicas=0)`
- create a service: `create_svc(manifest_filename, namespace='default')`

## Dependencies

All of these are included in the [setup](setup.py):

* Python [Requests](http://docs.python-requests.org/en/latest/) (note: I've tested with version `2.6.2`)
* Python [PyYAML](http://pyyaml.org/wiki/PyYAML) (note: I've tested with version `3.11`)

## Using pyk

A simple usage pattern is, for example, to create a [Replication Controller](http://kubernetes.io/v1.1/docs/user-guide/replication-controller.html):

    import pprint
    from pyk import toolkit

    pyk_client = toolkit.KubeHTTPClient() # assumes local API Server at http://localhost:8080
    _, rc_url = pyk_client.create_rc(manifest_filename='manifest/nginx-webserver-rc.yaml')
    rc = pyk_client.describe_resource(rc_url)
    pprint.pprint(rc.json())

## Testing pyk

In order to run the tests, use `test_pyk.py $KUBERNETES_API_SERVER_URL`, for example:

    $ ./test_pyk.py http://52.33.181.164/service/kubernetes

Above runs all the tests. You can also specify a particular test, like so:

    $ ./test_pyk.py http://52.33.181.164/service/kubernetes "init app"
    ================================================================================
    = Test case: init a simple app

    2015-11-28T05:13:16 From manifest/nginx-webserver-rc.yaml I created the RC "webserver-rc" at /api/v1/namespaces/default/replicationcontrollers/webserver-rc
    2015-11-28T05:13:17 From manifest/webserver-svc.yaml I created the service "webserver-svc" at /api/v1/namespaces/default/services/webserver-svc
    2015-11-28T05:13:18 Found following endpoints:
    2015-11-28T05:13:18 /api/v1/namespaces/default/endpoints/k8sm-scheduler ->
    {
      "addresses": [
        {
          "ip": "10.0.3.45"
        }
      ],
      "ports": [
        {
          "port": 25504,
          "protocol": "TCP"
        }
      ]
    }
    2015-11-28T05:13:18 /api/v1/namespaces/default/endpoints/kubernetes ->
    {
      "addresses": [
        {
          "ip": "10.0.3.45"
        }
      ],
      "ports": [
        {
          "port": 25502,
          "protocol": "TCP"
        }
      ]
    }
    2015-11-28T05:13:18 /api/v1/namespaces/default/endpoints/webserver-svc ->


text:
"""Guest login

:copyright: Copyright (c) 2019 RadiaSoft LLC.  All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from pykern import pkconfig
from pykern import pkinspect
from pykern.pkcollections import PKDict
from pykern.pkdebug import pkdc, pkdexc, pkdlog, pkdp
import datetime
import sirepo.auth
import sirepo.quest
import sirepo.srtime
import sirepo.util

AUTH_METHOD = sirepo.auth.METHOD_GUEST

#: User can see it
AUTH_METHOD_VISIBLE = True

#: module handle
this_module = pkinspect.this_module()

#: time to recheck login against db (prefix is "sraz", because github is "srag")
_COOKIE_EXPIRY_TIMESTAMP = "srazt"

_ONE_DAY = datetime.timedelta(days=1)

class API(sirepo.quest.API):
    @sirepo.quest.Spec("require_cookie_sentinel")
    def api_authGuestLogin(self, simulation_type):
        """You have to be an anonymous or logged in user at this point"""
        req = self.parse_params(type=simulation_type)
        # if already logged in as guest, just redirect
        if self.auth.user_if_logged_in(AUTH_METHOD):
            self.auth.login_success_response(req.type)
        self.auth.login(this_module, sim_type=req.type)
        raise AssertionError("auth.login returned unexpectedly")

def is_login_expired(qcall, res=None):
    """If expiry is configured, check timestamp

    Args:
        res (hash): If a hash and return is True, will contain (uid, expiry, and now).

    Returns:
        bool: true if login is expired
    """
    if not cfg.expiry_days:
        return False
    n = sirepo.srtime.utc_now_as_int()
    t = int(qcall.cookie.unchecked_get_value(_COOKIE_EXPIRY_TIMESTAMP, 0))
    if n <= t:
        # cached timestamp less than expiry
        return False
    # db expiry at most one day from now so we can change expiry_days
    # and (in any event) ensure expiry is checked once a day. This
    # would also allow us to extend the expired period in the db.
    u = qcall.auth.logged_in_user()
    r = qcall.auth.user_registration(u)
    t = r.created + cfg.expiry_days
    n = sirepo.srtime.utc_now()
    if n > t:
        if res is not None:
            res.update(uid=u, expiry=t, now=n)
        return True
    # set expiry in cookie
    t2 = n + _ONE_DAY
    if t2 < t:
        t = t2
    t -= datetime.datetime.utcfromtimestamp(0)
    qcall.cookie.set_value(_COOKIE_EXPIRY_TIMESTAMP, int(t.total_seconds()))
    return False

def validate_login(qcall):
    """If expiry is configured, check timestamp

    Returns:
        object: if valid, None, otherwise flask.Response.
    """
    msg = PKDict()
    if is_login_expired(qcall, msg):
        raise sirepo.util.SRException(
            "loginFail",
            PKDict({":method": "guest", ":reason": "guest-expired"}),
            "expired uid={uid}, expiry={expiry} now={now}",
            **msg
        )

def _cfg_login_days(value):
    value = int(value)
    if value == 0:
        return None
    assert value >= 1
    return datetime.timedelta(days=value)

cfg = pkconfig.init(
    expiry_days=(None, _cfg_login_days, "when auth login expires"),
)


text:
layout: page
title: Avery Citadel Air Show
date: 2016-05-24
author: Joe Kidd
tags: weekly links, java
status: published
summary: Sed diam mauris, interdum in eros cursus, aliquet facilisis velit.
banner: images/banner/leisure-04.jpg
booking:
  startDate: 10/20/2018
  endDate: 10/21/2018
  ctyhocn: COIBHHX
  groupCode: ACAS
published: true
---
Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer vel dolor malesuada, lobortis justo id, elementum lorem. Ut tincidunt ultrices egestas. Aenean imperdiet nibh a maximus maximus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In eleifend lectus ac elementum lacinia. Sed aliquam eros vel fermentum eleifend. Nulla accumsan lobortis ante, a finibus nulla efficitur nec. Nullam at purus hendrerit sem laoreet aliquet in eget dui.

* Aenean eget ipsum et nunc vulputate ultrices quis commodo lacus
* Nulla tristique dui dapibus eros vehicula, a consequat dui ornare
* Phasellus tempor nulla quis tristique lacinia
* Proin vitae lectus non tortor vulputate tristique vel eu massa.

Donec a tincidunt mauris. Proin eu dapibus odio, ac venenatis ante. Proin luctus nibh vel ligula interdum scelerisque. Duis at lacus sagittis, hendrerit nibh ut, blandit magna. Maecenas dictum neque at dolor sagittis imperdiet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam dapibus lobortis convallis. Integer in tincidunt orci, ac dictum est. Proin tempus pharetra aliquam. Donec sit amet nulla id mi pellentesque condimentum sit amet quis metus. Etiam at lacus vitae justo feugiat vulputate. Donec rutrum non libero non condimentum.


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

require_once ('Instagram.php');

// $params = array(
// 	'apiKey'=>'db4f35cd0f1042629eb500ca10af6810',
// 	'apiSecret'=>'2fc0e4f024464cdb9555dea61e422a70',
// 	'apiCallback'=>'http://lionlove.me'
// );
// $instagram = $this->load->library('Simplelib');
//$instagram = $this->Instagram->__construct($params);

/*
TODO: api callback 을 success.php로 채우기.
TODO: 받아온 코드를 $data = $instagram->getOAuthToken($code);
 $username = $data->user->username;
    // store user access token
    $instagram->setAccessToken($data);
    // now you have access to all authenticated user methods
    $result = $instagram->getUserMedia();

TODO:vardump로 다 뿌려보고
TODO:call 함수로 curl통신을 해서 데이터 가져오기.
TODO:가져온 데이터를 foreach 써서 img 폼에 맞춰서 뿌려주기.

*/
$instagram = new Instagram(array(
	'apiKey'=>'db4f35cd0f1042629eb500ca10af6810',
	'apiSecret'=>'2fc0e4f024464cdb9555dea61e422a70',
	'apiCallback'=>'http://www.lionlove.me'
));

// receive OAuth code parameter
$code = $_GET['code'];
// check whether the user has granted access
if (isset($code)) {
    // receive OAuth token object
    $data = $instagram->getOAuthToken($code);
    $username = $data->user->username;
    // store user access token
    $instagram->setAccessToken($data);
    // now you have access to all authenticated user methods
    $result = $instagram->getUserMedia();
} else {
    // check whether an error occurred
    if (isset($_GET['error'])) {
        echo 'An error occurred: ' . $_GET['error_description'];
    }
}

?>

<!DOCTYPE html>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>welcome</title>
	<link rel="stylesheet" href="/include/css/welcome.css">
	<link rel="stylesheet" href="/include/css/prism.css">

Instagram display your photo stream

                <a class="login" href="<?php echo $loginUrl ?>">» Login with Instagram

Use your Instagram account to login.

created by cosenary's Instagram class,
                available on GitHub

Instagram photos taken by <?php echo $data->user->username ?>

            <?php
            // display all user likes
            foreach ($result->data as $media) {
                $content = '
';
                // output media
                if ($media->type === 'video') {
                    // video
                    $poster = $media->images->low_resolution->url;
                    $source = $media->videos->standard_resolution->url;
                    $content .= "<video class=\"media video-js vjs-default-skin\" width=\"250\" height=\"250\" poster=\"{$poster}\"
                           data-setup='{\"controls\":true, \"preload\": \"auto\"}'>
                             <source src=\"{$source}\" type=\"video/mp4\" />
                           </video>";
                } else {
                    // image
                    $image = $media->images->low_resolution->url;
                    $content .= "";
                }
                // create meta section
                $avatar = $media->user->profile_picture;
                $username = $media->user->username;
                $comment = $media->caption->text;
                $content .= "

{$username}

{$comment}

";
                // output media
                echo $content . '
';
            }
            ?>

created by cosenary's Instagram class,
                available on GitHub

	인스타그램 로그인

	<xmp>

dlk

asdfjkh

welirh

	</xmp>

<?php

$keyword = 'good';
$access_token = '1491046049.d6e77b1.cb12f23d408648e08e0ccbe6023d6b48';
//$endpoint = 'https://api.instagram.com/v1/tags/'.$keyword.'/media/recent?access_token=1491046049.d6e77b1.cb12f23d408648e08e0ccbe6023d6b48';
//$endpoint ='https://api.instagram.com/v1/users/self/?access_token=1491046049.d6e77b1.cb12f23d408648e08e0ccbe6023d6b48';
$endpoint = 'https://api.instagram.com/v1/media/search?lat=48.858844&lng=2.294351&access_token=1491046049.d6e77b1.cb12f23d408648e08e0ccbe6023d6b48';

// $curl = curl_init($endpoint);
// curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 3);
// curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
// curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);

// $data = curl_exec($curl);

// var_dump($data);

?>

Jeff


text:
package types

const (
	// ModuleName defines the module name.
	ModuleName = "dclauth"

	// ModuleName defines the module name to use in user interactions.
	ModuleNameUser = "auth"

	// command name for the module.
	CmdName = ModuleNameUser

	// StoreKey defines the primary module store key.
	StoreKey = ModuleName

	// RouterKey is the message route for slashing.
	RouterKey = ModuleNameUser

	// QuerierRoute defines the module's query routing key.
	QuerierRoute = ModuleNameUser

	// MemStoreKey defines the in-memory store key.
	MemStoreKey = "mem_" + ModuleName
)

func KeyPrefix(p string) []byte {
	return []byte(p)
}

const (
	AccountStatKey = "AccountStat-value-"
)


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Taschenbestimmb. f. Pilze 2, Erysiphaceen (1926)

#### Original name
Podosphaera oxyacanthae f. sorbi Jacz.

### Remarks
null


text:
#ifndef WFAPI_SETTINGS_INTERFACE_H
#define WFAPI_SETTINGS_INTERFACE_H

#include "WFAPIConfig.h"
#include "Interface.h"
#include "DistanceUnit.h"
#include "VoiceVerbosity.h"
#include "RouteCost.h"
#include "TransportationType.h"
#include "SynchronousStatus.h"
#include "AsynchronousStatus.h"
#include "POICategories.h"

namespace WFAPI {

// Forward declarations
class StackedDialogVisualSpec;
class ScreenPoint;
class Nav2APIImpl;
class SettingsInterfaceImpl;
class SettingsListener;

/**
 * Interface for settings, used to get and set settings.
 */
class SettingsInterface : public Interface
{

public:

   /**
    * Destructor.
    */
   virtual ~SettingsInterface();

   /**
    * Add a listener for setting events.
    * @see SettingsListener
    *
    * @param listener The SettingsListener to add.
    *                 It may not be deleted until it is removed by
    *                 calling removeSettingsListener.
    */
   void addSettingsListener(SettingsListener* listener);

   /**
    * Remove a settings listener.
    *
    * @param listener The SettingsListener to remove.
    *                 It should now be deleted by caller, unless caller
    *                 keeps it around for later use.
    */
   void removeSettingsListener(SettingsListener* listener);

   /**
    * Get if it is set to automatic calculate a new route if off track.
    *
    * @param autoReroute Set to the value of autoReroute.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus getAutoReroute(bool& autoReroute);

   /**
    * Get if it is set to avoid highways.
    *
    * @param avoidHighway Set to the value of AvoidHighway.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus getAvoidHighway(bool& avoidHighway);

   /**
    * Get if it is set to avoid toll roads.
    *
    * @param avoidTollRoad Set to the value of AvoidTollRoad.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus getAvoidTollRoad(bool& avoidTollRoad);

   /**
    * Get if it is set to check for traffic changes.
    *
    * @param checkRouteForTrafficChanges Set to the value of
    *        CheckRouteForTrafficChanges.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus getCheckRouteForTrafficChanges(
      bool& checkRouteForTrafficChanges);

   /**
    * Get units used for measuring distances.
    *
    * @param distanceUnit Set to the value of DistanceUnit.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus getDistanceUnit(DistanceUnit& distanceUnit);

   /**
    * Get how route costs are measured.
    *
    * @param routeCost Set to the value of RouteCost.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus getRouteCost(RouteCost& routeCost);

   /**
    * Get how often it is set to check for traffic information updates.
    *
    * @param trafficInformationUpdateTime Set to the value of
    *        TrafficInformationUpdateTime, in minutes.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus getTrafficInformationUpdateTime(
      wf_uint32& trafficInformationUpdateTime);

   /**
    * Get which verbosity level is set for voices.
    *
    * @param voiceVerbosity Set to the value of VoiceVerbosity.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus getVoiceVerbosity(VoiceVerbosity& voiceVerbosity);

   /**
    * Get the TransportationType set in the last routeTo call in
    * RouteInterface.
    *
    * @param transportationType Set to the value of TransportationType.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus getCurrentTransportationType(
      TransportationType& transportationType);

   /**
    * To set if to automatic calculate a new route if off track.
    *
    * @param newVal If to automatic calculate a new route if off track.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus setAutoReroute(const bool& newVal);

   /**
    * To set if to avoid highways.
    *
    * @param newVal If to avoid highways.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus setAvoidHighway(const bool& newVal);

   /**
    * To set if to avoid toll roads.
    *
    * @param newVal If to avoid toll roads.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus setAvoidTollRoad(const bool& newVal);

   /**
    * To set if to check route for traffic changes.
    *
    * @param newVal If to check route for traffic changes.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus setCheckRouteForTrafficChanges(const bool& newVal);

   /**
    * To set which unit to use for distances.
    *
    * @param newVal The unit to use for distances.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus setDistanceUnit(DistanceUnit newVal);

   /**
    * Set how to measure route costs.
    *
    * @param newVal The route cost to be used.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus setRouteCost(RouteCost newVal);

   /**
    * To set how often to check for traffic information updates.
    *
    * @param newVal Time in minutes between traffic information updates.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus setTrafficInformationUpdateTime(wf_uint32 newVal);

   /**
    * To set verbosity level for voices.
    *
    * @param newVal The verbosity level to use for voices.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus setVoiceVerbosity(VoiceVerbosity newVal);

   /**
    * Set this parameter to true to get the position based search
    * categories list.
    *
    * @param newVal If set to true the postion will be used when requesting
    *               the search categories list.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus setUsePositionForSearchCategoriesRequests(bool newVal);

   /**
    * Get the parameter that enables the position based search categories list.
    *
    * @param usePos If set to true the postion will be used when requesting
    *               the search categories list.
    * @return StatusCodes::OK if operation succeeded.
    */
   SynchronousStatus getUsePositionForSearchCategoriesRequests(bool &usePos);

   /**
    * Settings for MapLib, set in the connected MapLibAPI and
    * stored in Nav2's settings storage between application restarts.
    */
   //@{
   /**
    * Sets the max size of the disk cache if it exists.
    *
    * @param nbrBytes The maximum size of the disk cache in bytes.
    */
   void setMaxDiskCacheSize(wf_uint32 nbrBytes);

   /**
    * Set the visibility of a POI category with the specified id.
    *
    * @param id The id of the category to modify visibility of.
    * @param visible If true, the category will be visible.
    * @return True if the category id was found.
    */
   bool setCategoryVisible(wf_uint32 id, bool visible);

   /**
    * Synchronize a local set of POI categories with visibility information
    * with the currently available categories in MapLib. This may lead to
    * that some categories are removed and some are added.
    * If a category is not removed, its visibility state remains unchanged.
    * The visibility state of added categories will be set by MapLib.
    *
    * @param localCategories The locally stored POI categories to synchronize
    *                        with MapLib's current category set. This is also
    *                        an out parameter which will be updated
    *                        accordingly.
    * @return True if any POI categories were added or removed to
    *         the supplied localCategories.
    */
   bool synchronizePOICategories(POICategories& localCategories);

   //@}

   /**
    * Asynchronous function to check if EULA is updated. The result of the
    * request comes in a callback to the listener.
    *
    * @param filename The filename of the EULA, this is the name to the file
    *                 where the EULA is stored.
    * @return The status of the request.
    */
   AsynchronousStatus isEULAUpdated(const WFString& filename);

   /**
    * Synchronous function for retrieving the user's username
    *
    * @param username The username to be retrieved.
    * @return The status of the request.
    */
   SynchronousStatus getUsername(WFString& username);

   /**
    * Synchronous function for setting the user's web password
    *
    * @param password The password to change to.
    * @return The status of the request.
    */
   SynchronousStatus setPassword(const WFString& password);

   /**
    * Synchronous function for setting the UIN of this user.
    *
    * @param UIN Where the UIN will be stored.
    * @return The status of the request.
    */
   SynchronousStatus setUIN(const WFString& UIN);

   /**
    * Call to get new version information if there is a new version available.
    * The strings are empty if there are no new version available.
    *
    * @param versionNumber The new version number. Comes as a string
    * containing 3 different versions:
    * <Program version> : <Resource version> : <MLFW version>
    * where the "Resource version" and "MLFW version" are optional.
    * The program and resource versions are specified as:
    * [1-9][0-9]*'.'[1-9][0-9]*'.'[1-9][0-9]*
    * and the MLFW version is specified as a single number.
    * @param versionUrl The url where the new version is available for
    * download.
    * @param versionString A freetext string for the new version. Can be
    * an URI, a platform market link, a package name, an id, etc.
    * @param force A flag saying if the update should be forced,
    * e.g. the user should not be able to use the application until he
    * has accepted the upgrade.
    */
   SynchronousStatus getNewVersionInformation(WFString& version,
                                              WFString& url,
                                              WFString& versionString,
                                              bool& force);

   /**
    * Internal function.
    */
   SettingsInterfaceImpl* getImpl();

private:
   /**
    * Do not create SettingsInterface get it from the Nav2API class.
    */
   SettingsInterface(Nav2APIImpl* nav2APIimpl);

   /**
    * We do not allow copies of this interface.
    */
   SettingsInterface(const SettingsInterface&);
   const SettingsInterface& operator=(const SettingsInterface&);

   struct impl;

   impl* m_impl;

   friend class Nav2APIImpl;
};

} // End namespace WFAPI.

#endif // End WFAPI_SETTINGS_INTERFACE_H.


text:
@implementation UIApplication (openURL)

- (BOOL)newOpenURL:(NSURL*)url {
    if ([eLongDebugManager businessLineInstance].enabled) {
        if (![[eLongDebugManager businessLineInstance] isEnabled:eLongDebugBLBooking]) {
            // 如果monkey打开,不做处理,直接跳出
            return NO;
        }
    }
    return [self openURL:url];
}

@end


text:
layout: post

#event information
title:  "Das Boot and German Film History"
cover: "/images/1024px-Bavaria_Filmstudio_Das_Boot_1.jpg"
attribution:
  name: "Film set of Das Boot at the Bavaria Film Studios"
  author: "Aconcagua"
  license: "CC BY-SA 3.0"
  name_url: "https://commons.wikimedia.org/wiki/File:Bavaria_Filmstudio_Das_Boot_1.jpg"
  license_url: "https://creativecommons.org/licenses/by-sa/3.0/deed.en"
date:   "2016-03-31 18:45"
endDate:   "2016-03-31 21:00"
creation: "2016-03-22"
start_time: "6:45 PM"
end_time: "9:00 PM"
location:
  name: "Goethe-Institut Washington"
  address:
    - "1990 K St NW #03"
  city: Washington
  state: DC
  zip: 20006
tags: [ 'Goethe-Institut', 'Arts', 'Lectures' ]
excerpt: >
  This talk examines the pivotal role played by the blockbuster
  *Das Boot* (1981) in establishing a new production model and
  aesthetic vision for German film.

---

This talk examines the pivotal role played by the blockbuster
*Das Boot* (1981) in establishing a new production model and
aesthetic vision for German film. Ushering in a shift away from
the director-driven New German Cinema of the 1960s and 1970s and
toward a new commercially oriented genre cinema, *Das Boot* made a
virtue of the financial limitations of German film production in
the 1980s and established new strategies for appealing to global
audiences that continue to hold sway in the twenty-first century.
Focusing on the film's formal and technological innovations as well
as its double-edged politics, this talk presents a critical take
on what remains — even thirty-five years after its initial
release — the most commercially successful foreign-language
film ever released in North America.

Hester Baer is an associate professor of German and Film Studies
at the University of Maryland, College Park, where she chairs the
Department of Germanic Studies. She has published widely on
German film, digital media, contemporary literature, and
feminism. She is the author of Dismantling the Dream Factory:
Gender, German Cinema, and the Postwar Quest for a New Film
Language (2009), and the co-editor of German Women's Writing
in the Twenty-First Century (2015). She is currently working
on a book about German cinema from 1980-2010. Baer is the
recipient of Fulbright and DAAD grants, and she has served as
the President of the South Central Modern Language Association
and the Coalition of Women in German.

Organized by the American Goethe Society. Please RSVP by March 20
to Dr. Mary Helen Dupree at mhd33@georgetown.edu or
(202) 714-2486.


text:
package cz.metacentrum.perun.wui.profile.client.resources;

import cz.metacentrum.perun.wui.client.resources.PerunTranslation;

/**
 * Perun Profile test translations
 *
 * @author Pavel Zlámal <zlamal@cesnet.cz>
 */
public interface PerunProfileTranslation extends PerunTranslation {

	@DefaultMessage("Member ID")
	String memberId();

	@DefaultMessage("Member status")
	String memberStatus();

	@DefaultMessage("Member details")
	String memberDetails();

	@DefaultMessage("Choose")
	String select();

	@DefaultMessage("User profile")
	public String appName();

	@DefaultMessage("My profile")
	public String menuMyProfile();

	@DefaultMessage("My groups")
	String menuMyGroups();

	@DefaultMessage("Virtual Organizations")
	public String menuOrganizations();

	@DefaultMessage("My linked accounts")
	public String menuMyIdentities();

	@DefaultMessage("My services")
	String menuMyResources();

	@DefaultMessage("Logins & Passwords")
	public String menuLoginsAndPasswords();

	@DefaultMessage("Settings")
	public String menuSettings();

	@DefaultMessage("Title before")
	String title();

	@DefaultMessage("Name")
	String name();

	@DefaultMessage("Surname")
	String surname();

	@DefaultMessage("Title after")
	String titleAfter();

	@DefaultMessage("E-mail")
	String preferredMail();

	@DefaultMessage("Preferred language")
	String preferredLang();

	@DefaultMessage("Timezone")
	String timezone();

	@DefaultMessage("Organization")
	String organization();

	@DefaultMessage("Phone")
	String phone();

	@DefaultMessage("Last usage")
	String lastAccess();

	@DefaultMessage("These are the accounts you use to access your services.")
	public String myIdentsText();

	@DefaultMessage("Certificate issuer")
	String x509Issuer();

	@DefaultMessage("Identity")
	String x509Identity();

	@DefaultMessage("Removing identity")
	String removingIdentity();

	@DefaultMessage("Loading identities")
	String loadingIdentities();

	@DefaultMessage("Link a new account")
	String addFed();

	@DefaultMessage("Add new certificate")
	String addCert();

	@DefaultMessage("Loading user data")
	String loadingUserData();

	@DefaultMessage("Change")
	String updateEmail();

	@DefaultMessage("Change password")
	String changePassword();

	@DefaultMessage("Reset password")
	String resetPassword();

	@DefaultMessage("Change password for {0}")
	String changePasswordModalTitle(String login);

	@DefaultMessage("Old password can`t be empty!")
	String oldPassCantBeEmpty();

	@DefaultMessage("New e-mail")
	String newPreferredEmail();

	@DefaultMessage("Request e-mail change (you will receive validation e-mail)")
	String sendValidationEmail();

	@DefaultMessage("Sending validation e-mail")
	String requestingEmailUpdate();

	@DefaultMessage("Invalid e-mail format")
	String wrongEmailFormat();

	@DefaultMessage("Validation e-mail has been send to {0}. Check your inbox and complete validation by clicking on link in received e-mail.")
	String haveRequestedEmailUpdate(String emails);

	@DefaultMessage("E-mail change")
	String updateEmailModalTitle();

	@DefaultMessage("Groups in which you are a member")
	String memberGroups();

	@DefaultMessage("Groups in which you are an admin")
	String adminGroups();

	@DefaultMessage("You are not a member of any group in selected OrganizationsView.")
	String noMemberGroups();

	@DefaultMessage("You are not admin of any group in selected OrganizationsView.")
	String noAdminGroups();

	@DefaultMessage("User information")
	String userInfo();

	@DefaultMessage("Information from virtual OrganizationsView")
	String voInfo();

	@DefaultMessage("Display all information")
	String completeInfo();

	@DefaultMessage("here")
	String here();

	@DefaultMessage("No resources found")
	String noResources();

	@DefaultMessage("Email")
	String uesEmail();

	@DefaultMessage("Show other identities")
	String otherIdentities();

	@DefaultMessage("External source name")
	String uesName();

	@DefaultMessage("No groups found.")
	String noGroups();

	@DefaultMessage("Groups")
	String groups();

	@DefaultMessage("Membership expiration")
	String membershipExpiration();

	@DefaultMessage("Extend")
	String extendMembership();

	@DefaultMessage("Privacy")
	String menuPrivacy();

	@DefaultMessage("To view all information that we keep about you, click")
	String showAllInfoText();

	@DefaultMessage("Here is all information that we keep about you. We keep this information for the purpose of providing services.")
	String allInfoDescriptionText();

	@DefaultMessage("Groups with access")
	String resourceGroups();

	@DefaultMessage("Data used for")
	String dataUsedFor();

	@DefaultMessage("Terms of use")
	String aupHeader();

	@DefaultMessage("No identities found")
	String noIdentities();

	@DefaultMessage("You have no SSH keys")
	String noSshKey();

	@DefaultMessage("You have no admin SSH keys")
	String noAdminSshKey();

	@DefaultMessage("SSH keys")
	String sshKeys();

	@DefaultMessage("Admin SSH keys")
	String adminSshKeysHeading();

	@DefaultMessage("Here is a list of your SSH keys used for root access.")
	String adminSshKeysNote();

	@DefaultMessage("Here is a list of your SSH keys.")
	String sshKeysNote();

	@DefaultMessage("New key")
	String newPublicKey();

	@DefaultMessage("New admin key")
	String newPublicAdminKey();

	@DefaultMessage("SSH Keys")
	String menuSettingsSshKeys();

	@DefaultMessage("Key")
	String key();

	@DefaultMessage("Add SSH key")
	String addPublicKey();

	@DefaultMessage("Add admin SSH key")
	String addAdminPublicKey();

	@DefaultMessage("Begins with ''ssh-rsa'', ''ssh-dss'', ''sk-ssh-ed25519'', ''ssh-ed25519'', ''sk-ecdsa'', ''ecdsa-sha2-nistp256'', ''ecdsa-sha2-nistp384'' or ''ecdsa-sha2-nistp521''.")
	String newSshKeyInfoText();

	@DefaultMessage("Invalid value given. Your key should have one of the following types: ''ssh-ed25519'', ''ssh-ed25519-cert-v01@openssh.com'', ''sk-ssh-ed25519@openssh.com'', ''sk-ssh-ed25519-cert-v01@openssh.com'', ''ssh-rsa'', ''ssh-dss'', ''ecdsa-sha2-nistp256'', ''ecdsa-sha2-nistp384'', ''ecdsa-sha2-nistp521'', ''sk-ecdsa-sha2-nistp256@openssh.com'', ''ssh-rsa-cert-v01@openssh.com'', ''ssh-dss-cert-v01@openssh.com'', ''ecdsa-sha2-nistp256-cert-v01@openssh.com'', ''ecdsa-sha2-nistp384-cert-v01@openssh.com'', ''ecdsa-sha2-nistp521-cert-v01@openssh.com'' or ''sk-ecdsa-sha2-nistp256-cert-v01@openssh.com")
	String sshInvalidPrefixText();

	@DefaultMessage("Cancel")
	String cancel();

	@DefaultMessage("Key value cannot contain multiple lines.")
	String sshInvalidNewLinesText();

	@DefaultMessage("Public part of key")
	String publicKey();

	@DefaultMessage("Preferred shells")
    String preferredShells();

	@DefaultMessage("Bona fide status")
	String bonaFideStatus();

	@DefaultMessage("List of preferred shells (ordered from the most preferred to least) is used to determine your shell on provided resources. If none of preferred shells is available on resource (or no preferred shell is set), resource`s default is used.")
	String preferredShellsInfo();

	@DefaultMessage("Custom value")
	String customValue();

	@DefaultMessage("Enter custom shell")
	String customShellValueHeader();

	@DefaultMessage("Update value")
	String updateValue();

	@DefaultMessage("Change")
	String change();

	@DefaultMessage("Add preferred shell")
	String addPreferredShell();

	@DefaultMessage("Invalid shell value. Example: ''/bin/bash''.")
	String invalidShellValue();

	@DefaultMessage("Shell value can not be empty.")
	String emptyShellValue();

	@DefaultMessage("Preferred Unix group names")
	String unixGroupNames();

	@DefaultMessage("Group names in namespaces ''")
	String preferredGroupNameHeaderText();

	@DefaultMessage("Add preferred group name")
	String addPreferredGroupName();

	@DefaultMessage("Edit preferred group name")
	String changePreferredGroupName();

	@DefaultMessage("Enter new preferred group name")
	String newPreferredGroupName();

	@DefaultMessage("Data quotas")
	String unixDataQuotas();

	@DefaultMessage("Data quota")
	String dataQuota();

	@DefaultMessage("Files quota")
	String filesQuota();

	@DefaultMessage("Default")
	String defaultValue();

	@DefaultMessage("Using default")
	String usingDefault();

	@DefaultMessage("Request change")
	String requestChange();

	@DefaultMessage("Data quota change request")
	String dataQuotaRequestChange();

	@DefaultMessage("Files quota change request")
	String filesQuotaRequestChange();

	@DefaultMessage("Resource")
	String resourceHeading();

	@DefaultMessage("Current quota")
	String currentQuota();

	@DefaultMessage("Value can not be empty!")
	String cannotBeEmpty();

	@DefaultMessage("Value must be number!")
	String mustBeNumber();

	@DefaultMessage("No resources where you can request quota change were found.")
	String noQuotaResources();

	@DefaultMessage("RT ticket QUOTA: Change request sent. Responses will be sent to the e-mail address: ")
	String rtMessageSuccess();

	@DefaultMessage("Sending request")
	String sendingRequest();

	@DefaultMessage("Requested quota")
	String requestedQuota();

	@DefaultMessage("Reason")
	String reason();

	@DefaultMessage("Not set")
	String notSet();

	@DefaultMessage("SAMBA password")
	String menuSambaPassword();

	@DefaultMessage("Alternative passwords")
	String menuAltPasswords();

	@DefaultMessage("Description")
	String description();

	@DefaultMessage("Generate")
	String addAltPassword();

	@DefaultMessage("Delete")
	String delete();

	@DefaultMessage("No passwords found")
	String noPasswords();

	@DefaultMessage("Your generated alternative password is")
	String generatedPassword();

	@DefaultMessage("Generate new alternative password")
	String generatePassword();

	@DefaultMessage("Your alternative passwords")
	String yourAlternativePasswords();

	@DefaultMessage("Password description")
	String passwordDescription();

	@DefaultMessage("Please copy the password now. It will not be shown again.")
	String generatedPasswordHint();

	@DefaultMessage("You do not have any alternative passwords yet")
	String noAlternativePasswords();

	@DefaultMessage("Examples of password descriptions: "email on mobile phone" or "teleconferences on tablet".")
	String alternativePasswordsExample();

	@DefaultMessage("Copy to clipbord")
	String copyPassword();

	@DefaultMessage("Close")
	String close();

	@DefaultMessage("You have to type description into box below")
	String errorMissingDescription();

	@DefaultMessage("You already have password with this description")
	String errorDuplicateDescription();

	@DefaultMessage("Enter new password")
	String passwordField();

	@DefaultMessage("You already have password for SAMBA. You can change it by setting new password.")
	String sambaPasswordSet();

	@DefaultMessage("You don`t have password for SAMBA yet. You can create new one using form below.")
	String sambaPasswordNotSet();

	@DefaultMessage("Set password")
	String setSambaPassword();

	@DefaultMessage("Password for SAMBA service has been changed.")
	String sambaPasswordSetNotif();

	@DefaultMessage("Verify preferred e-mail")
	String verifyEmailChangeTitle();

	@DefaultMessage("Verifying e-mail")
	String verifyingEmailChange();

	@DefaultMessage("E-mail address {0} was verified and set as your preferred e-mail.")
	String verifyingEmailChangeDone(String email);

	@DefaultMessage("Preferred email change requested doesn't exist or isn't valid anymore.")
	String mailChangeError();
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Task05.WebCalculator
{
    public partial class Index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.SqRootBtn.Text = "\u221A";
        }

        protected void Calculate_Click(object sender, EventArgs e)
        {
            if (ViewState["Result"] == null)
            {
                ViewState["Result"] = GetResult(ViewState["Operand0"].ToString(),
                                                    ViewState["Operand1"].ToString(),
                                                    ViewState["Operation0"].ToString());
            }

            this.Result.Text = ViewState["Result"].ToString();
        }

        protected void Clear_Click(object sender, EventArgs e)
        {
            ViewState.Clear();
            this.Result.Text = "";
        }

        protected void Operation_Click(object sender, CommandEventArgs e)
        {
            if (ViewState["Index"] == null)
            {
                ViewState["Index"] = "0";
            }

            int index = int.Parse(ViewState["Index"].ToString());
            ViewState["Operation" + index] = e.CommandArgument.ToString();
            // second operation - show result of first two
            if (index > 0)
            {
                if (ViewState["Result"] == null)
                {
                    ViewState["Result"] = "";
                }

                ViewState["Result"] = this.GetResult(ViewState["Operand" + (index - 1)].ToString(),
                                                    ViewState["Operand" + index].ToString(),
                                                    ViewState["Operation" + (index - 1)].ToString());
            }
            ViewState["Index"] = index + 1;
        }

        protected void Digit_Click(object sender, CommandEventArgs e)
        {
            if (ViewState["Index"] == null)
            {
                ViewState["Index"] = "0";
            }

            string key = "Operand" + ViewState["Index"].ToString();
            if (ViewState[key] == null)
            {
                ViewState[key] = "";
            }

            ViewState[key] = ViewState[key].ToString() + e.CommandArgument.ToString();

            this.Result.Text = ViewState[key].ToString();
        }

        private string GetResult(string op1, string op2, string operation)
        {
            var num1 = double.Parse(op1);
            var num2 = double.Parse(op2);

            switch (operation)
            {
                case "+": return (num1 + num2).ToString();
                case "-": return (num1 - num2).ToString();
                case "*": return (num1 * num2).ToString();
                case "/": return (num1 / num2).ToString();
                case "sr": return (Math.Sqrt(num1)).ToString();
                default: return "Invalid input";
            }
        }
    }
}


text:
var assert = require("assert");
var child_process = require("child_process"); // eslint-disable-line camelcase
var path = require("path");
var fs = require("fs");

var temp = require('temp').track();

var promises = require("../lib/promises");
var test = require("./test")(module);
var testPath = require("./testing").testPath;

test("HTML is printed to stdout if output file is not set", function() {
    return runMammoth(testPath("single-paragraph.docx")).then(function(result) {
        assert.equal(result.stderrOutput, "");
        assert.equal(result.output, "
Walking on imported air
");
    });
});

test("HTML is written to file if output file is set", function() {
    return createTempDir().then(function(tempDir) {
        var outputPath = path.join(tempDir, "output.html");
        return runMammoth(testPath("single-paragraph.docx"), outputPath).then(function(result) {
            assert.equal(result.stderrOutput, "");
            assert.equal(result.output, "");
            assert.equal(fs.readFileSync(outputPath, "utf8"), "
Walking on imported air
");
        });
    });
});

var imageBase64 = "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAOvgAADr4B6kKxwAAAABNJREFUKFNj/M+ADzDhlWUYqdIAQSwBE8U+X40AAAAASUVORK5CYII=";

test("inline images are included in output if writing to single file", function() {
    return runMammoth(testPath("tiny-picture.docx")).then(function(result) {
        assert.equal(result.stderrOutput, "");
        assert.equal(result.output, '

');
    });
});

test("images are written to separate files if output dir is set", function() {
    return createTempDir().then(function(tempDir) {
        var outputPath = path.join(tempDir, "tiny-picture.html");
        var imagePath = path.join(tempDir, "1.png");
        return runMammoth(testPath("tiny-picture.docx"), "--output-dir", tempDir).then(function(result) {
            assert.equal(result.stderrOutput, "");
            assert.equal(result.output, "");
            assert.equal(fs.readFileSync(outputPath, "utf8"), '

');
            assert.equal(fs.readFileSync(imagePath, "base64"), imageBase64);
        });
    });
});

test("style map is used if set", function() {
    return createTempDir().then(function(tempDir) {
        var styleMapPath = path.join(tempDir, "style-map");
        fs.writeFileSync(styleMapPath, "p => span:fresh");
        return runMammoth(testPath("single-paragraph.docx"), "--style-map", styleMapPath).then(function(result) {
            assert.equal(result.stderrOutput, "");
            assert.equal(result.output, "Walking on imported air");
        });
    });
});

test("--output-format=markdown option generate markdown output", function() {
    return runMammoth(testPath("single-paragraph.docx"), "--output-format=markdown").then(function(result) {
        assert.equal(result.stderrOutput, "");
        assert.equal(result.output, "Walking on imported air\n\n");
    });
});

function runMammoth() {
    var args = Array.prototype.slice.call(arguments, 0);
    var deferred = promises.defer();

    var processArgs = ["node", "bin/mammoth"].concat(args);
    // TODO: proper escaping of args
    var command = processArgs.join(" ");
    child_process.exec(command, function(error, stdout, stderr) { // eslint-disable-line camelcase
        console.log(stderr); // eslint-disable-line no-console
        assert.equal(error, null);
        deferred.resolve({output: stdout, stderrOutput: stderr});
    });

    return deferred.promise;
}

function createTempDir() {
    return promises.nfcall(temp.mkdir, null);
}


text:
#ifndef VMWARE_H
#define VMWARE_H

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#ifdef HAVE_XORG_SERVER_1_1_0
#include <string.h>
#endif

#include "xf86.h"
#include "xf86_OSproc.h"

#include <X11/extensions/panoramiXproto.h>

#ifdef XSERVER_LIBPCIACCESS
#include <pciaccess.h>
#else
#include "xf86Resources.h"
#endif

#include "compiler.h"	        /* inb/outb */

#include "xf86Pci.h"		/* pci */
#include "xf86Cursor.h"		/* hw cursor */
#include "cursorstr.h"          /* xhot/yhot */

#include "vgaHW.h"		/* VGA hardware */
#include "fb.h"

#include "xf86cmap.h"		/* xf86HandleColormaps */

#include "vm_basic_types.h"
#include "svga_reg.h"
#include "svga_struct.h"
#include "vmware_bootstrap.h"
#include <xf86Module.h>

#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
#define _swapl(x, n) swapl(x,n)
#define _swaps(x, n) swaps(x,n)
#else
#define _swapl(x, n) (void) n; swapl(x)
#define _swaps(x, n) (void) n; swaps(x)
#endif

/*
 * The virtual hardware's cursor limits are pretty big. Some VMware
 * product versions limit to 1024x1024 pixels, others limit to 128
 * kilobytes of cursor data. We just choose an arbitrary maximum
 * cursor size. 64x64 is a common value for real hardware, so we'll go
 * with that.
 */
#define MAX_CURS        64

#define NUM_DYN_MODES   2

typedef struct {
    CARD32 svga_reg_enable;
    CARD32 svga_reg_width;
    CARD32 svga_reg_height;
    CARD32 svga_reg_bits_per_pixel;

    CARD32 svga_reg_cursor_on;
    CARD32 svga_reg_cursor_x;
    CARD32 svga_reg_cursor_y;
    CARD32 svga_reg_cursor_id;

    Bool svga_fifo_enabled;

    CARD32 svga_reg_id;
} VMWARERegRec, *VMWARERegPtr;

typedef xXineramaScreenInfo VMWAREXineramaRec, *VMWAREXineramaPtr;

typedef struct {
    EntityInfoPtr pEnt;
#if XSERVER_LIBPCIACCESS
    struct pci_device *PciInfo;
#else
    pciVideoPtr PciInfo;
    PCITAG PciTag;
#endif
    Bool Primary;
    int depth;
    int bitsPerPixel;
    rgb weight;
    rgb offset;
    int defaultVisual;
    int videoRam;
    unsigned long memPhysBase;
    unsigned long fbOffset;
    unsigned long fbPitch;
    unsigned long ioBase;
    unsigned long portIOBase;
    int maxWidth;
    int maxHeight;
    unsigned int vmwareCapability;

    unsigned char* FbBase;
    unsigned long FbSize;

    VMWARERegRec SavedReg;
    VMWARERegRec ModeReg;
    CARD32 suspensionSavedRegId;

    DisplayModePtr dynModes[NUM_DYN_MODES];

    Bool* pvtSema;

    Bool noAccel;
    Bool hwCursor;
    Bool cursorDefined;
    int cursorSema;
    Bool cursorExcludedForUpdate;
    Bool cursorShouldBeHidden;

    unsigned int cursorRemoveFromFB;
    unsigned int cursorRestoreToFB;

#ifdef RENDER
    CompositeProcPtr Composite;
    void (*EnableDisableFBAccess)(int, Bool);
#endif /* RENDER */

    unsigned long mmioPhysBase;
    unsigned long mmioSize;

    unsigned char* mmioVirtBase;
    CARD32* vmwareFIFO;

    xf86CursorInfoPtr CursorInfoRec;
    CursorPtr oldCurs;
    struct {
        int bg, fg, x, y;
        int hotX, hotY;
        BoxRec box;

        uint32 mask[SVGA_BITMAP_SIZE(MAX_CURS, MAX_CURS)];
        uint32 maskPixmap[SVGA_PIXMAP_SIZE(MAX_CURS, MAX_CURS, 32)];
        uint32 source[SVGA_BITMAP_SIZE(MAX_CURS, MAX_CURS)];
        uint32 sourcePixmap[SVGA_PIXMAP_SIZE(MAX_CURS, MAX_CURS, 32)];
    } hwcur;

    unsigned long indexReg, valueReg;

    ScreenRec ScrnFuncs;

    /*
     * Xinerama state
     */
    Bool xinerama;
    Bool xineramaStatic;

    VMWAREXineramaPtr xineramaState;
    unsigned int xineramaNumOutputs;

    VMWAREXineramaPtr xineramaNextState;
    unsigned int xineramaNextNumOutputs;

    /*
     * Xv
     */
    DevUnion *videoStreams;

} VMWARERec, *VMWAREPtr;

#define VMWAREPTR(p) ((VMWAREPtr)((p)->driverPrivate))

#define MIN(a,b) ((a)<(b)?(a):(b))
#define MAX(a,b) ((a)>(b)?(a):(b))
#define ABS(x) (((x) >= 0) ? (x) : -(x))

#define BOX_INTERSECT(a, b) \
		(ABS(((a).x1 + (a).x2) - ((b).x1 + (b).x2)) <= \
		((a).x2 - (a).x1) + ((b).x2 - (b).x1) && \
		ABS(((a).y1 + (a).y2) - ((b).y1 + (b).y2)) <= \
		((a).y2 - (a).y1) + ((b).y2 - (b).y1))

#define SVGA_GLYPH_SCANLINE_SIZE_DWORDS(w) (((w) + 31) >> 5)

#define PRE_OP_HIDE_CURSOR() \
    if (pVMWARE->cursorDefined && *pVMWARE->pvtSema) { \
        pVMWARE->cursorSema++; \
        if (pVMWARE->cursorSema == 1) { \
            vmwareWriteCursorRegs(pVMWARE, FALSE, FALSE); \
        } \
    }
#define POST_OP_SHOW_CURSOR() \
    if (pVMWARE->cursorDefined && *pVMWARE->pvtSema) { \
        pVMWARE->cursorSema--; \
        if (!pVMWARE->cursorSema && !pVMWARE->cursorShouldBeHidden) { \
            vmwareWriteCursorRegs(pVMWARE, TRUE, FALSE); \
        } \
    }

#define MOUSE_ID 1

/* Undefine this to kill all acceleration */
#define ACCELERATE_OPS

#if XSERVER_LIBPCIACCESS
#define VENDOR_ID(p)      (p)->vendor_id
#define DEVICE_ID(p)      (p)->device_id
#define SUBVENDOR_ID(p)   (p)->subvendor_id
#define SUBSYS_ID(p)      (p)->subdevice_id
#define CHIP_REVISION(p)  (p)->revision
#else
#define VENDOR_ID(p)      (p)->vendor
#define DEVICE_ID(p)      (p)->chipType
#define SUBVENDOR_ID(p)   (p)->subsysVendor
#define SUBSYS_ID(p)      (p)->subsysCard
#define CHIP_REVISION(p)  (p)->chipRev
#endif

void vmwareWriteReg(
   VMWAREPtr pVMWARE, int index, CARD32 value
   );

CARD32 vmwareReadReg(
    VMWAREPtr pVMWARE, int index
    );

void vmwareWriteWordToFIFO(
   VMWAREPtr pVMWARE, CARD32 value
   );

void vmwareWaitForFB(
   VMWAREPtr pVMWARE
   );

void vmwareSendSVGACmdUpdate(
   VMWAREPtr pVMWARE, BoxPtr pBB
   );

void vmwareSendSVGACmdUpdateFullScreen(
   VMWAREPtr pVMWARE
   );

DisplayModeRec *VMWAREAddDisplayMode(
    ScrnInfoPtr pScrn,
    const char *name,
    int width,
    int height
   );

Bool vmwareIsRegionEqual(
    const RegionPtr reg1,
    const RegionPtr reg2
   );

void vmwareNextXineramaState(
   VMWAREPtr pVMWARE
   );

/* vmwarecurs.c */
Bool vmwareCursorInit(
   ScreenPtr pScr
   );

void vmwareCursorModeInit(
    ScrnInfoPtr pScrn,
    DisplayModePtr mode
   );

void vmwareCursorCloseScreen(
    ScreenPtr pScr
    );

void vmwareWriteCursorRegs(
   VMWAREPtr pVMWARE,
   Bool visible,
   Bool force
   );

void vmwareCursorHookWrappers(
   ScreenPtr pScreen
   );

/* vmwarectrl.c */
void VMwareCtrl_ExtInit(ScrnInfoPtr pScrn);

/* vmwarexinerama.c */
void VMwareXinerama_ExtInit(ScrnInfoPtr pScrn);

/* vmwarevideo.c */
Bool vmwareVideoInit(
   ScreenPtr pScreen
   );
void vmwareVideoEnd(
   ScreenPtr pScreen
   );
Bool vmwareVideoEnabled(
   VMWAREPtr pVMWARE
   );

void vmwareCheckVideoSanity(
   ScrnInfoPtr pScrn
   );

/* vmwaremode.c */
void vmwareAddDefaultMode(
   ScrnInfoPtr pScrn,
   uint32 dwidth,
   uint32 dheight
   );
#endif


text:
<?php

/*
 * Menu
 */
$lang['testfile'] = "Test d'ecriture de fichier";
$lang['testfolder'] = "Test des dossiers";


text:
package com.smartlogic.classificationserver.client;

import org.testng.annotations.Test;

import static com.github.tomakehurst.wiremock.client.WireMock.*;
import static org.testng.Assert.assertEquals;

public class ClassifyNullTest extends ClassificationTestCase {

	@Test
	public void testNull() throws ClassificationException {

		wireMockRule.stubFor(post(urlEqualTo("/"))
				.willReturn(aResponse()
						.withHeader("Content-Type", "text/xml")
						.withBody(readFileToString("src/test/resources/responses/csResponseNoResults.xml"))));

		String title = "This is the document title";
		String body = "";
		Result result1 = classificationClient.getClassifiedDocument(new Body(body), new Title(title));
		assertEquals(0, result1.getAllClassifications().size(), "No results 1");
		Result result2 = classificationClient.getClassifiedDocument(new byte[0], "cheeey.pdf");
		assertEquals(0, result2.getAllClassifications().size(), "No results 2");
	}

}


text:
"""normalize python2/3 subprocess calls

TODO(ckuehl|2021-06-23): Stop using this and relying on old Python 2 defaults.
"""
import functools
import subprocess

def set_defaults(func, **defaults):
    @functools.wraps(func)
    def wrapped(cmd, **kwargs):
        kwargs = dict(defaults, **kwargs)
        return func(cmd, **kwargs)
    return wrapped

call = set_defaults(subprocess.call, close_fds=False)
check_call = set_defaults(subprocess.check_call, close_fds=False)
Popen = set_defaults(subprocess.Popen, close_fds=False)

PIPE = subprocess.PIPE
STDOUT = subprocess.STDOUT
CalledProcessError = subprocess.CalledProcessError


text:
package co.cask.cdap.test;

import co.cask.cdap.proto.Id;
import co.cask.cdap.proto.ProgramRunStatus;
import co.cask.cdap.proto.RunRecord;
import co.cask.cdap.proto.id.ProgramId;
import com.google.common.collect.ImmutableMap;

import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

/**
 * Abstract implementation of {@link ProgramManager} that includes common functionality for all implementations.
 * @param <T> The type of ProgramManager
 */
public abstract class AbstractProgramManager<T extends ProgramManager> implements ProgramManager<T> {
  protected final ProgramId programId;
  private final ApplicationManager applicationManager;

  public AbstractProgramManager(ProgramId programId, ApplicationManager applicationManager) {
    this.applicationManager = applicationManager;
    this.programId = programId;
  }

  public AbstractProgramManager(Id.Program programId, ApplicationManager applicationManager) {
    this(programId.toEntityId(), applicationManager);
  }

  @Override
  public T start() {
    return start(ImmutableMap.<String, String>of());
  }

  @Override
  public T start(Map<String, String> arguments) {
    applicationManager.startProgram(programId, arguments);
    // this cast is fine as long as the derived classes extend AbstractProgramManager with the
    // template (<T>) declared as its own class
    return (T) this;
  }

  @Override
  public void stop() {
    applicationManager.stopProgram(programId);
  }

  @Override
  public boolean isRunning() {
    return applicationManager.isRunning(programId);
  }

  @Override
  public void waitForFinish(long timeout, TimeUnit timeoutUnit) throws TimeoutException, InterruptedException {
    // Min sleep time is 10ms, max sleep time is 1 seconds
    long sleepMillis = Math.max(10, Math.min(timeoutUnit.toMillis(timeout) / 10, TimeUnit.SECONDS.toMillis(1)));
    waitForStatus(false, sleepMillis, timeoutUnit.toMillis(timeout), TimeUnit.MILLISECONDS);
  }

  @Override
  public void waitForStatus(boolean status) throws InterruptedException {
    waitForStatus(status, 50, 5000, TimeUnit.MILLISECONDS);
  }

  @Override
  public void waitForStatus(boolean status, int retries, int timeout) throws InterruptedException {
    // The API is not good. The "timeout" parameter is actually sleep time
    // We calculate the actual timeout by multiplying retries with sleep time
    long sleepTimeMillis = TimeUnit.SECONDS.toMillis(timeout);
    long timeoutMillis = sleepTimeMillis * retries;
    waitForStatus(status, sleepTimeMillis, timeoutMillis, TimeUnit.MILLISECONDS);
  }

  /**
   * Waits for the program status.
   *
   * @param status true to wait for start, false for stop
   * @param sleepTime time to sleep in between polling
   * @param timeout timeout for the polling if the status doesn't match
   * @param timeoutUnit unit for both sleepTime and timeout
   */
  protected void waitForStatus(boolean status, long sleepTime,
                               long timeout, TimeUnit timeoutUnit) throws InterruptedException {
    long timeoutMillis = timeoutUnit.toMillis(timeout);
    boolean statusMatched = status == isRunning();
    long startTime = System.currentTimeMillis();
    while (!statusMatched && (System.currentTimeMillis() - startTime) < timeoutMillis) {
      timeoutUnit.sleep(sleepTime);
      statusMatched = status == isRunning();
    }

    if (!statusMatched) {
      throw new IllegalStateException(String.format("Program state for '%s' not as expected. Expected '%s'.",
                                                    programId, status));
    }
  }

  @Override
  public List<RunRecord> getHistory() {
    return getHistory(ProgramRunStatus.ALL);
  }

  @Override
  public List<RunRecord> getHistory(ProgramRunStatus status) {
    return applicationManager.getHistory(programId.toId(), status);
  }

  @Override
  public void setRuntimeArgs(Map<String, String> args) throws Exception {
    applicationManager.setRuntimeArgs(programId, args);
  }
}


text:
package simcity.test;

import java.util.ArrayList;
import java.util.List;

import simcity.PersonAgent;
import simcity.KRestaurant.KCookRole;
import simcity.KRestaurant.KCookRole.Food;
import simcity.KRestaurant.KCookRole.Food;
import simcity.KRestaurant.KCookRole.marketOrderState;
import simcity.KRestaurant.gui.KCookGui;
import simcity.Market.MFoodOrder;
import simcity.gui.SimCityGui;
import simcity.test.mock.MockKRestaurantWaiter;
import simcity.test.mock.MockMarketManager;
import junit.framework.TestCase;

public class KCookTest extends TestCase {

		PersonAgent p;
		KCookRole cook;
		MockMarketManager manager;
		MockKRestaurantWaiter waiter;
		SimCityGui gui;

		public void setUp() throws Exception {
			super.setUp();
			p = new PersonAgent("person");
			cook = new KCookRole(null);
			manager = new MockMarketManager("mockmanager");
			waiter = new MockKRestaurantWaiter("mockwaiter");
			cook.myPerson = p;
			cook.markets.add(manager);
			cook.setGui(new KCookGui(cook, null));
			cook.arrived = false;
		}

		public void testOrderingFromMarket() {
			cook.setCashier(null);

			// preconditions
			assertTrue("cook's log should be empty but isn't", cook.log.size() == 0);
			assertTrue("manager's log should be empty but isn't", manager.log.size() == 0);
			assertTrue("waiter's log should be empty but isn't", waiter.log.size() == 0);

			// make steak inventory low
			Food f =  cook.new Food("Steak", 5000, 2, 3, 1,10);
			cook.foods.put("Steak",f );
			assertEquals("cook's steak inventory should be 2 but isn't",2, cook.foods.get("Steak").amount);

			// give cook an order
			cook.msgHereIsAnOrder(waiter, "Steak", 0);
			assertTrue("cook's log say got an order but doesn't", cook.log.containsString("got order from waiter"));
			assertTrue("manager's log should be empty but isn't", manager.log.size() == 0);
			assertTrue("waiter's log should be empty but isn't", waiter.log.size() == 0);

			cook.msgAtFridge();
			cook.msgAtGrill();
			cook.msgAtPlating();
			cook.pickAndExecuteAnAction();
			assertTrue("cook's log say got an order but doesn't", cook.log.containsString("need to order food"));
			assertTrue("waiter's log should be empty but isn't", waiter.log.size() == 0);
			assertTrue("manager's log should say got order from cook but doesn't", manager.log.containsString("got order from cook"));
			assertTrue("cook's needToOrder should be false but isn't", cook.needToOrder == false);
			assertTrue("cook's marketOrders should have one order but doesn't", cook.marketOrders.size() == 1);

			// give requested order to cook
			List<MFoodOrder> order = new ArrayList<MFoodOrder>();
			order.add(new MFoodOrder("Steak", 2));
			cook.msgHereIsDelivery(order, 20.0, manager, null);
			assertTrue("cook's log say got delivery but doesn't", cook.log.containsString("got delivery from market"));

			// post conditions
			assertTrue("cook's marketOrders should have an order that's state is arrived", cook.marketOrders.get(0).state == marketOrderState.arrived);

		}
}


text:
namespace mujoco::plugin::elasticity {
namespace {

// compute quaternion difference between two frames in joint coordinates
void QuatDiff(mjtNum* quat, const mjtNum body_quat[4],
              const mjtNum joint_quat[4], bool pullback) {
  if (pullback == 0) {
    // contribution in local coordinates
    mju_mulQuat(quat, body_quat, joint_quat);
  } else {
    // contribution pulled-back in local coordinates of the other body
    mjtNum invquat[4];
    mju_mulQuat(invquat, body_quat, joint_quat);
    mju_negQuat(quat, invquat);
  }
}

// compute local force given material properties, orientation,
// and reference curvature
//   inputs:
//     stiffness   - material parameters
//     quat        - orientation of the body in local coordinates
//     omega0      - initial curvature
//     xquat       - cartesian orientation of the body (optional)
//     scl         - scaling of the force
//   outputs:
//     qfrc        - local torque contribution
void LocalForce(mjtNum qfrc[3], const mjtNum stiffness[4],
                const mjtNum quat[4], const mjtNum omega0[3],
                const mjtNum xquat[4], mjtNum scl) {
  mjtNum omega[3], lfrc[3];

  // compute curvature
  mju_quat2Vel(omega, quat, scl);

  // subtract omega0 in reference configuration
  mjtNum tmp[] = {
      - stiffness[0]*(omega[0] - omega0[0]) / stiffness[3],
      - stiffness[1]*(omega[1] - omega0[1]) / stiffness[3],
      - stiffness[2]*(omega[2] - omega0[2]) / stiffness[3],
  };

  // rotate into global frame
  if (xquat) {
    mju_rotVecQuat(lfrc, tmp, xquat);
  } else {
    mju_copy3(lfrc, tmp);
  }

  // add to total qfrc
  mju_addToScl3(qfrc, lfrc, scl);
}

// reads numeric attributes
bool CheckAttr(const char* name, const mjModel* m, int instance) {
  char *end;
  std::string value = mj_getPluginConfig(m, instance, name);
  value.erase(std::remove_if(value.begin(), value.end(), isspace), value.end());
  strtod(value.c_str(), &end);
  return end == value.data() + value.size();
}

}  // namespace

// factory function
std::optional<Cable> Cable::Create(
  const mjModel* m, mjData* d, int instance) {
  if (CheckAttr("twist", m, instance) && CheckAttr("bend", m, instance)) {
    return Cable(m, d, instance);
  } else {
    mju_warning("Invalid parameter specification in cable plugin");
    return std::nullopt;
  }
}

// plugin constructor
Cable::Cable(const mjModel* m, mjData* d, int instance) {
  // parameters were validated by the factor function
  std::string flat = mj_getPluginConfig(m, instance, "flat");
  mjtNum G = strtod(mj_getPluginConfig(m, instance, "twist"), nullptr);
  mjtNum E = strtod(mj_getPluginConfig(m, instance, "bend"), nullptr);

  // count plugin bodies
  n = 0;
  for (int i = 1; i < m->nbody; i++) {
    if (m->body_plugin[i] == instance) {
      if (!n++) {
        i0 = i;
      }
    }
  }

  // allocate arrays
  prev.assign(n, 0);         // index of previous body
  next.assign(n, 0);         // index of next body
  omega0.assign(3*n, 0);     // reference curvature
  stiffness.assign(4*n, 0);  // material parameters

  // run forward kinematics to populate xquat (mjData not yet initialized)
  mju_zero(d->mocap_quat, 4*m->nmocap);
  mju_copy(d->qpos, m->qpos0, m->nq);
  mj_kinematics(m, d);

  // compute initial curvature
  for (int b = 0; b < n; b++) {
    int i = i0 + b;
    if (m->body_plugin[i] != instance) {
      mju_error("This body does not have the requested plugin instance");
    }
    bool first = (b == 0), last = (b == n-1);
    prev[b] = first ? 0 : -1;
    next[b] =  last ? 0 : +1;

    // compute omega0: curvature at equilibrium
    if (prev[b] && flat != "true") {
      int qadr = m->jnt_qposadr[m->body_jntadr[i]] + m->body_dofnum[i]-3;
      mju_subQuat(omega0.data()+3*b, m->body_quat+4*i, d->qpos+qadr);
    } else {
      mju_zero3(omega0.data()+3*b);
    }

    // compute physical parameters
    int geom_i = m->body_geomadr[i];
    mjtNum J = 0, Iy = 0, Iz = 0;
    if (m->geom_type[geom_i] == mjGEOM_CYLINDER ||
        m->geom_type[geom_i] == mjGEOM_CAPSULE) {
      // https://en.wikipedia.org/wiki/Torsion_constant#Circle
      // https://en.wikipedia.org/wiki/List_of_second_moments_of_area
      J = mjPI * pow(m->geom_size[3*geom_i+0], 4) / 2;
      Iy = Iz = mjPI * pow(m->geom_size[3*geom_i+0], 4) / 4.;
    } else if (m->geom_type[geom_i] == mjGEOM_BOX) {
      // https://en.wikipedia.org/wiki/Torsion_constant#Rectangle
      // https://en.wikipedia.org/wiki/List_of_second_moments_of_area
      mjtNum h = m->geom_size[3*geom_i+1];
      mjtNum w = m->geom_size[3*geom_i+2];
      mjtNum a = std::max(h, w);
      mjtNum b = std::min(h, w);
      J = a*pow(b, 3)*(16./3.-3.36*b/a*(1-pow(b, 4)/pow(a, 4)/12));
      Iy = pow(2 * w, 3) * 2 * h / 12.;
      Iz = pow(2 * h, 3) * 2 * w / 12.;
    }
    stiffness[4*b+0] = J * G;
    stiffness[4*b+1] = Iy * E;
    stiffness[4*b+2] = Iz * E;
    stiffness[4*b+3] =
      prev[b] ? mju_dist3(d->xpos+3*i, d->xpos+3*(i+prev[b])) : 0;
  }
}

void Cable::Compute(const mjModel* m, mjData* d, int instance) {
  for (int b = 0; b < n; b++)  {
    // index into body array
    int i = i0 + b;
    if (m->body_plugin[i] != instance) {
      mju_error(
        "This body is not associated with the requested plugin instance");
    }

    // if no stiffness, skip body
    if (!stiffness[b*4+0] && !stiffness[b*4+1] && !stiffness[b*4+2]) {
      continue;
    }

    // elastic forces
    mjtNum quat[4] = {0};
    mjtNum xfrc[3] = {0};

    // local orientation
    if (prev[b]) {
      int qadr = m->jnt_qposadr[m->body_jntadr[i]] + m->body_dofnum[i]-3;
      QuatDiff(quat, m->body_quat+4*i, d->qpos+qadr, 0);

      // contribution of orientation i-1 to xfrc i
      LocalForce(xfrc, stiffness.data()+4*b, quat, omega0.data()+3*b,
                 d->xquat+4*(i+prev[b]), 1);
    }

    if (next[b]) {
      int bn = b + next[b];
      int in = i + next[b];

      // local orientation
      int qadr = m->jnt_qposadr[m->body_jntadr[in]] + m->body_dofnum[in]-3;
      QuatDiff(quat, m->body_quat+4*in, d->qpos+qadr, 1);

      // contribution of orientation i+1 to xfrc i
      LocalForce(xfrc, stiffness.data()+4*bn, quat, omega0.data()+3*bn,
                 d->xquat+4*i, -1);
    }

    // convert from global coordinates and apply torque to com
    mj_applyFT(m, d, 0, xfrc, d->xpos+3*i, i, d->qfrc_passive);
  }
}

mjPLUGIN_DYNAMIC_LIBRARY_INIT {
  mjpPlugin plugin;
  mjp_defaultPlugin(&plugin);

  plugin.name = "mujoco.elasticity.cable";
  plugin.type |= mjPLUGIN_PASSIVE;

  const char* attributes[] = {"twist", "bend", "flat"};
  plugin.nattribute = sizeof(attributes) / sizeof(attributes[0]);
  plugin.attributes = attributes;
  plugin.nstate = +[](const mjModel* m, int instance) { return 0; };

  plugin.init = +[](const mjModel* m, mjData* d, int instance) {
    auto elasticity_or_null = Cable::Create(m, d, instance);
    if (!elasticity_or_null.has_value()) {
      return -1;
    }
    d->plugin_data[instance] = reinterpret_cast<uintptr_t>(
        new Cable(std::move(*elasticity_or_null)));
return 0;
  };
  plugin.destroy = +[](mjData* d, int instance) {
    delete reinterpret_cast<Cable*>(d->plugin_data[instance]);
    d->plugin_data[instance] = 0;
  };
  plugin.compute = +[](const mjModel* m, mjData* d, int instance, int type) {
    auto* elasticity = reinterpret_cast<Cable*>(d->plugin_data[instance]);
    elasticity->Compute(m, d, instance);
  };

  mjp_registerPlugin(&plugin);
}

}  // namespace mujoco::plugin::elasticity


text:
---
layout: post
title: minnum depthe of binary tree
category: leetcode
---

{{ page.title }}

Logic is important

{% highlight cpp linenos %}
  /**
 * Definition for binary tree
 * struct TreeNode {
 *     int val;
 *     TreeNode *left;
 *     TreeNode *right;
 *     TreeNode(int x) : val(x), left(NULL), right(NULL) {}
 * };
 */
class Solution {
public:
    int minDepth(TreeNode *root) {
        if ( !root ) {
            return 0;
        }
        if ( root->left && root->right ) {
            return min(minDepth(root->left),minDepth(root->right))+1;
        }
        if ( root->left ) {
            return minDepth(root->left)+1;
        }
        if ( root->right ) {
            return minDepth(root->right)+1;
        }
        return 1;
    }
};
  {% endhighlight %}


text:
<!DOCTYPE html>
<title>flexbox | computed style | flex-shrink: number</title>
<link rel="author" href="http://opera.com" title="Opera Software">
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#propdef-flex-shrink">
<link rel="match" href="ref-pass-body.html">
<meta name="flags" content="dom">

FAIL, enable javascript


text:
namespace Merchello.Core.Persistence.Repositories
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using Factories;
    using Models;
    using Models.EntityBase;
    using Models.Rdbms;
    using Querying;
    using Umbraco.Core;
    using Umbraco.Core.Cache;
    using Umbraco.Core.Persistence;
    using Umbraco.Core.Persistence.Querying;
    using UnitOfWork;

    /// <summary>
    /// Represents a ItemCacheLineItemRepository
    /// </summary>
    internal class ItemCacheLineItemRepository : LineItemRepositoryBase<IItemCacheLineItem>, IItemCacheLineItemRepository
    {
        public ItemCacheLineItemRepository(IDatabaseUnitOfWork work, IRuntimeCacheProvider cache)
            : base(work, cache)
        {
        }

        public override void Delete(IItemCacheLineItem entity)
        {
            var deletes = GetDeleteClauses();
            foreach (var delete in deletes)
            {
                Database.Execute(delete, new { Key = entity.Key });
            }
        }

        protected override IItemCacheLineItem PerformGet(Guid key)
        {
            var sql = GetBaseQuery(false)
            .Where(GetBaseWhereClause(), new { Key = key });

            var dto = Database.Fetch<ItemCacheItemDto>(sql).FirstOrDefault();

            if (dto == null)
                return null;

            var factory = new ItemCacheLineItemFactory();
            return factory.BuildEntity(dto);
        }

        protected override IEnumerable<IItemCacheLineItem> PerformGetAll(params Guid[] keys)
        {
            if (keys.Any())
            {
                foreach (var key in keys)
                {
                    yield return Get(key);
                }
            }
            else
            {
                var factory = new ItemCacheLineItemFactory();
                var dtos = Database.Fetch<ItemCacheItemDto>(GetBaseQuery(false));
                foreach (var dto in dtos)
                {
                    yield return factory.BuildEntity(dto);
                }
            }
        }

        protected override IEnumerable<IItemCacheLineItem> PerformGetByQuery(IQuery<IItemCacheLineItem> query)
        {
            var sqlClause = GetBaseQuery(false);
            var translator = new SqlTranslator<IItemCacheLineItem>(sqlClause, query);
            var sql = translator.Translate();

            var dtos = Database.Fetch<ItemCacheItemDto>(sql);

            return dtos.DistinctBy(x => x.Key).Select(dto => Get(dto.Key));
        }

        protected override Sql GetBaseQuery(bool isCount)
        {
            var sql = new Sql();
            sql.Select(isCount ? "COUNT(*)" : "*")
                .From<ItemCacheItemDto>();

            return sql;
        }

        protected override string GetBaseWhereClause()
        {
            return "merchItemCacheItem.pk = @Key";
        }

        protected override IEnumerable<string> GetDeleteClauses()
        {
            var list = new List<string>
            {
                "DELETE FROM merchItemCacheItem WHERE pk = @Key"
            };

            return list;
        }

        protected override void PersistNewItem(IItemCacheLineItem entity)
        {
            ((Entity)entity).AddingEntity();

            var factory = new ItemCacheLineItemFactory();
            var dto = factory.BuildDto(entity);

            Database.Insert(dto);

            entity.Key = dto.Key;

            entity.ResetDirtyProperties();
        }

        protected override void PersistUpdatedItem(IItemCacheLineItem entity)
        {
            ((Entity)entity).UpdatingEntity();

            var factory = new ItemCacheLineItemFactory();
            var dto = factory.BuildDto(entity);

            Database.Update(dto);

            entity.ResetDirtyProperties();
        }

    }
}


text:
<!DOCTYPE html>

<?php require_once("include/head.php"); ?>

	<?php require_once("include/nav.php"); ?>

<?= $page_title ?>

		<?php fancy_table($traitements, $traitements_col_names, $traitements_primary_key, null, $traitements_prefix, true, $traitements_col_ommitted); ?>


text:
package com.github.tonivade.claudb.command.set;

import com.github.tonivade.claudb.command.DBCommand;
import com.github.tonivade.claudb.command.annotation.ParamType;
import com.github.tonivade.claudb.command.annotation.ReadOnly;
import com.github.tonivade.claudb.data.DataType;
import com.github.tonivade.claudb.data.Database;
import com.github.tonivade.purefun.data.ImmutableSet;
import com.github.tonivade.resp.annotation.Command;
import com.github.tonivade.resp.annotation.ParamLength;
import com.github.tonivade.resp.command.Request;
import com.github.tonivade.resp.protocol.RedisToken;
import com.github.tonivade.resp.protocol.SafeString;

@ReadOnly
@Command("sunion")
@ParamLength(2)
@ParamType(DataType.SET)
public class SetUnionCommand implements DBCommand {

  @Override
  public RedisToken execute(Database db, Request request) {
    ImmutableSet<SafeString> result = db.getSet(request.getParam(0));
    for (SafeString param : request.getParams().asList().tail()) {
      result = result.union(db.getSet(param));
    }
    return convert(result);
  }
}


text:
package com.azure.resourcemanager.hdinsight.implementation;

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.hdinsight.fluent.ScriptExecutionHistoriesClient;
import com.azure.resourcemanager.hdinsight.fluent.models.RuntimeScriptActionDetailInner;
import com.azure.resourcemanager.hdinsight.models.RuntimeScriptActionDetail;
import com.azure.resourcemanager.hdinsight.models.ScriptExecutionHistories;

public final class ScriptExecutionHistoriesImpl implements ScriptExecutionHistories {
    private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionHistoriesImpl.class);

    private final ScriptExecutionHistoriesClient innerClient;

    private final com.azure.resourcemanager.hdinsight.HDInsightManager serviceManager;

    public ScriptExecutionHistoriesImpl(
        ScriptExecutionHistoriesClient innerClient,
        com.azure.resourcemanager.hdinsight.HDInsightManager serviceManager) {
        this.innerClient = innerClient;
        this.serviceManager = serviceManager;
    }

    public PagedIterable<RuntimeScriptActionDetail> listByCluster(String resourceGroupName, String clusterName) {
        PagedIterable<RuntimeScriptActionDetailInner> inner =
            this.serviceClient().listByCluster(resourceGroupName, clusterName);
        return Utils.mapPage(inner, inner1 -> new RuntimeScriptActionDetailImpl(inner1, this.manager()));
    }

    public PagedIterable<RuntimeScriptActionDetail> listByCluster(
        String resourceGroupName, String clusterName, Context context) {
        PagedIterable<RuntimeScriptActionDetailInner> inner =
            this.serviceClient().listByCluster(resourceGroupName, clusterName, context);
        return Utils.mapPage(inner, inner1 -> new RuntimeScriptActionDetailImpl(inner1, this.manager()));
    }

    public Response<Void> promoteWithResponse(
        String resourceGroupName, String clusterName, String scriptExecutionId, Context context) {
        return this.serviceClient().promoteWithResponse(resourceGroupName, clusterName, scriptExecutionId, context);
    }

    public void promote(String resourceGroupName, String clusterName, String scriptExecutionId) {
        this.serviceClient().promote(resourceGroupName, clusterName, scriptExecutionId);
    }

    private ScriptExecutionHistoriesClient serviceClient() {
        return this.innerClient;
    }

    private com.azure.resourcemanager.hdinsight.HDInsightManager manager() {
        return this.serviceManager;
    }
}


text:
import sys
from PyQt5.QtWidgets import QApplication, QWidget
from PyQt5.QtGui import QPainter, QBrush, QPen
from PyQt5.QtCore import Qt

class MyPaintWidget(QWidget):

    def __init__(self):
        super().__init__()

        # Set window background color
        self.setAutoFillBackground(True)

        palette = self.palette()
        palette.setColor(self.backgroundRole(), Qt.white)

        self.setPalette(palette)

    def paintEvent(self, event):
        qp = QPainter(self)

        qp.setPen(QPen(Qt.black, 5, Qt.SolidLine))
        qp.setBrush(QBrush(Qt.red, Qt.SolidPattern))
        qp.setRenderHint(QPainter.Antialiasing)           # <- Set anti-aliasing  See https://wiki.python.org/moin/PyQt/Painting%20and%20clipping%20demonstration

        x_start, y_start, x_end, y_end = 100, 50, 50, 100
        qp.drawLine(x_start, y_start, x_end, y_end)

if __name__ == '__main__':
    app = QApplication(sys.argv)

    widget = MyPaintWidget()
    widget.show()

    # The mainloop of the application. The event handling starts from this point.
    # The exec_() method has an underscore. It is because the exec is a Python keyword. And thus, exec_() was used instead.
    exit_code = app.exec_()

    # The sys.exit() method ensures a clean exit.
    # The environment will be informed, how the application ended.
    sys.exit(exit_code)


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Microsoft.IdentityModel.Tokens;

namespace Microsoft.AspNetCore.Authentication;

internal class TestSecurityToken : SecurityToken
{
    public override string Id => "id";

    public override string Issuer => "issuer";

    public override SecurityKey SecurityKey => throw new NotImplementedException();

    public override SecurityKey SigningKey
    {
        get => throw new NotImplementedException();
        set => throw new NotImplementedException();
    }

    public override DateTime ValidFrom => new DateTime(2008, 3, 22);

    public override DateTime ValidTo => new DateTime(2017, 3, 22);
}


text:
/* Generated by org.multijava.util.testing.Main */

package org.jmlspecs.samples.reader;

/**
 * This class is automatically generated using
 * org.multijava.util.testing.Main and is used to
 * group a collection of JUnit tests for the local
 * package and perhaps some subpackages.
 */
public class TestSuite extends junit.framework.TestSuite {
    public TestSuite() {
        super();
    }

    public TestSuite( String name ) {
        super( name );
    }

    public static junit.framework.Test suite() {
        junit.framework.TestSuite suite =
            new junit.framework.TestSuite() {
                    public String toString() { return TEST_DESC; }
                };
        suite.addTest( org.jmlspecs.samples.reader.BlankReader_JML_Test.suite() );
        return suite;
    }

    public static final String TEST_DESC =
        "Test suite for org.jmlspecs.samples.reader";
}