text:
import csv
import functools
import io
import itertools

from girder.api import access
from girder.api.describe import describeRoute, Description
from girder.api.rest import loadmodel, setResponseHeader
from girder.constants import AccessType, SortDir
from girder.exceptions import ValidationException

from .base import IsicResource
from ..models.study import Study
from ..models.user import User

class StudyResource(IsicResource):
    def __init__(self,):
        super(StudyResource, self).__init__()
        self.resourceName = 'study'

        self.route('GET', (), self.find)
        self.route('GET', (':id',), self.getStudy)

    @describeRoute(
        Description('Return a list of annotation studies.')
        .pagingParams(defaultSort='lowerName')
        .param('detail', 'Display the full information for each image, instead of a summary.',
               required=False, dataType='boolean', default=False)
        .param('state', 'Filter studies to those at a given state', paramType='query',
               required=False, enum=('active', 'complete'))
        .param('userId', 'Filter studies to those containing a user ID, or "me".',
               paramType='query', required=False)
        .errorResponse()
    )
    @access.public(cookie=True)
    def find(self, params):
        currentUser = self.getCurrentUser()
        detail = self.boolParam('detail', params, default=False)
        limit, offset, sort = self.getPagingParameters(params, 'lowerName')

        annotatorUser = None
        if params.get('userId'):
            if params['userId'] == 'me':
                annotatorUser = currentUser
            else:
                annotatorUser = User().load(params['userId'], force=True, exc=True)

        state = None
        if 'state' in params:
            state = params['state']
            if state not in {Study().State.ACTIVE, Study().State.COMPLETE}:
                raise ValidationException('Value may only be "active" or "complete".', 'state')

        filterFunc = Study().filter if detail else Study().filterSummary
        return [
            filterFunc(study, currentUser)
            for study in
            Study().filterResultsByPermission(
                Study().find(query=None, annotatorUser=annotatorUser, state=state, sort=sort),
                user=currentUser, level=AccessType.READ, limit=limit, offset=offset
            )
        ]

    @describeRoute(
        Description('Get a study by ID.')
        .param('id', 'The ID of the study.', paramType='path')
        .param('format', 'The output format.', paramType='query', required=False,
               enum=('csv', 'json'), default='json')
        .errorResponse()
    )
    @access.public(cookie=True)
    @loadmodel(model='study', plugin='isic_archive', level=AccessType.READ)
    def getStudy(self, study, params):
        if params.get('format') == 'csv':
            setResponseHeader('Content-Type', 'text/csv')
            setResponseHeader('Content-Disposition',
                              f'attachment; filename="{study["name"]}.csv"')
            return functools.partial(self._getStudyCSVStream, study)

        else:
            user = self.getCurrentUser()
            return Study().filter(study, user)

    def _getStudyCSVStream(self, study):
        currentUser = self.getCurrentUser()

        csvFields = tuple(itertools.chain(
            ('study_name', 'study_id',
             'user_name', 'user_id',
             'image_name', 'image_id',
             'flag_status', 'elapsed_seconds'),
            (question['id'] for question in study['meta']['questions'])
        ))

        responseBody = io.StringIO()
        csvWriter = csv.DictWriter(responseBody, csvFields, restval='')

        csvWriter.writeheader()
        yield responseBody.getvalue()
        responseBody.seek(0)
        responseBody.truncate()

        images = list(
            Study().getImages(study).sort('lowerName', SortDir.ASCENDING))

        for annotatorUser, image in itertools.product(
            sorted(
                Study().getAnnotators(study),
                key=lambda annotatorUser: User().obfuscatedName(annotatorUser)),
            images
        ):
            # this will iterate either 0 or 1 times
            for annotation in Study().childAnnotations(
                study=study,
                annotatorUser=annotatorUser,
                image=image,
                state=Study().State.COMPLETE
            ):
                elapsedSeconds = \
                    int((annotation['stopTime'] - annotation['startTime']).total_seconds())

                filteredAnnotatorUser = User().filterSummary(annotatorUser, currentUser)
                annotatorUserName = filteredAnnotatorUser['name']
                if 'login' in filteredAnnotatorUser:
                    annotatorUserName += ' [%s %s (%s)]' % (
                        filteredAnnotatorUser['firstName'],
                        filteredAnnotatorUser['lastName'],
                        filteredAnnotatorUser['login'])

                outDictBase = {
                    'study_name': study['name'],
                    'study_id': str(study['_id']),
                    'user_name': annotatorUserName,
                    'user_id': str(annotatorUser['_id']),
                    'image_name': image['name'],
                    'image_id': str(image['_id']),
                    'flag_status': annotation['status'],
                    'elapsed_seconds': elapsedSeconds
                }

                outDict = outDictBase.copy()
                for question in study['meta']['questions']:
                    if question['id'] in annotation['responses']:
                        outDict[question['id']] = annotation['responses'][question['id']]
                csvWriter.writerow(outDict)
                yield responseBody.getvalue()
                responseBody.seek(0)
                responseBody.truncate()


text:
use civet::{Config, Server};
use conduit::{Body, HttpResult, RequestExt, Response};
use conduit_router::{RequestParams, RouteBuilder};
use std::sync::mpsc::channel;

fn name(req: &mut dyn RequestExt) -> HttpResult {
    let name = req.params().find("name").unwrap();
    let bytes = format!("Hello {}!", name).into_bytes();
    Response::builder().body(Body::from_vec(bytes))
}

fn hello(_req: &mut dyn RequestExt) -> HttpResult {
    Response::builder().body(Body::from_static(b"Hello world!"))
}

fn main() {
    let mut router = RouteBuilder::new();

    router.get("/", hello);
    router.get("/:name", name);

    let mut cfg = Config::new();
    cfg.port(8888).threads(1);
    let _server = Server::start(cfg, router);

    // Preventing process exit.
    let (_tx, rx) = channel::<()>();
    rx.recv().unwrap();
}

redpajama_set_name: RedPajamaGithub


text:
'use strict';

const express = require('express');
const bodyParser = require('body-parser');
const consolidate = require('consolidate');
const path = require('path');
const qs = require('qs');

const app = express();

app.set('trust proxy', true);
app.set('x-powered-by', false);

app.set('view engine', 'mustache');
app.engine('mustache', consolidate.hogan);
app.set('views', path.join(__dirname, 'views'));

app.use((req, res, next) => {
  if (req.headers['x-forwarded-proto'] && !req.secure) {
    return res.redirect(['https://', req.hostname, req.url].join(''));
  }
  next();
});

app.use(bodyParser.urlencoded({ extended: true })); // parse application/x-www-form-urlencoded
app.use(bodyParser.json()); // parse application/json

app.use(express.static('public'));

app.get('/hello', (req, res) => {
  res.type('text');
  res.send('Hello World!');
});

app.post('/', (req, res) => {
  let message = req.body ? req.body.message.replace(/[^\w\s]/g, '') : '';
  res.redirect('/?' + qs.stringify({ message }));
});

app.get('/', (req, res) => {
  res.render('index', {
    message: req.query.message
  });
});

const server = app.listen(process.env.PORT || 3000, () => {
  const port = server.address().port;
  console.log(`Listening on port ${port}`);
});


text:
"use strict;"

// TODO: refactor to not need the `gameboard` dependency,
//       can just export a map of danger indices
function DangerCalculator(gameboard) {
    return {
        board: gameboard,
        neighborhood: {
            // distance in steps from this square:
            //           vert. horz.
            NORTH:      [  1,  0 ],
            NORTHEAST:  [  1,  1 ],
            EAST:       [  0,  1 ],
            SOUTHEAST:  [ -1,  1 ],
            SOUTH:      [ -1,  0 ],
            SOUTHWEST:  [ -1, -1 ],
            WEST:       [  0, -1 ],
            NORTHWEST:  [  1, -1 ]
        },
        forSquare: function(row, cell) {
            if (+row >= 0 && +cell >= 0) {
                var totalMines = 0,
                    directions = Object.keys(this.neighborhood);

                directions.forEach(function(direction) {
                    var vert = this.neighborhood[direction][0],
                        horiz = this.neighborhood[direction][1],
                        neighbor = this.board.getSquareAt(row + vert, cell + horiz);

                    if (neighbor && neighbor.isMined()) totalMines++;
                }, this);
                return totalMines || '';
            } else
                return null;
        }
    };
}

module.exports = DangerCalculator;


text: Will be release as a gem ASAP.


text:
@implementation ChartsGalleryCandlestickDataSource

- (SChartSeries *)sChart:(ShinobiChart *)chart seriesAtIndex:(NSInteger)index {
  SChartCandlestickSeries *series = [[SChartCandlestickSeries alloc] init];
  return series;
}

- (id)yValuesAtIndex:(NSInteger)dataIndex forSeriesAtIndex:(NSInteger)seriesIndex {
  return [@{SChartCandlestickKeyLow : self.dataCollection[dataIndex][@"low"],
            SChartCandlestickKeyHigh : self.dataCollection[dataIndex][@"high"],
            SChartCandlestickKeyOpen : self.dataCollection[dataIndex][@"open"],
            SChartCandlestickKeyClose : self.dataCollection[dataIndex][@"close"]}
          mutableCopy];
}

@end


text:
package acceptance

import (
	"strings"
	"testing"
	"time"

	"golang.org/x/net/context"

	"github.com/gogo/protobuf/proto"
	"github.com/pkg/errors"

	"github.com/cockroachdb/cockroach/pkg/acceptance/cluster"
	"github.com/cockroachdb/cockroach/pkg/keys"
	"github.com/cockroachdb/cockroach/pkg/roachpb"
	"github.com/cockroachdb/cockroach/pkg/server"
	"github.com/cockroachdb/cockroach/pkg/server/serverpb"
	"github.com/cockroachdb/cockroach/pkg/testutils"
	"github.com/cockroachdb/cockroach/pkg/util"
	"github.com/cockroachdb/cockroach/pkg/util/httputil"
	"github.com/cockroachdb/cockroach/pkg/util/log"
)

func TestFreezeCluster(t *testing.T) {
	t.Skip("#7957")

	s := log.Scope(t, "")
	defer s.Close(t)
	runTestOnConfigs(t, testFreezeClusterInner)
}

func postFreeze(
	ctx context.Context, c cluster.Cluster, freeze bool, timeout time.Duration,
) (serverpb.ClusterFreezeResponse, error) {
	httpClient := cluster.HTTPClient
	httpClient.Timeout = timeout

	var resp serverpb.ClusterFreezeResponse
	log.Infof(ctx, "requesting: freeze=%t, timeout=%s", freeze, timeout)
	cb := func(v proto.Message) {
		oldNum := resp.RangesAffected
		resp = *v.(*serverpb.ClusterFreezeResponse)
		if oldNum > resp.RangesAffected {
			resp.RangesAffected = oldNum
		}
		if (resp != serverpb.ClusterFreezeResponse{}) {
			log.Infof(ctx, "%+v", &resp)
		}
	}
	err := httputil.StreamJSON(
		httpClient,
		c.URL(ctx, 0)+"/_admin/v1/cluster/freeze",
		&serverpb.ClusterFreezeRequest{Freeze: freeze},
		&serverpb.ClusterFreezeResponse{},
		cb,
	)
	return resp, err
}

