text:
Représentation abstraite d'une ambiance solaire floue + bruit blanc.
*Script Processing créé pour un projet d'expression plastique.*

### Consignes
Baisser le son de votre ordinateur et lancer `BlurAmbiant.pde` avec Processing

redpajama_set_name: RedPajamaGithub


text:
<?php
/**
 * NumberFilterer
 *
 * PHP version 5
 *
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted under the terms of the BSD License.
 *
 * @version     $Id: NumberFilterer.php 2012 2012-01-15 23:34:00Z jbsmith $
 */

class NumberFilterer extends AbstractFilterer
{
    protected function getDefaultMethod()
    {
        return 'format';
    }

    /**
     * wrapper for number_format
     *
     * @return int|string
     */
    protected function format()
    {
        $number = $this->getParameter('number');

        if($number instanceof Meta) {
            $number = $number->getValue();
        }

        if(empty($number) || !is_numeric($number)) {
            return 0;
        }
        $decimals = $this->getParameter('decimals');
        $decimal_sep = $this->getParameter('decimal_separator');
        $thousands_sep = $this->getParameter('thousands_separator');

        return number_format((double)$number, $decimals, $decimal_sep, $thousands_sep);
    }

    /**
     * Return a number within a range.
     *
     * @return integer
     */
    protected function bound()
    {
        $number = $this->getParameter('number');
        $min = $this->getParameter('min');
        $max = $this->getParameter('max');

        if ($number instanceof Meta) {
            $number = $number->getValue();
        }

        return NumberUtils::bound($number, $min, $max);
    }
}


text:
#include <sys/types.h>
#if !defined (__Userspace_os_Windows)
#include <sys/wait.h>
#include <unistd.h>
#include <pthread.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <netinet/sctp_pcb.h>
#include <netinet/sctp_sysctl.h>
#include "netinet/sctp_callout.h"

/* This is the polling time of callqueue in milliseconds
 * 10ms seems to work well. 1ms was giving erratic behavior
 */
#define TIMEOUT_INTERVAL 10

extern int ticks;

void *
user_sctp_timer_iterate(void *arg)
{
	sctp_os_timer_t *c;
	void (*c_func)(void *);
	void *c_arg;
	sctp_os_timer_t *sctp_os_timer_next;
	/*
	 * The MSEC_TO_TICKS conversion depends on hz. The to_ticks in
	 * sctp_os_timer_start also depends on hz. E.g. if hz=1000 then
	 * for multiple INIT the to_ticks is 2000, 4000, 8000, 16000, 32000, 60000
	 * and further to_ticks level off at 60000 i.e. 60 seconds.
	 * If hz=100 then for multiple INIT the to_ticks are 200, 400, 800 and so-on.
	 */
	for (;;) {
#if defined (__Userspace_os_Windows)
		Sleep(TIMEOUT_INTERVAL);
#else
		struct timeval timeout;

		timeout.tv_sec  = 0;
		timeout.tv_usec = 1000 * TIMEOUT_INTERVAL;
		select(0, NULL, NULL, NULL, &timeout);
#endif
		if (SCTP_BASE_VAR(timer_thread_should_exit)) {
			break;
		}
		/* update our tick count */
		ticks += MSEC_TO_TICKS(TIMEOUT_INTERVAL);
		SCTP_TIMERQ_LOCK();
		c = TAILQ_FIRST(&SCTP_BASE_INFO(callqueue));
		while (c) {
			if (c->c_time <= ticks) {
				sctp_os_timer_next = TAILQ_NEXT(c, tqe);
				TAILQ_REMOVE(&SCTP_BASE_INFO(callqueue), c, tqe);
				c_func = c->c_func;
				c_arg = c->c_arg;
				c->c_flags &= ~SCTP_CALLOUT_PENDING;
				SCTP_TIMERQ_UNLOCK();
				c_func(c_arg);
				SCTP_TIMERQ_LOCK();
				c = sctp_os_timer_next;
			} else {
				c = TAILQ_NEXT(c, tqe);
			}
		}
		SCTP_TIMERQ_UNLOCK();
	}
#if defined (__Userspace_os_Windows)
	ExitThread(0);
#else
	pthread_exit(NULL);
#endif
	return NULL;
}

void
sctp_start_timer(void)
{
	/*
	 * No need to do SCTP_TIMERQ_LOCK_INIT();
	 * here, it is being done in sctp_pcb_init()
	 */
#if defined (__Userspace_os_Windows)
	if ((SCTP_BASE_VAR(timer_thread) = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)user_sctp_timer_iterate, NULL, 0, NULL)) == NULL) {
		SCTP_PRINTF("ERROR; Creating ithread failed\n");
	}
#else
	int rc;

	rc = pthread_create(&SCTP_BASE_VAR(timer_thread), NULL, user_sctp_timer_iterate, NULL);
	if (rc) {
		SCTP_PRINTF("ERROR; return code from pthread_create() is %d\n", rc);
	}
#endif
}


text:
import { Languages } from 'prismjs';

declare class CodeFlask {
    constructor(selectorOrElement: string | HTMLElement, opts: CodeFlask.options);
    onUpdate(callback: (code: string) => void): void;
    updateCode(newCode: string): void;
    getCode(): string;
    addLanguage(name: string, options: Languages): void;
}

export = CodeFlask;

declare namespace CodeFlask {
    interface options {
        language?: string;
        rtl?: boolean;
        tabSize?: number;
        enableAutocorrect?: boolean;
        lineNumbers?: boolean;
        defaultTheme?: boolean;
        areaId?: string;
        ariaLabelledby?: string;
        readonly?: boolean;
        handleTabs?: boolean;
        handleSelfClosingCharacters?: boolean;
        handleNewLineIndentation?: boolean;
        styleParent?: ShadowRoot;
    }
}


text:
You need to create controllers that inherit from `JsonApiController<TResource>`

```c#
public class ArticlesController : JsonApiController<Article>
{
    public ArticlesController(IJsonApiOptions options, ILoggerFactory loggerFactory,
        IResourceService<Article> resourceService)
        : base(options, loggerFactory, resourceService)
    {
    }
}
```

## Non-Integer Type Keys

If your model is using a type other than `int` for the primary key, you must explicitly declare it in the controller/service/repository definitions.

```c#
public class ArticlesController : JsonApiController<Article, Guid>
//---------------------------------------------------------- ^^^^
{
    public ArticlesController(IJsonApiOptions options, ILoggerFactory loggerFactory,
        IResourceService<Article, Guid> resourceService)
        //----------------------- ^^^^
        : base(options, loggerFactory, resourceService)
    {
    }
}
```

## Resource Access Control

It is often desirable to limit what methods are exposed on your controller. The first way you can do this, is to simply inherit from `BaseJsonApiController` and explicitly declare what methods are available.

In this example, if a client attempts to do anything other than GET a resource, an HTTP 404 Not Found response will be returned since no other methods are exposed.

This approach is ok, but introduces some boilerplate that can easily be avoided.

```c#
public class ArticlesController : BaseJsonApiController<Article>
{
    public ArticlesController(IJsonApiOptions options, ILoggerFactory loggerFactory,
        IResourceService<Article> resourceService)
        : base(options, loggerFactory, resourceService)
    {
    }

    [HttpGet]
    public override async Task<IActionResult> GetAsync(CancellationToken cancellationToken)
    {
        return await base.GetAsync(cancellationToken);
    }

    [HttpGet("{id}")]
    public override async Task<IActionResult> GetAsync(int id,
        CancellationToken cancellationToken)
    {
        return await base.GetAsync(id, cancellationToken);
    }
}
```

## Using ActionFilterAttributes

The next option is to use the ActionFilter attributes that ship with the library. The available attributes are:

- `NoHttpPost`: disallow POST requests
- `NoHttpPatch`: disallow PATCH requests
- `NoHttpDelete`: disallow DELETE requests
- `HttpReadOnly`: all of the above

Not only does this reduce boilerplate, but it also provides a more meaningful HTTP response code.
An attempt to use one of the blacklisted methods will result in a HTTP 405 Method Not Allowed response.

```c#
[HttpReadOnly]
public class ArticlesController : BaseJsonApiController<Article>
{
    public ArticlesController(IJsonApiOptions options, ILoggerFactory loggerFactory,
        IResourceService<Article> resourceService)
        : base(options, loggerFactory, resourceService)
    {
    }
}
```

## Implicit Access By Service Injection

Finally, you can control the allowed methods by supplying only the available service implementations. In some cases, resources may be an aggregation of entities or a view on top of the underlying entities. In these cases, there may not be a writable `IResourceService` implementation, so simply inject the implementation that is available.

As with the ActionFilter attributes, if a service implementation is not available to service a request, HTTP 405 Method Not Allowed will be returned.

