text:
/**
 * @author alteredq / http://alteredqualia.com/
 */

THREE.TexturePass = function ( texture, opacity ) {

	THREE.Pass.call( this );

	if ( THREE.CopyShader === undefined )
		console.error( "THREE.TexturePass relies on THREE.CopyShader" );

	var shader = THREE.CopyShader;

	this.uniforms = THREE.UniformsUtils.clone( shader.uniforms );

	this.uniforms[ "opacity" ].value = ( opacity !== undefined ) ? opacity : 1.0;
	this.uniforms[ "tDiffuse" ].value = texture;

	this.material = new THREE.ShaderMaterial( {

		uniforms: this.uniforms,
		vertexShader: shader.vertexShader,
		fragmentShader: shader.fragmentShader

	} );

	this.needsSwap = false;

	this.camera = new THREE.OrthographicCamera( - 1, 1, 1, - 1, 0, 1 );
	this.scene  = new THREE.Scene();

	this.quad = new THREE.Mesh( new THREE.PlaneBufferGeometry( 2, 2 ), null );
	this.scene.add( this.quad );

};

THREE.TexturePass.prototype = Object.create( THREE.Pass.prototype );

THREE.TexturePass.prototype = {

	constructor: THREE.TexturePass,

	render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {

		this.quad.material = this.material;

		renderer.render( this.scene, this.camera, readBuffer, this.clear );

	}

};


text:
Fork the repository to your own account.

Clone the repository to a suitable location on your local machine.

```bash
git clone https://github.com/JetBov/pyrdstation.git
```

**Note:** This will clone the entire contents of the repository at the HEAD revision.

To update the project from within the project's folder you can run the following command:

```bash
git pull --rebase
```

### Building

Install the project's dependencies.

```bash
pip install -r requirements.txt
pip install -r requirements-dev.txt
```

### Testing

Install the project's dependencies.

```bash
pip install -r requirements.txt
```

Next, run the project's tests.

```bash
python setup.py test
```

## Feature Requests

I'm always looking for suggestions to improve this project. If you have a suggestion for improving an existing feature, or would like to suggest a completely new feature, please file an issue with my [GitHub repository](https://github.com/JetBov/pyrdstation/issues).

## Bug Reports

My project isn't always perfect, but I strive to always improve on that work. You may file bug reports on the [GitHub repository](https://github.com/JetBov/pyrdstation/issues) site.

## Pull Requests

Along with my desire to hear your feedback and suggestions, I'm also interested in accepting direct assistance in the form of new code or documentation.