func testFreezeClusterInner(
	ctx context.Context, t *testing.T, c cluster.Cluster, cfg cluster.TestConfig,
) {
	minAffected := int64(server.ExpectedInitialRangeCountWithoutMigrations())

	const long = time.Minute
	const short = 10 * time.Second

	mustPost := func(freeze bool) serverpb.ClusterFreezeResponse {
		reply, err := postFreeze(ctx, c, freeze, long)
		if err != nil {
			t.Fatal(errors.Errorf("%v", err))
		}
		return reply
	}

	if reply := mustPost(false); reply.RangesAffected != 0 {
		t.Fatalf("expected initial unfreeze to affect no ranges, got %d", reply.RangesAffected)
	}

	if reply := mustPost(true); reply.RangesAffected < minAffected {
		t.Fatalf("expected >=%d frozen ranges, got %d", minAffected, reply.RangesAffected)
	}

	if reply := mustPost(true); reply.RangesAffected != 0 {
		t.Fatalf("expected second freeze to affect no ranges, got %d", reply.RangesAffected)
	}

	if reply := mustPost(false); reply.RangesAffected < minAffected {
		t.Fatalf("expected >=%d thawed ranges, got %d", minAffected, reply.RangesAffected)
	}

	num := c.NumNodes()
	if num < 3 {
		t.Skip("skipping remainder of test; needs at least 3 nodes")
	}

	// Kill the last node.
	if err := c.Kill(ctx, num-1); err != nil {
		t.Fatal(err)
	}

	// Attempt to freeze should get stuck (since it does not get confirmation
	// of the last node receiving the freeze command).
	// Note that this is the freeze trigger stalling on the Replica, not the
	// Store-polling mechanism.
	acceptErrs := strings.Join([]string{
		"timed out waiting for Range",
		"Timeout exceeded while",
		"connection is closing",
		"deadline",
		// error returned via JSON when the server-side gRPC stream times out (due to
		// lack of new input). Unmarshaling that JSON fails with a message referencing
		// unknown fields, unfortunately in map order.
		"unknown field .*",
	}, "|")
	if reply, err := postFreeze(ctx, c, true, short); !testutils.IsError(err, acceptErrs) {
		t.Fatalf("expected timeout, got %v: %v", err, reply)
	}

	// Shut down the remaining nodes and restart them.
	for i := 0; i < num-1; i++ {
		if err := c.Kill(ctx, i); err != nil {
			t.Fatal(err)
		}
	}
	for i := 0; i < num; i++ {
		if err := c.Restart(ctx, i); err != nil {
			t.Fatal(err)
		}
	}

	// The cluster should now be fully operational (at least after waiting
	// a little bit) since each node tries to unfreeze everything when it
	// starts.
	if err := util.RetryForDuration(time.Minute, func() error {
		if _, err := postFreeze(ctx, c, false, short); err != nil {
			if testutils.IsError(err, "404 Not Found") {
				// It can take a bit until the endpoint is available.
				return err
			}
			t.Fatal(err)
		}

		db, err := c.NewClient(ctx, 0)
		if err != nil {
			t.Fatal(err)
		}

		if _, err := db.Scan(ctx, keys.LocalMax, roachpb.KeyMax, 0); err != nil {
			t.Fatal(err)
		}
		return nil
	}); err != nil {
		t.Fatal(err)
	}

	// Unfreezing again should be a no-op.
	if reply, err := postFreeze(ctx, c, false, long); err != nil {
		t.Fatal(err)
	} else if reply.RangesAffected > 0 {
		t.Fatalf("still %d frozen ranges", reply.RangesAffected)
	}
}


text:
require 'azure_mgmt_redis'

module Azure::Profiles::Latest
  module Redis
    module Mgmt
      Operations = Azure::Redis::Mgmt::V2018_03_01::Operations
      Redis = Azure::Redis::Mgmt::V2018_03_01::Redis
      FirewallRules = Azure::Redis::Mgmt::V2018_03_01::FirewallRules
      PatchSchedules = Azure::Redis::Mgmt::V2018_03_01::PatchSchedules
      LinkedServer = Azure::Redis::Mgmt::V2018_03_01::LinkedServer

      module Models
        RedisRebootParameters = Azure::Redis::Mgmt::V2018_03_01::Models::RedisRebootParameters
        Sku = Azure::Redis::Mgmt::V2018_03_01::Models::Sku
        ExportRDBParameters = Azure::Redis::Mgmt::V2018_03_01::Models::ExportRDBParameters
        RedisListResult = Azure::Redis::Mgmt::V2018_03_01::Models::RedisListResult
        RedisAccessKeys = Azure::Redis::Mgmt::V2018_03_01::Models::RedisAccessKeys
        RedisRegenerateKeyParameters = Azure::Redis::Mgmt::V2018_03_01::Models::RedisRegenerateKeyParameters
        Resource = Azure::Redis::Mgmt::V2018_03_01::Models::Resource
        NotificationListResponse = Azure::Redis::Mgmt::V2018_03_01::Models::NotificationListResponse
        OperationListResult = Azure::Redis::Mgmt::V2018_03_01::Models::OperationListResult
        RedisUpdateParameters = Azure::Redis::Mgmt::V2018_03_01::Models::RedisUpdateParameters
        ImportRDBParameters = Azure::Redis::Mgmt::V2018_03_01::Models::ImportRDBParameters
        RedisFirewallRuleCreateParameters = Azure::Redis::Mgmt::V2018_03_01::Models::RedisFirewallRuleCreateParameters
        ScheduleEntry = Azure::Redis::Mgmt::V2018_03_01::Models::ScheduleEntry
        CheckNameAvailabilityParameters = Azure::Redis::Mgmt::V2018_03_01::Models::CheckNameAvailabilityParameters
        Operation = Azure::Redis::Mgmt::V2018_03_01::Models::Operation
        RedisPatchScheduleListResult = Azure::Redis::Mgmt::V2018_03_01::Models::RedisPatchScheduleListResult
        UpgradeNotification = Azure::Redis::Mgmt::V2018_03_01::Models::UpgradeNotification
        RedisForceRebootResponse = Azure::Redis::Mgmt::V2018_03_01::Models::RedisForceRebootResponse
        RedisLinkedServer = Azure::Redis::Mgmt::V2018_03_01::Models::RedisLinkedServer
        OperationDisplay = Azure::Redis::Mgmt::V2018_03_01::Models::OperationDisplay
        RedisFirewallRuleListResult = Azure::Redis::Mgmt::V2018_03_01::Models::RedisFirewallRuleListResult
        RedisLinkedServerWithPropertiesList = Azure::Redis::Mgmt::V2018_03_01::Models::RedisLinkedServerWithPropertiesList
        RedisCreateParameters = Azure::Redis::Mgmt::V2018_03_01::Models::RedisCreateParameters
        RedisLinkedServerCreateParameters = Azure::Redis::Mgmt::V2018_03_01::Models::RedisLinkedServerCreateParameters
        ProxyResource = Azure::Redis::Mgmt::V2018_03_01::Models::ProxyResource
        TrackedResource = Azure::Redis::Mgmt::V2018_03_01::Models::TrackedResource
        RedisFirewallRule = Azure::Redis::Mgmt::V2018_03_01::Models::RedisFirewallRule
        RedisResource = Azure::Redis::Mgmt::V2018_03_01::Models::RedisResource
        RedisPatchSchedule = Azure::Redis::Mgmt::V2018_03_01::Models::RedisPatchSchedule
        RedisLinkedServerWithProperties = Azure::Redis::Mgmt::V2018_03_01::Models::RedisLinkedServerWithProperties
        SkuName = Azure::Redis::Mgmt::V2018_03_01::Models::SkuName
        SkuFamily = Azure::Redis::Mgmt::V2018_03_01::Models::SkuFamily
        TlsVersion = Azure::Redis::Mgmt::V2018_03_01::Models::TlsVersion
        ProvisioningState = Azure::Redis::Mgmt::V2018_03_01::Models::ProvisioningState
        RedisKeyType = Azure::Redis::Mgmt::V2018_03_01::Models::RedisKeyType
        RebootType = Azure::Redis::Mgmt::V2018_03_01::Models::RebootType
        DayOfWeek = Azure::Redis::Mgmt::V2018_03_01::Models::DayOfWeek
        ReplicationRole = Azure::Redis::Mgmt::V2018_03_01::Models::ReplicationRole
      end

      class RedisManagementClass
        attr_reader :operations, :redis, :firewall_rules, :patch_schedules, :linked_server, :configurable, :base_url, :options, :model_classes

        def initialize(configurable, base_url=nil, options=nil)
          @configurable, @base_url, @options = configurable, base_url, options

          @client_0 = Azure::Redis::Mgmt::V2018_03_01::RedisManagementClient.new(configurable.credentials, base_url, options)
          if(@client_0.respond_to?(:subscription_id))
            @client_0.subscription_id = configurable.subscription_id
          end
          add_telemetry(@client_0)
          @operations = @client_0.operations
          @redis = @client_0.redis
          @firewall_rules = @client_0.firewall_rules
          @patch_schedules = @client_0.patch_schedules
          @linked_server = @client_0.linked_server

          @model_classes = ModelClasses.new
        end

        def add_telemetry(client)
          profile_information = "Profiles/azure_sdk/#{Azure::VERSION}/Latest/Redis/Mgmt"
          client.add_user_agent_information(profile_information)
        end

        def method_missing(method, *args)
          if @client_0.respond_to?method
            @client_0.send(method, *args)
          else
            super
          end
        end

        class ModelClasses
          def redis_reboot_parameters
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisRebootParameters
          end
          def sku
            Azure::Redis::Mgmt::V2018_03_01::Models::Sku
          end
          def export_rdbparameters
            Azure::Redis::Mgmt::V2018_03_01::Models::ExportRDBParameters
          end
          def redis_list_result
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisListResult
          end
          def redis_access_keys
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisAccessKeys
          end
          def redis_regenerate_key_parameters
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisRegenerateKeyParameters
          end
          def resource
            Azure::Redis::Mgmt::V2018_03_01::Models::Resource
          end
          def notification_list_response
            Azure::Redis::Mgmt::V2018_03_01::Models::NotificationListResponse
          end
          def operation_list_result
            Azure::Redis::Mgmt::V2018_03_01::Models::OperationListResult
          end
          def redis_update_parameters
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisUpdateParameters
          end
          def import_rdbparameters
            Azure::Redis::Mgmt::V2018_03_01::Models::ImportRDBParameters
          end
          def redis_firewall_rule_create_parameters
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisFirewallRuleCreateParameters
          end
          def schedule_entry
            Azure::Redis::Mgmt::V2018_03_01::Models::ScheduleEntry
          end
          def check_name_availability_parameters
            Azure::Redis::Mgmt::V2018_03_01::Models::CheckNameAvailabilityParameters
          end
          def operation
            Azure::Redis::Mgmt::V2018_03_01::Models::Operation
          end
          def redis_patch_schedule_list_result
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisPatchScheduleListResult
          end
          def upgrade_notification
            Azure::Redis::Mgmt::V2018_03_01::Models::UpgradeNotification
          end
          def redis_force_reboot_response
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisForceRebootResponse
          end
          def redis_linked_server
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisLinkedServer
          end
          def operation_display
            Azure::Redis::Mgmt::V2018_03_01::Models::OperationDisplay
          end
          def redis_firewall_rule_list_result
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisFirewallRuleListResult
          end
          def redis_linked_server_with_properties_list
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisLinkedServerWithPropertiesList
          end
          def redis_create_parameters
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisCreateParameters
          end
          def redis_linked_server_create_parameters
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisLinkedServerCreateParameters
          end
          def proxy_resource
            Azure::Redis::Mgmt::V2018_03_01::Models::ProxyResource
          end
          def tracked_resource
            Azure::Redis::Mgmt::V2018_03_01::Models::TrackedResource
          end
          def redis_firewall_rule
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisFirewallRule
          end
          def redis_resource
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisResource
          end
          def redis_patch_schedule
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisPatchSchedule
          end
          def redis_linked_server_with_properties
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisLinkedServerWithProperties
          end
          def sku_name
            Azure::Redis::Mgmt::V2018_03_01::Models::SkuName
          end
          def sku_family
            Azure::Redis::Mgmt::V2018_03_01::Models::SkuFamily
          end
          def tls_version
            Azure::Redis::Mgmt::V2018_03_01::Models::TlsVersion
          end
          def provisioning_state
            Azure::Redis::Mgmt::V2018_03_01::Models::ProvisioningState
          end
          def redis_key_type
            Azure::Redis::Mgmt::V2018_03_01::Models::RedisKeyType
          end
          def reboot_type
            Azure::Redis::Mgmt::V2018_03_01::Models::RebootType
          end
          def day_of_week
            Azure::Redis::Mgmt::V2018_03_01::Models::DayOfWeek
          end
          def replication_role
            Azure::Redis::Mgmt::V2018_03_01::Models::ReplicationRole
          end
        end
      end
    end
  end