For more information about resource service injection, see [Replacing injected services](~/usage/extensibility/layer-overview.md#replacing-injected-services) and [Resource Services](~/usage/extensibility/services.md).

```c#
public class ReportsController : BaseJsonApiController<Report>
{
    public ReportsController(IJsonApiOptions options, ILoggerFactory loggerFactory,
        IGetAllService<Report> getAllService)
        : base(options, loggerFactory, getAllService)
    {
    }

    [HttpGet]
    public override async Task<IActionResult> GetAsync(CancellationToken cancellationToken)
    {
        return await base.GetAsync(cancellationToken);
    }
}
```


text:
/** @module pbjs */
// if pbjs already exists in global dodcument scope, use it, if not, create the object
window.pbjs = (window.pbjs || {});
window.pbjs.que = window.pbjs.que || [];
var pbjs = window.pbjs;
var CONSTANTS = require('./constants.json');
var utils = require('./utils.js');
var bidmanager = require('./bidmanager.js');
var adaptermanager = require('./adaptermanager');
var bidfactory = require('./bidfactory');
var adloader = require('./adloader');
var ga = require('./ga');
var events = require('./events');

/* private variables */

var objectType_function = 'function';
var objectType_undefined = 'undefined';
var objectType_object = 'object';
var objectType_string = 'string';
var objectType_number = 'number';
var BID_WON = CONSTANTS.EVENTS.BID_WON;
var BID_TIMEOUT = CONSTANTS.EVENTS.BID_TIMEOUT;

var pb_preBidders = [],
	pb_placements = [],
	pb_bidderMap = {},
	pb_targetingMap = {},
	pb_keyHistoryMap = {},
	pb_bidsTimedOut = false;

/* Public vars */
//default timeout for all bids
pbjs.bidderTimeout = pbjs.bidderTimeout || 3000;
pbjs.logging = pbjs.logging || false;

//let the world know we are loaded
pbjs.libLoaded = true;

//create adUnit array
pbjs.adUnits = pbjs.adUnits || [];

/**
 * Command queue that functions will execute once prebid.js is loaded
 * @param  {function} cmd Annoymous function to execute
 * @alias module:pbjs.que.push
 */
pbjs.que.push = function(cmd) {
	if (typeof cmd === objectType_function) {
		try {
			cmd.call();
		} catch (e) {
			utils.logError('Error processing command :' + e.message);
		}
	} else {
		utils.logError('Commands written into pbjs.que.push must wrapped in a function');
	}
};

function processQue() {
	for (var i = 0; i < pbjs.que.length; i++) {
		if (typeof pbjs.que[i].called === objectType_undefined) {
			try{
				pbjs.que[i].call();
				pbjs.que[i].called = true;
			}
			catch(e){
				utils.logError('Error processing command :', 'prebid.js', e);
			}

		}
	}
}

/*
 *   Main method entry point method
 */
function init(timeout, adUnitCodeArr) {
	var cbTimeout = 0;
	if(typeof timeout === objectType_undefined || timeout === null){
		cbTimeout = pbjs.bidderTimeout;
	}
	else{
		cbTimeout = timeout;
	}

	if (!isValidAdUnitSetting()) {
		utils.logMessage('No adUnits configured. No bids requested.');
		return;
	}
	//set timeout for all bids
	setTimeout(bidmanager.executeCallback, cbTimeout);
	//parse settings into internal vars
	if (adUnitCodeArr && utils.isArray(adUnitCodeArr)) {
		for (var k = 0; k < adUnitCodeArr.length; k++) {
			for (var i = 0; i < pbjs.adUnits.length; i++) {
				if (pbjs.adUnits[i].code === adUnitCodeArr[k]) {
					pb_placements.push(pbjs.adUnits[i]);
				}
			}
		}
		loadPreBidders();
		sortAndCallBids();
	} else {
		pb_placements = pbjs.adUnits;
		//Aggregrate prebidders by their codes
		loadPreBidders();
		//sort and call // default no sort
		sortAndCallBids();
	}
}

function isValidAdUnitSetting() {
	if (pbjs.adUnits && pbjs.adUnits.length !== 0) {
		return true;
	}
	return false;
}

function timeOutBidders(){
	if(!pb_bidsTimedOut){
		pb_bidsTimedOut = true;
		var timedOutBidders = bidmanager.getTimedOutBidders();
		events.emit(BID_TIMEOUT, timedOutBidders);
	}
}

function sortAndCallBids(sortFunc) {
	//Translate the bidder map into array so we can sort later if wanted
	var pbArr = Object.keys(pb_bidderMap).map(function(key) {
		return pb_bidderMap[key];
	});
	if (typeof sortFunc === objectType_function) {
		pbArr.sort(sortFunc);
	}
	adaptermanager.callBids(pbArr);
}

function loadPreBidders() {

	for (var i = 0; i < pb_placements.length; i++) {
		var bids = pb_placements[i][CONSTANTS.JSON_MAPPING.PL_BIDS];
		var placementCode = pb_placements[i][CONSTANTS.JSON_MAPPING.PL_CODE];
		storeBidRequestByBidder(pb_placements[i][CONSTANTS.JSON_MAPPING.PL_CODE], pb_placements[i][CONSTANTS.JSON_MAPPING.PL_SIZE], bids);
		//store pending response by placement
		bidmanager.addBidResponse(placementCode);
	}

	for (i = 0; i < pb_preBidders.length; i++) {
		pb_preBidders[i].loadPreBid();
	}
	//send a reference to bidmanager
	bidmanager.setBidderMap(pb_bidderMap);
}

function storeBidRequestByBidder(placementCode, sizes, bids) {
	for (var i = 0; i < bids.length; i++) {

		var currentBid = bids[i];
		currentBid.placementCode = placementCode;
		currentBid.sizes = sizes;

		//look up bidder on map
		var bidderName = bids[i][CONSTANTS.JSON_MAPPING.BD_BIDDER];
		var bidderObj = pb_bidderMap[bidderName];
		if (typeof bidderObj === objectType_undefined) {
			//bid not found
			var partnerBids = {
				bidderCode: bidderName,
				bids: []
			};
			partnerBids.bids.push(currentBid);
			//put bidder on map with bids
			pb_bidderMap[bidderName] = partnerBids;
		} else {
			bidderObj.bids.push(currentBid);
		}

	}
}

//use in place of hasOwnPropery - as opposed to a polyfill
function hasOwn(o, p) {
	if (o.hasOwnProperty) {
		return o.hasOwnProperty(p);
	} else {
		return (typeof o[p] !== objectType_undefined) && (o.constructor.prototype[p] !== o[p]);
	}
}

function isEmptyObject(obj) {
	var name;
	for (name in obj) {
		return false;
	}
	return true;
}

function getWinningBid(bidArray) {
	var winningBid = {};
	if (bidArray && bidArray.length !== 0) {
		bidArray.sort(function(a, b) {
			//put the highest CPM first
			return b.cpm - a.cpm;
		});
		//the first item has the highest cpm
		winningBid = bidArray[0];
		//TODO : if winning bid CPM === 0 - we need to indicate no targeting should be set
	}
	return winningBid.bid;

}

function setGPTAsyncTargeting(code, slot) {
	//get the targeting that is already configured
	var keyStrings = getTargetingfromGPTIdentifier(slot);
	//copy keyStrings into pb_keyHistoryMap by code
	if(!pb_keyHistoryMap[code]){
		pb_keyHistoryMap[code] = keyStrings;
	}
	else{
		utils.extend(pb_keyHistoryMap[code], keyStrings);
	}
	utils._each(pb_keyHistoryMap[code], function(value, key){
		//since DFP doesn't support deleting a single key, we will set all to empty string
		//This is "clear" for that key
		slot.setTargeting(key, '');
		//utils.logMessage('Attempting to clear the key : ' + key + ' to empty string for code: ' + code);
	});
	for (var key in keyStrings) {
		if (keyStrings.hasOwnProperty(key)) {
			try {
				utils.logMessage('Attempting to set key value for slot: ' + slot.getSlotElementId() + ' key: ' + key + ' value: ' + encodeURIComponent(keyStrings[key]));
				slot.setTargeting(key, keyStrings[key]);
			} catch (e) {
				utils.logMessage('Problem setting key value pairs in slot: ' + e.message);
			}
		}
	}
}
/*
 *   This function returns the object map of placements or
 *   if placement code is specified return just 1 placement bids
 */
function getBidResponsesByAdUnit(adunitCode) {
	var returnObj = {};
	if (adunitCode) {
		returnObj = bidmanager.pbBidResponseByPlacement[adunitCode];
		return returnObj;
	}
	else {
		return bidmanager.pbBidResponseByPlacement;
	}
}

/*
 *	Copies bids into a bidArray response
 */
function buildBidResponse(bidArray) {
	var bidResponseArray = [];
	var adUnitCode = '';
	//temp array to hold auction for bids
	var bidArrayTargeting = [];
	var bidClone = {};
	if (bidArray && bidArray[0] && bidArray[0].adUnitCode) {
		// init the pb_targetingMap for the adUnitCode
		adUnitCode = bidArray[0] && bidArray[0].adUnitCode;
		pb_targetingMap[adUnitCode] = {};
		for (var i = 0; i < bidArray.length; i++) {
			var bid = bidArray[i];
			//clone by json parse. This also gets rid of unwanted function properties
			bidClone = getCloneBid(bid);

			if (bid.alwaysUseBid && bidClone.adserverTargeting) { // add the bid if alwaysUse and bid has returned
				// push key into targeting
				pb_targetingMap[bidClone.adUnitCode] = utils.extend(pb_targetingMap[bidClone.adUnitCode], bidClone.adserverTargeting);
			} else if (bid.cpm && bid.cpm > 0){
				//else put into auction array if cpm > 0
				bidArrayTargeting.push({
					cpm: bid.cpm,
					bid: bid
				});
			}
			//put all bids into bidArray by default
			bidResponseArray.push(bidClone);
		}
	}

	// push the winning bid into targeting map
	if (adUnitCode && bidArrayTargeting.length !== 0) {
		var winningBid = getWinningBid(bidArrayTargeting);
		var keyValues = winningBid.adserverTargeting;
		pb_targetingMap[adUnitCode] = utils.extend(pb_targetingMap[adUnitCode], keyValues);
	}

	return bidResponseArray;
}

function getCloneBid(bid) {
	var bidClone = {};
	//clone by json parse. This also gets rid of unwanted function properties
	if (bid) {
		var jsonBid = JSON.stringify(bid);
		bidClone = JSON.parse(jsonBid);

		//clean up bid clone
		delete bidClone.pbLg;
		delete bidClone.pbMg;
		delete bidClone.pbHg;
	}
	return bidClone;
}

function resetBids() {
	bidmanager.clearAllBidResponses();
	pb_bidderMap = {};
	pb_placements = [];
	pb_targetingMap = {};
	pb_bidsTimedOut = false;
}

function requestAllBids(tmout){
	var timeout = tmout;
	resetBids();
	init(timeout);
}

//////////////////////////////////
//								//
//		Start Public APIs		//
// 								//
//////////////////////////////////
/**
 * This function returns the query string targeting parameters available at this moment for a given ad unit. Note that some bidder's response may not have been received if you call this function too quickly after the requests are sent.
 * @param  {string} [adunitCode] adUnitCode to get the bid responses for
 * @alias module:pbjs.getAdserverTargetingForAdUnitCodeStr
 * @return {array}	returnObj return bids array
 */
pbjs.getAdserverTargetingForAdUnitCodeStr = function(adunitCode) {
	// call to retrieve bids array
	if(adunitCode){
		var res = pbjs.getAdserverTargetingForAdUnitCode(adunitCode);
		return utils.transformAdServerTargetingObj(res);
	}
	else{
		utils.logMessage('Need to call getAdserverTargetingForAdUnitCodeStr with adunitCode');
	}
};
/**
 * This function returns the query string targeting parameters available at this moment for a given ad unit. Note that some bidder's response may not have been received if you call this function too quickly after the requests are sent.
 * @param  {string} [adunitCode] adUnitCode to get the bid responses for
 * @alias module:pbjs.getAdserverTargetingForAdUnitCode
 * @return {object}	returnObj return bids
 */
pbjs.getAdserverTargetingForAdUnitCode = function(adunitCode) {
	// call to populate pb_targetingMap
	pbjs.getBidResponses(adunitCode);

	if (adunitCode) {
		return pb_targetingMap[adunitCode];
	}
	return pb_targetingMap;
};
/**
 * returns all ad server targeting for all ad units
 * @return {object} Map of adUnitCodes and targeting values []
 * @alias module:pbjs.getAdserverTargeting
 */
pbjs.getAdserverTargeting = function() {
	return pbjs.getAdserverTargetingForAdUnitCode();
};

/**
 * This function returns the bid responses at the given moment.
 * @param  {string} [adunitCode] adunitCode adUnitCode to get the bid responses for
 * @alias module:pbjs.getBidResponses
 * @return {object}            map | object that contains the bidResponses
 */
pbjs.getBidResponses = function(adunitCode) {
	var bidArrayTargeting = [];
	var response = {};
	var bidArray = [];
	var returnObj = {};

	if (adunitCode) {
		response = getBidResponsesByAdUnit(adunitCode);
		bidArray = [];
		if (response && response.bids) {
			bidArray = buildBidResponse(response.bids);
		}

		returnObj = {
			bids: bidArray
		};

	} else {
		response = getBidResponsesByAdUnit();
		for (var adUnit in response) {
			if (response.hasOwnProperty(adUnit)) {
				if (response && response[adUnit] && response[adUnit].bids) {
					bidArray = buildBidResponse(response[adUnit].bids);
				}

				returnObj[adUnit] = {
					bids: bidArray
				};

			}
		}
	}

	return returnObj;

};
/**
 * Returns bidResponses for the specified adUnitCode
 * @param  {String} adUnitCode adUnitCode
 * @alias module:pbjs.getBidResponsesForAdUnitCode
 * @return {Object}            bidResponse object
 */
pbjs.getBidResponsesForAdUnitCode = function(adUnitCode) {
	return pbjs.getBidResponses(adUnitCode);
};
/**
 * Set query string targeting on adUnits specified. The logic for deciding query strings is described in the section Configure AdServer Targeting. Note that this function has to be called after all ad units on page are defined.
 * @param {array} [codeArr] an array of adUnitodes to set targeting for.
 * @alias module:pbjs.setTargetingForAdUnitsGPTAsync
 */
pbjs.setTargetingForAdUnitsGPTAsync = function(codeArr) {
	if (!window.googletag || !utils.isFn(window.googletag.pubads) || !utils.isFn(window.googletag.pubads().getSlots)) {
		utils.logError('window.googletag is not defined on the page');
		return;
	}

	//emit bid timeout event here
	timeOutBidders();

	var adUnitCodesArr = codeArr;

	if (typeof codeArr === objectType_string) {
		 adUnitCodesArr = [codeArr];
	} else if (typeof codeArr === objectType_object) {
		adUnitCodesArr = codeArr;
	}

	var placementBids = {},
		i = 0;
	if (adUnitCodesArr) {
		for (i = 0; i < adUnitCodesArr.length; i++) {
			var code = adUnitCodesArr[i];
			//get all the slots from google tag
			var slots = window.googletag.pubads().getSlots();
			for (var k = 0; k < slots.length; k++) {

				if (slots[k].getSlotElementId() === code || slots[k].getAdUnitPath() === code) {
					placementBids = getBidResponsesByAdUnit(code);
					setGPTAsyncTargeting(code, slots[k]);
				}
			}
		}
	} else {
		//get all the slots from google tag
		var slots = window.googletag.pubads().getSlots();
		for (i = 0; i < slots.length; i++) {
			var adUnitCode = slots[i].getSlotElementId();
			if (adUnitCode) {
				//placementBids = getBidsFromGTPIdentifier(slots[i]);
				setGPTAsyncTargeting(adUnitCode, slots[i]);
			}
		}
	}

};
/**
 * Returns a string identifier (either DivId or adUnitPath)
 * @param  {[type]} slot [description]
 * @return {[type]}      [description]
 */
function getTargetingfromGPTIdentifier(slot){
	var targeting = null;
	if(slot){
		//first get by elementId
		targeting =  pbjs.getAdserverTargetingForAdUnitCode(slot.getSlotElementId());
		//if not available, try by adUnitPath
		if(!targeting){
			targeting = pbjs.getAdserverTargetingForAdUnitCode(slot.getAdUnitPath());
		}
	}
	return targeting;
}

/**

/**
 * Set query string targeting on all GPT ad units.
 * @alias module:pbjs.setTargetingForGPTAsync
 */
pbjs.setTargetingForGPTAsync = function(codeArr) {
	pbjs.setTargetingForAdUnitsGPTAsync(codeArr);
};

/**
 * Returns a bool if all the bids have returned or timed out
 * @alias module:pbjs.allBidsAvailable
 * @return {bool} all bids available
 */
pbjs.allBidsAvailable = function() {
	return bidmanager.allBidsBack();
};

/**
 * This function will render the ad (based on params) in the given iframe document passed through. Note that doc SHOULD NOT be the parent document page as we can't doc.write() asynchrounsly
 * @param  {object} doc document
 * @param  {string} id bid id to locate the ad
 * @alias module:pbjs.renderAd
 */
pbjs.renderAd = function(doc, id) {
	utils.logMessage('Calling renderAd with adId :' + id);
	if (doc && id) {
		try {
			//lookup ad by ad Id
			var adObject = bidmanager._adResponsesByBidderId[id];
			if (adObject) {
				//emit 'bid won' event here
				events.emit(BID_WON, adObject);
				var height = adObject.height;
				var width = adObject.width;
				var url = adObject.adUrl;
				var ad = adObject.ad;

				if (ad) {
					doc.write(ad);
					doc.close();
					if (doc.defaultView && doc.defaultView.frameElement) {
						doc.defaultView.frameElement.width = width;
						doc.defaultView.frameElement.height = height;
					}
				}
				//doc.body.style.width = width;
				//doc.body.style.height = height;
				else if (url) {
					doc.write('<IFRAME SRC="' + url + '" FRAMEBORDER="0" SCROLLING="no" MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0" LEFTMARGIN="0" ALLOWTRANSPARENCY="true" WIDTH="' + width + '" HEIGHT="' + height + '"></IFRAME>');
					doc.close();

					if (doc.defaultView && doc.defaultView.frameElement) {
						doc.defaultView.frameElement.width = width;
						doc.defaultView.frameElement.height = height;
					}

				} else {
					utils.logError('Error trying to write ad. No ad for bid response id: ' + id);
				}

			} else {
				utils.logError('Error trying to write ad. Cannot find ad by given id : ' + id);
			}

		} catch (e) {
			utils.logError('Error trying to write ad Id :' + id + ' to the page:' + e.message);
		}
	} else {
		utils.logError('Error trying to write ad Id :' + id + ' to the page. Missing document or adId');
	}

};

/*
 *	@deprecated - will be removed next release. Use pbjs.requestBids
 */
pbjs.requestBidsForAdUnit = function(adUnitCode) {
	resetBids();
	init(adUnitCode);

};

/**
 * @deprecated - will be removed next release. Use pbjs.requestBids
 */
pbjs.requestBidsForAdUnits = function(adUnitsObj) {
	if (!adUnitsObj || adUnitsObj.constructor !== Array) {
		utils.logError('requestBidsForAdUnits must pass an array of adUnits');
		return;
	}
	resetBids();
	var adUnitBackup = pbjs.adUnits.slice(0);
	pbjs.adUnits = adUnitsObj;
	init();
	pbjs.adUnits = adUnitBackup;

};

/**
 * Remove adUnit from the pbjs configuration
 * @param  {String} adUnitCode the adUnitCode to remove
 * @alias module:pbjs.removeAdUnit
 */
pbjs.removeAdUnit = function(adUnitCode) {
	if (adUnitCode) {
		for (var i = 0; i < pbjs.adUnits.length; i++) {
			if (pbjs.adUnits[i].code === adUnitCode) {
				pbjs.adUnits.splice(i, 1);
			}
		}
	}
};

/**
 * Request bids ad-hoc. This function does not add or remove adUnits already configured.
 * @param  {Object} requestObj
 * @param {string[]} requestObj.adUnitCodes  adUnit codes to request. Use this or requestObj.adUnits
 * @param {object[]} requestObj.adUnits AdUnitObjects to request. Use this or requestObj.adUnitCodes
 * @param {number} [requestObj.timeout] Timeout for requesting the bids specified in milliseconds
 * @param {function} [requestObj.bidsBackHandler] Callback to execute when all the bid responses are back or the timeout hits.
 * @alias module:pbjs.requestBids
 */
pbjs.requestBids = function(requestObj) {
	if (!requestObj) {
		//utils.logMessage('requesting all bids');

		requestAllBids();

	}
	else{
		var adUnitCodes = requestObj.adUnitCodes;
		var adUnits = requestObj.adUnits;
		var timeout = requestObj.timeout;
		var bidsBackHandler = requestObj.bidsBackHandler;
		var adUnitBackup = pbjs.adUnits.slice(0);

		if (typeof bidsBackHandler === objectType_function) {
			bidmanager.addOneTimeCallback(bidsBackHandler);
		}

		if (adUnitCodes && utils.isArray(adUnitCodes)) {
			resetBids();
			init(timeout, adUnitCodes);

		} else if (adUnits && utils.isArray(adUnits)) {
			resetBids();
			pbjs.adUnits = adUnits;
			init(timeout);
		} else {
			//request all ads
			requestAllBids(timeout);
		}

		pbjs.adUnits = adUnitBackup;
	}

};

/**
 *
 * Add adunit(s)
 * @param {(string|string[])} Array of adUnits or single adUnit Object.
 * @alias module:pbjs.addAdUnits
 */
pbjs.addAdUnits = function(adUnitArr) {
	if (utils.isArray(adUnitArr)) {
		//append array to existing
		pbjs.adUnits.push.apply(pbjs.adUnits, adUnitArr);
	} else if (typeof adUnitArr === objectType_object) {
		pbjs.adUnits.push(adUnitArr);
	}
};

/**
 * Add a callback event
 * @param {String} event event to attach callback to Options: "allRequestedBidsBack" | "adUnitBidsBack"
 * @param {Function} func  function to execute. Paramaters passed into the function: (bidResObj), [adUnitCode]);
 * @alias module:pbjs.addCallback
 * @returns {String} id for callback
 */
pbjs.addCallback = function(eventStr, func) {
	var id = null;
	if (!eventStr || !func || typeof func !== objectType_function) {
		utils.logError('error registering callback. Check method signature');
		return id;
	}

	id = utils.getUniqueIdentifierStr;
	bidmanager.addCallback(id, func, eventStr);
	return id;
};

/**
 * Remove a callback event
 * @param {string} cbId id of the callback to remove
 * @alias module:pbjs.removeCallback
 * @returns {String} id for callback
 */
pbjs.removeCallback = function(cbId) {
	//todo
};

/**
 * Wrapper to register bidderAdapter externally (adaptermanager.registerBidAdapter())
 * @param  {[type]} bidderAdaptor [description]
 * @param  {[type]} bidderCode    [description]
 * @return {[type]}               [description]
 */
pbjs.registerBidAdapter = function(bidderAdaptor, bidderCode){
	try{
		adaptermanager.registerBidAdapter(bidderAdaptor(), bidderCode);
	}
	catch(e){
		utils.logError('Error registering bidder adapter : ' + e.message);
	}
};

/**
 *
 */
 pbjs.bidsAvailableForAdapter = function(bidderCode){

	//TODO getAd
	var bids = pb_bidderMap[bidderCode].bids;

	for (var i = 0; i < bids.length; i++) {
		var adunitCode = bids[i].placementCode;
		var responseObj = bidmanager.pbBidResponseByPlacement[adunitCode];

		var bid = bidfactory.createBid(1);
		// bid.creative_id = adId;
		bid.bidderCode = bidderCode;
		bid.adUnitCode = adunitCode;
		bid.bidder = bidderCode;
		// bid.cpm = responseCPM;
		// bid.adUrl = jptResponseObj.result.ad;
		// bid.width = jptResponseObj.result.width;
		// bid.height = jptResponseObj.result.height;
		// bid.dealId = jptResponseObj.result.deal_id;

		responseObj.bids.push(bid);
		responseObj.bidsReceivedCount++;
		bidmanager.pbBidResponseByPlacement[adunitCode] = responseObj;
	};

	bidmanager.increaseBidResponseReceivedCount(bidderCode);
}

/**
 * Wrapper to bidfactory.createBid()
 * @param  {[type]} statusCode [description]
 * @return {[type]}            [description]
 */
pbjs.createBid = function(statusCode){
	return bidfactory.createBid(statusCode);
};

/**
 * Wrapper to bidmanager.addBidResponse
 * @param {[type]} adUnitCode [description]
 * @param {[type]} bid        [description]
 */
pbjs.addBidResponse = function(adUnitCode, bid){
	bidmanager.addBidResponse(adUnitCode, bid);
};

/**
 * Wrapper to adloader.loadScript
 * @param  {[type]}   tagSrc   [description]
 * @param  {Function} callback [description]
 * @return {[type]}            [description]
 */
pbjs.loadScript = function(tagSrc, callback){
	adloader.loadScript(tagSrc, callback);
};

/**
 * This isn't ready yet
 * return data for analytics
 * @param  {Function}  [description]
 * @return {[type]}    [description]

pbjs.getAnalyticsData = function(){
	var returnObj = {};
	var bidResponses = pbjs.getBidResponses();

	//create return obj for all adUnits
	for(var i=0;i<pbjs.adUnits.length;i++){
		var allBids = pbjs.adUnits[i].bids;
		for(var j=0;j<allBids.length;j++){
			var bid = allBids[j];
			if(typeof returnObj[bid.bidder] === objectType_undefined){
				returnObj[bid.bidder] = {};
				returnObj[bid.bidder].bids = [];
			}

			var returnBids = returnObj[bid.bidder].bids;
			var returnBidObj = {};
			returnBidObj.timeout = true;
			returnBids.push(returnBidObj);
		}
	}

	utils._each(bidResponses,function(responseByUnit, adUnitCode){
		var bids = responseByUnit.bids;

		for(var i=0; i<bids.length; i++){

			var bid = bids[i];
			if(bid.bidderCode!==''){
				var returnBids = returnObj[bid.bidderCode].bids;
				var returnIdx = 0;

				for(var j=0;j<returnBids.length;j++){
					if(returnBids[j].timeout)
						returnIdx = j;
				}

				var returnBidObj = {};

				returnBidObj.cpm = bid.cpm;
				returnBidObj.timeToRespond = bid.timeToRespond;

				//check winning
				if(pb_targetingMap[adUnitCode].hb_adid === bid.adId){
					returnBidObj.win = true;
				}else{
					returnBidObj.win = false;
				}

				returnBidObj.timeout = false;
				returnBids[returnIdx] = returnBidObj;
			}
		}
	});

	return returnObj;
};

*/

/**
 * Will enable sendinga prebid.js to data provider specified
 * @param  {object} options object {provider : 'string', options : {}}
 */
pbjs.enableAnalytics = function(options){
	if(!options){
		utils.logError('pbjs.enableAnalytics should be called with option {}', 'prebid.js');
		return;
	}

	if(options.provider === 'ga'){
		try{
			ga.enableAnalytics(typeof options.options === 'undefined' ? {} :options.options ) ;
		}
		catch(e){
			utils.logError('Error calling GA: ', 'prebid.js', e);
		}
	}
	else if(options.provider === 'other_provider'){
		//todo
	}
};

/**
 * This will tell analytics that all bids received after are "timed out"
 */
pbjs.sendTimeoutEvent = function(){
	timeOutBidders();
};

pbjs.aliasBidder = function(bidderCode,alias){

	if(bidderCode && alias){
		adaptermanager.aliasBidAdapter(bidderCode,alias);
	}
	else{
		utils.logError('bidderCode and alias must be passed as arguments', 'pbjs.aliasBidder');
	}

};

processQue();

// @ifdef DEBUG
//only for test
pbjs_testonly = {};

pbjs_testonly.getAdUnits = function() {
    return pbjs.adUnits;
};

pbjs_testonly.clearAllAdUnits = function(){
	pbjs.adUnits =[];
};
// @endif


text:
caesar-ciphers
==============

This project have reached end-of-life, please use my [caesar-salad](https://www.npmjs.org/package/caesar-salad) project instead.

Benefits over this project:

* File I/O
* [ROT Cipher](http://en.wikipedia.org/wiki/ROT13) support
* [multiple password formats](http://schnittstabil.github.io/caesar-salad/api/classes/Password.html)
* unified [Cipher/Decipher interface](http://schnittstabil.github.io/caesar-salad/api/classes/SubstitutionCipher.html)

License
-------

Copyright (c) 2014 Michael Mayer

Licensed under the MIT license.


text:
layout: page
title: Buckley Family Reunion
date: 2016-05-24
author: Michelle Jacobs
tags: weekly links, java
status: published
summary: Praesent viverra ante non tortor cursus, non varius massa.
banner: images/banner/office-01.jpg
booking:
  startDate: 03/21/2018
  endDate: 03/26/2018
  ctyhocn: BUFATHX
  groupCode: BFR
published: true
---
Nulla ac neque tempor, ornare nibh nec, pharetra risus. Sed cursus massa elementum accumsan tempus. In orci diam, fringilla eu porttitor eget, congue eu tellus. Pellentesque ultricies libero nec ante posuere bibendum. In sollicitudin aliquam leo non tempus. Mauris risus lorem, pharetra ut est ac, tempor pulvinar lacus. Integer commodo leo id magna lobortis mattis.

* Donec rhoncus urna nec vestibulum posuere
* Curabitur eget purus vehicula, iaculis massa vel, facilisis metus
* Curabitur vel dolor convallis, eleifend massa ut, iaculis libero.

Nullam accumsan sed lorem eu rutrum. Donec nec sagittis nibh. Donec augue purus, molestie ac molestie ac, aliquet a est. Etiam sit amet fermentum magna. Donec elit sem, malesuada fermentum eros non, viverra pharetra arcu. Pellentesque eget sapien placerat, pretium risus vulputate, porta enim. Ut sit amet condimentum sapien. Donec pellentesque posuere dui in pretium. Integer rutrum lacus et metus bibendum, nec efficitur libero pulvinar.


text:
require 'ads_common/savon_service'
require 'ad_manager_api/v202208/network_service_registry'

module AdManagerApi; module V202208; module NetworkService
  class NetworkService < AdsCommon::SavonService
    def initialize(config, endpoint)
      namespace = 'https://www.google.com/apis/ads/publisher/v202208'
      super(config, endpoint, namespace, :v202208)
    end

    def get_all_networks(*args, &block)
      return execute_action('get_all_networks', args, &block)
    end

    def get_all_networks_to_xml(*args)
      return get_soap_xml('get_all_networks', args)
    end

    def get_current_network(*args, &block)
      return execute_action('get_current_network', args, &block)
    end

    def get_current_network_to_xml(*args)
      return get_soap_xml('get_current_network', args)
    end

    def get_default_third_party_data_declaration(*args, &block)
      return execute_action('get_default_third_party_data_declaration', args, &block)
    end

    def get_default_third_party_data_declaration_to_xml(*args)
      return get_soap_xml('get_default_third_party_data_declaration', args)
    end

    def make_test_network(*args, &block)
      return execute_action('make_test_network', args, &block)
    end

    def make_test_network_to_xml(*args)
      return get_soap_xml('make_test_network', args)
    end

    def update_network(*args, &block)
      return execute_action('update_network', args, &block)
    end

    def update_network_to_xml(*args)
      return get_soap_xml('update_network', args)
    end

    private

    def get_service_registry()
      return NetworkServiceRegistry
    end

    def get_module()
      return AdManagerApi::V202208::NetworkService
    end
  end
end; end; end


text:
local require = require

local i18n = require("cp.i18n")

local plugin = {
    id = "core.helpandsupport.credits",
    group = "core",
    dependencies = {
        ["core.menu.manager"] = "menuManager",
        ["core.commands.global"] = "global",
    }
}

function plugin.init(deps)
    --------------------------------------------------------------------------------
    -- Open Credits:
    --------------------------------------------------------------------------------
    local show = function()
        os.execute('open "http://help.commandpost.io/getting_started/credits/"')
    end

    --------------------------------------------------------------------------------
    -- Commands:
    --------------------------------------------------------------------------------
    deps.global
        :add("cpCredits")
        :whenActivated(show)
        :groupedBy("helpandsupport")

    --------------------------------------------------------------------------------
    -- Menubar:
    --------------------------------------------------------------------------------
    deps.menuManager.commandPostHelpAndSupport
        :addItem(10, function() return { title = i18n("credits"), fn = show } end)
end

return plugin


text:
package com.thexfactor117.lsc.util;

import java.util.UUID;

import com.thexfactor117.lsc.LootSlashConquer;
import com.thexfactor117.lsc.capabilities.cap.CapabilityLSCPlayer;
import com.thexfactor117.lsc.capabilities.implementation.LSCPlayerCapability;
import com.thexfactor117.lsc.config.Configs;
import com.thexfactor117.lsc.network.client.PacketUpdatePlayerStats;

import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;

/**
 *
 * @author TheXFactor117
 *
 */
public class PlayerUtil
{
	// private static final String ATTACK_DAMAGE = "ece5e91f-afc9-4883-a169-c7b5883c12dc";
	public static final String MOVEMENT_SPEED = "50ac5b8b-00a6-436c-bdc3-9848393bb7b7";
	public static final String ATTACK_SPEED = "e574e861-e5bd-4906-b72e-f6be6e4c9563";
	public static final String MAX_HEALTH = "e3762718-bbd8-4763-bfe9-1d18d70eaa76";

	/**
	 * Returns the LSC player capability.
	 *
	 * @param player
	 * @return
	 */
	public static LSCPlayerCapability getLSCPlayer(EntityPlayer player)
	{
		LSCPlayerCapability cap = (LSCPlayerCapability) player.getCapability(CapabilityLSCPlayer.PLAYER_CAP, null);

		if (cap != null)
		{
			return cap;
		}
		else
		{
			LootSlashConquer.LOGGER.info("ERROR: Player: " + player.getName() + " doesn't have an attached capability. Things might break.");
			return null;
		}
	}

	/**
	 * Updates all of the players stats.
	 *
	 * @param player
	 */
	public static void updateAllStats(EntityPlayer player)
	{
		updateStrengthStat(player);
		updateAgilityStat(player);
		updateDexterityStat(player);
		updateIntelligenceStat(player);
		updateWisdomStat(player);
		updateFortitudeStat(player);
	}

	/**
	 * Updates the player's strength stat. Does nothing right now...re-work how strength works?
	 *
	 * @param player
	 */
	public static void updateStrengthStat(EntityPlayer player)
	{
		// TODO: convert new damage to add to the player's attribute...look into this more, the whole system is all sorts of fucked up.
		// increase attack damage
		/*
		 * AttributeModifier strengthAttackDamage = new AttributeModifier(UUID.fromString(ATTACK_DAMAGE), "playerStrength", ATTACK_DAMAGE_MULTIPLIER * (cap.getTotalStrength()), 0);
		 *
		 * if (player.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).getModifier(UUID.fromString(ATTACK_DAMAGE)) != null) {
		 * player.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).removeModifier(UUID.fromString(ATTACK_DAMAGE));
		 * player.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).applyModifier(strengthAttackDamage); } else
		 * player.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).applyModifier(strengthAttackDamage);
		 */
	}

	/**
	 * Updates the player's Agility stat. Increase movement speed and attack speed.
	 *
	 * @param player
	 */
	public static void updateAgilityStat(EntityPlayer player)
	{
		LSCPlayerCapability cap = getLSCPlayer(player);

		// increase movement speed
		AttributeModifier agilityMovementSpeed = new AttributeModifier(UUID.fromString(MOVEMENT_SPEED), "agilityMovementSpeed",
				Configs.playerCategory.movementSpeedMultiplier * (cap.getTotalAgility()), 0);

		if (player.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).getModifier(UUID.fromString(MOVEMENT_SPEED)) != null)
		{
			player.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).removeModifier(UUID.fromString(MOVEMENT_SPEED));
			player.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).applyModifier(agilityMovementSpeed);
		}
		else player.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).applyModifier(agilityMovementSpeed);

		// increase attack speed
		AttributeModifier agilityAttackSpeed = new AttributeModifier(UUID.fromString(ATTACK_SPEED), "agilityAttackSpeed", Configs.playerCategory.attackSpeedMultiplier * (cap.getTotalAgility()), 0);

		if (player.getEntityAttribute(SharedMonsterAttributes.ATTACK_SPEED).getModifier(UUID.fromString(ATTACK_SPEED)) != null)
		{
			player.getEntityAttribute(SharedMonsterAttributes.ATTACK_SPEED).removeModifier(UUID.fromString(ATTACK_SPEED));
			player.getEntityAttribute(SharedMonsterAttributes.ATTACK_SPEED).applyModifier(agilityAttackSpeed);
		}
		else player.getEntityAttribute(SharedMonsterAttributes.ATTACK_SPEED).applyModifier(agilityAttackSpeed);
	}

	/**
	 * Updates the player's Dexterity stat. Increase critical chance and critical damage.
	 *
	 * @param player
	 */
	public static void updateDexterityStat(EntityPlayer player)
	{
		if (!player.getEntityWorld().isRemote)
		{
			LSCPlayerCapability cap = getLSCPlayer(player);

			int bonus = cap.getTotalDexterity() > 0 ? 1 : 0;

			cap.setCriticalChance(Configs.playerCategory.critChanceMultiplier * ((cap.getTotalDexterity() / 5) + bonus));
			cap.setCriticalDamage(Configs.playerCategory.critDamageMultiplier * ((cap.getTotalDexterity() / 2) + bonus));

			LootSlashConquer.network.sendTo(new PacketUpdatePlayerStats(cap), (EntityPlayerMP) player);
		}
	}

	/**
	 * Updates the player's Intelligence stat. Doesn't currently do anything...needs re-working.
	 *
	 * @param player
	 */
	public static void updateIntelligenceStat(EntityPlayer player)
	{
		if (!player.getEntityWorld().isRemote)
		{
			// LSCPlayerCapability cap = getLSCPlayer(player);

			// cap.setMagicalPower(MAGICAL_POWER_MULTIPLIER * (cap.getTotalIntelligence()));

			// LootSlashConquer.network.sendTo(new PacketUpdatePlayerStats(cap), (EntityPlayerMP) player);
		}
	}

	/**
	 * Updates the player's Wisdom stat. Increases max mana and mana regen.
	 * @param player
	 */
	public static void updateWisdomStat(EntityPlayer player)
	{
		if (!player.getEntityWorld().isRemote)
		{
			LSCPlayerCapability cap = getLSCPlayer(player);

			cap.setMaxMana((int) ((Configs.playerCategory.maxManaMultiplier * cap.getTotalWisdom()) + 100));
			cap.setManaPerSecond(Configs.playerCategory.manaPer5 * cap.getTotalWisdom());

			LootSlashConquer.network.sendTo(new PacketUpdatePlayerStats(cap), (EntityPlayerMP) player);
		}
	}

	/**
	 * Updates the player's Fortitude stat. Increases max health and health regen.
	 * @param player
	 */
	public static void updateFortitudeStat(EntityPlayer player)
	{
		LSCPlayerCapability cap = getLSCPlayer(player);

		// increases max health
		AttributeModifier fortitudeMaxHealth = new AttributeModifier(UUID.fromString(MAX_HEALTH), "maxHealth", Configs.playerCategory.maxHealthMultiplier * (cap.getTotalFortitude()), 0);

		if (player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).getModifier(UUID.fromString(MAX_HEALTH)) != null)
		{
			player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(UUID.fromString(MAX_HEALTH));
			player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(fortitudeMaxHealth);
		}
		else player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(fortitudeMaxHealth);

		if (!player.getEntityWorld().isRemote)
		{
			cap.setHealthPerSecond(Configs.playerCategory.healthPer5 * cap.getTotalFortitude());

			if (player.getHealth() > player.getMaxHealth())
			{
				player.setHealth(player.getMaxHealth());
			}

			LootSlashConquer.network.sendTo(new PacketUpdatePlayerStats(cap), (EntityPlayerMP) player);
		}
	}
}


text:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <title>statsmodels.tsa.statespace.kalman_filter.KalmanFilter.bind — statsmodels v0.10.1 documentation</title>
    <link rel="stylesheet" href="../_static/nature.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" type="text/css" href="../_static/graphviz.css" />

    <link rel="shortcut icon" href="../_static/statsmodels_hybi_favico.ico"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="statsmodels.tsa.statespace.kalman_filter.KalmanFilter.filter" href="statsmodels.tsa.statespace.kalman_filter.KalmanFilter.filter.html" />
    <link rel="prev" title="statsmodels.tsa.statespace.kalman_filter.KalmanFilter" href="statsmodels.tsa.statespace.kalman_filter.KalmanFilter.html" />
<link rel="stylesheet" href="../_static/examples.css" type="text/css" />
<link rel="stylesheet" href="../_static/facebox.css" type="text/css" />

Navigation

          index

          modules |

          next |

          previous |

Install
  |

Support
  |

Bugs
  |

Develop
  |

Examples
  |

FAQ
  |

Time Series Analysis by State Space Methods statespace |

statsmodels.tsa.statespace.kalman_filter.KalmanFilter |

statsmodels.tsa.statespace.kalman_filter.KalmanFilter.bind¶

method

KalmanFilter.bind(endog)¶

Bind data to the statespace representation