Please feel free to file merge requests against my [GitHub repository](https://github.com/JetBov/pyrdstation/pulls).

redpajama_set_name: RedPajamaGithub


text:
/* global describe, it, before, after */

'use strict';

const preq   = require('preq');
const assert = require('../../utils/assert.js');
const server = require('../../utils/server.js');

if (!server.stopHookAdded) {
    server.stopHookAdded = true;
    after(() => server.stop());
}

describe('page gets', function() {

    this.timeout(20000); // eslint-disable-line no-invalid-this

    before(() => server.start());

    // common URI prefix for the page
    const uri = `${server.config.uri}en.wikipedia.org/v1/page/Table_(database)/`;

    it('should get the whole page body', () => {
        return preq.get({
            uri
        }).then((res) => {
            // check the status
            assert.status(res, 200);
            // check the returned Content-Type header
            assert.contentType(res, 'text/html');
            // inspect the body
            assert.notDeepEqual(res.body, undefined, 'No body returned!');
            // this should be the right page
            if (!/Table_\(database\)#cite/.test(res.body)) {
                throw new Error('Not the title I was expecting!');
            }
        });
    });

    it('should get only the leading section', () => {
        return preq.get({
            uri: `${uri}lead`
        }).then((res) => {
            // check the status
            assert.status(res, 200);
            // check the returned Content-Type header
            assert.contentType(res, 'text/html');
            // inspect the body
            assert.notDeepEqual(res.body, undefined, 'No body returned!');
            // this should be the right page
            if (!/Table/.test(res.body)) {
                throw new Error('Not the page I was expecting!');
            }
            // .. and should start with

            if (!/^
/.test(res.body)) {
                throw new Error('This is not a leading section!');
            }
        });
    });

    it('should throw a 404 for a non-existent page', () => {
        return preq.get({
            uri: `${server.config.uri}en.wikipedia.org/v1/page/Foobar_and_friends`
        }).then((res) => {
            // if we are here, no error was thrown, not good
            throw new Error('Expected an error to be thrown, got status: ', res.status);
        }, (err) => {
            // inspect the status
            assert.deepEqual(err.status, 404);
        });
    });
});


text:
/*
 Combined processedModules by KISSY Module Compiler:

 editor/plugin/underline
*/

KISSY.add("editor/plugin/underline", ["./font/ui", "./underline/cmd", "./button"], function(S, require) {
  var ui = require("./font/ui");
  var cmd = require("./underline/cmd");
  require("./button");
  function Underline() {
  }
  S.augment(Underline, {pluginRenderUI:function(editor) {
    cmd.init(editor);
    editor.addButton("underline", {cmdType:"underline", tooltip:"\u4e0b\u5212\u7ebf"}, ui.Button);
    editor.docReady(function() {
      editor.get("document").on("keydown", function(e) {
        if(e.ctrlKey && e.keyCode === S.Node.KeyCode.U) {
          editor.execCommand("underline");
          e.preventDefault()
        }
      })
    })
  }});
  return Underline
});


text:
YUI.add('gallery-bt-pushpop', function (Y, NAME) {

/**
 * Provide PushPop widget extension to handle Container push/pop transition.
 *
 * @module gallery-bt-pushpop
 * @static
 */
var RENDERUI = 'renderUI',

    PUSHPOP = 'pushpop',

    HEIGHT_CHANGE = 'heightChange',
    WIDTH_CHANGE = 'widthChange',
    VISIBLE_CHANGE = 'visibleChange',

    ADDCHILD = 'addChild',

    UNDERLAY_CFGS = {
        none: 'none',
        'with': 'with',
        after: 1
    },

    DIRECTIONS = {
        right: [1, 0],
        left: [-1, 0],
        top: [0, -1],
        bottom: [0, 1],
        tr: [1, -1],
        br: [1, 1],
        tl: [-1, -1],
        bl: [-1, 1]
    },

    nodeBody = Y.one('body'),
    pfixed = Y.Bottle.Device.getPositionFixedSupport(),

    moveWidget = function (W, T) {
        W.get('boundingBox').setStyles({
            left: T.left,
            top: T.top
        });
    },

/**
 * PushPop extension that adds push, pop unshift animation and methods to Widget Parent
 *
 * @class PushPop
 * @namespace Bottle
 * @param [config] {Object} User configuration object
 */
PushPop = function () {
    /**
     * internal eventhandlers, keep for destructor
     *
     * @property _bppEventHandlers
     * @type EventHandle
     * @private
     */
    this._bppEventHandlers = new Y.EventHandle([
        Y.after(this._renderUIPushPop, this, RENDERUI),

        this.before(ADDCHILD, this._beforePPAddChild),
        this.after(ADDCHILD, this._afterPPAddChild),
        this.after(WIDTH_CHANGE, this._afterPPWidthChange),
        this.after(HEIGHT_CHANGE, this._afterPPHeightChange),
        this.on('destroy', this._destroyPushPop)
    ]);
};

/**
 * Static property used to define the default attribute configuration.
 *
 * @property ATTRS
 * @protected
 * @type Object
 * @static
 */
PushPop.ATTRS = {
    /**
     * Use native browser scroll
     *
     * @attribute action
     * @type String
     * @default unveil
     */
    nativeScroll: {
        value: true,
        validator: Y.Lang.isBool,
        writeOnce: 'initOnly',
        setter: function (V) {
            var B = this.get('boundingBox');

            if (B) {
                B.toggleClass('btp-nscroll', V);
            }
            return V;
        }
    },

    /**
     * Default child class
     *
     * @attribute defaultChildType
     * @type Object
     * @default Y.Bottle.Container
     */
    defaultChildType: {
        value: Y.Bottle.Container
    },

    /**
     * Default css3 selector to add children when rendering
     *
     * @property childQuery
     * @type String
     * @default '> [data-role=container]'
     */
    childQuery: {
        value: '> [data-role=container]',
        writeOnce: true
    },

    /**
     * Default initial attributes for all children when rendering
     *
     * @property cfgChild
     * @type Object
     * @default {}
     */
    cfgChild: {
        value: {},
        validator: Y.Lang.isObject,
        writeOnce: true
    },

    /**
     * Underlay animation, can be one of:
     *

     *
none

no underlay animation
     *
with

same time with  push/pop animation

     *
after

just after push/pop animation ends

     *
{Number}

wait N million seconds after push/pop animation ends

     *

     *
     * @attribute underlay
     * @type String
     * @default none
     */
    underlay: {
        value: 'none',
        validator: function (V) {
            return UNDERLAY_CFGS[V] || Y.Lang.isNumber(V);
        },
        setter: function (V) {
            return UNDERLAY_CFGS[V];
        }
    },

    /**
     * Default transition setting for push pop
     *
     * @attribute ppTrans
     * @type Object
     * @default {dutation: 0.5}
     */
    ppTrans: {
        value: {
            duration: 0.5
        },
        lazyAdd: false,
        validator: Y.Lang.isObject,
        setter: function (cfg) {
            this._updateTransitions(0, cfg);
            return cfg;
        }
    },

    /**
     * Push direction, can be one of 'right', 'left', 'top', 'bottom', 'tr', 'br', 'tl', 'bl'
     *
     * @attribute pushFrom
     * @type String
     * @default 'right'
     */
    pushFrom: {
        value: 'right',
        lazyAdd: false,
        validator: function (D) {
            return DIRECTIONS[D];
        },
        setter: function (D) {
            this._updateTransitions(D);
            return D;
        }
    }
};

/**
 * Static property used to define the default HTML parsing rules
 *
 * @property HTML_PARSER
 * @protected
 * @static
 * @type Object
 */
PushPop.HTML_PARSER = {
    nativeScroll: function (srcNode) {
        var D = srcNode.getData('native-scroll');

        if (D === 'false') {
            return false;
        }

        if (D === 'true') {
            return true;
        }
        return Y.Bottle.Device.getTouchSupport();
    },
    childQuery: function (srcNode) {
        return srcNode.getData('child-query');
    },
    cfgChild: function (srcNode) {
        try {
            return Y.JSON.parse(srcNode.getData('cfg-child'));
        } catch (e) {
        }
    },
    ppTrans: function (srcNode) {
        try {
            return Y.JSON.parse(srcNode.getData('cfg-pp-trans'));
        } catch (e) {
        }
    },
    pushFrom: function (srcNode) {
        return srcNode.getData('push-from');
    },
    underlay: function (srcNode) {
        return srcNode.getData('underlay');
    }
};

PushPop.prototype = {
    initializer: function () {
        var once;

        if (this.get('visible')) {
            this._addAllChildren();
        } else {
            once = this.after(VISIBLE_CHANGE, function (E) {
                if (E.newVal) {
                    once.detach();
                    this._addAllChildren();
                }
            });
        }
    },

    /**
     * query and get all children then add into this widget
     *
     * @method _addAllChildren
     * @protected
     */
    _addAllChildren: function () {
        var query = this.get('childQuery'),
            cfg = this.get('cfgChild'),
            L;

        if (!query || this._bppAllAdded) {
            return;
        }

        this._bppAllAdded = true;

        this.get('contentBox').all(query).each(function (O) {
            this.add(Y.merge(cfg, {srcNode: O, disabled: true}));
        }, this);

        L = this.item(this.size() - 1);
        if (L) {
            L.enable();
        }
    },

    /**
     * do clean up jobs when destroyed
     *
     * @method _destroyPushPop
     * @private
     */
    _destroyPushPop: function () {
        this._bppEventHandlers.detach();
        delete this._bppEventHandlers;
    },

    /**
     * sync one size (height or width) with all children
     *
     * @method _updateTransitions
     * @param [direction] {String} should be one of 'right', 'left', 'top', 'bottom',
              'tr', 'br', 'tl', 'bl'. If omitted, current 'pushFrom' attribute will be used
     * @param [transition] {Object} transition config. If omitted, current 'ppTrans' attribute will be used
     * @protected
     */
    _updateTransitions: function (direction, transition) {
        var D = direction || this.get('pushFrom'),
            trans = transition || this.get('ppTrans'),
            xy = DIRECTIONS[D];

        this._PUSHPOP_TRANS = Y.merge(trans, {
            left: xy[0] * this.get('width') + 'px',
            top: xy[1] * this.get('height') + 'px'
        });

        this._DONE_TRANS = Y.merge(trans, {
            left: 0,
            top: 0
        });

        this._UNDERLAY_TRANS = Y.merge(trans, {
            left: -xy[0] * this.get('width') + 'px',
            top: -xy[1] * this.get('height') + 'px'
        });
    },

    /**
     * sync one size (height or width) with all children
     *
     * @method _syncOneSize
     * @param sideName {String} should be 'width' or 'height'
     * @protected
     */
    _syncOneSide: function (HW) {
        var hw = this.get(HW);
        this.each(function () {
            this.set(HW, hw);
        });
        this._updateTransitions();
    },

    /**
     * handle child Widget height when self height changed
     *
     * @method _afterPPHeightChange
     * @protected
     */
    _afterPPHeightChange: function () {
        this._syncOneSide('height');
    },

    /**
     * handle child Widget width when self width changed
     *
     * @method _afterPPWidthChange
     * @protected
     */
    _afterPPWidthChange: function () {
        this._syncOneSide('width');
    },

    /**
     * handle add child Widget, if not defaultChildType, cancel add
     *
     * @method _beforePPAddChild
     * @protected
     */
    _beforePPAddChild: function (E) {
        if (Y.instanceOf(E.child, this.get('defaultChildType'))) {
            E.child.set('nativeScroll', this.get('nativeScroll'));
        } else {
            E.halt();
        }
    },

    /**
     * handle child Widget, sync size after add
     *
     * @method _afterPPAddChild
     * @protected
     */
    _afterPPAddChild: function (E) {
        this.sync(E.child);
    },

    /**
     * add proper classname for pushpop
     *
     * @method _renderUIPushPop
     * @protected
     */
    _renderUIPushPop: function () {
        this.get('boundingBox').addClass(Y.Widget.getClassName(PUSHPOP));
    },

    /**
     * Get scroll position for both native scroll or Page Container scrollView.
     *
     * @method getScrollY
     * @return scrollY {Number} the position of vertical scroll
     */
    getScrollY: function () {
        return this.get('nativeScroll') ? Y.Bottle.Device.getScrollY() : this.topScroll().get('scrollY');
    },

    /**
     * Get scroll content height for both native scroll or Page Container scrollView.
     *
     * @method getScrollHeight
     * @return scrollY {Number} the position of vertical scroll
     */
    getScrollHeight: function () {
        return this.get('nativeScroll') ? Y.DOM.docHeight() : this.topScroll()._maxScrollY;
    },

    /**
     * Scroll the page to a position or a Node, works in scrollView mode and native scroll mode.
     *
     * @method scrollTo
     * @param position {Number|Node} the Y position or the Node to scroll into viewport.
     * @param [duration] {Number} ms of the scroll animation.
     * @static
     */
    scrollTo: function (position, duration) {
        var S = this.topScroll(),
            Y;
        if (this.get('nativeScroll')) {
            Y.Bottle.Device.scrollTo(0, position.getY ? position.getY() : position);
        } else {
            if (position.getY) {
                Y = S.get('scrollY');
                S.scrollTo(0, 0, 0);
                position = position.getY() - S.get('boundingBox').getY();
                S.scrollTo(0, Y, 0);
            }
            S.scrollTo(0, position, duration);
        }
    },

    /**
     * When nativeScroll enabled, set page size and simulate original scroll position
     * with new top position; or restore to original page size and scroll position.
     *
     * @method resetScroll
     * @param height {Number|Node} new page height, or new Node element to align with height.
     *        if undefined, restore to original page size and scroll position.
     * @param position {Number} new page position. if undefined, scroll to 0.
     */
    resetScroll: function (height, position) {
        var bb = this.get('boundingBox'),
            S,
            H = (height && height.get) ? height.get('offsetHeight') : height;

        if (height) {
            S = this.getScrollY();
            Y.Bottle.nativeScrollPositions.push({
                height: H,
                pageHeight: nodeBody.getComputedStyle('height'),
                pageScroll: S,
                node: height.get ? height : null
            });
            nodeBody.setStyles({
                overflow: 'hidden',
                height: Math.max(H, Y.Bottle.Device.getBrowserHeight()) + 'px'
            });
            Y.Bottle.Device.scrollTo(0, (position ? position : 0));
            bb.setStyles({
                top: - S + 'px',
                position: pfixed ? 'fixed' : 'relative'
            });
        } else {
            H = Y.Bottle.nativeScrollPositions.pop();
            nodeBody.setStyles({
                overflow: '',
                height: 'auto'
            });
            bb.setStyles({
                top: 0,
                position: ''
            });
            Y.Bottle.Device.scrollTo(0, H.pageScroll);
        }
    },

    /**
     * sync width and height from DOM to widget object
     *
     * @method syncWH
     */
    syncWH: function () {
        var O = this.get('boundingBox'),
            P = this.get('contentBox'),
            W = O.get('offsetWidth') || P.get('offsetWidth'),
            H = O.get('offsetHeight') || P.get('offsetHeight');

        if (!this.get('height') && H && !this.get('nativeScroll')) {
            this.set('height', H);
        }

        if (!this.get('width') && W) {
            this.set('width', W);
        }
    },

    /**
     * sync a widget width and height with self
     *
     * @method sync
     * @param widget {Widget} widget to be synced
     * @chainable
     */
    sync: function (widget) {
        widget.set('width', this.get('width'));
        widget.set('height', this.get('height'));
        return this;
    },

    /**
     * move the widget by setting css top and left only
     *
     * @method absMove
     * @param x {Number} x position
     * @param y {Number} y position
     * @chainable
     */
    absMove: function (x, y) {
        this.get('boundingBox').setStyles({
            top: y + 'px',
            left: x + 'px'
        });
        return this;
    },

    /**
     * get top (last) item
     *
     * @method topItem
     * @return {WidgetChild} the top widget child
     */
    topItem: function () {
        this._addAllChildren();
        return this.item(this.size() - 1);
    },

    /**
     * Update content size and scroll position
     *
     * @method updateContentSize
     * @return updated {Boolean} true when content size updated, false when no child
     */
    updateContentSize: function () {
        var O = this.topItem();

        if (O) {
            O.updateContentSize();
            return true;
        } else {
            return false;
        }
    },

    /**
     * get top (last) scrollView
     *
     * @method topScroll
     * @return {ScrollView|undefined} the scrollview inside top widget child. If scrollview can not be found, return undefined.
     */
    topScroll: function () {
        var top = this.topItem();

        return top ? top.get('scrollView') : undefined;
    },

    /**
     * get child by widget or index
     *
     * @method getChild
     * @param widget {Widget | Integer} the child widget or index of child
     * @return { mixed } the child widget or undefined
     */
    getChild: function (widget) {
        if (Y.instanceOf(widget, this.get('defaultChildType'))) {
            return widget;
        }
        if (Y.Lang.isNumber(widget)) {
            return this.item(widget);
        }
    },

    /**
     * move a child widget to a new position
     *
     * @method moveChild
     * @param widget {Widget | Integer} the child widget or index of child
     * @param transition {Object} transition configuration
     * @param [done] {Boolean | Function} When is true, move the child directly. When is a function, callback the function when transition done.
     * @chainable
     */
    moveChild: function (widget, transition, done) {
        var W = this.getChild(widget),
            that = this;

        if (done === true) {
            moveWidget(W, transition);
        } else {
            if (this.get('visible')) {
                W.get('boundingBox').transition(transition, function () {
                    if (done) {
                        done.apply(that);
                    }
                });
            } else {
                moveWidget(W, transition);
                if (done) {
                    done.apply(that);
                }
            }
        }
        return this;
    },

    /**
     * push a widget into html, overlap on plugged widget
     *
     * @method push
     * @param widget {Widget} widget to be pushed
     * @chainable
     */
    push: function (widget) {
        var index = this.size() - 1,
            underlay = this.get('underlay');

        if (underlay === 'with') {
            this.moveChild(index, this._UNDERLAY_TRANS);
        }

        this.add(widget);
        this.moveChild(widget, this._PUSHPOP_TRANS, true);

        if (Y.Lang.isNumber(underlay)) {
            return this.moveChild(index, this._UNDERLAY_TRANS, function () {
                Y.later(underlay, this, function () {
                    this.moveChild(widget, this._DONE_TRANS, function () {
                        this.item(index).disable();
                    });
                });
            });
        } else {
            return this.moveChild(widget, this._DONE_TRANS, function () {
                this.item(index).disable();
            });
        }
    },

    /**
     * pop current widget off html, and remove the widget from PushPop widget
     *
     * @method pop
     * @param [keep] {Boolean} true means do not destroy the widget. Default to destroy the widget after pop animation.
     * @chainable
     */
    pop: function (keep) {
        var index = this.size() - 1,
            widget = this.item(index),
            w2 = this.item(index - 1),
            underlay = this.get('underlay');

        if (!widget) {
            return this;
        }

        if (w2) {
            w2.enable();
        }

        if (underlay !== 'none') {
            this.moveChild(index - 1, this._UNDERLAY_TRANS, true);
            if ((underlay === 'with') && index) {
                this.moveChild(index - 1, this._DONE_TRANS);
            }
        }

        return this.moveChild(widget, this._PUSHPOP_TRANS, function () {
            widget.remove();
            if (!keep) {
                Y.later(850, null, function() {
                    widget.destroy(true);
                });
            }
            if (index && Y.Lang.isNumber(underlay)) {
                Y.later(underlay, this, function () {
                    this.moveChild(index - 1, this._DONE_TRANS);
                });
            }
        });
    }
};

Y.namespace('Bottle').PushPop = PushPop;

}, 'gallery-2013.04.10-22-48', {"requires": ["base-build", "widget-parent", "gallery-bt-container"]});


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace MetroDemo.ExampleViews
{
    /// <summary>
    /// Interaction logic for DataGridExamples.xaml
    /// </summary>
    public partial class DataGridExamples : UserControl
    {
        public DataGridExamples()
        {
            InitializeComponent();
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<XnaContent>
  <Asset Type="RolePlayingGameData.FixedCombat">
    <Name>Misc4</Name>
    <Entries>
      <Item>
        <ContentName>OrcSoldier</ContentName>
        <Count>1</Count>
      </Item>
      <Item>
        <ContentName>OrcCaptain</ContentName>
        <Count>2</Count>
      </Item>
      <Item>
        <ContentName>BanditMage</ContentName>
        <Count>2</Count>
      </Item>
    </Entries>
  </Asset>
</XnaContent>


text:
struct ofxCommon
{
    ~ofxCommon();
    ofxCommon();

    struct type
    {
        ~type();
        type();

        ofxRx::Mouse mouse;
        ofxRx::Keyboard keyboard;
        ofxRx::Updates updates;

#if RXCPP_VIEW_TRACE
        ofxRxTrace& vt;
#endif
    };

    std::shared_ptr<type> shared;

    inline ofxRx::Mouse& mouse() {return shared->mouse;}
    inline ofxRx::Keyboard& keyboard() {return shared->keyboard;}
    inline ofxRx::Updates& updates() {return shared->updates;}

    rx::observable<ofPoint> window_center();
    rx::observable<ofPoint> all_movement();
    rx::observable<ofPoint> just_moves();
    rx::observable<ofPoint> just_drags();
    rx::observable<ofPoint> never();

    void trace_off();
    void trace_on();

    void setup();
    void draw();
};


text:
<?php
Class user_Model extends CI_Model
{
		function _construct(){
			parent::_construct;
			$this->load->database();
		}
	public function getrole($userid)//Pobiera rolę przypisaną do urzytkownika
	{
		$this->db->select('role');
		$this->db->where('id',$userid);
		$s=$this->db->get('author');
		$r=$s->row();
		$d=$r->role;
		return $d;
	}
	public function getinfo($username)
	{
		$this->db->select('authorname, description, authormail, last_login, created');
		$this->db->where('authorname',$username);
		$s=$this->db->get('author');
		$s->result();
		return $s;
	}
	public function addopis($id, $opis)
	{
		$this->db->set('description',$opis);
		$this->db->where('id',$id);
		$this->db->update('author');
	}
	public function lastwatki($username)
	{
		$this->db->select('name, id, posts');
		$this->db->where('authorname',$username);
		$s=$this->db->get('watki');
		return $s;
	}
	public function lastposty($username)
	{
		$this->db->select('name, id');
		$this->db->where('authorname',$username);
		$s=$this->db->get('posty');
		return $s;
	}
		public function lastwpisy($username)
	{
		$this->db->select('text, id, postyid');
		$this->db->where('authorname',$username);
		$s=$this->db->get('wpisy');
		return $s;
	}
	public function ban($id,$reason)//banuje urzytkownika o danym id
	{
		$this->db->set('banned',1);
		$this->db->set('ban_reason',$reason);
		$this->db->where('id',$id);
		$this->db->update('author');
	}
}


text:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

<meta property="og:title" content="Blowout Module" />

<meta property="og:type" content="website" />

<meta property="og:url" content="modules/blowout.html" />

<meta property="og:description" content="This page is an index and launchpad to explore all of the classes, methods, and functions in the blowout module of tamoc. blowout Class Objects: blowout.Blowout Methods: blowout Module Helper Funct..." />

    <title>Blowout Module</title>

  <link href="../_static/styles/theme.css?digest=1999514e3f237ded88cf" rel="stylesheet">
<link href="../_static/styles/pydata-sphinx-theme.css?digest=1999514e3f237ded88cf" rel="stylesheet">

  <link rel="stylesheet"
    href="../_static/vendor/fontawesome/5.13.0/css/all.min.css">
  <link rel="preload" as="font" type="font/woff2" crossorigin
    href="../_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2">
  <link rel="preload" as="font" type="font/woff2" crossorigin
    href="../_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2">

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" href="../_static/styles/sphinx-book-theme.css?digest=62ba249389abaaa9ffc34bf36a076bdc1d65ee18" type="text/css" />
    <link rel="stylesheet" type="text/css" href="../_static/copybutton.css" />
    <link rel="stylesheet" type="text/css" href="../_static/panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css" />
    <link rel="stylesheet" type="text/css" href="../_static/panels-bootstrap.5fd3999ee7762ccc51105388f4a9d115.css" />
    <link rel="stylesheet" type="text/css" href="../_static/panels-variables.06eb56fa6e07937060861dad626602ad.css" />

  <link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=1999514e3f237ded88cf">

    <link rel="shortcut icon" href="../_static/tamoc_favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="tamoc.blowout" href="../generated/tamoc.blowout.html" />
    <link rel="prev" title="tamoc.particle_size_models.plot_phase" href="../generated/tamoc.particle_size_models.plot_phase.html" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="docsearch:language" content="None">

<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle navigation sidebar">

Toggle navigation sidebar

<input type="checkbox" class="sidebar-toggle" name="__page-toc" id="__page-toc" aria-label="Toggle in-page Table of Contents">

Toggle in-page Table of Contents

<form class="bd-search d-flex align-items-center" action="../search.html" method="get">

  <input type="search" class="form-control" name="q" id="search-input" placeholder="Search the docs ..." aria-label="Search the docs ..." autocomplete="off" >
</form>

  Contents:

   Getting Started

  <input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox"/>

     Installation

     How to use this documentation

     ReadMe File

     License

     Release Notes

     Reporting Bugs

   User's Guide

  <input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" type="checkbox"/>

     Equations of State for Seawater

     Tools for Manipulating Ambient Profile Data

     Discrete Bubble Model

     Discrete Bubble Model – Properties Functions

     Dispersed Phases

     Single Bubble Model

     Stratified Plume Model User's Guide

     Bent Plume Model

     Params Module

     Blowout Module

     Particle Size Models

   Example Scripts

  <input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" type="checkbox"/>

     Ambient Scripts

    <input class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" type="checkbox"/>

       bin.ambient.profile_from_txt

       bin.ambient.profile_from_lab

       bin.ambient.profile_from_ctd

       bin.ambient.profile_from_world_ocean

       bin.ambient.profile_append

       bin.ambient.profile_extending

       bin.ambient.nc_profile_from_txt

       bin.ambient.nc_profile_from_lab

       bin.ambient.nc_profile_from_ctd

       bin.ambient.nc_profile_append

       bin.ambient.nc_profile_extending

       bin.ambient.np_profile_from_txt

       bin.ambient.np_profile_from_lab

       bin.ambient.np_profile_from_ctd

     Discrete Particle Model Scripts

    <input class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" type="checkbox"/>

       bin.dbm.air_eos

       bin.dbm.co2_eos

       bin.dbm.dead_oil

       bin.dbm.gas_bubbles

       bin.dbm.hydrocarbon_drops

       bin.dbm.droplet_rise

       bin.dbm.equilibrium

     Single Bubble Model Scripts

    <input class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" type="checkbox"/>

       bin.sbm.bubble

       bin.sbm.drop

       bin.sbm.particle

       bin.sbm.sbm_file_io

       bin.sbm.seep_bubble

       bin.sbm.drop_biodeg

       bin.sbm.CO2_bubble

     Stratified Plume Model Scripts

    <input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" type="checkbox"/>

       bin.spm.lake_part

       bin.spm.lake_bub

       bin.spm.spm_blowout_sim

       bin.spm.spm_file_io

     Bent Plume Model Scripts

    <input class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" type="checkbox"/>

       bin.bpm.crossflow_plume

       bin.bpm.bpm_blowout_sim

     Particle Size Model Scripts

    <input class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" type="checkbox"/>

       bin.psm.oil_jet

       bin.psm.blowout_jet

     Blowout Scripts

    <input class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" type="checkbox"/>

       bin.bpm.blowout_obj

     Non-Dimensional Parameters Scripts

    <input class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" type="checkbox"/>

       bin.params.scales

   API Reference

  <input checked="" class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" type="checkbox"/>

     Seawater Module

    <input class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" type="checkbox"/>

       tamoc.seawater

       tamoc.seawater.density

       tamoc.seawater.mu

       tamoc.seawater.sigma

       tamoc.seawater.k

       tamoc.seawater.cp

       tamoc.seawater.pH

     Ambient Module

    <input class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" type="checkbox"/>

       tamoc.ambient

       tamoc.ambient.Profile

       tamoc.ambient.BaseProfile

       tamoc.ambient.Profile.get_values

       tamoc.ambient.Profile.get_units

       tamoc.ambient.Profile.append

       tamoc.ambient.Profile.extend_profile_deeper

       tamoc.ambient.Profile.add_computed_gas_concentrations

       tamoc.ambient.Profile.buoyancy_frequency

       tamoc.ambient.Profile.insert_density

       tamoc.ambient.Profile.insert_potential_density

       tamoc.ambient.Profile.insert_buoyancy_frequency

       tamoc.ambient.Profile.plot_parameter

       tamoc.ambient.Profile.plot_profiles

       tamoc.ambient.Profile.plot_physical_profiles

       tamoc.ambient.Profile.plot_chem_profiles

       tamoc.ambient.Profile.close_nc

       tamoc.ambient.xr_check_units

       tamoc.ambient.xr_convert_units

       tamoc.ambient.xr_coarsen_dataset

       tamoc.ambient.xr_stabilize_dataset

       tamoc.ambient.xr_dataset_to_array

       tamoc.ambient.xr_array_to_dataset

       tamoc.ambient.xr_add_data_from_numpy

       tamoc.ambient.create_nc_db

       tamoc.ambient.fill_nc_db

       tamoc.ambient.fill_nc_db_variable

       tamoc.ambient.get_nc_data

       tamoc.ambient.get_xarray_data

       tamoc.ambient.add_data

       tamoc.ambient.extract_profile

       tamoc.ambient.coarsen

       tamoc.ambient.stabilize

       tamoc.ambient.compute_pressure

       tamoc.ambient.convert_units

       tamoc.ambient.get_world_ocean

       tamoc.ambient.load_raw

     Discrete Particle Module

    <input class="toctree-checkbox" id="toctree-checkbox-15" name="toctree-checkbox-15" type="checkbox"/>

       tamoc.dbm

       tamoc.dbm.FluidMixture

       tamoc.dbm.FluidParticle

       tamoc.dbm.InsolubleParticle

       tamoc.dbm.FluidMixture.masses

       tamoc.dbm.FluidMixture.mass_frac

       tamoc.dbm.FluidMixture.moles

       tamoc.dbm.FluidMixture.mol_frac

       tamoc.dbm.FluidMixture.partial_pressures

       tamoc.dbm.FluidMixture.density

       tamoc.dbm.FluidMixture.fugacity

       tamoc.dbm.FluidMixture.viscosity

       tamoc.dbm.FluidMixture.interface_tension

       tamoc.dbm.FluidMixture.equilibrium

       tamoc.dbm.FluidMixture.solubility

       tamoc.dbm.FluidMixture.diffusivity

       tamoc.dbm.FluidMixture.hydrate_stability

       tamoc.dbm.FluidMixture.biodegradation_rate

       tamoc.dbm.FluidParticle.masses

       tamoc.dbm.FluidParticle.mass_frac

       tamoc.dbm.FluidParticle.moles

       tamoc.dbm.FluidParticle.mol_frac

       tamoc.dbm.FluidParticle.partial_pressures

       tamoc.dbm.FluidParticle.density

       tamoc.dbm.FluidParticle.fugacity

       tamoc.dbm.FluidParticle.viscosity

       tamoc.dbm.FluidParticle.interface_tension

       tamoc.dbm.FluidParticle.equilibrium

       tamoc.dbm.FluidParticle.solubility

       tamoc.dbm.FluidParticle.diffusivity

       tamoc.dbm.FluidParticle.hydrate_stability

       tamoc.dbm.FluidParticle.biodegradation_rate

       tamoc.dbm.FluidParticle.masses_by_diameter

       tamoc.dbm.FluidParticle.diameter

       tamoc.dbm.FluidParticle.particle_shape

       tamoc.dbm.FluidParticle.slip_velocity

       tamoc.dbm.FluidParticle.surface_area

       tamoc.dbm.FluidParticle.mass_transfer

       tamoc.dbm.FluidParticle.heat_transfer

       tamoc.dbm.FluidParticle.return_all

       tamoc.dbm.InsolubleParticle.density

       tamoc.dbm.InsolubleParticle.viscosity

       tamoc.dbm.InsolubleParticle.interface_tension

       tamoc.dbm.InsolubleParticle.biodegradation_rate

       tamoc.dbm.InsolubleParticle.mass_by_diameter

       tamoc.dbm.InsolubleParticle.diameter

       tamoc.dbm.InsolubleParticle.particle_shape

       tamoc.dbm.InsolubleParticle.slip_velocity

       tamoc.dbm.InsolubleParticle.surface_area

       tamoc.dbm.InsolubleParticle.heat_transfer

       tamoc.dbm.InsolubleParticle.return_all

       tamoc.dbm.equil_MM

       tamoc.dbm.stability_analysis

       tamoc.dbm.successive_substitution

       tamoc.dbm.gas_liq_eq

     Discrete Particle Module – Properties Functions

    <input class="toctree-checkbox" id="toctree-checkbox-16" name="toctree-checkbox-16" type="checkbox"/>

       tamoc.dbm_p

       tamoc.dbm_p.cubic_roots

       tamoc.dbm_p.eotvos

       tamoc.dbm_p.morton

       tamoc.dbm_p.reynolds

       tamoc.dbm_p.h_parameter

       tamoc.dbm_p.particle_shape

       tamoc.dbm_p.theta_w_sc

       tamoc.dbm_p.surface_area_sc

       tamoc.dbm_p.surface_area_sphere

       tamoc.dbm_p.us_sphere

       tamoc.dbm_p.us_ellipsoid

       tamoc.dbm_p.us_spherical_cap

       tamoc.dbm_p.xfer_kumar_hartland

       tamoc.dbm_p.xfer_johnson

       tamoc.dbm_p.xfer_clift

       tamoc.dbm_p.xfer_sphere

       tamoc.dbm_p.xfer_ellipsoid

       tamoc.dbm_p.xfer_spherical_cap

       tamoc.dbm_p.density

       tamoc.dbm_p.fugacity

       tamoc.dbm_p.volume_trans

       tamoc.dbm_p.z_pr

       tamoc.dbm_p.coefs

       tamoc.dbm_p.mole_fraction

       tamoc.dbm_p.viscosity

       tamoc.dbm_p.kh_insitu

       tamoc.dbm_p.sw_solubility

       tamoc.dbm_p.diffusivity

       tamoc.dbm_p.kvsi_hydrate

     DBM Utilities Module

    <input class="toctree-checkbox" id="toctree-checkbox-17" name="toctree-checkbox-17" type="checkbox"/>

       tamoc.dbm_utilities

       tamoc.dbm_utilities.get_oil

       tamoc.dbm_utilities.load_tamoc_oil

       tamoc.dbm_utilities.format_dbm_data

       tamoc.dbm_utilities.mix_gas_for_gor

       tamoc.dbm_utilities.natural_gas

       tamoc.dbm_utilities.gas_fraction

       tamoc.dbm_utilities.set_mass_fluxes

       tamoc.dbm_utilities.load_adios_oil

       tamoc.dbm_utilities.load_simap_oil

       tamoc.dbm_utilities.sequence_names

       tamoc.dbm_utilities.get_solubility

       tamoc.dbm_utilities.get_henry_constant

       tamoc.dbm_utilities.get_preos_params

       tamoc.dbm_utilities.pedersen

       tamoc.dbm_utilities.compute_Vb

       tamoc.dbm_utilities.Vc_tuning

       tamoc.dbm_utilities.print_chemdata

       tamoc.dbm_utilities.print_composition

       tamoc.dbm_utilities.print_petroleum_props

     Dispersed Phases Module

    <input class="toctree-checkbox" id="toctree-checkbox-18" name="toctree-checkbox-18" type="checkbox"/>

       tamoc.dispersed_phases

       tamoc.dispersed_phases.SingleParticle

       tamoc.dispersed_phases.PlumeParticle

       tamoc.dispersed_phases.SingleParticle.properties

       tamoc.dispersed_phases.SingleParticle.diameter

       tamoc.dispersed_phases.SingleParticle.biodegradation_rate

       tamoc.dispersed_phases.PlumeParticle.properties

       tamoc.dispersed_phases.PlumeParticle.diameter

       tamoc.dispersed_phases.PlumeParticle.biodegradation_rate

       tamoc.dispersed_phases.PlumeParticle.update

       tamoc.dispersed_phases.initial_conditions

       tamoc.dispersed_phases.save_particle_to_nc_file

       tamoc.dispersed_phases.load_particle_from_nc_file

       tamoc.dispersed_phases.shear_entrainment

       tamoc.dispersed_phases.hydrate_formation_time

       tamoc.dispersed_phases.zfe_volume_flux

       tamoc.dispersed_phases.wuest_ic

       tamoc.dispersed_phases.bf_average

       tamoc.dispersed_phases.get_chem_names

       tamoc.dispersed_phases.particles_state_space

     Single Bubble Model Module

    <input class="toctree-checkbox" id="toctree-checkbox-19" name="toctree-checkbox-19" type="checkbox"/>

       tamoc.single_bubble_model

       tamoc.single_bubble_model.Model

       tamoc.single_bubble_model.ModelParams

       tamoc.single_bubble_model.Model.simulate

       tamoc.single_bubble_model.Model.save_sim

       tamoc.single_bubble_model.Model.save_txt

       tamoc.single_bubble_model.Model.load_sim

       tamoc.single_bubble_model.Model.post_process

       tamoc.single_bubble_model.calculate_path

       tamoc.single_bubble_model.derivs

       tamoc.single_bubble_model.sbm_ic

       tamoc.single_bubble_model.plot_state_space

     Stratified Plume Model Module

    <input class="toctree-checkbox" id="toctree-checkbox-20" name="toctree-checkbox-20" type="checkbox"/>

       tamoc.stratified_plume_model

       tamoc.stratified_plume_model.Model

       tamoc.stratified_plume_model.ModelParams

       tamoc.stratified_plume_model.InnerPlume

       tamoc.stratified_plume_model.OuterPlume

       tamoc.stratified_plume_model.Model.simulate

       tamoc.stratified_plume_model.Model.save_sim

       tamoc.stratified_plume_model.Model.save_txt

       tamoc.stratified_plume_model.Model.load_sim

       tamoc.stratified_plume_model.Model.plot_state_space

       tamoc.stratified_plume_model.Model.plot_all_variables

       tamoc.stratified_plume_model.InnerPlume.update

       tamoc.stratified_plume_model.OuterPlume.update

       tamoc.stratified_plume_model.inner_main

       tamoc.stratified_plume_model.outer_main

       tamoc.stratified_plume_model.err_check

       tamoc.stratified_plume_model.particle_from_Q

       tamoc.stratified_plume_model.particle_from_mb0

       tamoc.stratified_plume_model.plot_state_space

       tamoc.stratified_plume_model.plot_all_variables

     Bent Plume Model Module

    <input class="toctree-checkbox" id="toctree-checkbox-21" name="toctree-checkbox-21" type="checkbox"/>

       tamoc.bent_plume_model

       tamoc.bent_plume_model.Model

       tamoc.bent_plume_model.ModelParams

       tamoc.bent_plume_model.Particle

       tamoc.bent_plume_model.LagElement

       tamoc.bent_plume_model.Model.simulate

       tamoc.bent_plume_model.Model.get_intrusion_concentration

       tamoc.bent_plume_model.Model.get_grid_concentrations

       tamoc.bent_plume_model.Model.get_planar_concentrations

       tamoc.bent_plume_model.Model.save_sim

       tamoc.bent_plume_model.Model.save_txt

       tamoc.bent_plume_model.Model.load_sim

       tamoc.bent_plume_model.Model.report_mass_fluxes

       tamoc.bent_plume_model.Model.report_surfacing_fluxes

       tamoc.bent_plume_model.Model.report_psds

       tamoc.bent_plume_model.Model.plot_psds

       tamoc.bent_plume_model.Model.plot_state_space

       tamoc.bent_plume_model.Model.plot_all_variables

       tamoc.bent_plume_model.Model.plot_fractions_dissolved

       tamoc.bent_plume_model.Model.plot_mass_balance

       tamoc.bent_plume_model.Particle.track

       tamoc.bent_plume_model.Particle.outside

       tamoc.bent_plume_model.Particle.run_sbm

       tamoc.bent_plume_model.Particle.point_concentration

       tamoc.bent_plume_model.Particle.grid_concentrations

       tamoc.bent_plume_model.LagElement.update

       tamoc.bent_plume_model.plot_state_space

       tamoc.bent_plume_model.plot_all_variables

       tamoc.bent_plume_model.width_projection

       tamoc.bent_plume_model.chem_idx_list

     Particle Size Model Module

    <input class="toctree-checkbox" id="toctree-checkbox-22" name="toctree-checkbox-22" type="checkbox"/>

       tamoc.particle_size_models

       tamoc.particle_size_models.Model

       tamoc.particle_size_models.PureJet

       tamoc.particle_size_models.ModelBase

       tamoc.particle_size_models.Model.update_properties

       tamoc.particle_size_models.Model.update_z0

       tamoc.particle_size_models.Model.update_Tj

       tamoc.particle_size_models.Model.update_m_mixture

       tamoc.particle_size_models.Model.simulate

       tamoc.particle_size_models.Model.get_de_max

       tamoc.particle_size_models.Model.get_d50

       tamoc.particle_size_models.Model.get_distributions

       tamoc.particle_size_models.Model.plot_psd

       tamoc.particle_size_models.PureJet.update_properties

       tamoc.particle_size_models.PureJet.simulate

       tamoc.particle_size_models.PureJet.get_de_max

       tamoc.particle_size_models.PureJet.get_d50

       tamoc.particle_size_models.PureJet.get_distributions

       tamoc.particle_size_models.PureJet.plot_psd

       tamoc.particle_size_models.ModelBase.update_properties

       tamoc.particle_size_models.ModelBase.simulate

       tamoc.particle_size_models.ModelBase.get_de_max

       tamoc.particle_size_models.ModelBase.get_d50

       tamoc.particle_size_models.ModelBase.get_distributions

       tamoc.particle_size_models.ModelBase.plot_psd

       tamoc.particle_size_models.plot_phase

     Blowout Module

    <input checked="" class="toctree-checkbox" id="toctree-checkbox-23" name="toctree-checkbox-23" type="checkbox"/>

       tamoc.blowout

       tamoc.blowout.Blowout

       tamoc.blowout.Blowout.simulate

       tamoc.blowout.Blowout.save_sim

       tamoc.blowout.Blowout.save_txt

       tamoc.blowout.Blowout.plot_state_space

       tamoc.blowout.Blowout.plot_all_variables

       tamoc.blowout.Blowout.update_release_depth

       tamoc.blowout.Blowout.update_orifice_diameter

       tamoc.blowout.Blowout.update_substance

       tamoc.blowout.Blowout.update_q_oil

       tamoc.blowout.Blowout.update_gor

       tamoc.blowout.Blowout.update_produced_water

       tamoc.blowout.Blowout.update_vertical_orientation

       tamoc.blowout.Blowout.update_horizontal_orientation

       tamoc.blowout.Blowout.update_num_gas_elements

       tamoc.blowout.Blowout.update_water_data

       tamoc.blowout.Blowout.update_current_data

       tamoc.blowout.Blowout.update_track_particles

       tamoc.blowout.particles

       tamoc.blowout.get_ambient_profile

       tamoc.blowout.get_ctd_from_txt

       tamoc.blowout.create_ambient_profile

     Non-Dimensional Parameters Module

    <input class="toctree-checkbox" id="toctree-checkbox-24" name="toctree-checkbox-24" type="checkbox"/>

       tamoc.params

       tamoc.params.Scales

       tamoc.params.Scales.simulate

       tamoc.params.Scales.save_txt

       tamoc.params.Scales.get_variables

       tamoc.params.Scales.h_T

       tamoc.params.Scales.h_P

       tamoc.params.Scales.h_S

       tamoc.params.Scales.lambda_1

       tamoc.params.Scales.u_inf_crit

  Source Code:

   Test Package

  <input class="toctree-checkbox" id="toctree-checkbox-25" name="toctree-checkbox-25" type="checkbox"/>

     tamoc.test.test_ambient

     tamoc.test.test_blowout

     tamoc.test.test_bpm

     tamoc.test.test_dbm_f

     tamoc.test.test_dbm_objects

     tamoc.test.test_dbm

     tamoc.test.test_params

     tamoc.test.test_psm

     tamoc.test.test_sbm

     tamoc.test.test_sintef

     tamoc.test.test_spm

   GitHub repository

            Theme by the Executable Book Project

<button onclick="toggleFullScreen()"
  class="headerbtn"
  data-toggle="tooltip"
data-placement="bottom"
title="Fullscreen mode"
>

</button>

  <button class="headerbtn menu-dropdown__trigger"
      aria-label="Download this page">

  </button>

.rst

<button onclick="printPdf(this)"
  class="headerbtn"
  data-toggle="tooltip"
data-placement="left"
title="Print to PDF"
>

.pdf
</button>

         Contents

     blowout

   Class Objects

     blowout.Blowout

   Methods

     blowout

   Module Helper Functions

Blowout Module

 Contents

     blowout

   Class Objects

     blowout.Blowout

   Methods

     blowout

   Module Helper Functions

Blowout Module#

This page is an index and launchpad to explore all of the classes, methods, and functions in the blowout module of tamoc.

<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>

blowout

Blowout Module

blowout Class Objects#

<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>

Blowout([z0, d0, substance, q_oil, gor, x0, ...])

Class to facilitiate creating simulations using the  bent_plume_model

blowout.Blowout Methods#

<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>

Blowout.simulate()

Run a bent_plume_model simulation for the present conditions

Blowout.save_sim(fname, profile_path, ...)

Save the bent_plume_model complete solution in netCDF format

Blowout.save_txt(base_name, profile_path, ...)

Save the bent_plume_model state space in ascii text format

Blowout.plot_state_space([fignum])

Plot the bent_plume_model state space solution

Blowout.plot_all_variables([fignum])

Plot all variables for the bent_plume_model solution

Blowout.update_release_depth(z0)

Change the release depth (m) to use in a model simulation

Blowout.update_orifice_diameter(d0)

Change the orifice diametr (m) to use in a model simulation

Blowout.update_substance(substance)

Change the OilLibrary ID number to use in a model simulation

Blowout.update_q_oil(q_oil)

Change the oil flow rate (bbl/d) to use in a model simulation

Blowout.update_gor(gor)

Change the gas-to-oil ratio (std ft^3/bbl) to use in a model simulation

Blowout.update_produced_water(u0)

Change the amount of produced water (m/s) exiting with the oil and gas through the orifice

Blowout.update_vertical_orientation(phi_0)

Change the vertical orientation (rad) of the release

Blowout.update_horizontal_orientation(theta_0)

Change the horizontal orientation (rad) of the release

Blowout.update_num_gas_elements(num_gas_elements)

Change the number of gas bubbles to include in the simulation

Blowout.update_water_data(water)

Change the ambient temperature and salinity profile data

Blowout.update_current_data(current)

Change the ambient current profile data

Blowout.update_track_particles(track)

Set whether the fluid particles are tracked in the far-field

blowout Module Helper Functions#

<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>

particles(m_tot, d, vf, profile, oil, yk, ...)

Create particles to add to a bent plume model simulation

get_ambient_profile(water, current, **kwargs)

Create an ambient.Profile object from the given ambient data

get_ctd_from_txt(fname, summary, source, ...)

Create an ambient.Profile object from a text file of ocean property data

create_ambient_profile(data, labels, units, ...)

Create an ambient Profile object from given data

previous

tamoc.particle_size_models.plot_phase

next

tamoc.blowout

    By Scott A. Socolofsky

      © Copyright 2022, Scott A. Socolofsky.


text:
JQPATH=$(which jq)
if [ "x$JQPATH" == "x" ]; then
  echo "Couldn't find jq executable." 1>&2
  exit 2
fi

set -eu
shopt -s nullglob

if [ -z "${REGISTRY_DATA_DIR-}" ]; then
    echo "No registry data dir specified, using default: /var/lib/docker/registry"
    BASE_DIR=/var/lib/docker/registry
else
    BASE_DIR=$REGISTRY_DATA_DIR;
fi

readonly output_dir=$(mktemp -d -t trace-images-XXXX)
readonly jq=$JQPATH

readonly repository_dir=$BASE_DIR/repositories
readonly image_dir=$BASE_DIR/images

readonly all_images=$output_dir/all
readonly used_images=$output_dir/used
readonly unused_images=$output_dir/unused

function image_history() {
    local readonly image_hash=$1
    $jq '.[]' $image_dir/$image_hash/ancestry | tr -d  '"'
}

echo "Collecting orphan images"
for library in $repository_dir/*; do
    echo "Library $(basename $library)" >&2

    for repo in $library/*; do
        echo " Repo $(basename $repo)" >&2

        for tag in $repo/tag_*; do
            echo "  Tag $(basename $tag)" >&2

            tagged_image=$(cat $tag)
            image_history $tagged_image
        done
    done
done | sort | uniq > $used_images

ls $image_dir > $all_images

grep -v -F -f $used_images $all_images > $unused_images

readonly all_image_count=$(wc -l $all_images | awk '{print $1}')
readonly used_image_count=$(wc -l $used_images | awk '{print $1}')
readonly unused_image_count=$(wc -l $unused_images | awk '{print $1}')
readonly unused_image_size=$(cd $image_dir; du -hc $(cat $unused_images) | tail -n1 | cut -f1)

echo "${all_image_count} images, ${used_image_count} used, ${unused_image_count} unused"
echo "Unused images consume ${unused_image_size}"

echo -e "\nTrimming _index_images..."
readonly unused_images_flatten=$output_dir/unused.flatten
cat $unused_images | sed -e 's/\(.*\)/\"\1\" /' | tr -d "\n" > $unused_images_flatten

for library in $repository_dir/*; do
    echo "Library $(basename $library)" >&2

    for repo in $library/*; do
        echo " Repo $(basename $repo)" >&2
        mkdir -p "$output_dir/$(basename $repo)"
        jq '.' "$repo/_index_images" > "$output_dir/$(basename $repo)/_index_images.old"
        jq -s '.[0] - [ .[1:][] | {id: .} ]' "$repo/_index_images" $unused_images_flatten > "$output_dir/$(basename $repo)/_index_images"
        cp "$output_dir/$(basename $repo)/_index_images" "$repo/_index_images"
    done
done

echo -e "\nRemoving images"
cat $unused_images | xargs -I{} rm -rf $image_dir/{}


text:
<?php
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Gedmo\Translatable\Translatable;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * Baseclass for the eligibility profile for a service.
 *
 * When adding or removing fields be sure to update the serialization configuration.
 * The serialization configs can be found in the config/serialization/ directory.
 *
 * @ORM\MappedSuperclass
 */
class EligibilityBase implements Translatable
{
    /**
     * @var \Ramsey\Uuid\Uuid The unique id of this eligibility profile
     *
     * @ORM\Id
     * @ORM\Column(type="uuid_binary", unique=true, nullable=false)
     * @ORM\GeneratedValue(strategy="CUSTOM")
     * @ORM\CustomIdGenerator(class="Ramsey\Uuid\Doctrine\UuidGenerator")
     */
    private $id;

    /**
     * @var smallint The index of this profile within the service.
     *
     * @ORM\Column(type="smallint", nullable=true)
     */
    public $profileIndex;

    /**
     * @var smallint The minimum age eligibility for this profile (if any).
     *
     * @ORM\Column(type="smallint", nullable=true)
     */
    public $ageMin;

    /**
     * @var smallint The maximum age eligibility for this profile (if any).
     *
     * @ORM\Column(type="smallint", nullable=true)
     */
    public $ageMax;

    /**
     * @var smallint The income eligibility for this profile as a percent of Area Median Income.
     *
     * @ORM\Column(type="smallint", nullable=true)
     */
    public $percentAMI;

    /**
     * @var smallint The income eligibility for this profile as a percent of Federal Poverty Level.
     *
     * @ORM\Column(type="smallint", nullable=true)
     */
    public $percentFPL;

    /**
     * @var simple_array The income eligibility for this profile as custom amounts.
     * The value at each index is the maximum income for a family of size (index + 1).
     *
     * @ORM\Column(type="simple_array", nullable=true)
     */
    public $incomeMaxima;

    /**
     * @var text The fees for this profile (as an unvalidated string).
     *
     * @Gedmo\Translatable
     * @ORM\Column(type="text", nullable=true)
     * @Assert\Length(max = 600)
     */
    public $fees;

    /**
     * @var boolean If true, applicants must have proof of residency.
     *
     * @ORM\Column(type="boolean", nullable=true)
     */
    public $residentRequired;

    /**
     * @var boolean If true, applicants must have proof of citizenship.
     *
     * @ORM\Column(type="boolean", nullable=true)
     */
    public $citizenRequired;

    /**
     * @var text Other eligibility requirements for this profile (if any).
     *
     * @Gedmo\Translatable
     * @ORM\Column(type="text", nullable=true)
     * @Assert\Length(max = 1000)
     */
    public $other;

    /**
     * Used locale to override Translation listener`s locale.
     * Should be the language code only (usually two letters).
     *
     * @Gedmo\Locale
     */
    public $locale;

    public function getId()
    {
        return $this->id;
    }
}


text:
"""
Copyright 2015 SmartBear Software

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

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

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

    Ref: https://github.com/swagger-api/swagger-codegen
"""

from pprint import pformat
from six import iteritems

class Power100PowerControl(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        Power100PowerControl - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'member_id': 'str',
            'oem': 'ResourceOem',
            'power_limit': 'Power100PowerLimit',
            'power_metrics': 'Power100PowerMetric',
            'related_item': 'list[Odata400IdRef]',
            'related_itemodata_count': 'Odata400Count',
            'related_itemodata_navigation_link': 'Odata400IdRef',
            'status': 'ResourceStatus'
        }

        self.attribute_map = {
            'member_id': 'MemberId',
            'oem': 'Oem',
            'power_limit': 'PowerLimit',
            'power_metrics': 'PowerMetrics',
            'related_item': 'RelatedItem',
            'related_itemodata_count': 'RelatedItem@odata.count',
            'related_itemodata_navigation_link': 'RelatedItem@odata.navigationLink',
            'status': 'Status'
        }

        self._member_id = None
        self._oem = None
        self._power_limit = None
        self._power_metrics = None
        self._related_item = None
        self._related_itemodata_count = None
        self._related_itemodata_navigation_link = None
        self._status = None

    @property
    def member_id(self):
        """
        Gets the member_id of this Power100PowerControl.
        This is the identifier for the member within the collection.

        :return: The member_id of this Power100PowerControl.
        :rtype: str
        """
        return self._member_id

    @member_id.setter
    def member_id(self, member_id):
        """
        Sets the member_id of this Power100PowerControl.
        This is the identifier for the member within the collection.

        :param member_id: The member_id of this Power100PowerControl.
        :type: str
        """
        self._member_id = member_id

    @property
    def oem(self):
        """
        Gets the oem of this Power100PowerControl.
        This is the manufacturer/provider specific extension moniker used to divide the Oem object into sections.

        :return: The oem of this Power100PowerControl.
        :rtype: ResourceOem
        """
        return self._oem

    @oem.setter
    def oem(self, oem):
        """
        Sets the oem of this Power100PowerControl.
        This is the manufacturer/provider specific extension moniker used to divide the Oem object into sections.

        :param oem: The oem of this Power100PowerControl.
        :type: ResourceOem
        """
        self._oem = oem

    @property
    def power_limit(self):
        """
        Gets the power_limit of this Power100PowerControl.
        Power limit status and configuration information for this chassis

        :return: The power_limit of this Power100PowerControl.
        :rtype: Power100PowerLimit
        """
        return self._power_limit

    @power_limit.setter
    def power_limit(self, power_limit):
        """
        Sets the power_limit of this Power100PowerControl.
        Power limit status and configuration information for this chassis

        :param power_limit: The power_limit of this Power100PowerControl.
        :type: Power100PowerLimit
        """
        self._power_limit = power_limit

    @property
    def power_metrics(self):
        """
        Gets the power_metrics of this Power100PowerControl.
        Power readings for this chassis.

        :return: The power_metrics of this Power100PowerControl.
        :rtype: Power100PowerMetric
        """
        return self._power_metrics

    @power_metrics.setter
    def power_metrics(self, power_metrics):
        """
        Sets the power_metrics of this Power100PowerControl.
        Power readings for this chassis.

        :param power_metrics: The power_metrics of this Power100PowerControl.
        :type: Power100PowerMetric
        """
        self._power_metrics = power_metrics

    @property
    def related_item(self):
        """
        Gets the related_item of this Power100PowerControl.
        The ID(s) of the resources associated with this Power Limit

        :return: The related_item of this Power100PowerControl.
        :rtype: list[Odata400IdRef]
        """
        return self._related_item

    @related_item.setter
    def related_item(self, related_item):
        """
        Sets the related_item of this Power100PowerControl.
        The ID(s) of the resources associated with this Power Limit

        :param related_item: The related_item of this Power100PowerControl.
        :type: list[Odata400IdRef]
        """
        self._related_item = related_item

    @property
    def related_itemodata_count(self):
        """
        Gets the related_itemodata_count of this Power100PowerControl.

        :return: The related_itemodata_count of this Power100PowerControl.
        :rtype: Odata400Count
        """
        return self._related_itemodata_count

    @related_itemodata_count.setter
    def related_itemodata_count(self, related_itemodata_count):
        """
        Sets the related_itemodata_count of this Power100PowerControl.

        :param related_itemodata_count: The related_itemodata_count of this Power100PowerControl.
        :type: Odata400Count
        """
        self._related_itemodata_count = related_itemodata_count

    @property
    def related_itemodata_navigation_link(self):
        """
        Gets the related_itemodata_navigation_link of this Power100PowerControl.

        :return: The related_itemodata_navigation_link of this Power100PowerControl.
        :rtype: Odata400IdRef
        """
        return self._related_itemodata_navigation_link

    @related_itemodata_navigation_link.setter
    def related_itemodata_navigation_link(self, related_itemodata_navigation_link):
        """
        Sets the related_itemodata_navigation_link of this Power100PowerControl.

        :param related_itemodata_navigation_link: The related_itemodata_navigation_link of this Power100PowerControl.
        :type: Odata400IdRef
        """
        self._related_itemodata_navigation_link = related_itemodata_navigation_link

    @property
    def status(self):
        """
        Gets the status of this Power100PowerControl.

        :return: The status of this Power100PowerControl.
        :rtype: ResourceStatus
        """
        return self._status

    @status.setter
    def status(self, status):
        """
        Sets the status of this Power100PowerControl.

        :param status: The status of this Power100PowerControl.
        :type: ResourceStatus
        """
        self._status = status

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            else:
                result[attr] = value

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return pformat(self.to_dict())

    def __repr__(self):
        """
        For `print` and `pprint`
        """
        return self.to_str()

    def __eq__(self, other):
        """
        Returns true if both objects are equal
        """
        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """
        Returns true if both objects are not equal
        """
        return not self == other


text:
using UnityEngine;
using System.Collections;

[System.Serializable]
public class TimerInfo {

	public string name;
	//getting the timing like this from the composer
	public float min;
	public float sec;
	public float ms;

	public float D1Power; //max flight power, for letting the program control our performance
	public float D2Power;

	public int musicState; //controlling the music track
	public string drone1; //instruction for drones
	public string drone2;
	public float length; //precalculated on startup

	public float startTime; //should be set when starting

	public float GetTime()
	{
		return min*60f+sec+ms/1000f;
	}

	public float Pct(float time)
	{
		return (time-startTime)/length;
	}

}


text:
UserInformationLayout = Backbone.Marionette.Layout.extend({

    template: "#user-info-layout-template"

});


text:
static inline double pow2(double x) {
    return x * x;
}

static inline double noteToHz(int noteNumber)
{
    return 440. * exp2((noteNumber - 69)/12.);
}

#import "AKDSPKernel.hpp"

class AKBankDSPKernel: public AKSoundpipeKernel {

public:

    void init(int _channels, double _sampleRate) override {
        AKSoundpipeKernel::init(_channels, _sampleRate);

        attackDurationRamper.init();
        decayDurationRamper.init();
        sustainLevelRamper.init();
        releaseDurationRamper.init();
        pitchBendRamper.init();
        vibratoDepthRamper.init();
        vibratoRateRamper.init();
    }

    void reset() {
        playingNotesCount = 0;
        resetted = true;

        attackDurationRamper.reset();
        decayDurationRamper.reset();
        sustainLevelRamper.reset();
        releaseDurationRamper.reset();
        pitchBendRamper.reset();
        vibratoDepthRamper.reset();
        vibratoRateRamper.reset();
    }

    double frequencyScale = 2. * M_PI / sampleRate;

    float attackDuration = 0.1;
    float decayDuration = 0.1;
    float sustainLevel = 1.0;
    float releaseDuration = 0.1;

    float pitchBend = 0;
    float vibratoDepth = 0;
    float vibratoRate = 0;

    UInt64 currentRunningIndex = 0;

    int playingNotesCount = 0;
    bool resetted = false;

    ParameterRamper attackDurationRamper = 0.1;
    ParameterRamper decayDurationRamper = 0.1;
    ParameterRamper sustainLevelRamper = 1.0;
    ParameterRamper releaseDurationRamper = 0.1;
    ParameterRamper pitchBendRamper = 0;
    ParameterRamper vibratoDepthRamper = 0;
    ParameterRamper vibratoRateRamper = 0;
};

#define standardBankKernelFunctions() \
    void startNote(int note, int velocity) { \
        noteStates[note].noteOn(note, velocity); \
    } \
    void startNote(int note, int velocity, float frequency) { \
        noteStates[note].noteOn(note, velocity, frequency); \
    } \
    void stopNote(int note) { \
        noteStates[note].noteOn(note, 0); \
    } \
    void setAttackDuration(float value) { \
        attackDuration = clamp(value, 0.0f, 99.0f); \
        attackDurationRamper.setImmediate(attackDuration); \
    } \
    void setDecayDuration(float value) { \
        decayDuration = clamp(value, 0.0f, 99.0f); \
        decayDurationRamper.setImmediate(decayDuration); \
    } \
    void setSustainLevel(float value) { \
        sustainLevel = clamp(value, 0.0f, 99.0f); \
        sustainLevelRamper.setImmediate(sustainLevel); \
    } \
    void setReleaseDuration(float value) { \
        releaseDuration = clamp(value, 0.0f, 99.0f); \
        releaseDurationRamper.setImmediate(releaseDuration); \
    } \
    void setPitchBend(float value) { \
        pitchBend = clamp(value, (float)-48, (float)48); \
        pitchBendRamper.setImmediate(pitchBend); \
    } \
    void setVibratoDepth(float value) { \
        vibratoDepth = clamp(value, (float)0, (float)24); \
        vibratoDepthRamper.setImmediate(vibratoDepth); \
    } \
    void setVibratoRate(float value) { \
        vibratoRate = clamp(value, (float)0, (float)600); \
        vibratoRateRamper.setImmediate(vibratoRate); \
    }

#define standardBankSetParameters() \
    case attackDurationAddress: \
        attackDurationRamper.setUIValue(clamp(value, 0.0f, 99.0f)); \
        break; \
    case decayDurationAddress: \
        decayDurationRamper.setUIValue(clamp(value, 0.0f, 99.0f)); \
        break; \
    case sustainLevelAddress: \
        sustainLevelRamper.setUIValue(clamp(value, 0.0f, 99.0f)); \
        break; \
    case releaseDurationAddress: \
        releaseDurationRamper.setUIValue(clamp(value, 0.0f, 99.0f)); \
        break; \
    case pitchBendAddress: \
        pitchBendRamper.setUIValue(clamp(value, (float)-24, (float)24)); \
        break; \
    case vibratoDepthAddress: \
        vibratoDepthRamper.setUIValue(clamp(value, (float)0, (float)24)); \
        break; \
    case vibratoRateAddress: \
        vibratoRateRamper.setUIValue(clamp(value, (float)0, (float)600)); \
        break;

#define standardBankGetParameters() \
    case attackDurationAddress: \
        return attackDurationRamper.getUIValue(); \
    case decayDurationAddress: \
        return decayDurationRamper.getUIValue(); \
    case sustainLevelAddress: \
        return sustainLevelRamper.getUIValue(); \
    case releaseDurationAddress: \
        return releaseDurationRamper.getUIValue(); \
    case pitchBendAddress: \
        return pitchBendRamper.getUIValue(); \
    case vibratoDepthAddress: \
        return vibratoDepthRamper.getUIValue(); \
    case vibratoRateAddress: \
        return vibratoRateRamper.getUIValue(); \
    default: return 0.0f;

#define standardBankStartRamps() \
    case attackDurationAddress:\
        attackDurationRamper.startRamp(clamp(value, 0.0f, 99.0f), duration); \
        break; \
    case decayDurationAddress: \
        decayDurationRamper.startRamp(clamp(value, 0.0f, 99.0f), duration); \
        break; \
    case sustainLevelAddress: \
        sustainLevelRamper.startRamp(clamp(value, 0.0f, 99.0f), duration); \
        break; \
    case releaseDurationAddress: \
        releaseDurationRamper.startRamp(clamp(value, 0.0f, 99.0f), duration); \
        break; \
    case pitchBendAddress: \
        pitchBendRamper.startRamp(clamp(value, (float)-24, (float)24), duration); \
        break; \
    case vibratoDepthAddress: \
        vibratoDepthRamper.startRamp(clamp(value, (float)0, (float)24), duration); \
        break; \
    case vibratoRateAddress: \
        vibratoRateRamper.startRamp(clamp(value, (float)0, (float)600), duration); \
        break;

#define standardHandleMIDI() \
    virtual void handleMIDIEvent(AUMIDIEvent const& midiEvent) override { \
        if (midiEvent.length != 3) return; \
        uint8_t status = midiEvent.data[0] & 0xF0; \
        switch (status) { \
            case 0x80 : {  \
                uint8_t note = midiEvent.data[1]; \
                if (note > 127) break; \
                noteStates[note].noteOn(note, 0); \
                break; \
            } \
            case 0x90 : {  \
                uint8_t note = midiEvent.data[1]; \
                uint8_t veloc = midiEvent.data[2]; \
                if (note > 127 || veloc > 127) break; \
                noteStates[note].noteOn(note, veloc); \
                break; \
            } \
            case 0xB0 : { \
                uint8_t num = midiEvent.data[1]; \
                if (num == 123) { \
                    NoteState* noteState = playingNotes; \
                    while (noteState) { \
                        noteState->clear(); \
                        noteState = noteState->next; \
                    } \
                    playingNotes = nullptr; \
                    playingNotesCount = 0; \
                } \
                break; \
            } \
        } \
    }

#define standardBankGetAndSteps() \
    attackDuration = attackDurationRamper.getAndStep(); \
    decayDuration = decayDurationRamper.getAndStep(); \
    sustainLevel = sustainLevelRamper.getAndStep(); \
    releaseDuration = releaseDurationRamper.getAndStep(); \
    pitchBend = double(pitchBendRamper.getAndStep()); \
    vibratoDepth = double(vibratoDepthRamper.getAndStep()); \
    vibratoRate = double(vibratoRateRamper.getAndStep());


text:
/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes} checked by tsc
 */

// This file isn't itself a test case, but it is imported by the
// export.in.ts test case.
export let /** @type {number} */ export2 = 3;
export let /** @type {number} */ export3 = 3;
export let /** @type {number} */ export4 = 3;

export type TypeDef = string|number;
/** @typedef {(string|number)} */
exports.TypeDef;

/**
 * @record
 */
export function Interface() {}
/** @type {string} */
Interface.prototype.x;

export interface Interface { x: string; }

export const enum ConstEnum {
  AValue = 1
}

export declare type DeclaredType = {
  a: number
}
/** @typedef {DeclaredType} */
exports.DeclaredType;

export declare interface DeclaredInterface {
  a: number;
}
/** @typedef {DeclaredInterface} */
exports.DeclaredInterface;


text:
namespace impeller {

template <class T>
struct TSize {
  using Type = T;

  Type width = {};
  Type height = {};

  constexpr TSize() {}

  constexpr TSize(Type width, Type height) : width(width), height(height) {}

  template <class U>
  explicit constexpr TSize(const TSize<U>& other)
      : TSize(static_cast<Type>(other.width), static_cast<Type>(other.height)) {
  }

  static constexpr TSize MakeWH(Type width, Type height) {
    return TSize{width, height};
  }

  static constexpr TSize Infinite() {
    return TSize{std::numeric_limits<Type>::max(),
                 std::numeric_limits<Type>::max()};
  }

  constexpr TSize operator*(Scalar scale) const {
    return {width * scale, height * scale};
  }

  constexpr TSize operator/(Scalar scale) const {
    return {static_cast<Scalar>(width) / scale,
            static_cast<Scalar>(height) / scale};
  }

  constexpr TSize operator/(const TSize& s) const {
    return {width / s.width, height / s.height};
  }

  constexpr bool operator==(const TSize& s) const {
    return s.width == width && s.height == height;
  }

  constexpr bool operator!=(const TSize& s) const {
    return s.width != width || s.height != height;
  }

  constexpr TSize operator+(const TSize& s) const {
    return {width + s.width, height + s.height};
  }

  constexpr TSize operator-(const TSize& s) const {
    return {width - s.width, height - s.height};
  }

  constexpr TSize Min(const TSize& o) const {
    return {
        std::min(width, o.width),
        std::min(height, o.height),
    };
  }

  constexpr TSize Max(const TSize& o) const {
    return {
        std::max(width, o.width),
        std::max(height, o.height),
    };
  }

  constexpr Type Area() const { return width * height; }

  constexpr bool IsPositive() const { return width > 0 && height > 0; }

  constexpr bool IsNegative() const { return width < 0 || height < 0; }

  constexpr bool IsZero() const { return width == 0 || height == 0; }

  constexpr bool IsEmpty() const { return IsNegative() || IsZero(); }

  template <class U>
  static constexpr TSize Ceil(const TSize<U>& other) {
    return TSize{static_cast<Type>(std::ceil(other.width)),
                 static_cast<Type>(std::ceil(other.height))};
  }

  constexpr size_t MipCount() const {
    if (!IsPositive()) {
      return 1u;
    }
    return std::max(ceil(log2(width)), ceil(log2(height)));
  }
};

using Size = TSize<Scalar>;
using ISize = TSize<int64_t>;

static_assert(sizeof(Size) == 2 * sizeof(Scalar));

}  // namespace impeller

namespace std {

template <class T>
inline std::ostream& operator<<(std::ostream& out,
                                const impeller::TSize<T>& s) {
  out << "(" << s.width << ", " << s.height << ")";
  return out;
}

}  // namespace std


text:
#include "ats_rewrite_driver_factory.h"

#include <cstdio>
#include <vector>

#include "ats_thread_system.h"
#include "ats_message_handler.h"
#include "ats_server_context.h"

#include "net/instaweb/http/public/content_type.h"
#include "net/instaweb/http/public/rate_controller.h"
#include "net/instaweb/http/public/rate_controlling_url_async_fetcher.h"
#include "net/instaweb/http/public/wget_url_fetcher.h"
#include "net/instaweb/rewriter/public/rewrite_driver.h"
#include "net/instaweb/rewriter/public/rewrite_driver_factory.h"
#include "net/instaweb/rewriter/public/server_context.h"
#include "net/instaweb/rewriter/public/static_asset_manager.h"
#include "net/instaweb/system/public/in_place_resource_recorder.h"
#include "net/instaweb/system/public/serf_url_async_fetcher.h"
#include "net/instaweb/system/public/system_caches.h"
#include "net/instaweb/system/public/system_rewrite_options.h"
#include "net/instaweb/util/public/google_message_handler.h"
#include "net/instaweb/util/public/null_shared_mem.h"
#include "net/instaweb/util/public/posix_timer.h"
#include "net/instaweb/util/public/property_cache.h"
#include "net/instaweb/util/public/pthread_shared_mem.h"
#include "net/instaweb/util/public/scheduler_thread.h"
#include "net/instaweb/util/public/shared_circular_buffer.h"
#include "net/instaweb/util/public/shared_mem_statistics.h"
#include "net/instaweb/util/public/slow_worker.h"
#include "net/instaweb/util/public/stdio_file_system.h"
#include "net/instaweb/util/public/string.h"
#include "net/instaweb/util/public/string_util.h"
#include "net/instaweb/util/public/thread_system.h"

namespace net_instaweb
{
AtsRewriteDriverFactory::AtsRewriteDriverFactory(const ProcessContext &process_context, AtsThreadSystem *thread_system,
                                                 StringPiece hostname, int port)
  : SystemRewriteDriverFactory(process_context, thread_system, NULL /*default shared mem runtime*/, "" /*hostname, not used*/,
                               -1 /*port, not used*/),
    ats_message_handler_(new AtsMessageHandler(thread_system->NewMutex())),
    ats_html_parse_message_handler_(new AtsMessageHandler(thread_system->NewMutex())),
    use_per_vhost_statistics_(false),
    threads_started_(false)
{
  InitializeDefaultOptions();
  default_options()->set_beacon_url("/ats_pagespeed_beacon");
  default_options()->set_enabled(RewriteOptions::kEnabledOn);
  default_options()->SetRewriteLevel(RewriteOptions::kCoreFilters);

  SystemRewriteOptions *system_options = dynamic_cast<SystemRewriteOptions *>(default_options());
  system_options->set_log_dir("/tmp/ps_log/");
  system_options->set_statistics_logging_enabled(true);

  system_options->set_file_cache_clean_inode_limit(500000);
  system_options->set_file_cache_clean_size_kb(1024 * 10000); // 10 GB
  system_options->set_avoid_renaming_introspective_javascript(true);
  system_options->set_file_cache_path("/tmp/ats_ps/");
  system_options->set_lru_cache_byte_limit(163840);
  system_options->set_lru_cache_kb_per_process(1024 * 500); // 500 MB

  system_options->set_flush_html(true);

  AtsRewriteOptions *ats_options = (AtsRewriteOptions *)system_options;
  std::vector<std::string> args;
  args.push_back("RateLimitBackgroundFetches");
  args.push_back("on");
  global_settings settings;
  const char *msg = ats_options->ParseAndSetOptions(args, ats_message_handler_, settings);
  CHECK(!msg);

  set_message_buffer_size(1024 * 128);
  set_message_handler(ats_message_handler_);
  set_html_parse_message_handler(ats_html_parse_message_handler_);
  StartThreads();
}

AtsRewriteDriverFactory::~AtsRewriteDriverFactory()
{
  ShutDown();
  delete ats_message_handler_;
  ats_message_handler_ = NULL;
  delete ats_html_parse_message_handler_;
  ats_html_parse_message_handler_ = NULL;
  STLDeleteElements(&uninitialized_server_contexts_);
}

// void AtsRewriteDriverFactory::InitStaticAssetManager(StaticAssetManager* static_js_manager) {
//    //static_js_manager->set_library_url_prefix("/ats_pagespeed_static/");
//}

Hasher *
AtsRewriteDriverFactory::NewHasher()
{
  return new MD5Hasher;
}

MessageHandler *
AtsRewriteDriverFactory::DefaultHtmlParseMessageHandler()
{
  return ats_html_parse_message_handler_;
}

MessageHandler *
AtsRewriteDriverFactory::DefaultMessageHandler()
{
  return ats_message_handler_;
}

FileSystem *
AtsRewriteDriverFactory::DefaultFileSystem()
{
  return new StdioFileSystem();
}

Timer *
AtsRewriteDriverFactory::DefaultTimer()
{
  return new PosixTimer;
}

NamedLockManager *
AtsRewriteDriverFactory::DefaultLockManager()
{
  CHECK(false) << "default lock manager should not be called";
  return NULL;
}

RewriteOptions *
AtsRewriteDriverFactory::NewRewriteOptions()
{
  AtsRewriteOptions *options = new AtsRewriteOptions(thread_system());
  options->SetRewriteLevel(RewriteOptions::kCoreFilters);
  return options;
}

ServerContext *
AtsRewriteDriverFactory::NewDecodingServerContext()
{
  ServerContext *sc = new AtsServerContext(this);
  InitStubDecodingServerContext(sc);
  return sc;
}

void
AtsRewriteDriverFactory::InitStats(Statistics *statistics)
{
  // Init standard PSOL stats.
  SystemRewriteDriverFactory::InitStats(statistics);
  // Init Ats-specific stats.
  AtsServerContext::InitStats(statistics);
}

AtsServerContext *
AtsRewriteDriverFactory::MakeAtsServerContext()
{
  AtsServerContext *server_context = new AtsServerContext(this);
  uninitialized_server_contexts_.insert(server_context);
  return server_context;
}

ServerContext *
AtsRewriteDriverFactory::NewServerContext()
{
  LOG(DFATAL) << "MakeAtsServerContext should be used instead";
  return NULL;
}

net_instaweb::QueuedWorkerPool *
AtsRewriteDriverFactory::CreateWorkerPool(net_instaweb::RewriteDriverFactory::WorkerPoolCategory pool, StringPiece name)
{
  int tc = 8;
  TSDebug("ats_pagespeed", "Created new QueuedWorkerPool of type %d named '%s' of size %d", pool, name.data(), tc);
  net_instaweb::QueuedWorkerPool *q_pool = new net_instaweb::QueuedWorkerPool(tc, name, thread_system());
  return q_pool;
}

void
AtsRewriteDriverFactory::StartThreads()
{
  if (threads_started_) {
    CHECK(false) << "threads already started";
  }
  SchedulerThread *thread = new SchedulerThread(thread_system(), scheduler());
  bool ok                 = thread->Start();
  CHECK(ok) << "Unable to start scheduler thread";
  defer_cleanup(thread->MakeDeleter());
  threads_started_ = true;
}

} // namespace net_instaweb


text:
package de.unihannover.se.iviewxjava.iviewx.serialization.json;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import de.unihannover.se.iviewxjava.core.chronologic.ETChronologicCollection;
import de.unihannover.se.iviewxjava.iviewx.data.ETSample;

import java.lang.reflect.Type;

public class ETSampleJsonSerializer {

    public static String serialize(ETSample sample, ETJsonOutputType outputType) {
        GsonBuilder builder = new GsonBuilder();

        if(outputType == ETJsonOutputType.PRETTY) {
            builder.setPrettyPrinting();
        }

        Gson gson = builder.create();

        return gson.toJson(sample);
    }

    public static ETSample deserialize(String json) {
        Gson gson = new Gson();

        return gson.fromJson(json, ETSample.class);
    }

    public static String serializeCollection(ETChronologicCollection<ETSample> samples, ETJsonOutputType outputType) {
        GsonBuilder builder = new GsonBuilder();

        if(outputType == ETJsonOutputType.PRETTY) {
            builder.setPrettyPrinting();
        }

        Gson gson = builder.create();

        return gson.toJson(samples);
    }

    public static ETChronologicCollection<ETSample> deserializeCollection(String json) {
        Gson gson = new Gson();

        Type collectionType = new TypeToken<ETChronologicCollection<ETSample>>(){}.getType();

        return gson.fromJson(json, collectionType);
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<Package Name="DisplayName" LicenseAgreement="Eula.rtf" Culture="Culture" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
  <PackageFiles>
    <PackageFile Name="Eula.rtf" />
  </PackageFiles>
  <Strings>
    <String Name="Culture">en</String>
    <String Name="DisplayName">SQL Server 2014 Express LocalDB</String>
    <String Name="sqllocaldb_32">http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/LocalDB%2032BIT/SqlLocalDB.msi</String>
    <String Name="sqllocaldb_64">http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/LocalDB%2064BIT/SqlLocalDB.msi</String>
    <String Name="AdminRequired">You do not have the permissions required to install SQL Server 2014 Express LocalDB. Please contact your administrator.</String>
    <String Name="GeneralFailure">An error occurred attempting to install SQL Server 2014 Express LocalDB.</String>
    <String Name="InvalidPlatformOS">The current operating system version does not support SQL Server 2014 Express LocalDB.</String>
    <String Name="InvalidPlatformOSServicePack">The current operating system does not meet Service Pack level requirements for SQL Server 2014 Express LocalDB. Install the most recent Service Pack from the Windows Service Pack and Update Center at http://windows.microsoft.com/en-us/windows/service-packs-download before continuing setup.</String>
  </Strings>
</Package>


text:
package com.joelapenna.foursquared;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

/**
 * Presents the user with a list of different methods for adding foursquare
 * friends.
 *
 * @date February 11, 2010
 * @author Mark Wyszomierski (markww@gmail.com), foursquare.
 */
public class AddFriendsActivity extends Activity {
    private static final String TAG = "AddFriendsActivity";
    private static final boolean DEBUG = FoursquaredSettings.DEBUG;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (DEBUG) Log.d(TAG, "onCreate()");
        setContentView(R.layout.add_friends_activity);

        Button btnAddFriendsByAddressBook = (Button) findViewById(R.id.findFriendsByAddressBook);
        btnAddFriendsByAddressBook.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(AddFriendsActivity.this,
                        AddFriendsByUserInputActivity.class);
                intent.putExtra(AddFriendsByUserInputActivity.INPUT_TYPE,
                        AddFriendsByUserInputActivity.INPUT_TYPE_ADDRESSBOOK);
                startActivity(intent);
            }
        });

        Button btnAddFriendsByFacebook = (Button) findViewById(R.id.findFriendsByFacebook);
        btnAddFriendsByFacebook.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(AddFriendsActivity.this,
                        AddFriendsByUserInputActivity.class);
                intent.putExtra(AddFriendsByUserInputActivity.INPUT_TYPE,
                        AddFriendsByUserInputActivity.INPUT_TYPE_FACEBOOK);
                startActivity(intent);
            }
        });

        Button btnAddFriendsByTwitter = (Button) findViewById(R.id.findFriendsByTwitter);
        btnAddFriendsByTwitter.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(AddFriendsActivity.this,
                        AddFriendsByUserInputActivity.class);
                intent.putExtra(AddFriendsByUserInputActivity.INPUT_TYPE,
                        AddFriendsByUserInputActivity.INPUT_TYPE_TWITTERNAME);
                startActivity(intent);
            }
        });

        Button btnAddFriendsByName = (Button) findViewById(R.id.findFriendsByNameOrPhoneNumber);
        btnAddFriendsByName.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(AddFriendsActivity.this,
                        AddFriendsByUserInputActivity.class);
                intent.putExtra(AddFriendsByUserInputActivity.INPUT_TYPE,
                        AddFriendsByUserInputActivity.INPUT_TYPE_NAME_OR_PHONE);
                startActivity(intent);
            }
        });

        Button btnInviteFriends = (Button) findViewById(R.id.findFriendsInvite);
        btnInviteFriends.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(AddFriendsActivity.this,
                        AddFriendsByUserInputActivity.class);
                intent.putExtra(AddFriendsByUserInputActivity.INPUT_TYPE,
                        AddFriendsByUserInputActivity.INPUT_TYPE_ADDRESSBOOK_INVITE);
                startActivity(intent);
            }
        });
    }
}