end


text:
const { filter, map, includes, sortBy } = require('lodash')

const { getOptions } = require('../../../../lib/options')

const COMPANY_LABEL = 'Company'
const LIMITED_COMPANY_LABEL = 'Limited company'
const BUSINESS_TYPE_WHITELIST = {
  charity: '9dd14e94-5d95-e211-a939-e4115bead28a',
  company: '98d14e94-5d95-e211-a939-e4115bead28a',
  governmentDepartmentOrOtherPublicBody: '9cd14e94-5d95-e211-a939-e4115bead28a',
  limitedPartnership: '8b6eaf7e-03e7-e611-bca1-e4115bead28a',
  partnership: '9ad14e94-5d95-e211-a939-e4115bead28a',
  soleTrader: '99d14e94-5d95-e211-a939-e4115bead28a',
}

async function fetchOrganisationTypes(req) {
  const businessTypeOptions = await getOptions(req, 'business-type')
  const filteredBusinessTypeOptions = filter(
    businessTypeOptions,
    ({ value }) => {
      return includes(BUSINESS_TYPE_WHITELIST, value)
    }
  )

  return sortBy(
    map(filteredBusinessTypeOptions, (businessTypeOption) => {
      if (businessTypeOption.label === COMPANY_LABEL) {
        return {
          ...businessTypeOption,
          label: LIMITED_COMPANY_LABEL,
        }
      }

      return businessTypeOption
    }),
    'label'
  )
}

module.exports = {
  fetchOrganisationTypes,
}


text:
title: Menu Merge in MDI applications
page_title: Menu Merge in MDI applications - RadMenu
description: RadMenu enables you to integrate attractive and flexible menus on Forms within your Windows applications.
slug: winforms/menus/menu/menu-merge/menu-merge-in-mdi-applications
tags: menu,merge,in,mdi,applications
published: True
position: 0
previous_url: menus-menu-menu-merge-menu-merge-in-mdi-applications
---

# Menu Merge in MDI applications

__RadMenu__ automatically discovers that it is placed in a child MDI form. When a child MDI form is maximized, **RadMenu** automatically merges the Menu items in the parent form using the **MergeType** and **MergeOrder** properties defined for each **RadMenuItem**. When a child form is restored/minimized, the parent menu state is restored.

Please refer to the next [section]({%slug winforms/menus/menu/menu-merge/menu-merge%}) about **MergeType** and **MergeOrder** properties.

>caption Figure 1: Menu Merge

![menus-menu-menu-merge-menu-merge-in-mdi-applications 001](images/menus-menu-menu-merge-menu-merge-in-mdi-applications001.gif)

# See Also

* [MDI forms]({%slug winforms/forms-and-dialogs/form/mdi%})


text:
package net.wasdev.wlp.maven.plugins.server;

import net.wasdev.wlp.ant.UninstallFeatureTask;
import net.wasdev.wlp.maven.plugins.BasicSupport;
import net.wasdev.wlp.maven.plugins.server.types.Features;

import org.apache.maven.plugin.MojoExecutionException;

/**
 * This mojo uninstalls a feature packaged as a Subsystem Archive (esa) from the
 * runtime.
 *
 * @goal uninstall-feature
 */
public class UninstallFeatureMojo extends BasicSupport {

    /**
     * Define a set of features to uninstall.
     *
     * @parameter
     */
    private Features features;

    /*
     * (non-Javadoc)
     * @see org.codehaus.mojo.pluginsupport.MojoSupport#doExecute()
     */
    @Override
    protected void doExecute() throws Exception {
        if (skip == true) {
            return;
        }

        // for liberty-assembly integration
        if (features == null) {
            return;
        }

        if (features.getFeatures().size() <= 0) {
            throw new MojoExecutionException(
                    messages.getString("error.install.feature.set.validate"));
        }

        UninstallFeatureTask uninstallFeatureTask = (UninstallFeatureTask) ant
                .createTask("antlib:net/wasdev/wlp/ant:uninstall-feature");

        if (uninstallFeatureTask == null) {
            throw new NullPointerException("Uninstall feature task not found.");
        }

        uninstallFeatureTask.setInstallDir(installDirectory);
        uninstallFeatureTask.setServerName(serverName);
        uninstallFeatureTask.setUserDir(userDirectory);
        uninstallFeatureTask.setOutputDir(outputDirectory);
        uninstallFeatureTask.setFeatures(features.getFeatures());
        uninstallFeatureTask.execute();
    }

}


text:
package org.fxmisc.richtext.demo.hyperlink;

import javafx.scene.paint.Color;
import org.fxmisc.richtext.model.Codec;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.nio.charset.MalformedInputException;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Optional;

/**
 * Holds information about the style of a text fragment.
 */
class TextStyle {

    public static final TextStyle EMPTY = new TextStyle();

    public static final Codec<TextStyle> CODEC = new Codec<TextStyle>() {

        private final Codec<Optional<String>> OPT_STRING_CODEC =
                Codec.optionalCodec(Codec.STRING_CODEC);
        private final Codec<Optional<Color>> OPT_COLOR_CODEC =
                Codec.optionalCodec(Codec.COLOR_CODEC);

        @Override
        public String getName() {
            return "text-style";
        }

        @Override
        public void encode(DataOutputStream os, TextStyle s)
                throws IOException {
            os.writeByte(encodeBoldItalicUnderlineStrikethrough(s));
            os.writeInt(encodeOptionalUint(s.fontSize));
            OPT_STRING_CODEC.encode(os, s.fontFamily);
            OPT_COLOR_CODEC.encode(os, s.textColor);
            OPT_COLOR_CODEC.encode(os, s.backgroundColor);
        }

        @Override
        public TextStyle decode(DataInputStream is) throws IOException {
            byte bius = is.readByte();
            Optional<Integer> fontSize = decodeOptionalUint(is.readInt());
            Optional<String> fontFamily = OPT_STRING_CODEC.decode(is);
            Optional<Color> textColor = OPT_COLOR_CODEC.decode(is);
            Optional<Color> bgrColor = OPT_COLOR_CODEC.decode(is);
            return new TextStyle(
                    bold(bius), italic(bius), underline(bius), strikethrough(bius),
                    fontSize, fontFamily, textColor, bgrColor);
        }

        private int encodeBoldItalicUnderlineStrikethrough(TextStyle s) {
            return encodeOptionalBoolean(s.bold) << 6 |
                   encodeOptionalBoolean(s.italic) << 4 |
                   encodeOptionalBoolean(s.underline) << 2 |
                   encodeOptionalBoolean(s.strikethrough);
        }

        private Optional<Boolean> bold(byte bius) throws IOException {
            return decodeOptionalBoolean((bius >> 6) & 3);
        }

        private Optional<Boolean> italic(byte bius) throws IOException {
            return decodeOptionalBoolean((bius >> 4) & 3);
        }

        private Optional<Boolean> underline(byte bius) throws IOException {
            return decodeOptionalBoolean((bius >> 2) & 3);
        }

        private Optional<Boolean> strikethrough(byte bius) throws IOException {
            return decodeOptionalBoolean((bius >> 0) & 3);
        }

        private int encodeOptionalBoolean(Optional<Boolean> ob) {
            return ob.map(b -> 2 + (b ? 1 : 0)).orElse(0);
        }

        private Optional<Boolean> decodeOptionalBoolean(int i) throws IOException {
            switch(i) {
                case 0: return Optional.empty();
                case 2: return Optional.of(false);
                case 3: return Optional.of(true);
            }
            throw new MalformedInputException(0);
        }

        private int encodeOptionalUint(Optional<Integer> oi) {
            return oi.orElse(-1);
        }

        private Optional<Integer> decodeOptionalUint(int i) {
            return (i < 0) ? Optional.empty() : Optional.of(i);
        }
    };

    public static TextStyle bold(boolean bold) { return EMPTY.updateBold(bold); }
    public static TextStyle italic(boolean italic) { return EMPTY.updateItalic(italic); }
    public static TextStyle underline(boolean underline) { return EMPTY.updateUnderline(underline); }
    public static TextStyle strikethrough(boolean strikethrough) { return EMPTY.updateStrikethrough(strikethrough); }
    public static TextStyle fontSize(int fontSize) { return EMPTY.updateFontSize(fontSize); }
    public static TextStyle fontFamily(String family) { return EMPTY.updateFontFamily(family); }
    public static TextStyle textColor(Color color) { return EMPTY.updateTextColor(color); }
    public static TextStyle backgroundColor(Color color) { return EMPTY.updateBackgroundColor(color); }

    static String cssColor(Color color) {
        int red = (int) (color.getRed() * 255);
        int green = (int) (color.getGreen() * 255);
        int blue = (int) (color.getBlue() * 255);
        return "rgb(" + red + ", " + green + ", " + blue + ")";
    }

    final Optional<Boolean> bold;
    final Optional<Boolean> italic;
    final Optional<Boolean> underline;
    final Optional<Boolean> strikethrough;
    final Optional<Integer> fontSize;
    final Optional<String> fontFamily;
    final Optional<Color> textColor;
    final Optional<Color> backgroundColor;

    public TextStyle() {
        this(
            Optional.empty(),
            Optional.empty(),
            Optional.empty(),
            Optional.empty(),
            Optional.empty(),
            Optional.empty(),
            Optional.empty(),
            Optional.empty()
        );
    }