Parameters

endogarray

Endogenous data to bind to the model. Must be column-ordered
ndarray with shape (k_endog, nobs) or row-ordered ndarray with
shape (nobs, k_endog).

Notes

The strict requirements arise because the underlying statespace and
Kalman filtering classes require Fortran-ordered arrays in the wide
format (shaped (k_endog, nobs)), and this structure is setup to
prevent copying arrays in memory.

By default, numpy arrays are row (C)-ordered and most time series are
represented in the long format (with time on the 0-th axis). In this
case, no copying or re-ordering needs to be performed, instead the
array can simply be transposed to get it in the right order and shape.

Although this class (Representation) has stringent bind requirements,
it is assumed that it will rarely be used directly.

Previous topic

statsmodels.tsa.statespace.kalman_filter.KalmanFilter

Next topic

statsmodels.tsa.statespace.kalman_filter.KalmanFilter.filter

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" />
      <input type="submit" value="Go" />
    </form>

        © Copyright 2009-2018, Josef Perktold, Skipper Seabold, Jonathan Taylor, statsmodels-developers.
      Created using Sphinx 2.1.2.


text: int helper_function(int arg);


text:
#pragma once

class CBackground : public CLevel
{
public:
	CBackground();
	~CBackground();

	// members
	bool Create();
	bool Render();
	int GetTotalWidth();