    public TextStyle(
            Optional<Boolean> bold,
            Optional<Boolean> italic,
            Optional<Boolean> underline,
            Optional<Boolean> strikethrough,
            Optional<Integer> fontSize,
            Optional<String> fontFamily,
            Optional<Color> textColor,
            Optional<Color> backgroundColor) {
        this.bold = bold;
        this.italic = italic;
        this.underline = underline;
        this.strikethrough = strikethrough;
        this.fontSize = fontSize;
        this.fontFamily = fontFamily;
        this.textColor = textColor;
        this.backgroundColor = backgroundColor;
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                bold, italic, underline, strikethrough,
                fontSize, fontFamily, textColor, backgroundColor);
    }

    @Override
    public boolean equals(Object other) {
        if(other instanceof TextStyle) {
            TextStyle that = (TextStyle) other;
            return Objects.equals(this.bold,            that.bold) &&
                   Objects.equals(this.italic,          that.italic) &&
                   Objects.equals(this.underline,       that.underline) &&
                   Objects.equals(this.strikethrough,   that.strikethrough) &&
                   Objects.equals(this.fontSize,        that.fontSize) &&
                   Objects.equals(this.fontFamily,      that.fontFamily) &&
                   Objects.equals(this.textColor,       that.textColor) &&
                   Objects.equals(this.backgroundColor, that.backgroundColor);
        } else {
            return false;
        }
    }

    @Override
    public String toString() {
        List<String> styles = new ArrayList<>();

        bold           .ifPresent(b -> styles.add(b.toString()));
        italic         .ifPresent(i -> styles.add(i.toString()));
        underline      .ifPresent(u -> styles.add(u.toString()));
        strikethrough  .ifPresent(s -> styles.add(s.toString()));
        fontSize       .ifPresent(s -> styles.add(s.toString()));
        fontFamily     .ifPresent(f -> styles.add(f.toString()));
        textColor      .ifPresent(c -> styles.add(c.toString()));
        backgroundColor.ifPresent(b -> styles.add(b.toString()));

        return String.join(",", styles);
    }

    public String toCss() {
        StringBuilder sb = new StringBuilder();

        if(bold.isPresent()) {
            if(bold.get()) {
                sb.append("-fx-font-weight: bold;");
            } else {
                sb.append("-fx-font-weight: normal;");
            }
        }

        if(italic.isPresent()) {
            if(italic.get()) {
                sb.append("-fx-font-style: italic;");
            } else {
                sb.append("-fx-font-style: normal;");
            }
        }

        if(underline.isPresent()) {
            if(underline.get()) {
                sb.append("-fx-underline: true;");
            } else {
                sb.append("-fx-underline: false;");
            }
        }

        if(strikethrough.isPresent()) {
            if(strikethrough.get()) {
                sb.append("-fx-strikethrough: true;");
            } else {
                sb.append("-fx-strikethrough: false;");
            }
        }

        if(fontSize.isPresent()) {
            sb.append("-fx-font-size: " + fontSize.get() + "pt;");
        }

        if(fontFamily.isPresent()) {
            sb.append("-fx-font-family: " + fontFamily.get() + ";");
        }

        if(textColor.isPresent()) {
            Color color = textColor.get();
            sb.append("-fx-fill: " + cssColor(color) + ";");
        }

        if(backgroundColor.isPresent()) {
            Color color = backgroundColor.get();
            sb.append("-rtfx-background-color: " + cssColor(color) + ";");
        }

        return sb.toString();
    }

    public TextStyle updateWith(TextStyle mixin) {
        return new TextStyle(
                mixin.bold.isPresent() ? mixin.bold : bold,
                mixin.italic.isPresent() ? mixin.italic : italic,
                mixin.underline.isPresent() ? mixin.underline : underline,
                mixin.strikethrough.isPresent() ? mixin.strikethrough : strikethrough,
                mixin.fontSize.isPresent() ? mixin.fontSize : fontSize,
                mixin.fontFamily.isPresent() ? mixin.fontFamily : fontFamily,
                mixin.textColor.isPresent() ? mixin.textColor : textColor,
                mixin.backgroundColor.isPresent() ? mixin.backgroundColor : backgroundColor);
    }

    public TextStyle updateBold(boolean bold) {
        return new TextStyle(Optional.of(bold), italic, underline, strikethrough, fontSize, fontFamily, textColor, backgroundColor);
    }

    public TextStyle updateItalic(boolean italic) {
        return new TextStyle(bold, Optional.of(italic), underline, strikethrough, fontSize, fontFamily, textColor, backgroundColor);
    }

    public TextStyle updateUnderline(boolean underline) {
        return new TextStyle(bold, italic, Optional.of(underline), strikethrough, fontSize, fontFamily, textColor, backgroundColor);
    }

    public TextStyle updateStrikethrough(boolean strikethrough) {
        return new TextStyle(bold, italic, underline, Optional.of(strikethrough), fontSize, fontFamily, textColor, backgroundColor);
    }

    public TextStyle updateFontSize(int fontSize) {
        return new TextStyle(bold, italic, underline, strikethrough, Optional.of(fontSize), fontFamily, textColor, backgroundColor);
    }

    public TextStyle updateFontFamily(String fontFamily) {
        return new TextStyle(bold, italic, underline, strikethrough, fontSize, Optional.of(fontFamily), textColor, backgroundColor);
    }

    public TextStyle updateTextColor(Color textColor) {
        return new TextStyle(bold, italic, underline, strikethrough, fontSize, fontFamily, Optional.of(textColor), backgroundColor);
    }

    public TextStyle updateBackgroundColor(Color backgroundColor) {
        return new TextStyle(bold, italic, underline, strikethrough, fontSize, fontFamily, textColor, Optional.of(backgroundColor));
    }
}


text:
const ws = require('ws');
const colors = require('colors');

const Settings = require('./../../settings.js');
const Modules = require('./../../modules.js');
const HttpConnection = require('./http.js');

/*
 * Parses a query
 */
const getParsedQuery = (query, regexp, route) => {
  if ( typeof route !== 'string' ) {
    route = '';
  }

  const values = query.split(regexp).filter((str) => !!str);
  const keys = (route.match(/\:([A-z0-9_]+)/g) || []).map((str) => {
    return str.substr(1);
  });

  if ( keys.length === values.length ) {
    const result = {};
    keys.forEach((k, i) => (result[k] = values[i]));
    return result;
  }

  return values;
};

class WSConnection extends HttpConnection {

  constructor() {
    super(...arguments);
    this.websocketMap = {};
  }

  /**
   * Destroys the module
   * @return {Promise<Boolean, Error>}
   */
  destroy() {
    this.websocketMap = {};

    if ( this.websocket ) {
      this.websocket.close();
    }

    return super.destroy(...arguments);
  }

  /**
   * Registers the module
   * @return {Promise<Boolean, Error>}
   */
  register() {
    return new Promise((resolve, reject) => {
      super.register(...arguments).then(() => {
        const hostname = Settings.option('HOSTNAME') || Settings.get('http.hostname');
        const wsSettings = Settings.get('http.ws');
        const wsOptions = {
          server: this.server,
          path: wsSettings.path
        };

        if ( wsSettings.port !== 'upgrade' ) {
          wsOptions.port = wsSettings.port;
        }

        console.log(colors.bold('Creating'), colors.green('websocket'), 'server on', hostname + '@' + wsSettings.port + wsSettings.path);

        this.websocket = new ws.Server(wsOptions);
        this.websocket.on('connection', (ws, upgradeReq) => {
          const sid = this.getSessionId(upgradeReq);

          ws.on('message', (msg) => {
            try {
              msg = JSON.parse(msg);
              this.handleMessage(ws, msg, upgradeReq);
            } catch ( e ) {
              console.error(e);
            }
          });

          ws.on('close', () => {
            if ( typeof this.websocketMap[sid] !== 'undefined' ) {
              delete this.websocketMap[sid];
            }
            console.info('< Closed a Websocket connection...');
          });

          this.websocketMap[sid] = ws;

          console.info('> Created a Websocket connection...');
        });

        return resolve(true);
      }).catch(reject);
    });
  }

  getWebsocketFromUser(username) {
    let foundSid = null;

    Object.keys(this.sidMap).forEach((sid) => {
      if ( foundSid === null && this.sidMap[sid] === username ) {
        foundSid = sid;
      }
    });

    if ( this.websocketMap[foundSid] ) {
      console.warn('FOUND YOUR USER WEBSOCKET', foundSid);
      return this.websocketMap[foundSid];
    }

    return null;
  }

  /**
   * Broadcast a message
   * @param {String} username User
   * @param {String} action Action
   * @param {*} message Message
   */
  broadcast(username, action, message) {
    const data = JSON.stringify({
      action: action,
      args: message
    });

    if ( username ) {
      const ws = this.getWebsocketFromUser(username);
      ws.send(data);
    } else {
      this.websocket.clients.forEach((client) => client.send(data));
    }
  }

  /**
   * Handles the incoming WebSocket message
   * @param {Websocket} ws Client socket
   * @param {Object} msg Message
   * @param {IncomingMessage} req Http Request
   */
  handleMessage(ws, msg, req) {
    const query = msg.path;
    const args = msg.args || {};
    const index = msg._index;

    const found = this.app._router.stack.filter((iter) => {
      return iter.name === 'bound dispatch' && iter.regexp !== /^\/?(?=\/|$)/i;
    }).find((iter) => {
      return iter.match(query);
    });

    const send = (newRequest, data) => {
      if ( typeof index !== 'undefined' ) {
        data._index = index;
      }

      if ( data.error instanceof Error ) {
        console.error(data.error);
        data.error = data.error.toString();
      }

      const module = Modules.getSession() || {};
      const sid = this.getSessionId(newRequest);

      if ( module.touch ) {
        module.touch(sid, newRequest.session, (err, session) => {
          if ( session ) {
            newRequest.session = session;
          }
          if ( err ) {
            console.error(err);
          }

          ws.send(JSON.stringify(data));
        });
      } else {
        ws.send(JSON.stringify(data));
      }
    };

    const respond = (newRequest) => {
      if ( found ) {
        newRequest.params = getParsedQuery(query, found.regexp, found.route.path);

        const responder = {
          status: () => responder,
          send: (data) => send(newRequest, data),
          json: (data) => send(newRequest, data)
        };

        found.handle_request(newRequest, responder, () => {
          console.error('Not handled', query);
        });
      } else {
        console.error(404, query);
      }
    };

    this.session(req, {}, (err) => {
      respond(Object.assign(req, {
        method: 'POST',
        query: query,
        body: args
      }));
    });
  }

}

module.exports = WSConnection;


text:
![Dependencies Status](http://autocomplete-js.com/images/dependencies-none-brightgreen.png)
![Javascript Strict Mode](http://autocomplete-js.com/images/Javascript-Strict-Mode-brightgreen.png)
![JSHint test](http://autocomplete-js.com/images/JSHint-0-error-brightgreen.png)
![License MIT](http://autocomplete-js.com/images/license-mit.png)

autocomplete.js is a Javascript project with purpose to propose an autocomplete, fast, lite and without dependency.

###Documentation

The documentation is available [here](http://autocomplete-js.com).

###Slogan

Lite, Open, made by a developer for developers. Help me and contributed :)

###Thanks

Thank you to [Demonixis](https://github.com/demonixis) for the Javascript advices.


text:
.class final synthetic Lcom/samsung/android/server/virtualspace/-$Lambda$aFXG8WE91-FZMtiJlE77lsGUfPU;
.super Ljava/lang/Object;

# interfaces
.implements Lcom/android/internal/util/FunctionalUtils$ThrowingRunnable;

# instance fields
.field private final synthetic -$f0:Ljava/lang/Object;

.field private final synthetic -$f1:Ljava/lang/Object;

# direct methods
.method private final synthetic $m$0()V
    .locals 2

    iget-object v0, p0, Lcom/samsung/android/server/virtualspace/-$Lambda$aFXG8WE91-FZMtiJlE77lsGUfPU;->-$f0:Ljava/lang/Object;

    check-cast v0, Lcom/samsung/android/server/virtualspace/VSManagerService;

    iget-object v1, p0, Lcom/samsung/android/server/virtualspace/-$Lambda$aFXG8WE91-FZMtiJlE77lsGUfPU;->-$f1:Ljava/lang/Object;

    check-cast v1, Lcom/samsung/android/server/virtualspace/VSSession;

    invoke-virtual {v0, v1}, Lcom/samsung/android/server/virtualspace/VSManagerService;->lambda$-com_samsung_android_server_virtualspace_VSManagerService_18130(Lcom/samsung/android/server/virtualspace/VSSession;)V

    return-void
.end method

.method public synthetic constructor <init>(Ljava/lang/Object;Ljava/lang/Object;)V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Lcom/samsung/android/server/virtualspace/-$Lambda$aFXG8WE91-FZMtiJlE77lsGUfPU;->-$f0:Ljava/lang/Object;

    iput-object p2, p0, Lcom/samsung/android/server/virtualspace/-$Lambda$aFXG8WE91-FZMtiJlE77lsGUfPU;->-$f1:Ljava/lang/Object;

    return-void
.end method

# virtual methods
.method public final run()V
    .locals 0

    invoke-direct {p0}, Lcom/samsung/android/server/virtualspace/-$Lambda$aFXG8WE91-FZMtiJlE77lsGUfPU;->$m$0()V

    return-void
.end method


text:
package org.datagr4m.viewer.renderer;

public enum TextAlign {
    LEFT,
    CENTER,
    RIGHT
}


text:
module Azure::Network::Mgmt::V2016_03_30
  module Models
    #
    # Load balancer Probe
    #
    class Probe < SubResource

      include MsRestAzure

      # @return [Array<SubResource>] Gets Load balancer rules that use this
      # probe
      attr_accessor :load_balancing_rules

      # @return [ProbeProtocol] Gets or sets the protocol of the end point.
      # Possible values are http pr Tcp. If Tcp is specified, a received ACK is
      # required for the probe to be successful. If http is specified,a 200 OK
      # response from the specifies URI is required for the probe to be
      # successful. Possible values include: 'Http', 'Tcp'
      attr_accessor :protocol

      # @return [Integer] Gets or sets Port for communicating the probe.
      # Possible values range from 1 to 65535, inclusive.
      attr_accessor :port

      # @return [Integer] Gets or sets the interval, in seconds, for how
      # frequently to probe the endpoint for health status. Typically, the
      # interval is slightly less than half the allocated timeout period (in
      # seconds) which allows two full probes before taking the instance out of
      # rotation. The default value is 15, the minimum value is 5
      attr_accessor :interval_in_seconds

      # @return [Integer] Gets or sets the number of probes where if no
      # response, will result in stopping further traffic from being delivered
      # to the endpoint. This values allows endpoints to be taken out of
      # rotation faster or slower than the typical times used in Azure.
      attr_accessor :number_of_probes

      # @return [String] Gets or sets the URI used for requesting health status
      # from the VM. Path is required if a protocol is set to http. Otherwise,
      # it is not allowed. There is no default value
      attr_accessor :request_path

      # @return [String] Gets or sets Provisioning state of the PublicIP
      # resource Updating/Deleting/Failed
      attr_accessor :provisioning_state

      # @return [String] Gets name of the resource that is unique within a
      # resource group. This name can be used to access the resource
      attr_accessor :name

      # @return [String] A unique read-only string that changes whenever the
      # resource is updated
      attr_accessor :etag

      #
      # Mapper for Probe class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Probe',
          type: {
            name: 'Composite',
            class_name: 'Probe',
            model_properties: {
              id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              load_balancing_rules: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.loadBalancingRules',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'SubResourceElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'SubResource'
                      }
                  }
                }
              },
              protocol: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.protocol',
                type: {
                  name: 'String'
                }
              },
              port: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.port',
                type: {
                  name: 'Number'
                }
              },
              interval_in_seconds: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.intervalInSeconds',
                type: {
                  name: 'Number'
                }
              },
              number_of_probes: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.numberOfProbes',
                type: {
                  name: 'Number'
                }
              },
              request_path: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.requestPath',
                type: {
                  name: 'String'
                }
              },
              provisioning_state: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.provisioningState',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              etag: {
                client_side_validation: true,
                required: false,
                serialized_name: 'etag',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end


text:
import { StyleSheet } from 'aphrodite';
import * as colors from '../../style/colors';
import * as fonts from '../../style/fonts';

export default StyleSheet.create({
	questionContainer: {
		position: 'relative'
	},

	timeline: {
		position: 'absolute',
		left: '50%',
		width: '1.5rem',
		top: '-4rem',
		bottom: '-4rem',
		marginLeft: '-0.75rem',
		backgroundColor: colors.seaGreen,
		zIndex: -1
	},

	question: {
		width: '100%',
		margin: '4em 0'
	},

	blurb: {
		fontSize: fonts.smaller
	},

	moreCircle: {
		width: '6em',
		height: '6em',
		lineHeight: '6em',
		margin: '-5px auto 0 auto',
		backgroundColor: colors.aquaMarine
	},

	moreInner: {
		color: colors.white,
		fontSize: '2rem'
	},

	buttonGroup: {
		textAlign: 'left',
		fontSize: fonts.smallerer,
	},

	radio: {
		padding: '0.25em 0'
  },

  correct: {
    fontSize: fonts.smallerer,
    color: colors.aquaMarine
  },

  incorrect: {
    fontSize: fonts.smallerer,
    color: colors.red
	},

	link: {
		textDecoration: 'underline',
		cursor: 'pointer',
		':hover': {
			color: colors.aquaMarine
		}

	}
});


text:
package com.ea.orbit.async;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Annotation to mark methods that will work with asynchronously with async-await.
 *

 * Example:
 *

 * import com.ea.orbit.async.Async;
 * import static com.ea.orbit.async.Await.await;
 * ...
 *
 * {@literal@}Async
 * CompletableFuture<Integer> getPageLengthAsync()
 * {
 *     CompletableFuture<String> pageFuture = getPageAsync("http://example.com");
 *     String page = await(pageFuture);
 *     return CompletableFuture.completedFuture(page.length);
 * }

 *
 * Or using orbit Task:
 *

 * {@literal@}Async
 * Task CompletableFuture<Integer> getPageLengthAsync()
 * {
 *     Task<String> pageFuture = getPageAsync("http://example.com");
 *     String page = await(pageFuture);
 *     return Task.fromValue(page.length);
 * }

 *
 * Caveat: The following code must be called before the program execution:
 * {@code static { Await.init() }}
 * Otherwise, the first method to call {@code await()} might be blocking,
 * and a warning message will be printed to the console.
 * Subsequent async methods will work as expected.
 *
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Async
{
}


text:
<bill session="110" type="h" number="6237" updated="2009-01-09T05:44:40-05:00">
	<status><introduced date="1213156800" datetime="2008-06-11"/></status>

	<introduced date="1213156800" datetime="2008-06-11"/>
	<titles>
		<title type="short" as="introduced">Tax Relief for Long-Term Care Act of 2008</title>
		<title type="official" as="introduced">To amend the Internal Revenue Code of 1986 to provide for a credit for long-term care insurance premiums and for taxpayers with long-term care needs.</title>
	</titles>
	<sponsor id="412193"/>
	<cosponsors>

	</cosponsors>
	<actions>
		<action date="1213156800" datetime="2008-06-11"><text>Referred to the House Committee on Ways and Means.</text></action>
	</actions>
	<committees>

	</committees>
	<relatedbills>

	</relatedbills>
	<subjects>

	</subjects>
	<amendments>

	</amendments>

	6/11/2008--Introduced.
Tax Relief for Long-Term Care Act of 2008 - Amends the Internal Revenue Code to allow a tax credit for long-term care insurance premiums and for care provided by a caregiver to a family member or dependent with long-term care needs who resides with such caregiver. Phases in a maximum credit amount of $3,000 between 2009 and 2013. Reduces such credit amount for a taxpayer whose adjusted gross income exceeds $75,000 ($150,000 in the case of a joint return).

</bill>


text:
import { Route } from '@angular/router';

import { PharmacyViewComponent } from './index';

export const PharmacyViewRoutes: Route[] = [
	{
		path: 'pharmacy-view/:id',
		component: PharmacyViewComponent
	}
];


text:
#include "rtp_receiver_video.h"

#include <cassert> //assert
#include <cstring>  // memcpy()
#include <math.h>

#include "critical_section_wrapper.h"
#include "receiver_fec.h"
#include "rtp_rtcp_impl.h"
#include "rtp_utility.h"
#include "trace.h"