	CTile tiles[2];

	bool DrawGDIText(LPDIRECTDRAWSURFACE7 lpdds, char *text, int x, int y, COLORREF color);
};


text:
package org.vafer.jdeb.debian;

import java.io.FileInputStream;
import java.text.ParseException;

import junit.framework.TestCase;

public final class PackageControlFileTestCase extends TestCase {

    public void testParse() throws Exception {
        String input =
                "Key1: Value1\n" +
                "Key2: Value2\n" +
                " Value2.1\n" +
                " Value2.2\n" +
                "Key3: Value3\n";

        BinaryPackageControlFile d = new BinaryPackageControlFile(input);
        assertFalse(d.isValid());

        assertEquals("key 1", "Value1", d.get("Key1"));
        assertEquals("key 2", "Value2\nValue2.1\nValue2.2", d.get("Key2"));
        assertEquals("key 3", "Value3", d.get("Key3"));
    }

    public void testComments() throws Exception {
        String input =
                "Key1: Value1\n" +
                "Key2: Value2\n" +
                " Value2.1\n" +
                "# Value2.2\n" +
                "#Key3: Value3comment\n" +
                "Key3: Value3\n" +
                "# Value3.1\n" +
                " Value3.2\n" +
                "Key4: Value4\n" +
                "# Value4.1\n" +
                "# Value4.2\n" +
                "#Key5: Value5\n";

        BinaryPackageControlFile d = new BinaryPackageControlFile(input);
        assertFalse(d.isValid());

        assertEquals("key 1", "Value1", d.get("Key1"));
        assertEquals("key 2", "Value2\nValue2.1", d.get("Key2"));
        assertEquals("key 3", "Value3\nValue3.2", d.get("Key3"));
        assertEquals("key 4", "Value4", d.get("Key4"));
        assertEquals("key 5", null, d.get("Key5"));
    }