namespace webrtc {
WebRtc_UWord32 BitRateBPS(WebRtc_UWord16 x )
{
    return (x & 0x3fff) * WebRtc_UWord32(pow(10.0f,(2 + (x >> 14))));
}

RTPReceiverVideo::RTPReceiverVideo(const WebRtc_Word32 id,
                                   ModuleRtpRtcpImpl* owner)
    : _id(id),
      _criticalSectionReceiverVideo(
          CriticalSectionWrapper::CreateCriticalSection()),
      _currentFecFrameDecoded(false),
      _receiveFEC(NULL) {
}

RTPReceiverVideo::~RTPReceiverVideo() {
    delete _criticalSectionReceiverVideo;
    delete _receiveFEC;
}

ModuleRTPUtility::Payload* RTPReceiverVideo::RegisterReceiveVideoPayload(
    const char payloadName[RTP_PAYLOAD_NAME_SIZE],
    const WebRtc_Word8 payloadType,
    const WebRtc_UWord32 maxRate) {
  RtpVideoCodecTypes videoType = kRtpNoVideo;
  if (ModuleRTPUtility::StringCompare(payloadName, "VP8", 3)) {
    videoType = kRtpVp8Video;
  } else if (ModuleRTPUtility::StringCompare(payloadName, "I420", 4)) {
    videoType = kRtpNoVideo;
  } else if (ModuleRTPUtility::StringCompare(payloadName, "ULPFEC", 6)) {
    // store this
    if (_receiveFEC == NULL) {
      _receiveFEC = new ReceiverFEC(_id, this);
    }
    _receiveFEC->SetPayloadTypeFEC(payloadType);
    videoType = kRtpFecVideo;
  } else {
    return NULL;
  }
  ModuleRTPUtility::Payload* payload =  new ModuleRTPUtility::Payload;

  payload->name[RTP_PAYLOAD_NAME_SIZE - 1] = 0;
  strncpy(payload->name, payloadName, RTP_PAYLOAD_NAME_SIZE - 1);
  payload->typeSpecific.Video.videoCodecType = videoType;
  payload->typeSpecific.Video.maxRate = maxRate;
  payload->audio = false;
  return payload;
}

// we have no critext when calling this
// we are not allowed to have any critsects when calling
// CallbackOfReceivedPayloadData
WebRtc_Word32 RTPReceiverVideo::ParseVideoCodecSpecific(
    WebRtcRTPHeader* rtpHeader,
    const WebRtc_UWord8* payloadData,
    const WebRtc_UWord16 payloadDataLength,
    const RtpVideoCodecTypes videoType,
    const bool isRED,
    const WebRtc_UWord8* incomingRtpPacket,
    const WebRtc_UWord16 incomingRtpPacketSize,
    const WebRtc_Word64 nowMS) {
  WebRtc_Word32 retVal = 0;

  _criticalSectionReceiverVideo->Enter();

  if (isRED) {
    if(_receiveFEC == NULL) {
      _criticalSectionReceiverVideo->Leave();
      return -1;
    }
    bool FECpacket = false;
    retVal = _receiveFEC->AddReceivedFECPacket(
        rtpHeader,
        incomingRtpPacket,
        payloadDataLength,
        FECpacket);
    if (retVal != -1) {
      retVal = _receiveFEC->ProcessReceivedFEC();
    }
    _criticalSectionReceiverVideo->Leave();

    if(retVal == 0 && FECpacket) {
      // Callback with the received FEC packet.
      // The normal packets are delivered after parsing.
      // This contains the original RTP packet header but with
      // empty payload and data length.
      rtpHeader->frameType = kFrameEmpty;
      // We need this for the routing.
      WebRtc_Word32 retVal = SetCodecType(videoType, rtpHeader);
      if(retVal != 0) {
        return retVal;
      }
      // Pass the length of FEC packets so that they can be accounted for in
      // the bandwidth estimator.
      retVal = CallbackOfReceivedPayloadData(NULL, payloadDataLength,
                                             rtpHeader);
    }
  } else {
    // will leave the _criticalSectionReceiverVideo critsect
    retVal = ParseVideoCodecSpecificSwitch(rtpHeader,
                                           payloadData,
                                           payloadDataLength,
                                           videoType);
  }
  return retVal;
}

WebRtc_Word32 RTPReceiverVideo::BuildRTPheader(
    const WebRtcRTPHeader* rtpHeader,
    WebRtc_UWord8* dataBuffer) const {
  dataBuffer[0] = static_cast<WebRtc_UWord8>(0x80);  // version 2
  dataBuffer[1] = static_cast<WebRtc_UWord8>(rtpHeader->header.payloadType);
  if (rtpHeader->header.markerBit) {
    dataBuffer[1] |= kRtpMarkerBitMask;  // MarkerBit is 1
  }
  ModuleRTPUtility::AssignUWord16ToBuffer(dataBuffer + 2,
                                          rtpHeader->header.sequenceNumber);
  ModuleRTPUtility::AssignUWord32ToBuffer(dataBuffer + 4,
                                          rtpHeader->header.timestamp);
  ModuleRTPUtility::AssignUWord32ToBuffer(dataBuffer + 8,
                                          rtpHeader->header.ssrc);

  WebRtc_Word32 rtpHeaderLength = 12;

  // Add the CSRCs if any
  if (rtpHeader->header.numCSRCs > 0) {
    if (rtpHeader->header.numCSRCs > 16) {
      // error
      assert(false);
    }
    WebRtc_UWord8* ptr = &dataBuffer[rtpHeaderLength];
    for (WebRtc_UWord32 i = 0; i < rtpHeader->header.numCSRCs; ++i) {
      ModuleRTPUtility::AssignUWord32ToBuffer(ptr,
                                              rtpHeader->header.arrOfCSRCs[i]);
      ptr +=4;
    }
    dataBuffer[0] = (dataBuffer[0]&0xf0) | rtpHeader->header.numCSRCs;
    // Update length of header
    rtpHeaderLength += sizeof(WebRtc_UWord32)*rtpHeader->header.numCSRCs;
  }
  return rtpHeaderLength;
}

WebRtc_Word32 RTPReceiverVideo::ReceiveRecoveredPacketCallback(
    WebRtcRTPHeader* rtpHeader,
    const WebRtc_UWord8* payloadData,
    const WebRtc_UWord16 payloadDataLength) {
  // TODO(pwestin) Re-factor this to avoid the messy critsect handling.
  _criticalSectionReceiverVideo->Enter();

  _currentFecFrameDecoded = true;

  ModuleRTPUtility::Payload* payload = NULL;
  if (PayloadTypeToPayload(rtpHeader->header.payloadType, payload) != 0) {
    _criticalSectionReceiverVideo->Leave();
    return -1;
  }
  // here we can re-create the original lost packet so that we can use it for
  // the relay we need to re-create the RED header too
  WebRtc_UWord8 recoveredPacket[IP_PACKET_SIZE];
  WebRtc_UWord16 rtpHeaderLength = (WebRtc_UWord16)BuildRTPheader(
      rtpHeader, recoveredPacket);

  const WebRtc_UWord8 REDForFECHeaderLength = 1;

  // replace pltype
  recoveredPacket[1] &= 0x80;             // reset
  recoveredPacket[1] += REDPayloadType(); // replace with RED payload type

  // add RED header
  recoveredPacket[rtpHeaderLength] = rtpHeader->header.payloadType;
  // f-bit always 0

  memcpy(recoveredPacket + rtpHeaderLength + REDForFECHeaderLength, payloadData,
         payloadDataLength);

  return ParseVideoCodecSpecificSwitch(
      rtpHeader,
      payloadData,
      payloadDataLength,
      payload->typeSpecific.Video.videoCodecType);
}

WebRtc_Word32 RTPReceiverVideo::SetCodecType(const RtpVideoCodecTypes videoType,
                                             WebRtcRTPHeader* rtpHeader) const {
  switch (videoType) {
    case kRtpNoVideo:
      rtpHeader->type.Video.codec = kRTPVideoGeneric;
      break;
    case kRtpVp8Video:
      rtpHeader->type.Video.codec = kRTPVideoVP8;
      break;
    case kRtpFecVideo:
      rtpHeader->type.Video.codec = kRTPVideoFEC;
      break;
  }
  return 0;
}

WebRtc_Word32 RTPReceiverVideo::ParseVideoCodecSpecificSwitch(
    WebRtcRTPHeader* rtpHeader,
    const WebRtc_UWord8* payloadData,
    const WebRtc_UWord16 payloadDataLength,
    const RtpVideoCodecTypes videoType) {
  WebRtc_Word32 retVal = SetCodecType(videoType, rtpHeader);
  if (retVal != 0) {
    _criticalSectionReceiverVideo->Leave();
    return retVal;
  }
  WEBRTC_TRACE(kTraceStream, kTraceRtpRtcp, _id, "%s(timestamp:%u)",
               __FUNCTION__, rtpHeader->header.timestamp);

  // All receive functions release _criticalSectionReceiverVideo before
  // returning.
  switch (videoType) {
    case kRtpNoVideo:
      return ReceiveGenericCodec(rtpHeader, payloadData, payloadDataLength);
    case kRtpVp8Video:
      return ReceiveVp8Codec(rtpHeader, payloadData, payloadDataLength);
    case kRtpFecVideo:
      break;
  }
  _criticalSectionReceiverVideo->Leave();
  return -1;
}

WebRtc_Word32 RTPReceiverVideo::ReceiveVp8Codec(
    WebRtcRTPHeader* rtpHeader,
    const WebRtc_UWord8* payloadData,
    const WebRtc_UWord16 payloadDataLength) {
  bool success;
  ModuleRTPUtility::RTPPayload parsedPacket;
  if (payloadDataLength == 0) {
    success = true;
    parsedPacket.info.VP8.dataLength = 0;
  } else {
    ModuleRTPUtility::RTPPayloadParser rtpPayloadParser(kRtpVp8Video,
                                                        payloadData,
                                                        payloadDataLength,
                                                        _id);

    success = rtpPayloadParser.Parse(parsedPacket);
  }
  // from here down we only work on local data
  _criticalSectionReceiverVideo->Leave();

  if (!success) {
    return -1;
  }
  if (parsedPacket.info.VP8.dataLength == 0) {
    // we have an "empty" VP8 packet, it's ok, could be one way video
    // Inform the jitter buffer about this packet.
    rtpHeader->frameType = kFrameEmpty;
    if (CallbackOfReceivedPayloadData(NULL, 0, rtpHeader) != 0) {
      return -1;
    }
    return 0;
  }
  rtpHeader->frameType = (parsedPacket.frameType == ModuleRTPUtility::kIFrame) ?
      kVideoFrameKey : kVideoFrameDelta;

  RTPVideoHeaderVP8 *toHeader = &rtpHeader->type.Video.codecHeader.VP8;
  ModuleRTPUtility::RTPPayloadVP8 *fromHeader = &parsedPacket.info.VP8;

  rtpHeader->type.Video.isFirstPacket = fromHeader->beginningOfPartition
      && (fromHeader->partitionID == 0);
  toHeader->pictureId = fromHeader->hasPictureID ? fromHeader->pictureID :
      kNoPictureId;
  toHeader->tl0PicIdx = fromHeader->hasTl0PicIdx ? fromHeader->tl0PicIdx :
      kNoTl0PicIdx;
  if (fromHeader->hasTID) {
    toHeader->temporalIdx = fromHeader->tID;
    toHeader->layerSync = fromHeader->layerSync;
  } else {
    toHeader->temporalIdx = kNoTemporalIdx;
    toHeader->layerSync = false;
  }
  toHeader->keyIdx = fromHeader->hasKeyIdx ? fromHeader->keyIdx : kNoKeyIdx;

  toHeader->frameWidth = fromHeader->frameWidth;
  toHeader->frameHeight = fromHeader->frameHeight;

  toHeader->partitionId = fromHeader->partitionID;
  toHeader->beginningOfPartition = fromHeader->beginningOfPartition;

  if(CallbackOfReceivedPayloadData(parsedPacket.info.VP8.data,
                                   parsedPacket.info.VP8.dataLength,
                                   rtpHeader) != 0) {
    return -1;
  }
  return 0;
}

WebRtc_Word32 RTPReceiverVideo::ReceiveGenericCodec(
    WebRtcRTPHeader* rtpHeader,
    const WebRtc_UWord8* payloadData,
    const WebRtc_UWord16 payloadDataLength) {
  rtpHeader->frameType = kVideoFrameKey;

  if(((SequenceNumber() + 1) == rtpHeader->header.sequenceNumber) &&
      (TimeStamp() != rtpHeader->header.timestamp)) {
    rtpHeader->type.Video.isFirstPacket = true;
  }
  _criticalSectionReceiverVideo->Leave();

  if(CallbackOfReceivedPayloadData(payloadData, payloadDataLength,
                                   rtpHeader) != 0) {
    return -1;
  }
  return 0;
}
} // namespace webrtc


text:
package org.apache.webbeans.test.portable.events;

import java.util.ArrayList;
import java.util.Collection;

import org.apache.webbeans.exception.WebBeansConfigurationException;
import org.apache.webbeans.test.AbstractUnitTest;
import org.apache.webbeans.test.portable.events.beans.Apple;
import org.apache.webbeans.test.portable.events.extensions.errors.AfterBeanDiscoveryErrorExtension;
import org.apache.webbeans.test.portable.events.extensions.errors.AfterBeansValidationErrorExtension;
import org.junit.Test;

public class ExtensionErrorsTest extends AbstractUnitTest
{

    @Test(expected=WebBeansConfigurationException.class)
    public void testAfterBeanDiscoveryError()
    {
        Collection<String> beanXmls = new ArrayList<String>();

        Collection<Class<?>> beanClasses = new ArrayList<Class<?>>();
        beanClasses.add(Apple.class);

        try
        {
            addExtension(new AfterBeanDiscoveryErrorExtension());
            startContainer(beanClasses, beanXmls);
        }
        finally
        {
            shutDownContainer();
        }

    }

    @Test(expected=WebBeansConfigurationException.class)
    public void testAfterBeanDeploymentValidationError()
    {
        Collection<String> beanXmls = new ArrayList<String>();

        Collection<Class<?>> beanClasses = new ArrayList<Class<?>>();
        beanClasses.add(Apple.class);

        try
        {
            addExtension(new AfterBeansValidationErrorExtension());
            startContainer(beanClasses, beanXmls);
        }
        finally
        {
            shutDownContainer();
        }

    }

}


text:
package models.services

import scala.concurrent.Future

import models.Ladder

trait LadderService {

  /**
   * Saves a ladder.
   *
   * @param user The ladder to save.
   * @return The saved ladder.
   */
  def save(ladder: Ladder): Future[Ladder]

  /**
   * Updates the active status of a ladder.
   *
   * @param user The id of the ladder to update, and the new active status.
   * @return The updated ladder.
   */
  def updateActiveStatus(id: Long, active: Boolean): Future[Unit]

  /**
   * Retrieves a ladder that matches the specified id.
   *
   * @param id The id to retrieve a ladder.
   * @return The retrieved ladder or None if no ladder could be retrieved for the given id.
   */
  def retrieve(id: Long): Future[Option[Ladder]]

  /**
   * Retrieves all ladders.
   *
   * @return The retrieved ladders.
   */
  def retrieveAll: Future[List[Ladder]]

  /**
   * Retrieves all ladders that matche the specified domain.
   *
   * @param domain The domain to retrieve ladders.
   * @return The retrieved ladders for the given domain.
   */
  def retrieveByDomain(domain: String, onlyActive: Boolean = true): Future[List[Ladder]]

}


text:
import java.awt.Graphics;
import java.awt.geom.AffineTransform;
import java.awt.image.AffineTransformOp;
import java.awt.image.BufferedImage;

public class Asteroid {

	private double x;
    private double y;
    private final double xVelocity;
    private final double yVelocity;
    private final double radius;
    private double rotate=0.4;
    private double rotationValue;
	private final int hitsLeft;
    private final int numSplit;
    final int goldDrop;

	//Used for gfx:
	private BufferedImage asteroid = null;

    public Asteroid(double x,double y,double radius,double minVelocity,
					double maxVelocity,int hitsLeft,int numSplit, int gold, BufferedImage sprite){
		asteroid = sprite;

		this.x=x;
		this.y=y;
		this.radius=radius;
		this.hitsLeft=hitsLeft;				//number of shots left to destroy it
		this.numSplit=numSplit; 			//number of smaller asteroids it breaks up into when shot
		this.goldDrop=gold;

        //Randomizes the rotation speed
		rotationValue = Math.random() * ( 2 - 1 );
		if (rotationValue < 0.5)
			rotationValue = 0.00015;
		else
			rotationValue = -0.00015;

		//Calculates a random direction and,
		//a random velocity between minVelocity and maxVelocity:
		double vel=minVelocity + Math.random()*(maxVelocity-minVelocity);
		double dir=2*Math.PI*Math.random();
		xVelocity=vel*Math.cos(dir);
		yVelocity=vel*Math.sin(dir);
	}

	public void move(int scrnWidth, int scrnHeight){
		x+=xVelocity;
		y+=yVelocity;
		rotate+= rotationValue;

		//Wrapping, edited to prevent asteroid wrapping too early:
		if(x<0-radius)
			x+=scrnWidth+2*radius;
		else if(x>scrnWidth+radius)
			x-=scrnWidth+2*radius;
		if(y<0-radius)
			y+=scrnHeight+2*radius;
		else if(y>scrnHeight+radius)
			y-=scrnHeight+2*radius;
	}

	public void draw(Graphics g){
		//Sets the proper image, setting size according to scale:

		int w = asteroid.getWidth();
		int h = asteroid.getHeight();
        BufferedImage after = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
		AffineTransform at = new AffineTransform();

		at.translate(0.5*h, 0.5*w);
		at.rotate(Math.PI/rotate);
		at.scale((radius/w)*2, (radius/h)*2);
		at.translate(-0.5*w, -0.5*h);
		AffineTransformOp op = new AffineTransformOp(at, AffineTransformOp.TYPE_BILINEAR);
		after = op.filter(asteroid, after);

		//Draws the image:
		g.drawImage(after, (int)(x-0.5*w), (int)(y-0.5*h), null);
	}

	public boolean shipCollision(Ship ship){
		// Use the distance formula to check if the ship is touching this
		// asteroid: Distance^2 = (x1-x2)^2 + (y1-y2)^2 ("^" denotes
		// exponents). If the sum of the radii is greater than the
		// distance between the center of the ship and asteroid, they are
		// touching.
		// If (shipRadius + asteroidRadius)^2 > (x1-x2)^2 + (y1-y2)^2,
		// then they have collided.
		// It does not check for collisions if the ship is not active
		// (the player is waiting to start a new life or the game is paused).
        return Math.pow(radius + ship.getRadius(), 2) > Math.pow(ship.getX() - x, 2) +
                Math.pow(ship.getY() - y, 2) && ship.isActive();
    }

	public boolean shotCollision(Shot shot){
		// Same idea as shipCollision, but using shotRadius = 0
        return Math.pow(radius, 2) > Math.pow(shot.getX() - x, 2) +
                Math.pow(shot.getY() - y, 2);
    }

	public Asteroid createSplitAsteroid(double minVelocity,
										double maxVelocity){
		//when this asteroid gets hit by a shot, this method is called
		//numSplit times by AsteroidsGame to create numSplit smaller
		//asteroids. Dividing the radius by sqrt(numSplit) makes the
		//sum of the areas taken up by the smaller asteroids equal to
		//the area of this asteroid. Each smaller asteroid has one
		//less hit left before being completely destroyed.
		return new Asteroid(x,y,radius/Math.sqrt(numSplit),
							minVelocity,maxVelocity,hitsLeft-1,numSplit, goldDrop+1, asteroid);
	}

	//Getters:
	public int getHitsLeft(){
		return hitsLeft;
	}

	public int getNumSplit(){
		return numSplit;
	}

	public double getX(){
		return x;
	}

	public double getY(){
		return y;
	}
}


text:
import sys

from typing import Any, AnyStr, TypeVar, Union

if sys.version_info < (3, 8):
    from asyncio import BaseTransport

    # from sanic.models.asgi import MockTransport
    MockTransport = TypeVar("MockTransport")

    TransportProtocol = Union[MockTransport, BaseTransport]
    Range = Any
    HTMLProtocol = Any
else:
    # Protocol is a 3.8+ feature
    from typing import Protocol

    class TransportProtocol(Protocol):
        def get_protocol(self):
            ...

        def get_extra_info(self, info: str) -> Union[str, bool, None]:
            ...

    class HTMLProtocol(Protocol):
        def __html__(self) -> AnyStr:
            ...

        def _repr_html_(self) -> AnyStr:
            ...

    class Range(Protocol):
        def start(self) -> int:
            ...

        def end(self) -> int:
            ...

        def size(self) -> int:
            ...

        def total(self) -> int:
            ...


text:
package com.adyen.service.resource.fund;

import com.adyen.Client;
import com.adyen.Service;
import com.adyen.service.Resource;

public class SetupBeneficiary extends Resource {

    public SetupBeneficiary(Service service) {
        super(service, service.getClient().getConfig().getMarketPayEndpoint() + "/Fund/" + Client.MARKETPAY_FUND_API_VERSION + "/setupBeneficiary", null);
    }

}


text:
package tictactoe

import org.scalatest.FunSuite

class Play extends FunSuite {

  test("start creates a new board") {
    val board: EmptyBoard = Board.start
    assert(board.whoseTurn == Some(Player.X))
    assert(board.isPositionTaken(8) == false)
  }

  test("an EmptyBoard allows a move and leads to an intermedia board") {
    val board: EmptyBoard = Board.start
    val newBoard: IntermediateBoard = board.move(8)
    assert(newBoard.isPositionTaken(8))
    assert(newBoard.isPositionTaken(7) == false)
    assert(newBoard.whoseTurn == Some(Player.O))
  }

  test("an IntermediateBoard doesn't change if a move to a taken position is done") {
    val board: IntermediateBoard = Board.start.move(8)
    assert(board == board.move(8))
  }

}


text:
.PHONY: test
test:
	node scripts/run-tests.js

test-debug:
	node --debug-brk scripts/run-tests.js

.PHONY: setup
setup:
	git submodule init
	git submodule sync
	git submodule update
	# if [ ! -f node_modules/fun ]; then ln -snf .. node_modules/fun; fi
	cd node_modules/dom; npm install .
	cd node_modules/require; npm install .
	npm install .


text:
<?php
declare(strict_types=1);

use Upgate\LaravelJsonRpc\Exception\BadRequestException;
use Upgate\LaravelJsonRpc\Server\Request;
use Upgate\LaravelJsonRpc\Server\Batch;
use Upgate\LaravelJsonRpc\Server\RequestFactory;

class RequestFactoryTest extends \PHPUnit\Framework\TestCase
{

    public function testCreateRequestWithoutParameters()
    {
        $requestData = (object)[
            'jsonrpc' => '2.0',
            'method'  => 'foo'
        ];
        $requestFactory = new RequestFactory();
        $request = $requestFactory->createRequest($requestData);
        $this->assertEquals('foo', $request->getMethod());
        $this->assertEmpty($request->getParams()->getParams());
    }

    public function testCreateRequestWithoutId()
    {
        $requestData = (object)[
            'jsonrpc' => '2.0',
            'method'  => 'foo'
        ];
        $requestFactory = new RequestFactory();
        $request = $requestFactory->createRequest($requestData);
        $this->assertNull($request->getId());
    }

    public function testCreateRequestWithNumericId()
    {
        $requestData = (object)[
            'jsonrpc' => '2.0',
            'method'  => 'foo',
            'id'      => 1
        ];
        $requestFactory = new RequestFactory();
        $request = $requestFactory->createRequest($requestData);
        $this->assertSame(1, $request->getId());
    }

    public function testCreateRequestWithStringId()
    {
        $requestData = (object)[
            'jsonrpc' => '2.0',
            'method'  => 'foo',
            'id'      => '1_1'
        ];
        $requestFactory = new RequestFactory();
        $request = $requestFactory->createRequest($requestData);
        $this->assertSame('1_1', $request->getId());
    }

    public function testCreateRequestWithPositionalParameters()
    {
        $requestData = (object)[
            'jsonrpc' => '2.0',
            'method'  => 'foo',
            'params'  => [1, "bar"]
        ];
        $requestFactory = new RequestFactory();
        $request = $requestFactory->createRequest($requestData);
        $this->assertEquals('foo', $request->getMethod());
        $this->assertEquals([1, "bar"], $request->getParams()->getParams());
        $this->assertFalse($request->getParams()->areParamsNamed());
    }

    public function testCreateRequestWithNamedParameters()
    {
        $requestData = (object)[
            'jsonrpc' => '2.0',
            'method'  => 'foo',
            'params'  => (object)['a' => 1, 'b' => "bar"]
        ];
        $requestFactory = new RequestFactory();
        $request = $requestFactory->createRequest($requestData);
        $this->assertEquals('foo', $request->getMethod());
        $this->assertEquals(['a' => 1, 'b' => "bar"], $request->getParams()->getParams());
        $this->assertTrue($request->getParams()->areParamsNamed());
    }

    public function testCreateRequestFailsWithBadVersion()
    {
        $requestData = (object)[
            'jsonrpc' => '1.0',
            'method'  => 'foo'
        ];
        $requestFactory = new RequestFactory();
        $this->expectException(BadRequestException::class);
        $requestFactory->createRequest($requestData);
    }

    public function testCreateRequestFailsWithoutJsonRpcField()
    {
        $requestData = (object)[
            'method' => 'foo'
        ];
        $requestFactory = new RequestFactory();
        $this->expectException(BadRequestException::class);
        $requestFactory->createRequest($requestData);
    }

    public function testCreateRequestWithoutMethod()
    {
        $requestData = (object)[
            'jsonrpc' => '2.0'
        ];
        $requestFactory = new RequestFactory();
        $this->expectException(BadRequestException::class);
        $requestFactory->createRequest($requestData);
    }

    public function testCreateRequestFromPayload()
    {
        $requestData = (object)[
            'jsonrpc' => '2.0',
            'method'  => 'foo',
            'params'  => [1, "bar"],
            'id'      => 'foo',
        ];
        $requestFactory = new RequestFactory();
        /** @var Request $request */
        $request = $requestFactory->createFromPayload(json_encode($requestData));
        $this->assertInstanceOf(Request::class, $request);
        $this->assertEquals('foo', $request->getMethod());
        $this->assertEquals([1, "bar"], $request->getParams()->getParams());
        $this->assertFalse($request->getParams()->areParamsNamed());
        $this->assertEquals('foo', $request->getId());
    }

    public function testCreateBatchFromPayload()
    {
        $requestData = [
            (object)[
                'jsonrpc' => '2.0',
                'method'  => 'foo',
                'id'      => 'foo',
            ],
            (object)[
                'jsonrpc' => '2.0',
                'method'  => 'bar',
                'id'      => 'bar',
            ],
        ];
        $requestFactory = new RequestFactory();
        /** @var Batch $batch */
        $batch = $requestFactory->createFromPayload(json_encode($requestData));
        $this->assertInstanceOf(Batch::class, $batch);
        $this->assertCount(2, $batch->toArray());

        for ($i = 0; $i < 2; ++$i) {
            $request = $requestFactory->createRequest($batch->toArray()[$i]);
            $this->assertEquals($requestData[$i]->method, $request->getMethod());
            $this->assertEquals($requestData[$i]->id, $request->getId());
        }
    }
}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Syn. meth. fung. (Göttingen) 2: 587 (1801)

#### Original name
Clavaria sanguinea Pers., 1800

### Remarks
null


text:
from __future__ import (
    division, absolute_import, print_function, unicode_literals,
)
from builtins import *                  # noqa
from future.builtins.disabled import *  # noqa

class MagicError(Exception):

    def __init__(self, message='[Empty Message]', **kwargs):
        super().__init__(conditional_to_bytes(message))

        self._message = message
        self._kwargs = kwargs

    def __str__(self):
        title = '{exception_name}: {message}'.format(
            exception_name=type(self).__name__,
            message=self._message,
        )
        sep_line = '-' * len(title)

        kv_line_template = '{0}: {1}'
        kv_lines = '\n'.join(map(
            lambda p: kv_line_template.format(p[0], p[1]),
            sorted(self._kwargs.items(), key=lambda p: p[0]),
        ))

        return conditional_to_bytes(
            # prefix \n for traceback display.
            '\n{title}\n{sep_line}\n{kv_lines}\n{sep_line}'.format(
                title=title,
                kv_lines=kv_lines or '[Empty kwargs]',
                sep_line=sep_line,
            ),
        )

    def serialize(self):
        ret = dict(self._kwargs)
        ret['message'] = self._message
        return ret

class MagicSyntaxError(MagicError, SyntaxError):
    pass

class MagicTypeError(MagicError, TypeError):
    pass

class MagicIndexError(MagicError, IndexError):
    pass

from magic_constraints.utils import conditional_to_bytes  # noqa


text:
New Booking

Fill out the information below to submit a booking.

    <?php $this->renderFeedbackMessages(); ?>

    <form action="<?php echo Config::get('URL'); ?>booking/createBooking" method="post">
      Machine Type
      <select name="machine_type" required>
        <option value="Washing Machine">Washing Machine</option>
        <option value="Dishwasher">Dishwasher</option>
        <option value="Oven">Oven</option>
        <option value="Hob">Hob</option>
        <option value="Washer Dryer">Washer Dryer</option>
        <option value="Tumble Dryer">Tumble Dryer</option>
        <option value="Glass Washer">Glass Washer</option>
        <option value="Fridge">Fridge</option>
        <option value="Freezer">Freezer</option>
        <option value="Fridge Freezer">Fridge Freezer</option>
      </select>

      Machine Model Number
      <input type="text" name="machine_model" required />

      Description of Fault
      <input type="textarea" name="description" required />

      Door Number
      <input type="number" name="door_number" required />

      Postcode
      <input type="text" name="postcode" required />

      <input type="submit" value="Submit Booking" />
    </form>