    public void testToString() throws Exception {
        BinaryPackageControlFile packageControlFile = new BinaryPackageControlFile();
        packageControlFile.set("Package", "test-package");
        packageControlFile.set("Description", "This is\na description\non several lines");
        packageControlFile.set("Version", "1.0");

        String s = packageControlFile.toString();

        BinaryPackageControlFile packageControlFile2 = new BinaryPackageControlFile(s);
        assertEquals("Package", packageControlFile.get("Package"), packageControlFile2.get("Package"));
        assertEquals("Description", packageControlFile.get("Description"), packageControlFile2.get("Description"));
        assertEquals("Version 3", packageControlFile.get("Version"), packageControlFile2.get("Version"));
    }

    public void testEmptyLines() throws Exception {
        String input =
                "Key1: Value1\n" +
                "Key2: Value2\n" +
                "\n";
        try {
            new BinaryPackageControlFile(input);
            fail("Should throw a ParseException");
        } catch (ParseException e) {
        }
    }

    public void testGetShortDescription() {
        BinaryPackageControlFile packageControlFile = new BinaryPackageControlFile();

        assertNull(packageControlFile.getShortDescription());

        packageControlFile.set("Description", "This is the short description\nThis is the loooooong description");

        assertEquals("short description", "This is the short description", packageControlFile.getShortDescription());

        packageControlFile.set("Description", "\nThere is no short description");

        assertEquals("short description", "", packageControlFile.getShortDescription());
    }