text:
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">

  <title>qgis._core.QgsPaperGrid</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />

         Home

         Trees

         Indices

         Help

        qgis ::
        _core ::
        QgsPaperGrid ::
        Class QgsPaperGrid

[hide private]

[frames] | no frames]

Class QgsPaperGrid

                object --+
                         |
         sip.simplewrapper --+
                             |
                   sip.wrapper --+
                                 |
         PyQt4.QtGui.QGraphicsItem --+
                                     |
PyQt4.QtGui.QAbstractGraphicsShapeItem --+
                                         |
             PyQt4.QtGui.QGraphicsRectItem --+
                                             |
                                            QgsPaperGrid

QgsPaperGrid(float, float, float, float, QgsComposition)

        Nested Classes
        [hide private]

Inherited from PyQt4.QtGui.QGraphicsItem:
      CacheMode,
      GraphicsItemChange,
      GraphicsItemFlag,
      GraphicsItemFlags,
      PanelModality

        Instance Methods
        [hide private]

          contextMenuEvent(...)

          dragEnterEvent(...)

          dragLeaveEvent(...)

          dragMoveEvent(...)

          dropEvent(...)

          focusInEvent(...)

          focusOutEvent(...)

          hoverEnterEvent(...)

          hoverLeaveEvent(...)

          hoverMoveEvent(...)

          inputMethodEvent(...)

          inputMethodQuery(...)

          itemChange(...)

          keyPressEvent(...)

          keyReleaseEvent(...)

          mouseDoubleClickEvent(...)

          mouseMoveEvent(...)

          mousePressEvent(...)

          mouseReleaseEvent(...)

          paint(...)

          prepareGeometryChange(...)

          sceneEvent(...)

          sceneEventFilter(...)

          updateMicroFocus(...)

          wheelEvent(...)

Inherited from PyQt4.QtGui.QGraphicsRectItem:
      boundingRect,
      contains,
      isObscuredBy,
      opaqueArea,
      rect,
      setRect,
      shape,
      type

Inherited from PyQt4.QtGui.QAbstractGraphicsShapeItem:
      brush,
      pen,
      setBrush,
      setPen

Inherited from PyQt4.QtGui.QGraphicsItem:
      acceptDrops,
      acceptHoverEvents,
      acceptTouchEvents,
      acceptedMouseButtons,
      acceptsHoverEvents,
      advance,
      boundingRegion,
      boundingRegionGranularity,
      cacheMode,
      childItems,
      childrenBoundingRect,
      clearFocus,
      clipPath,
      collidesWithItem,
      collidesWithPath,
      collidingItems,
      commonAncestorItem,
      cursor,
      data,
      deviceTransform,
      effectiveOpacity,
      ensureVisible,
      filtersChildEvents,
      flags,
      focusItem,
      focusProxy,
      grabKeyboard,
      grabMouse,
      graphicsEffect,
      group,
      handlesChildEvents,
      hasCursor,
      hasFocus,
      hide,
      inputMethodHints,
      installSceneEventFilter,
      isActive,
      isAncestorOf,
      isBlockedByModalPanel,
      isClipped,
      isEnabled,
      isObscured,
      isPanel,
      isSelected,
      isUnderMouse,
      isVisible,
      isVisibleTo,
      isWidget,
      isWindow,
      itemTransform,
      mapFromItem,
      mapFromParent,
      mapFromScene,
      mapRectFromItem,
      mapRectFromParent,
      mapRectFromScene,
      mapRectToItem,
      mapRectToParent,
      mapRectToScene,
      mapToItem,
      mapToParent,
      mapToScene,
      matrix,
      moveBy,
      opacity,
      panel,
      panelModality,
      parentItem,
      parentObject,
      parentWidget,
      pos,
      removeSceneEventFilter,
      resetMatrix,
      resetTransform,
      rotate,
      rotation,
      scale,
      scene,
      sceneBoundingRect,
      sceneMatrix,
      scenePos,
      sceneTransform,
      scroll,
      setAcceptDrops,
      setAcceptHoverEvents,
      setAcceptTouchEvents,
      setAcceptedMouseButtons,
      setAcceptsHoverEvents,
      setActive,
      setBoundingRegionGranularity,
      setCacheMode,
      setCursor,
      setData,
      setEnabled,
      setFiltersChildEvents,
      setFlag,
      setFlags,
      setFocus,
      setFocusProxy,
      setGraphicsEffect,
      setGroup,
      setHandlesChildEvents,
      setInputMethodHints,
      setMatrix,
      setOpacity,
      setPanelModality,
      setParentItem,
      setPos,
      setRotation,
      setScale,
      setSelected,
      setToolTip,
      setTransform,
      setTransformOriginPoint,
      setTransformations,
      setVisible,
      setX,
      setY,
      setZValue,
      shear,
      show,
      stackBefore,
      toGraphicsObject,
      toolTip,
      topLevelItem,
      topLevelWidget,
      transform,
      transformOriginPoint,
      transformations,
      translate,
      ungrabKeyboard,
      ungrabMouse,
      unsetCursor,
      update,
      window,
      x,
      y,
      zValue

Inherited from sip.simplewrapper:
      __init__,
      __new__

Inherited from object:
      __delattr__,
      __format__,
      __getattribute__,
      __hash__,
      __reduce__,
      __reduce_ex__,
      __repr__,
      __setattr__,
      __sizeof__,
      __str__,
      __subclasshook__

        Class Variables
        [hide private]

Inherited from PyQt4.QtGui.QGraphicsItem:
      DeviceCoordinateCache,
      ItemAcceptsInputMethod,
      ItemChildAddedChange,
      ItemChildRemovedChange,
      ItemClipsChildrenToShape,
      ItemClipsToShape,
      ItemCoordinateCache,
      ItemCursorChange,
      ItemCursorHasChanged,
      ItemDoesntPropagateOpacityToChildren,
      ItemEnabledChange,
      ItemEnabledHasChanged,
      ItemFlagsChange,
      ItemFlagsHaveChanged,
      ItemHasNoContents,
      ItemIgnoresParentOpacity,
      ItemIgnoresTransformations,
      ItemIsFocusable,
      ItemIsMovable,
      ItemIsPanel,
      ItemIsSelectable,
      ItemMatrixChange,
      ItemNegativeZStacksBehindParent,
      ItemOpacityChange,
      ItemOpacityHasChanged,
      ItemParentChange,
      ItemParentHasChanged,
      ItemPositionChange,
      ItemPositionHasChanged,
      ItemRotationChange,
      ItemRotationHasChanged,
      ItemScaleChange,
      ItemScaleHasChanged,
      ItemSceneChange,
      ItemSceneHasChanged,
      ItemScenePositionHasChanged,
      ItemSelectedChange,
      ItemSelectedHasChanged,
      ItemSendsGeometryChanges,
      ItemSendsScenePositionChanges,
      ItemStacksBehindParent,
      ItemToolTipChange,
      ItemToolTipHasChanged,
      ItemTransformChange,
      ItemTransformHasChanged,
      ItemTransformOriginPointChange,
      ItemTransformOriginPointHasChanged,
      ItemUsesExtendedStyleOption,
      ItemVisibleChange,
      ItemVisibleHasChanged,
      ItemZValueChange,
      ItemZValueHasChanged,
      NoCache,
      NonModal,
      PanelModal,
      SceneModal,
      UserType

        Properties
        [hide private]

Inherited from object:
      __class__

        Method Details
        [hide private]

contextMenuEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.contextMenuEvent

dragEnterEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.dragEnterEvent

dragLeaveEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.dragLeaveEvent

dragMoveEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.dragMoveEvent

dropEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.dropEvent

focusInEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.focusInEvent

focusOutEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.focusOutEvent

hoverEnterEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.hoverEnterEvent

hoverLeaveEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.hoverLeaveEvent

hoverMoveEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.hoverMoveEvent

inputMethodEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.inputMethodEvent

inputMethodQuery(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.inputMethodQuery

itemChange(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.itemChange

keyPressEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.keyPressEvent

keyReleaseEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.keyReleaseEvent

mouseDoubleClickEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.mouseDoubleClickEvent

mouseMoveEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.mouseMoveEvent

mousePressEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.mousePressEvent

mouseReleaseEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.mouseReleaseEvent

paint(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.paint

prepareGeometryChange(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.prepareGeometryChange

sceneEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.sceneEvent

sceneEventFilter(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.sceneEventFilter

updateMicroFocus(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.updateMicroFocus

wheelEvent(...)

Overrides:
        PyQt4.QtGui.QGraphicsItem.wheelEvent

         Home

         Trees

         Indices

         Help

    Generated by Epydoc 3.0.1 on Tue Jun 14 13:29:20 2016

      http://epydoc.sourceforge.net


text:
from a10sdk.common.A10BaseClass import A10BaseClass

class AddressList(A10BaseClass):

    """This class does not support CRUD Operations please use parent.

    :param ipv4_address: {"type": "string", "description": "IP address", "format": "ipv4-address"}
    :param ipv4_netmask: {"type": "string", "description": "IP subnet mask", "format": "ipv4-netmask"}
    :param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py`

    """
    def __init__(self, **kwargs):
        self.ERROR_MSG = ""

        self.b_key = "address-list"
        self.DeviceProxy = ""
        self.ipv4_address = ""
        self.ipv4_netmask = ""

        for keys, value in kwargs.items():
            setattr(self,keys, value)

class Ip(A10BaseClass):

    """Class Description::
    Global IP configuration subcommands.

    Class ip supports CRUD Operations and inherits from `common/A10BaseClass`.
    This class is the `"PARENT"` class for this module.`

    :param address_list: {"minItems": 1, "items": {"type": "object"}, "uniqueItems": true, "type": "array", "array": [{"properties": {"ipv4-address": {"type": "string", "description": "IP address", "format": "ipv4-address"}, "optional": true, "ipv4-netmask": {"type": "string", "description": "IP subnet mask", "format": "ipv4-netmask"}}}]}
    :param uuid: {"description": "uuid of the object", "format": "string", "minLength": 1, "modify-not-allowed": 1, "optional": true, "maxLength": 64, "type": "string"}
    :param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py`

    URL for this object::
    `https://<Hostname|Ip address>//axapi/v3/interface/loopback/{ifnum}/ip`.

    """
    def __init__(self, **kwargs):
        self.ERROR_MSG = ""
        self.required=[]
        self.b_key = "ip"
        self.a10_url="/axapi/v3/interface/loopback/{ifnum}/ip"
        self.DeviceProxy = ""
        self.address_list = []
        self.ospf = {}
        self.uuid = ""
        self.rip = {}
        self.router = {}

        for keys, value in kwargs.items():
            setattr(self,keys, value)


text:
#ifndef RenderSliderThumb_h
#define RenderSliderThumb_h

#include "core/html/shadow/SliderThumbElement.h"
#include "core/rendering/RenderBlockFlow.h"

namespace blink {

class SliderThumbElement;

class RenderSliderThumb FINAL : public RenderBlockFlow {
public:
    RenderSliderThumb(SliderThumbElement*);
    void updateAppearance(RenderStyle* parentStyle);

private:
    virtual bool isSliderThumb() const OVERRIDE;
};

} // namespace blink

#endif // RenderSliderThumb_h


text:
var p = Ent.Project.create("LicenseCop", "jar");
p.setVersion(1, 1, 0);
p.setJavaVersion(6);
p.setIncludeSource(true);


text:
<meta charset="UTF-8">
<title>plus - core</title>
<link rel="stylesheet" href="..\..\..\style.css">

core / com.erikcupal.theblackcatclient.helpers / com.badlogic.gdx.math.Vector2 / plus

plus

operator fun Vector2.plus(v: Vector2): Vector2