    public void testGetDescription() throws Exception {
        BinaryPackageControlFile packageControlFile = new BinaryPackageControlFile();
        packageControlFile.parse(new FileInputStream("target/test-classes/org/vafer/jdeb/deb/control/control"));

        assertEquals("Description", "revision @REVISION@, test package\n" +
                "This is a sample package control file.\n\n" +
                "Use for testing purposes only.",
                packageControlFile.get("Description"));
    }

    public void testGetUserDefinedFields() throws Exception {
        BinaryPackageControlFile packageControlFile = new BinaryPackageControlFile();
        packageControlFile.parse(new FileInputStream("target/test-classes/org/vafer/jdeb/deb/control/control"));
        assertEquals("UserDefinedField", "This is a user defined field.",  packageControlFile.get("UserDefinedField"));
    }
}


text:
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { ShellComponent } from './shell/shell.component';

const routes: Routes = [
  { path: 'merchandise', component: ShellComponent}
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class MerchandiseRoutingModule { }


text:
<?php

/**
 * Interface CFDBTransform for user-defined classes that can be used to transform data
 * as it is returned from the database but before it is is formatted for display.
 * See: short code "trans" option.
 */
interface CFDBTransform {

    /**
     * @param $entry array associative array of a single for entry
     * @return void
     */
    public function addEntry(&$entry);

    /**
     * Call this when done adding entries. Apply transform across all entered data,
     * then return the entire set. The returned set may be entirely different data than
     * what was input (e.g. statistics)
     * @return array of associative of array of data.
     */
    public function getTransformedData();

}


text:
/*global defineSuite*/
defineSuite([
        'Core/VRTheWorldTerrainProvider',
        'Core/DefaultProxy',
        'Core/defined',
        'Core/GeographicTilingScheme',
        'Core/HeightmapTerrainData',
        'Core/loadImage',
        'Core/loadWithXhr',
        'Core/Math',
        'Core/TerrainProvider',
        'Specs/pollToPromise',
        'ThirdParty/when'
    ], function(
        VRTheWorldTerrainProvider,
        DefaultProxy,
        defined,
        GeographicTilingScheme,
        HeightmapTerrainData,
        loadImage,
        loadWithXhr,
        CesiumMath,
        TerrainProvider,
        pollToPromise,
        when) {
    "use strict";
    /*global jasmine,describe,xdescribe,it,xit,expect,beforeEach,afterEach,beforeAll,afterAll,spyOn*/

    beforeEach(function() {
        loadWithXhr.load = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
            setTimeout(function() {
                var parser = new DOMParser();
                var xmlString =
                    '<TileMap version="1.0.0" tilemapservice="http://www.vr-theworld.com/vr-theworld/tiles/1.0.0/">' +
                    '<!--  Additional data: tms_type is default  -->' +
                    '<Title>Hawaii World elev</Title>' +
                    '<Abstract>layer to make cesium work right</Abstract>' +
                    '<SRS>EPSG:4326</SRS>' +
                    '<BoundingBox minx="-180.000000" miny="-90.000000" maxx="180.000000" maxy="90.000000"/>' +
                    '<Origin x="-180.000000" y="-90.000000"/>' +
                    '<TileFormat width="32" height="32" mime-type="image/tif" extension="tif"/>' +
                    '<TileSets>' +
                    '<TileSet href="http://www.vr-theworld.com/vr-theworld/tiles/1.0.0/73/0" units-per-pixel="5.62500000000000000000" order="0"/>' +
                    '<TileSet href="http://www.vr-theworld.com/vr-theworld/tiles/1.0.0/73/1" units-per-pixel="2.81250000000000000000" order="1"/>' +
                    '<TileSet href="http://www.vr-theworld.com/vr-theworld/tiles/1.0.0/73/2" units-per-pixel="1.40625000000000000000" order="2"/>' +
                    '<TileSet href="http://www.vr-theworld.com/vr-theworld/tiles/1.0.0/73/3" units-per-pixel="0.70312500000000000000" order="3"/>' +
                    '</TileSets>' +
                    '<DataExtents>' +
                    '<DataExtent minx="-180.000000" miny="-90.000000" maxx="180.000000" maxy="90.000000" minlevel="0" maxlevel="9"/>' +
                    '<DataExtent minx="24.999584" miny="-0.000417" maxx="30.000417" maxy="5.000417" minlevel="0" maxlevel="13"/>' +
                    '</DataExtents>' +
                    '</TileMap>';
                var xml = parser.parseFromString(xmlString, "text/xml");
                deferred.resolve(xml);
            }, 1);
        };
    });

    afterEach(function() {
        loadImage.createImage = loadImage.defaultCreateImage;
        loadWithXhr.load = loadWithXhr.defaultLoad;
    });

    it('conforms to TerrainProvider interface', function() {
        expect(VRTheWorldTerrainProvider).toConformToInterface(TerrainProvider);
    });

    it('constructor throws if url is not provided', function() {
        expect(function() {
            return new VRTheWorldTerrainProvider();
        }).toThrowDeveloperError();

        expect(function() {
            return new VRTheWorldTerrainProvider({
            });
        }).toThrowDeveloperError();
    });

    it('has error event', function() {
        var provider = new VRTheWorldTerrainProvider({
            url : 'made/up/url'
        });
        expect(provider.errorEvent).toBeDefined();
        expect(provider.errorEvent).toBe(provider.errorEvent);
    });

    it('returns reasonable geometric error for various levels', function() {
        var provider = new VRTheWorldTerrainProvider({
            url : 'made/up/url'
        });

        return pollToPromise(function() {
            return provider.ready;
        }).then(function() {
            expect(provider.getLevelMaximumGeometricError(0)).toBeGreaterThan(0.0);
            expect(provider.getLevelMaximumGeometricError(0)).toEqualEpsilon(provider.getLevelMaximumGeometricError(1) * 2.0, CesiumMath.EPSILON10);
            expect(provider.getLevelMaximumGeometricError(1)).toEqualEpsilon(provider.getLevelMaximumGeometricError(2) * 2.0, CesiumMath.EPSILON10);
        });
    });

    it('getLevelMaximumGeometricError must not be called before isReady returns true', function() {
        var provider = new VRTheWorldTerrainProvider({
            url : 'made/up/url'
        });

        expect(function() {
            provider.getLevelMaximumGeometricError(0);
        }).toThrowDeveloperError();
    });

    it('getTilingScheme must not be called before isReady returns true', function() {
        var provider = new VRTheWorldTerrainProvider({
            url : 'made/up/url'
        });

        expect(function() {
            var t = provider.tilingScheme;
        }).toThrowDeveloperError();
    });

    it('logo is undefined if credit is not provided', function() {
        var provider = new VRTheWorldTerrainProvider({
            url : 'made/up/url'
        });
        expect(provider.credit).toBeUndefined();
    });

    it('logo is defined if credit is provided', function() {
        var provider = new VRTheWorldTerrainProvider({
            url : 'made/up/url',
            credit : 'thanks to our awesome made up contributors!'
        });
        expect(provider.credit).toBeDefined();
    });

    it('does not have a water mask', function() {
        var provider = new VRTheWorldTerrainProvider({
            url : 'made/up/url'
        });
        expect(provider.hasWaterMask).toBe(false);
    });

    it('is not ready immediately', function() {
        var provider = new VRTheWorldTerrainProvider({
            url : 'made/up/url'
        });
        expect(provider.ready).toBe(false);
    });

    it('raises an error if the SRS is not supported', function() {
        loadWithXhr.load = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
            setTimeout(function() {
                var parser = new DOMParser();
                var xmlString =
                    '<TileMap version="1.0.0" tilemapservice="http://www.vr-theworld.com/vr-theworld/tiles/1.0.0/">' +
                    '<!--  Additional data: tms_type is default  -->' +
                    '<Title>Hawaii World elev</Title>' +
                    '<Abstract>layer to make cesium work right</Abstract>' +
                    '<SRS>EPSG:foo</SRS>' +
                    '<BoundingBox minx="-180.000000" miny="-90.000000" maxx="180.000000" maxy="90.000000"/>' +
                    '<Origin x="-180.000000" y="-90.000000"/>' +
                    '<TileFormat width="32" height="32" mime-type="image/tif" extension="tif"/>' +
                    '<TileSets>' +
                    '<TileSet href="http://www.vr-theworld.com/vr-theworld/tiles/1.0.0/73/0" units-per-pixel="5.62500000000000000000" order="0"/>' +
                    '<TileSet href="http://www.vr-theworld.com/vr-theworld/tiles/1.0.0/73/1" units-per-pixel="2.81250000000000000000" order="1"/>' +
                    '<TileSet href="http://www.vr-theworld.com/vr-theworld/tiles/1.0.0/73/2" units-per-pixel="1.40625000000000000000" order="2"/>' +
                    '<TileSet href="http://www.vr-theworld.com/vr-theworld/tiles/1.0.0/73/3" units-per-pixel="0.70312500000000000000" order="3"/>' +
                    '</TileSets>' +
                    '<DataExtents>' +
                    '<DataExtent minx="-180.000000" miny="-90.000000" maxx="180.000000" maxy="90.000000" minlevel="0" maxlevel="9"/>' +
                    '<DataExtent minx="24.999584" miny="-0.000417" maxx="30.000417" maxy="5.000417" minlevel="0" maxlevel="13"/>' +
                    '</DataExtents>' +
                    '</TileMap>';
                var xml = parser.parseFromString(xmlString, "text/xml");
                deferred.resolve(xml);
            }, 1);
        };

        var terrainProvider = new VRTheWorldTerrainProvider({
            url : 'made/up/url'
        });

        var deferred = when.defer();

        terrainProvider.errorEvent.addEventListener(function() {
            deferred.resolve();
        });

        return deferred.promise;
    });

    describe('requestTileGeometry', function() {
        it('must not be called before isReady returns true', function() {
            var terrainProvider = new VRTheWorldTerrainProvider({
                url : 'made/up/url',
                proxy : new DefaultProxy('/proxy/')
            });

            expect(function() {
                terrainProvider.requestTileGeometry(0, 0, 0);
            }).toThrowDeveloperError();
        });

        it('uses the proxy if one is supplied', function() {
            var baseUrl = 'made/up/url';

            loadImage.createImage = function(url, crossOrigin, deferred) {
                expect(url.indexOf('/proxy/?')).toBe(0);
                expect(url.indexOf(encodeURIComponent('.tif?cesium=true'))).toBeGreaterThanOrEqualTo(0);

                // Just return any old image.
                loadImage.defaultCreateImage('Data/Images/Red16x16.png', crossOrigin, deferred);
            };

            var terrainProvider = new VRTheWorldTerrainProvider({
                url : baseUrl,
                proxy : new DefaultProxy('/proxy/')
            });

            return pollToPromise(function() {
                return terrainProvider.ready;
            }).then(function() {
                return terrainProvider.requestTileGeometry(0, 0, 0);
            });
        });

        it('provides HeightmapTerrainData', function() {
            var baseUrl = 'made/up/url';

            loadImage.createImage = function(url, crossOrigin, deferred) {
                expect(url.indexOf('.tif?cesium=true')).toBeGreaterThanOrEqualTo(0);

                // Just return any old image.
                loadImage.defaultCreateImage('Data/Images/Red16x16.png', crossOrigin, deferred);
            };

            var terrainProvider = new VRTheWorldTerrainProvider({
                url : baseUrl
            });

            return pollToPromise(function() {
                return terrainProvider.ready;
            }).then(function() {
                expect(terrainProvider.tilingScheme instanceof GeographicTilingScheme).toBe(true);
                return terrainProvider.requestTileGeometry(0, 0, 0).then(function(loadedData) {
                    expect(loadedData).toBeInstanceOf(HeightmapTerrainData);
                });
            });
        });

        it('returns undefined if too many requests are already in progress', function() {
            var baseUrl = 'made/up/url';

            var deferreds = [];

            loadImage.createImage = function(url, crossOrigin, deferred) {
                // Do nothing, so requests never complete
                deferreds.push(deferred);
            };

            var terrainProvider = new VRTheWorldTerrainProvider({
                url : baseUrl
            });

            return pollToPromise(function() {
               return terrainProvider.ready;
            }).then(function() {
                var promise = terrainProvider.requestTileGeometry(0, 0, 0);
                expect(promise).toBeDefined();

                var i;
                for (i = 0; i < 10; ++i) {
                    promise = terrainProvider.requestTileGeometry(0, 0, 0);
                }

                promise = terrainProvider.requestTileGeometry(0, 0, 0);
                expect(promise).toBeUndefined();

                for (i = 0; i < deferreds.length; ++i) {
                    deferreds[i].resolve();
                }
            });
        });
    });
});


text:
package cn.com.cennavi.rtic.decoder.match;

import cn.com.cennavi.rtic.decoder.bean.RTICMesage;
import cn.com.cennavi.visualizer.service.parsedata.translate.CommRttData;

public interface IRTICMatcher {

	public RTICMesage match(CommRttData item);

}


text:
package main

import (
	"os"

	"github.com/arschles/godo/actions"
	"github.com/arschles/godo/log"
	"github.com/codegangsta/cli"
)

func main() {
	app := cli.NewApp()
	app.Name = "godo"
	app.Usage = "godo is a build and CI tool for Go projects"
	app.Flags = []cli.Flag{
		cli.BoolFlag{
			Name:  actions.FlagDebug,
			Usage: "Enable verbose debugging output",
		},
		cli.StringFlag{
			Name:  actions.FlagConfigFile,
			Usage: "Specify the name and location of the config file",
		},
	}

	app.Commands = []cli.Command{
		{
			Name:        "build",
			Aliases:     []string{"b"},
			Usage:       "Build your project",
			Description: "This command runs the equivalent of 'go build -o $CURRENT_DIR_NAME'",
			Action:      actions.Build,
		},
		{
			Name:        "docker",
			Aliases:     []string{"d"},
			Description: "Docker related actions",
			Subcommands: []cli.Command{
				{
					Name:        "build",
					Aliases:     []string{"db"},
					Usage:       "Build a Docker image for your project",
					Description: "This command runs the equivalent of 'docker build -t $IMG_NAME $DOCKERFILE_DIR'",
					Action:      actions.DockerBuild,
				},
				{
					Name:        "doc-push",
					Aliases:     []string{"dp"},
					Usage:       "Push the Docker image for your project",
					Description: "This command runs the equivalent of 'docker push $IMG_NAME'",
					Action:      actions.DockerPush,
				},
			},
		},
		{
			Name:    "custom",
			Aliases: []string{"c"},
			Flags: []cli.Flag{
				cli.BoolFlag{
					Name: actions.ListCustomFlag,
				},
			},
			Usage:       "Run a custom target",
			Description: "Run a custom build target.",
			Action:      actions.Custom,
		},
	}

	app.Before = func(c *cli.Context) error {
		log.IsDebugging = c.Bool(actions.FlagDebug)
		return nil
	}

	app.Run(os.Args)
}