text:
title: How To Buy Tickets
layout: concert-banner
---

HOW TO BUY CONCERT TICKETS

 2017 Outdoor Concert Series

 To purchase, renew, or upgrade your Garden Membership please call 801-585-7172 or visit our Membership page.

Red Butte Garden uses an external ticketing system called Ticketfly. You must set up a Ticketfly account BEFORE you can purchase concert tickets online.

Ticket Information

GARDEN MEMBER TICKET PRESALES:

Monday, April 24 at 7PM - Online-Only

Tuesday, April 25 at 9AM - In-person & Online

Membership Deadline – Friday, April 21

		Renew or purchase a Garden-Plus Membership level or above by April 21 in order to participate in the April 24 Member-Only Online presale.

Membership sales will not be available April 22 through April 24

Membership sales will resume on Tuesday, April 25

Please note: Garden Membership does not guarantee concert ticket availability.

GENERAL PUBLIC TICKET SALES:

Monday, May 1 at 9AM - In-Person & Online sales

 Ticketfly Registration Process

You must establish a Ticketfly account in order to purchase concert tickets online

To set up an account go to: www.ticketfly.com

Click on "My Account"

Click on "Register", follow the instructions and establish a Ticketfly password

 How To Buy Tickets Online

FYI: Because only a limited amount of tickets are available to any show, some concerts may sell-out quickly – sometimes in less than 10 minutes.

Important! Garden Members & General Public: SET UP and LOG IN to your Ticketfly account with your Ticketfly account password BEFORE tickets go on sale

Garden Members: After logging in to Ticketfly, use the email address associated with your Garden Membership as your "Promo Code," this allows you to participate in the Member-only presale AND get your Member discount on concert tickets

Still need help? Check out the How-To-Buy video below

If you are unsure of your Garden Member Promo Code, please email membership@redbutte.utah.edu PRIOR to the presale date

 Where To Purchase

 There is a $5 Order-Processing fee per order for ALL ticket orders: online, phone, or in-person.

 1. Online

 Go to: www.redbuttegarden.ticketfly.com

 $4.50 per ticket Ticket Fee for online purchases

 2. Phone

 Ticketfly: 877-987-6487 (Mon-Sat 7AM-6PM PST, Sun 10AM-6PM PST). $4.50 per ticket Ticket Fee plus $1.50 per ticket Phone Order fee for Ticketfly phone orders

 3. In-Person

 Red Butte Garden Visitor Center open daily at 9AM

 300 Wakara Way, Salt Lake City, UT 84108

 No per ticket Ticket Fee - Leave with tickets in hand

Still need help? Check out the How To Purchase video instructions.

 All sales are final. No refunds, replacements or exchanges. All shows rain or shine. For more information visit our CONCERT FAQ page.

 Be aware that other ticket vendors and scalpers use the words 'Red Butte' in some way to sell tickets. We recommend that you only purchase your tickets online through www.redbuttegarden.org or www.ticketfly.com.

 CONCERT TICKET TERMS & CONDITIONS

 A ticket to a Red Butte Garden concert is a license from Red Butte Garden to attend the concert event. Purchasers agree to, and must comply with, certain terms and conditions. These terms and conditions include:

 A prohibition on ticket scalping; aka overcharging

 A prohibition on improper or disruptive behavior at concert events

 Limitations on the number of tickets that may be purchased

 Prohibitions on certain purchasing methods and practices

 Rules regarding refunds and exchanges

 Prohibitions on recording and transmitting of concert events

 See a complete list and more details regarding these Terms & Conditions HERE. Failure to abide by the terms and conditions may result in exclusion from Red Butte Garden concerts and events, forfeiture of tickets, and banning of further purchase of Red Butte Garden concert and event tickets.

 Children

 Children age 3 and younger do not need tickets.

 How To Pick Up Tickets

 Ticketfly offers multiple ticket delivery options, including print-at-home, mail, and Will Call.

 *Photo ID required at Red Butte Garden Visitor Center Box Office and Amphitheatre Will Call Booth. Tickets may only be picked up by the purchaser.

 Day-Of-Show Tickets

 Ticket prices increase on the day of the show

 There are no Garden Member discounts on day-of-show tickets

 Red Butte Garden Member Benefits For Concerts

 Become a Garden Member and receive the following concert benefits:

 Participate in the member-only Outdoor Concert Series ticket pre-sale

 Receive a discount: Concert tickets are $5.00 less per ticket for Garden Members than for the General Public

 See more membership benefits HERE

 Members may purchase the following # of tickets at the discounted rate:

Garden-Basic membership level - 0

Garden-Plus membership level - 2

Family, Family-Plus, & Circle of Friends membership levels - 4

Contributor & Forget-Me-Not membership levels - 6

Blazing Star, Avant Gardener & Director's Club membership levels - 8

 To become a Garden Member, call the Membership Department at 801-585-7172 or visit our Membership page. Renew or upgrade your Garden Membership before concert tickets go on sale!

 Please Note: Garden Membership does not guarantee concert tickets.


text:
module ToSource
  class Emitter
    class Match3 < self

      handle(Rubinius::AST::Match3)

    private

      def dispatch
        visit(node.value)
        emit(' =~ ')
        visit(node.pattern)
      end
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
package com.thinkinjava.interfaces.processors;

public class WaveForm {
    private static long counter;
    private final long id = counter++;
    public String toString() {
        return this.getClass().getSimpleName() + " " + id;
    }
}


text:
easy_install_package 'explicit_action' do
  action :purge
end

easy_install_package 'with_attributes' do
  version '1.0.0'
  action  :purge
end

easy_install_package 'specifying the identity attribute' do
  package_name 'identity_attribute'
  action       :purge
end


text:
'use strict';

System.register(['lodash', 'app/plugins/sdk'], function (_export, _context) {
  "use strict";

  var _, QueryCtrl, _createClass, selectLabel, CDAPQueryCtrl;

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  function _possibleConstructorReturn(self, call) {
    if (!self) {
      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
    }

    return call && (typeof call === "object" || typeof call === "function") ? call : self;
  }

  function _inherits(subClass, superClass) {
    if (typeof superClass !== "function" && superClass !== null) {
      throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
    }

    subClass.prototype = Object.create(superClass && superClass.prototype, {
      constructor: {
        value: subClass,
        enumerable: false,
        writable: true,
        configurable: true
      }
    });
    if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  }

  return {
    setters: [function (_lodash) {
      _ = _lodash.default;
    }, function (_appPluginsSdk) {
      QueryCtrl = _appPluginsSdk.QueryCtrl;
    }],
    execute: function () {
      _createClass = function () {
        function defineProperties(target, props) {
          for (var i = 0; i < props.length; i++) {
            var descriptor = props[i];
            descriptor.enumerable = descriptor.enumerable || false;
            descriptor.configurable = true;
            if ("value" in descriptor) descriptor.writable = true;
            Object.defineProperty(target, descriptor.key, descriptor);
          }
        }

        return function (Constructor, protoProps, staticProps) {
          if (protoProps) defineProperties(Constructor.prototype, protoProps);
          if (staticProps) defineProperties(Constructor, staticProps);
          return Constructor;
        };
      }();

      selectLabel = '[ select ]';

      _export('CDAPQueryCtrl', CDAPQueryCtrl = function (_QueryCtrl) {
        _inherits(CDAPQueryCtrl, _QueryCtrl);

        function CDAPQueryCtrl($scope, $injector, uiSegmentSrv, $q) {
          _classCallCheck(this, CDAPQueryCtrl);

          var _this = _possibleConstructorReturn(this, (CDAPQueryCtrl.__proto__ || Object.getPrototypeOf(CDAPQueryCtrl)).call(this, $scope, $injector));

          _this.uiSegmentSrv = uiSegmentSrv;

          // Initialize our fields, if any are missing. The target is passed to the
          // "query" method of the datasource object. In our case, these fields will
          // be lists of strings.
          _this.target.tags = _this.target.tags || [];
          _this.target.metrics = _this.target.metrics || [];
          _this.target.groups = _this.target.groups || [];

          // If the target already contains tags, metrics, or groups, then we'll need
          // to create some segments.
          var newSegment = function newSegment(value) {
            return uiSegmentSrv.newSegment({
              text: selectLabel,
              fake: false,
              value: value,
              expandable: false
            });
          };
          _this.tags = _.map(_this.target.tags, newSegment);
          _this.metrics = _.map(_this.target.metrics, newSegment);
          _this.groups = _.map(_this.target.groups, newSegment);
          return _this;
        }

        // The controller calls these methods when the user adds or removes something
        // to or from the query.

        _createClass(CDAPQueryCtrl, [{
          key: 'addTag',
          value: function addTag() {
            this._addNewSegment(this.tags);
          }
        }, {
          key: 'addMetric',
          value: function addMetric() {
            this._addNewSegment(this.metrics);
          }
        }, {
          key: 'addGroup',
          value: function addGroup() {
            this._addNewSegment(this.groups);
          }
        }, {
          key: 'removeTag',
          value: function removeTag() {
            this._removeSegment(this.tags);
          }
        }, {
          key: 'removeMetric',
          value: function removeMetric() {
            this._removeSegment(this.metrics);
          }
        }, {
          key: 'removeGroup',
          value: function removeGroup() {
            this._removeSegment(this.groups);
          }
        }, {
          key: 'canAddTag',
          value: function canAddTag() {
            return this.tags.length === 0 || _.last(this.tags).value !== selectLabel;
          }
        }, {
          key: 'tagChanged',
          value: function tagChanged(index) {
            this.tags.splice(index + 1);
            this.somethingChanged();
          }
        }, {
          key: 'somethingChanged',
          value: function somethingChanged() {
            this.target.tags = this._readSegments(this.tags);
            this.target.metrics = this._readSegments(this.metrics);
            this.target.groups = this._readSegments(this.groups);
            this.refresh();
          }
        }, {
          key: 'getTagOptions',
          value: function getTagOptions(index) {
            var tags = this._readSegments(_.take(this.tags, index));
            return this.datasource.searchForTags(tags).then(this._createSegments());
          }
        }, {
          key: 'getMetricOptions',
          value: function getMetricOptions() {
            var tags = this._readSegments(this.tags);
            return this.datasource.searchForMetrics(tags).then(this._createSegments());
          }
        }, {
          key: 'getGroupOptions',
          value: function getGroupOptions() {
            var tags = this._readSegments(this.tags);

            // In this case, we just care about the part of the name that appears
            // before the ":" character.
            return this.datasource.searchForTags(tags).then(function (strs) {
              return _.uniq(_.map(strs, function (x) {
                return x.split(':', 1)[0];
              }));
            }).then(this._createSegments());
          }
        }, {
          key: '_readSegments',
          value: function _readSegments(array) {
            return _.filter(_.map(array, function (x) {
              return x.value;
            }), function (x) {
              return x !== selectLabel;
            });
          }
        }, {
          key: '_createSegments',
          value: function _createSegments() {
            var ui = this.uiSegmentSrv;
            return function (xs) {
              return _.map(xs, function (x) {
                return ui.newSegment({
                  text: x,
                  value: x,
                  expandable: false
                });
              });
            };
          }
        }, {
          key: '_addNewSegment',
          value: function _addNewSegment(array) {
            array.push(this.uiSegmentSrv.newSegment({ value: selectLabel, fake: true }));
          }
        }, {
          key: '_removeSegment',
          value: function _removeSegment(array) {
            if (array.length > 0) {
              array.splice(array.length - 1);
              this.somethingChanged();
            }
          }
        }]);

        return CDAPQueryCtrl;
      }(QueryCtrl));

      _export('CDAPQueryCtrl', CDAPQueryCtrl);

      CDAPQueryCtrl.templateUrl = 'public/plugins/cdap-grafana-datasource/partials/query.editor.html';
    }
  };
});


text:
add_subdirectory(elliptic/poisson)

## Heat equation
add_subdirectory(elliptic/heat)

## Allencahn equation
add_subdirectory(elliptic/allencahn)

## Crystal growth
add_subdirectory(elliptic/phasefield)


text:
using System;
using System.Xml.Serialization;

namespace Taga.DynamicServices.Wsdl
{
    public abstract class WsdlElement
    {
        [XmlAttribute("type")]
        public string FullTypeName { get; set; }

        [XmlIgnore]
        public Type Type { get; internal set; }

        public override string ToString()
        {
            return FullTypeName;
        }
    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>libguac: guacamole/parser.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

libguac
    0.9.11-incubating

Main Page

Data Structures

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

File List

Globals

guacamole

Data Structures |
Functions

parser.h File Reference

Provides functions and structures for parsing the Guacamole protocol.
More...

Go to the source code of this file.

Data Structures

struct  	guac_parser

 	A Guacamole protocol parser, which reads individual instructions, filling its own internal structure with the most recently read instruction data.  More...

Functions

guac_parser * 	guac_parser_alloc ()

 	Allocates a new parser.  More...

int 	guac_parser_append (guac_parser *parser, void *buffer, int length)

 	Appends data from the given buffer to the given parser.  More...

int 	guac_parser_length (guac_parser *parser)

 	Returns the number of unparsed bytes stored in the given parser's internal buffers.  More...

int 	guac_parser_shift (guac_parser *parser, void *buffer, int length)

 	Removes up to length bytes from internal buffer of unparsed bytes, storing them in the given buffer.  More...

void 	guac_parser_free (guac_parser *parser)

 	Frees all memory allocated to the given parser.  More...

int 	guac_parser_read (guac_parser *parser, guac_socket *socket, int usec_timeout)

 	Reads a single instruction from the given guac_socket connection.  More...

int 	guac_parser_expect (guac_parser *parser, guac_socket *socket, int usec_timeout, const char *opcode)

 	Reads a single instruction from the given guac_socket.  More...

Detailed Description

Provides functions and structures for parsing the Guacamole protocol.

Function Documentation

          guac_parser* guac_parser_alloc
          (
          	)

Allocates a new parser.

Returns

The newly allocated parser, or NULL if an error occurs during allocation, in which case guac_error will be set appropriately.

          int guac_parser_append
          (
          guac_parser *
          parser,

          void *
          buffer,

          int
          length

          )

Appends data from the given buffer to the given parser.

The data will be appended, if possible, to the in-progress instruction as a reference and thus the buffer must remain valid throughout the life of the current instruction. This function may modify the contents of the buffer when those contents are part of an element within the instruction being read.

Parameters

parser	The parser to append data to.

buffer	A buffer containing data that should be appended to this parser.

length	The number of bytes available for appending within the buffer.

Returns

The number of bytes appended to this parser, which may be zero if more data is needed.

          int guac_parser_expect
          (
          guac_parser *
          parser,

          guac_socket *
          socket,

          int
          usec_timeout,

          const char *
          opcode

          )

Reads a single instruction from the given guac_socket.

This operates identically to guac_parser_read(), except that an error is returned if the expected opcode is not received.

If an error occurs reading the instruction, NULL is returned, and guac_error is set appropriately.

If the instruction read is not the expected instruction, NULL is returned, and guac_error is set to GUAC_STATUS_BAD_STATE.

Parameters

parser	The guac_parser to read instruction data from.

socket	The guac_socket connection to use.

usec_timeout	The maximum number of microseconds to wait before giving up.

opcode	The opcode of the instruction to read.

Returns

Zero if an instruction with the given opcode was read, non-zero otherwise. If an instruction was read, but the instruction had a different opcode, non-zero is returned and guac_error is set to GUAC_STATUS_BAD_STATE.

          void guac_parser_free
          (
          guac_parser *
          parser	)

Frees all memory allocated to the given parser.

Parameters

parser	The parser to free.

          int guac_parser_length
          (
          guac_parser *
          parser	)

Returns the number of unparsed bytes stored in the given parser's internal buffers.

Parameters

parser	The parser to return the length of.

Returns

The number of unparsed bytes stored in the given parser.

          int guac_parser_read
          (
          guac_parser *
          parser,

          guac_socket *
          socket,

          int
          usec_timeout

          )

Reads a single instruction from the given guac_socket connection.

This may result in additional data being read from the guac_socket, stored internally within a buffer for future parsing. Future calls to guac_parser_read() will read from the interal buffer before reading from the guac_socket. Data from the internal buffer can be removed and used elsewhere through guac_parser_shift().

If an error occurs reading the instruction, non-zero is returned, and guac_error is set appropriately.

Parameters

parser	The guac_parser to read instruction data from.

socket	The guac_socket connection to use.

usec_timeout	The maximum number of microseconds to wait before giving up.

Returns

Zero if an instruction was read within the time allowed, or non-zero if no instruction could be read. If the instruction could not be read completely because the timeout elapsed, in which case guac_error will be set to GUAC_STATUS_INPUT_TIMEOUT and additional calls to guac_parser_read() will be required.

          int guac_parser_shift
          (
          guac_parser *
          parser,

          void *
          buffer,

          int
          length

          )

Removes up to length bytes from internal buffer of unparsed bytes, storing them in the given buffer.

Parameters

parser	The parser to remove unparsed bytes from.

buffer	The buffer to store the unparsed bytes within.

length	The length of the given buffer.

Returns

The number of bytes stored in the given buffer.

<address class="footer">
Generated by

 1.8.11
</address>


text:
sap.ui.define([
   "sap/ui/core/UIComponent",
   "sap/ui/model/json/JSONModel",
   "sap/ui/model/resource/ResourceModel"
], function (UIComponent, JSONModel, ResourceModel) {
   "use strict";
   return UIComponent.extend("sapui5-exploration.Component", {
            metadata : {
		rootView: "sapui5-exploration.view.mainView"
	},
      init : function () {
         // call the init function of the parent
         UIComponent.prototype.init.apply(this, arguments);
         // set data model
         var oData = {
            recipient : {
               name : "World"
            }
         };
         var oModel = new JSONModel(oData);
         this.setModel(oModel);

         // set i18n model
         var i18nModel = new ResourceModel({
            bundleName : "sapui5-exploration.i18n.i18n"
         });
         this.setModel(i18nModel, "i18n");
      }
   });
});


text:
using namespace chrono;
using namespace chrono::collision;

// Container collision model
enum ContainerType { BOXES, BOUNDARY };
ContainerType container_type = BOUNDARY;

// Tilt angle (about global Y axis) of the container.
double tilt_angle = 1 * CH_C_PI / 20;

// Shape of falling objects
enum ObjectType { BALL, BRICK };
ObjectType object_type = BALL;

// Number of objects: (2 * count_X + 1) * (2 * count_Y + 1) * count_Z
int count_X = 2;
int count_Y = 2;
int count_Z = 2;

// Material properties (same on bin and objects)
float Y = 2e6f;
float mu = 0.4f;
float cr = 0.4f;

// -----------------------------------------------------------------------------
// Create a bin attached to the ground.
// -----------------------------------------------------------------------------
void AddContainer(ChSystemMulticoreSMC* sys) {
    // IDs for the two bodies
    int binId = -200;

    // Create a common material
    auto mat = chrono_types::make_shared<ChMaterialSurfaceSMC>();
    mat->SetYoungModulus(Y);
    mat->SetFriction(mu);
    mat->SetRestitution(cr);

    // Create the containing bin (4 x 4 x 1)
    auto bin = chrono_types::make_shared<ChBody>(chrono_types::make_shared<ChCollisionModelChrono>());
    bin->SetIdentifier(binId);
    bin->SetMass(1);
    bin->SetPos(ChVector<>(0, 0, 0));
    bin->SetRot(Q_from_AngY(tilt_angle));
    bin->SetCollide(true);
    bin->SetBodyFixed(true);
    sys->AddBody(bin);

    ChVector<> hdim(2, 2, 0.5);
    double hthick = 0.1;

    switch (container_type) {
        case BOXES: {
            bin->GetCollisionModel()->ClearModel();
            utils::AddBoxGeometry(bin.get(), mat, ChVector<>(hdim.x(), hdim.y(), hthick), ChVector<>(0, 0, -hthick));
            utils::AddBoxGeometry(bin.get(), mat, ChVector<>(hthick, hdim.y(), hdim.z()),
                                  ChVector<>(-hdim.x() - hthick, 0, hdim.z()));
            utils::AddBoxGeometry(bin.get(), mat, ChVector<>(hthick, hdim.y(), hdim.z()),
                                  ChVector<>(hdim.x() + hthick, 0, hdim.z()));
            utils::AddBoxGeometry(bin.get(), mat, ChVector<>(hdim.x(), hthick, hdim.z()),
                                  ChVector<>(0, -hdim.y() - hthick, hdim.z()));
            utils::AddBoxGeometry(bin.get(), mat, ChVector<>(hdim.x(), hthick, hdim.z()),
                                  ChVector<>(0, hdim.y() + hthick, hdim.z()));
            bin->GetCollisionModel()->BuildModel();

            break;
        }
        case BOUNDARY: {
            auto cb = new ChBoundary(bin, mat);
            cb->AddPlane(ChFrame<>(ChVector<>(0, 0, 0), QUNIT), ChVector2<>(4, 4));
            cb->AddPlane(ChFrame<>(ChVector<>(2, 0, 0), Q_from_AngY(-CH_C_PI_2)), ChVector2<>(1, 4));
            cb->AddVisualization(0.05);

            break;
        }
    }
}

// -----------------------------------------------------------------------------
// Create the falling objects in a uniform rectangular grid.
// Return a handle to the first created object.
// -----------------------------------------------------------------------------
std::shared_ptr<ChBody> AddFallingObjects(ChSystemMulticore* sys) {
    std::shared_ptr<ChBody> first;

    // Common material
    auto objMat = chrono_types::make_shared<ChMaterialSurfaceSMC>();
    objMat->SetYoungModulus(Y);
    objMat->SetFriction(mu);
    objMat->SetRestitution(cr);
    objMat->SetAdhesion(0);

    // Create the falling objects
    int objId = 0;
    double mass = 1;
    double size = 0.15;
    ChVector<> inertia = (2.0 / 5.0) * mass * size * size * ChVector<>(1, 1, 1);

    for (int iz = 0; iz < count_Z; iz++) {
        double h = 1 + 0.4 * iz;
        for (int ix = -count_X; ix <= count_X; ix++) {
            for (int iy = -count_Y; iy <= count_Y; iy++) {
                ChVector<> pos(0.4 * ix, 0.4 * iy, h);

                auto obj = chrono_types::make_shared<ChBody>(chrono_types::make_shared<ChCollisionModelChrono>());

                obj->SetIdentifier(objId++);
                obj->SetMass(mass);
                obj->SetInertiaXX(inertia);
                obj->SetPos(pos);
                obj->SetRot(ChQuaternion<>(1, 0, 0, 0));
                obj->SetBodyFixed(false);
                obj->SetCollide(true);

                obj->GetCollisionModel()->ClearModel();
                switch (object_type) {
                case BALL:
                    utils::AddSphereGeometry(obj.get(), objMat, size);
                    break;
                case BRICK:
                    utils::AddBoxGeometry(obj.get(), objMat, ChVector<>(size, size / 2, size / 2));
                    break;
                }
                obj->GetCollisionModel()->BuildModel();

                sys->AddBody(obj);

                if (!first)
                    first = obj;
            }
        }
    }

    return first;
}

// -----------------------------------------------------------------------------
// Create the system, specify simulation parameters, and run simulation loop.
// -----------------------------------------------------------------------------
int main(int argc, char* argv[]) {
    GetLog() << "Copyright (c) 2017 projectchrono.org\nChrono version: " << CHRONO_VERSION << "\n\n";

    int threads = 8;

    // Simulation parameters
    // ---------------------

    double gravity = 9.81;
    double time_step = 1e-3;

    uint max_iteration = 100;
    real tolerance = 1e-3;

    // Create system
    // -------------

    ChSystemMulticoreSMC msystem;

    // Set number of threads.
    int max_threads = ChOMP::GetNumProcs();
    if (threads > max_threads)
        threads = max_threads;
    msystem.SetNumThreads(threads);

    // Set gravitational acceleration
    msystem.Set_G_acc(ChVector<>(0, 0, -gravity));

    // Set solver parameters
    msystem.GetSettings()->solver.max_iteration_bilateral = max_iteration;
    msystem.GetSettings()->solver.tolerance = tolerance;

    msystem.GetSettings()->collision.narrowphase_algorithm = ChNarrowphase::Algorithm::MPR;
    msystem.GetSettings()->collision.bins_per_axis = vec3(10, 10, 10);

    msystem.GetSettings()->solver.contact_force_model = ChSystemSMC::ContactForceModel::Hooke;
    msystem.GetSettings()->solver.adhesion_force_model = ChSystemSMC::AdhesionForceModel::Constant;

    // Create the fixed and moving bodies
    // ----------------------------------
    AddContainer(&msystem);
    auto object = AddFallingObjects(&msystem);

    // Perform the simulation
    // ----------------------

    opengl::ChVisualSystemOpenGL vis;
    vis.AttachSystem(&msystem);
    vis.SetWindowTitle("Test");
    vis.SetWindowSize(1280, 720);
    vis.SetRenderMode(opengl::WIREFRAME);
    vis.Initialize();
    vis.SetCameraPosition(ChVector<>(0, -6, 0), ChVector<>(0, 0, 0));
    vis.SetCameraVertical(CameraVerticalDir::Z);

    // Uncomment the following two lines for the OpenGL manager to automatically
    // run the simulation in an infinite loop.
    // vis.StartDrawLoop(time_step);
    // return 0;

    while (vis.Run()) {
        msystem.DoStepDynamics(time_step);
        vis.Render();
        ChVector<> pos = object->GetPos();
        real3 frc = msystem.GetBodyContactForce(0);
        std::cout << msystem.GetChTime() << "   " << pos.x() << " " << pos.y() << " " << pos.z() << "    " << frc.x
                  << "  " << frc.y << "  " << frc.z << std::endl;
    }

    return 0;
}


text:
<template name="reflowFoundationTemplate">
</template>


text:
layout: post-no-feature
title: "Empirical tests of large-scale collaborative recall"
description:
category: papers
type: Paper
journal: CogSci 2017
pdf: gates2017collaborative.pdf
tags: [spatial memory]
---

Much of our knowledge is transmitted socially rather than
through firsthand experience. Even our memories depend on
recollections of those around us. Surprisingly, when people recall
memories with others, they do not reach the potential number
of items they could have recalled alone. This phenomenon
is called collaborative inhibition. Recently, Luhmann and Rajaram
(2015) analyzed the dynamics of collaborative inhibition
at scale with an agent-based model, extrapolating from previous
small-scale laboratory experiments. We tested their model
against human data collected in a large-scale experiment and
found that participants demonstrate non-monotonicities not evident
in these predictions. We next analyzed memory transmission
beyond directly interacting agents by placing agents into
networks. Contrary to model predictions, we observed high
similarity only within directly interacting pairs. By comparing
behavior to model predictions in large-scale experiments, we
reveal unexpected results that motivate future work in elucidating
the algorithms underlying collaborative memory.


text:
#ifndef ACM_G722_H
#define ACM_G722_H

#include "acm_generic_codec.h"

typedef struct WebRtcG722EncInst    G722EncInst;
typedef struct WebRtcG722DecInst    G722DecInst;

namespace webrtc
{

// forward declaration
struct ACMG722EncStr;
struct ACMG722DecStr;

class ACMG722 : public ACMGenericCodec
{
public:
    ACMG722(WebRtc_Word16 codecID);
    ~ACMG722();
    // for FEC
    ACMGenericCodec* CreateInstance(void);

    WebRtc_Word16 InternalEncode(
        WebRtc_UWord8* bitstream,
        WebRtc_Word16* bitStreamLenByte);

    WebRtc_Word16 InternalInitEncoder(
        WebRtcACMCodecParams *codecParams);

    WebRtc_Word16 InternalInitDecoder(
        WebRtcACMCodecParams *codecParams);

protected:
    WebRtc_Word16 DecodeSafe(
        WebRtc_UWord8* bitStream,
        WebRtc_Word16  bitStreamLenByte,
        WebRtc_Word16* audio,
        WebRtc_Word16* audioSamples,
        WebRtc_Word8*  speechType);

    WebRtc_Word32 CodecDef(
        WebRtcNetEQ_CodecDef& codecDef,
        const CodecInst&      codecInst);

    WebRtc_Word32 Add10MsDataSafe(
        const WebRtc_UWord32 timestamp,
        const WebRtc_Word16* data,
        const WebRtc_UWord16 lengthSmpl,
        const WebRtc_UWord8  audioChannel);

    void DestructEncoderSafe();

    void DestructDecoderSafe();

    WebRtc_Word16 InternalCreateEncoder();

    WebRtc_Word16 InternalCreateDecoder();

    void InternalDestructEncoderInst(
        void* ptrInst);

    WebRtc_Word16 UnregisterFromNetEqSafe(
        ACMNetEQ*     netEq,
        WebRtc_Word16 payloadType);

    ACMG722EncStr* _ptrEncStr;
    ACMG722DecStr* _ptrDecStr;

    G722EncInst*  _encoderInstPtr;
    G722EncInst*  _encoderInstPtrRight; // Prepared for stereo
    G722DecInst*  _decoderInstPtr;
};

} // namespace webrtc

#endif // ACM_G722_H


text:
require 'spec_helper'

describe "macro_steps/create.js.rjs" do
  describe "for failed records" do
    before(:each) do
      assigns[:macro] = Factory.build(:macro)
      assigns[:macro_step] = MacroStep.new
      assigns[:macro_step].valid?

      render('macro_steps/create.js.rjs')
    end

    xit "should insert errors into the page" do
      response.should have_rjs(:replace_html, 'record-form-error')
    end

    xit "should have a error flash" do
      response.should include_text(%{showflash("error"})
    end
  end

  describe "for successful records" do
    before(:each) do
      assigns[:macro] = FactoryGirl.create(:macro)
      assigns[:macro_step] = FactoryGirl.create(:macro_step_create, :macro => assigns[:macro])

      render('macro_steps/create.js.rjs')
    end

    xit "should display a notice flash" do
      response.should include_text(%{showflash("info"} )
    end

    xit "should insert the steps into the table" do
      response.should have_rjs(:insert, :bottom, 'steps-table')
    end

  end

end


text:
using namespace lldb;
using namespace lldb_private;

//----------------------------------------------------------------------
// RegisterContextMacOSXFrameBackchain constructor
//----------------------------------------------------------------------
RegisterContextMacOSXFrameBackchain::RegisterContextMacOSXFrameBackchain(
    Thread &thread, uint32_t concrete_frame_idx,
    const UnwindMacOSXFrameBackchain::Cursor &cursor)
    : RegisterContext(thread, concrete_frame_idx), m_cursor(cursor),
      m_cursor_is_valid(true) {}

//----------------------------------------------------------------------
// Destructor
//----------------------------------------------------------------------
RegisterContextMacOSXFrameBackchain::~RegisterContextMacOSXFrameBackchain() {}

void RegisterContextMacOSXFrameBackchain::InvalidateAllRegisters() {
  m_cursor_is_valid = false;
}

size_t RegisterContextMacOSXFrameBackchain::GetRegisterCount() {
  return m_thread.GetRegisterContext()->GetRegisterCount();
}

const RegisterInfo *
RegisterContextMacOSXFrameBackchain::GetRegisterInfoAtIndex(size_t reg) {
  return m_thread.GetRegisterContext()->GetRegisterInfoAtIndex(reg);
}

size_t RegisterContextMacOSXFrameBackchain::GetRegisterSetCount() {
  return m_thread.GetRegisterContext()->GetRegisterSetCount();
}

const RegisterSet *
RegisterContextMacOSXFrameBackchain::GetRegisterSet(size_t reg_set) {
  return m_thread.GetRegisterContext()->GetRegisterSet(reg_set);
}

bool RegisterContextMacOSXFrameBackchain::ReadRegister(
    const RegisterInfo *reg_info, RegisterValue &value) {
  if (!m_cursor_is_valid)
    return false;

  uint64_t reg_value = LLDB_INVALID_ADDRESS;

  switch (reg_info->kinds[eRegisterKindGeneric]) {
  case LLDB_REGNUM_GENERIC_PC:
    if (m_cursor.pc == LLDB_INVALID_ADDRESS)
      return false;
    reg_value = m_cursor.pc;
    break;

  case LLDB_REGNUM_GENERIC_FP:
    if (m_cursor.fp == LLDB_INVALID_ADDRESS)
      return false;
    reg_value = m_cursor.fp;
    break;

  default:
    return false;
  }

  switch (reg_info->encoding) {
  case eEncodingInvalid:
  case eEncodingVector:
    break;

  case eEncodingUint:
  case eEncodingSint:
    value.SetUInt(reg_value, reg_info->byte_size);
    return true;

  case eEncodingIEEE754:
    switch (reg_info->byte_size) {
    case sizeof(float):
      if (sizeof(float) == sizeof(uint32_t)) {
        value.SetUInt32(reg_value, RegisterValue::eTypeFloat);
        return true;
      } else if (sizeof(float) == sizeof(uint64_t)) {
        value.SetUInt64(reg_value, RegisterValue::eTypeFloat);
        return true;
      }
      break;

    case sizeof(double):
      if (sizeof(double) == sizeof(uint32_t)) {
        value.SetUInt32(reg_value, RegisterValue::eTypeDouble);
        return true;
      } else if (sizeof(double) == sizeof(uint64_t)) {
        value.SetUInt64(reg_value, RegisterValue::eTypeDouble);
        return true;
      }
      break;

// TOOD: need a better way to detect when "long double" types are
// the same bytes size as "double"
#if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__) &&       \
    !defined(_MSC_VER) && !defined(__mips__) && !defined(__powerpc__) &&       \
    !defined(__ANDROID__)
    case sizeof(long double):
      if (sizeof(long double) == sizeof(uint32_t)) {
        value.SetUInt32(reg_value, RegisterValue::eTypeLongDouble);
        return true;
      } else if (sizeof(long double) == sizeof(uint64_t)) {
        value.SetUInt64(reg_value, RegisterValue::eTypeLongDouble);
        return true;
      }
      break;
#endif
    }
    break;
  }
  return false;
}

bool RegisterContextMacOSXFrameBackchain::WriteRegister(
    const RegisterInfo *reg_info, const RegisterValue &value) {
  // Not supported yet. We could easily add support for this by remembering the
  // address of each entry (it would need to be part of the cursor)
  return false;
}

bool RegisterContextMacOSXFrameBackchain::ReadAllRegisterValues(
    lldb::DataBufferSP &data_sp) {
  // libunwind frames can't handle this it doesn't always have all register
  // values. This call should only be called on frame zero anyway so there
  // shouldn't be any problem
  return false;
}

bool RegisterContextMacOSXFrameBackchain::WriteAllRegisterValues(
    const lldb::DataBufferSP &data_sp) {
  // Since this class doesn't respond to "ReadAllRegisterValues()", it must not
  // have been the one that saved all the register values. So we just let the
  // thread's register context (the register context for frame zero) do the
  // writing.
  return m_thread.GetRegisterContext()->WriteAllRegisterValues(data_sp);
}

uint32_t
RegisterContextMacOSXFrameBackchain::ConvertRegisterKindToRegisterNumber(
    lldb::RegisterKind kind, uint32_t num) {
  return m_thread.GetRegisterContext()->ConvertRegisterKindToRegisterNumber(
      kind, num);
}


text:
module Spree
  module Hub
    module Handler
      class UpdateProductHandler < Base
        attr_reader :params, :options, :taxon_ids, :parent_id

        def initialize(message)
          super message

          @params = @payload[:product]
          @parent_id = params[:parent_id]
          @taxon_ids = []

          params.delete :options
          params.delete :properties
          params.delete :images
          params.delete :parent_id

          params[:slug] = params.delete :permalink if params[:permalink].present?

          # FIXME Getting errors like this for nested taxons:
          #
          #   NoMethodError:
          #   undefined method `touch' for nil:NilClass
          #   .../spree-fa1cb8c1d3a8/core/app/models/spree/taxon.rb:87:in `touch_ancestors_and_taxonomy'
          #
          params.delete :taxons
        end

        def process
          params.delete :channel
          params.delete :id

          set_up_shipping_category

          unless master = Variant.find_by(sku: params[:sku], is_master: true)
            response("Could not find product wih sku #{paramas[:sku]}", 500) and return
          end

          @product = Core::Importer::Product.new(master.product, params).update

          if @product.errors.empty?
            response "Product #{@product.id} updated"
          else
            response "Could not update the Product #{@product.errors.messages.inspect}", 500
          end
        end

        private
          def set_up_shipping_category
            if shipping_category
              id = ShippingCategory.find_or_create_by(name: shipping_category).id
              params[:shipping_category_id] = id
            end
          end

          def shipping_category
            @shipping_category ||= params.delete(:shipping_category) || parameters["spree_shipping_category"]
          end
      end
    end
  end
end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Formatting;
using System.Web.Http;
using biz.dfch.CS.Graylog.Api.Formatters;

namespace biz.dfch.CS.Graylog.Api
{
    public static class WebApiConfig
    {
        public static void Register(HttpConfiguration config)
        {
            config.Routes.MapHttpRoute(
                name: "DefaultApi",
                routeTemplate: "api/{controller}/{id}",
                defaults: new { id = RouteParameter.Optional }
            );
            config.Routes.MapHttpRoute(
                name: "StreamDateTime",
                routeTemplate: "api/{controller}/stream/{streamTitle}/{from}/{to}",
                defaults: new { streamTitle = RouteParameter.Optional, from = RouteParameter.Optional, to = RouteParameter.Optional }
            );

            config.Formatters.Clear();
            config.Formatters.Add(new DynamicObjectJsonFormatter());
            config.Formatters.Add(new DynamicObjectXmlFormatter());
            config.Formatters.Add(new CSVFormatter());

            // Uncomment the following line of code to enable query support for actions with an IQueryable or IQueryable<T> return type.
            // To avoid processing unexpected or malicious queries, use the validation settings on QueryableAttribute to validate incoming queries.
            // For more information, visit http://go.microsoft.com/fwlink/?LinkId=279712.
            //config.EnableQuerySupport();

            // To disable tracing in your application, please comment out or remove the following line of code
            // For more information, refer to: http://www.asp.net/web-api
            config.EnableSystemDiagnosticsTracing();
        }
    }
}


text:
#if !defined(BOOST_SPIRIT_X3_DIRECTIVE_FEBRUARY_05_2007_0313PM)
#define BOOST_SPIRIT_X3_DIRECTIVE_FEBRUARY_05_2007_0313PM

#if defined(_MSC_VER)
#pragma once
#endif

//~ #include <boost/spirit/home/x3/directive/as.hpp>
//~ #include <boost/spirit/home/x3/directive/encoding.hpp>
//~ #include <boost/spirit/home/x3/directive/hold.hpp>
#include <boost/spirit/home/x3/directive/expect.hpp>
#include <boost/spirit/home/x3/directive/lexeme.hpp>
#include <boost/spirit/home/x3/directive/no_skip.hpp>
//~ #include <boost/spirit/home/x3/directive/matches.hpp>
//~ #include <boost/spirit/home/x3/directive/no_case.hpp>
#include <boost/spirit/home/x3/directive/omit.hpp>
#include <boost/spirit/home/x3/directive/raw.hpp>
//~ #include <boost/spirit/home/x3/directive/repeat.hpp>
#include <boost/spirit/home/x3/directive/skip.hpp>
#include <boost/spirit/home/x3/directive/with.hpp>

#endif


text:
$(document).ready(function(){
   $('#timeline_reply').click(function(){
        $('.timeline-panel').append("

");

   })
});


text:
cat $0

# receive my worker number
export item=$1
export WRK_NB=$1

# activate conda python environment

# This line used to work up until Feb 2019...
source activate myenv

# ... but since it's stopped working, this line makes sure we use the right python ...
export PATH="/home/dominic/.conda/envs/myenv/bin:$PATH"

# create worker-private subdirectory in $SNIC_TMP
# export WRK_DIR=$SNIC_TMP/WRK_${WRK_NB}
# mkdir $WRK_DIR

# create a variable to address the "job directory"
# export JOB_DIR=$SLURM_SUBMIT_DIR/job_${WRK_NB}

# now copy the input data and program from there

# cd $JOB_DIR
# cp -p input.dat processor $WRK_DIR

# change to the execution directory
# cd $WRK_DIR

# run the program
cd ${HOME}/iwg7_pipeline/4most-4gp-scripts/src/scripts/synthesize_samples

echo Temporary directory: ${TMPDIR}/workspace
mkdir ${TMPDIR}/workspace

python synthesize_marcs_grid.py --every 80 --skip ${item} --create \
                                --workspace "${TMPDIR}/workspace" \
                                --output-library turbospec_marcs_grid_${item} \
                                --log-dir ../../../output_data/logs/marcs_stars_${item}

echo Starting rsync: `date`
rsync -a ${TMPDIR}/workspace/turbospec_* ../../../workspace
echo Rsync done: `date`

# rescue the results back to job directory
# cp -p result.dat ${JOB_DIR}

# clean up the local disk and remove the worker-private directory

# cd $SNIC_TMP
# rm -rf WRK_${WRK_NB}


text:
/*
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.
*/
import * as DatasetAction from '../actions/dataset.actions';

export type Action = DatasetAction.All;

/*
** Interfaces for datasets in store/state
*/
export interface State {
    loaded: boolean,
    loading: boolean,
    datasets: any[],
    createDataset: any[],
    createDatasetError: any[],
    createDatasetSuccess: boolean,
    createDatasetFailed: boolean,
    dropDataset: any[],
    dropDatasetError: any[],
    dropDatasetSuccess: boolean,
    dropDatasetFailed: boolean,
    guideSelectsDataset: string
};

const initialState: State = {
    loaded: false,
    loading: false,
    datasets: [],
    createDataset: [],
    createDatasetError: [],
    createDatasetSuccess: false,
    createDatasetFailed: false,
    dropDataset: [],
    dropDatasetError: [],
    dropDatasetSuccess: false,
    dropDatasetFailed: false,
    guideSelectsDataset: ""
};

/*
** Reducer function for datasets in store/state
*/
export function datasetReducer(state = initialState, action: Action) {
    switch (action.type) {

      /*
      * Change the selected dataset state to true to signaling
      * UI from metadata guide
      */
      case DatasetAction.GUIDE_SELECT_DATASET: {
          return Object.assign({}, state, { guideSelectsDataset: action.payload });
      }

      /*
      * Change the load state to true to signaling
      * that a SELECT Query is ongoing
      */
      case DatasetAction.SELECT_DATASETS: {
          return Object.assign({}, state, { loading: true });
      }

      /*
      * Change the load state to false, and loaded to true to signaling
      * that a SELECT Query is success and there is datasets available in the
      * store
      */
      case DatasetAction.SELECT_DATASETS_SUCCESS: {
          return Object.assign({}, state, {
              loaded: true,
              loading: false,
              datasets: action.payload
          })
      }

      /*
      * Change the load state to true to signaling
      * that a CREATE a Dataset Query is ongoing
      */
      case DatasetAction.CREATE_DATASET: {
          return Object.assign({}, state, {
              createDataset: [],
              createDatasetError: [],
              createDatasetSuccess: false,
              createDatasetFailed: false
          });
      }

      /*
      * Change the load state to false, and loaded to true to signaling
      * that a CREATE a Dataset Query is success and there is datasets available in the
      * store
      */
      case DatasetAction.CREATE_DATASET_SUCCESS: {
          return Object.assign({}, state, {
              createDataset: action.payload,
              createDatasetName: action.payload,
              createDatasetError: [],
              createDatasetSuccess: true,
              createDatasetFailed: false
          })
      }

      /*
      * Change the load state to false, and loaded to true to signaling
      * that a CREATE a Dataset Query is failed and there is an error message available in the
      * store
      */
      case DatasetAction.CREATE_DATASET_FAIL: {
          return Object.assign({}, state, {
              createDataset: [],
              createDatasetError: action.payload,
              createDatasetSuccess: false,
              createDatasetFailed: true
          })
      }

      /*
      * Change the load state to true to signaling
      * that a DROP a Dataset Query is ongoing
      */
      case DatasetAction.DROP_DATASET: {
          return Object.assign({}, state, {
              dropDataset: [],
              dropDatasetError: [],
              dropDatasetName: action.payload,
              dropDatasetSuccess: false,
              dropDatasetFailed: false
          });
      }

      /*
      * Change the load state to false, and loaded to true to signaling
      * that a DROP a Dataset Query is success and there is datasets available in the
      * store
      */
      case DatasetAction.DROP_DATASET_SUCCESS: {
          return Object.assign({}, state, {
              dropDataset: action.payload,
              dropDatasetError: [],
              dropDatasetSuccess: true,
              dropDatasetFailed: false
          })
      }

      /*
      * Change the load state to false, and loaded to true to signaling
      * that a DROP a Dataset Query is failed and there is an error message available in the
      * store
      */
      case DatasetAction.DROP_DATASET_FAIL: {
          return Object.assign({}, state, {
              dropDataset: [],
              dropDatasetError: action.payload,
              dropDatasetSuccess: false,
              dropDatasetFailed: true
          })
      }

      /*
      * Just returns the current store/state object
      */
      default:
          return state;
    }
}


text:
from graph.graphs import Graph, Vertex, Edge
from isomorphism.ColorRefinementChecker import makeColors, countColors
from isomorphism.IsomorphismChecker import IsomorphismChecker
from isomorphism.Mock import Partitioner
from utils.lists import *

class FastPartitionRefinementChecker(IsomorphismChecker):
	# Override
	def isIsomorphic(self, graph1: Graph, graph2: Graph) -> (bool, list):
		if len(graph1._V) == 0:
			return False, []
		if len(graph1._V) != len(graph2._V):
			return False, []
		if len(graph1._E) != len(graph2._E):
			return False, []

		party = Partitioner(graph1, graph2)
		if not party.partition():
			return False, []

		colorList = []
		remainingKeys = list(party._colors.keys())
		while len(remainingKeys) > 0:
			color = remainingKeys.pop()
			colorClass = party._colors[color]
			while len(colorList) < color + 1:
				colorList.append(0)
			colorList[color] = colorClass.count()

			"""
		for color in party._colors.keys():
			colorClass = party._colors[color]
			count = colorClass.count()
			if (count > 0):
				for v in colorClass.V1():
					v.colornum = len(colorList)
				for v in colorClass.V2():
					v.colornum = len(colorList)
				colorList.append(count)
			"""
		return True, colorList

	def isBijection(self, colors1, colors2) -> bool:
		colors2 = list(colors2.values())
		for colorClass in colors1.values():
			for otherClass in colors2:
				if len(colorClass.V()) is len(otherClass.V()) and\
					colorClass.depth is otherClass.depth:
					colors2.remove(otherClass)
					break
		return len(colors2) is 0


text:
{% load i18n %}
<link href="{{ STATIC_URL }}live_support/css/live_support.css" type="text/css" media="all" rel="stylesheet" />

    <form method="post">
        {% csrf_token %}
        {{ chat_form.as_p }}
        {% if admin_active %}

<input type="submit" value="{% trans 'Start Chat' %}" />

        {% else %}

<input type="submit" value="{% trans 'Leave Message' %}" />

        {% endif %}
    </form>


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="FriendListView.cs" company="Exit Games GmbH">
//   Part of: Pun Cockpit
// </copyright>
// <author>developer@exitgames.com</author>
// --------------------------------------------------------------------------------------------------------------------

using System;
using System.Collections;
using System.Linq;

using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Events;
using System.Collections.Generic;

using Photon.Realtime;

namespace Photon.Pun.Demo.Cockpit
{

    /// <summary>
    /// Friend list UI view.
    /// </summary>
    public class FriendListView : MonoBehaviourPunCallbacks
    {
        /// <summary>
        /// Friend detail class
        /// This info comes from your social network and is meant to be matched against the friendInfo from Photon
        /// </summary>
        [Serializable]
        public class FriendDetail
        {
            public FriendDetail(string NickName, string UserId)
            {
                this.NickName = NickName;
                this.UserId = UserId;
            }

            public string NickName;
            public string UserId;
        }

        public FriendListCell CellPrototype;

		public Text ContentFeedback;

        public Text UpdateStatusText;

        [System.Serializable]
        public class OnJoinRoomEvent : UnityEvent<string> { }

        public OnJoinRoomEvent OnJoinRoom;

        Dictionary<string, FriendListCell> FriendCellList = new Dictionary<string, FriendListCell>();

        string[] FriendsLUT = new string[0];

        void Awake()
        {
            CellPrototype.gameObject.SetActive(false);

        }

        public override void OnEnable()
        {
            base.OnEnable();

            UpdateStatusText.text = string.Empty;
			ContentFeedback.text = string.Empty;;
        }

        public void SetFriendDetails(FriendDetail[] friendList)
        {
            ResetList();

            List<string> _list = new List<string>();
            foreach (FriendDetail _friend in friendList)
			{
                if (_friend.UserId != PhotonNetwork.LocalPlayer.UserId)
                {
                    FriendCellList[_friend.UserId] = Instantiate(CellPrototype);
                    FriendCellList[_friend.UserId].transform.SetParent(CellPrototype.transform.parent, false);
                    FriendCellList[_friend.UserId].gameObject.SetActive(true);
                    FriendCellList[_friend.UserId].RefreshInfo(_friend);

                    _list.Add(_friend.UserId);
                }
            }

            this.FriendsLUT = _list.ToArray<string>();

            FindFriends();
        }

        public void FindFriends()
        {

            PhotonNetwork.FindFriends(FriendsLUT);

			ContentFeedback.text = "Finding Friends...";
        }

        public override void OnFriendListUpdate(List<FriendInfo> friendList)
        {
            StartCoroutine("UpdateUIPing");

			if (friendList.Count == 0)
			{
				ContentFeedback.text = "No Friends Found";
			}else
			{
				ContentFeedback.text = string.Empty;
			}

            foreach (FriendInfo _info in friendList)
            {
                if (FriendCellList.ContainsKey(_info.UserId))
                {
                    FriendCellList[_info.UserId].RefreshInfo(_info);
                }
            }
        }

        public void OnRoomListUpdateCallBack(List<RoomInfo> roomList)
        {
			PhotonNetwork.FindFriends(FriendsLUT);
        }

        public void JoinFriendRoom(string RoomName)
        {
            //Debug.Log("FriendListView:JoinFriendRoom " + RoomName);
            OnJoinRoom.Invoke(RoomName);
        }

        IEnumerator UpdateUIPing()
        {
            UpdateStatusText.text = "Updated";

            yield return new WaitForSeconds(1f);

            UpdateStatusText.text = string.Empty;
        }

        public void ResetList()
        {
            foreach (KeyValuePair<string, FriendListCell> entry in FriendCellList)
            {
                if (entry.Value != null)
                {
                    Destroy(entry.Value.gameObject);
                }
            }

            FriendCellList = new Dictionary<string, FriendListCell>();
        }
    }
}


text:
from django.test import TestCase
from django.db.models.loading import get_apps, load_app

from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.contrib.contenttypes.models import ContentType

from correx.models import Change
from correx.tests.models import Article, Author

# Add the test models to INSTALLED_APPS
# Not sure if this the best way to do it.
# I just ripped the code out of the runtests.py
# file that is packaged with 1.0
from django.conf import settings
old_installed_apps = settings.INSTALLED_APPS
model_label = 'correx.tests'
mod = load_app(model_label)
settings.INSTALLED_APPS.append(model_label)

# Shortcut
CT = ContentType.objects.get_for_model

# Helper base class for changes tests that need data.
class ChangeTestCase(TestCase):
    fixtures = ["correx_tests"]

    def createSomeChanges(self):
        # A change without links to objects
        change_without_link = Change.objects.create(
            description='Correction without connection',
            change_type_id='Correction',
            pub_date='2009-02-14',
            is_public=True
        )
        # A change with a site
        lat_data_desk = Site.objects.get(id=1881)
        change_with_site = Change.objects.create(
            description='Site-level addition',
            change_type_id='Addition',
            pub_date='2009-02-14',
            site=lat_data_desk,
            is_public=True
        )
        # A change with a user
        otis = User.objects.get(username='Otis')
        change_with_user = Change.objects.create(
            description='Russ makes a site-wide addition',
            change_type_id='Addition',
            pub_date='2009-02-14',
            site=lat_data_desk,
            user=otis,
            is_public=True
        )
        # A change with an app
        author_ct = CT(Author)
        change_with_app = Change.objects.create(
            description='An app-wide update',
            change_type_id='Update',
            pub_date='2009-02-15',
            site=lat_data_desk,
            user=otis,
            content_app=author_ct.app_label,
            is_public=True
        )
        # A change with a model
        change_with_model = Change.objects.create(
            description='An update to an author bio',
            change_type_id='Update',
            pub_date='2009-02-14',
            site=lat_data_desk,
            user=otis,
            content_app=author_ct.app_label,
            content_type=author_ct,
            is_public=True
        )
        # A change with an object
        article_ct = CT(Article)
        change_with_object = Change.objects.create(
            description='A correction to a story',
            change_type_id='Correction',
            pub_date='2009-02-16',
            site=lat_data_desk,
            user=otis,
            content_app=article_ct.app_label,
            content_type=article_ct,
            object_id = 1,
            is_public=True
        )

        return change_without_link, change_with_site, change_with_user, change_with_app, change_with_model, change_with_object

from correx.tests.unittests.model_tests import *
from correx.tests.unittests.templatetag_tests import *
from correx.tests.unittests.view_tests import *
# Resetting INSTALLED_APPS...though I'm not sure it does everything it should
settings.INSTALLED_APPS = old_installed_apps


text:
``` purescript
data Builder :: *
```

#### `SELENIUM`

``` purescript
data SELENIUM :: !
```

#### `Driver`

``` purescript
data Driver :: *
```

#### `Until`

``` purescript
data Until :: *
```

#### `Element`

``` purescript
data Element :: *
```

#### `Locator`

``` purescript
data Locator :: *
```

#### `ActionSequence`

``` purescript
data ActionSequence :: *
```

#### `MouseButton`

``` purescript
data MouseButton :: *
```

#### `ChromeOptions`

``` purescript
data ChromeOptions :: *
```

#### `ControlFlow`

``` purescript
data ControlFlow :: *
```

#### `FirefoxOptions`

``` purescript
data FirefoxOptions :: *
```

#### `IEOptions`

``` purescript
data IEOptions :: *
```

#### `LoggingPrefs`

``` purescript
data LoggingPrefs :: *
```

#### `OperaOptions`

``` purescript
data OperaOptions :: *
```

#### `ProxyConfig`

``` purescript
data ProxyConfig :: *
```

#### `SafariOptions`

``` purescript
data SafariOptions :: *
```

#### `ScrollBehaviour`

``` purescript
data ScrollBehaviour :: *
```

#### `Capabilities`

``` purescript
data Capabilities :: *
```

#### `FileDetector`

``` purescript
data FileDetector :: *
```

#### `Method`

``` purescript
data Method
  = DELETE
  | GET
  | HEAD
  | OPTIONS
  | PATCH
  | POST
  | PUT
  | MOVE
  | COPY
  | CustomMethod String
```

Copied from `purescript-affjax` because the only thing we
need from `affjax` is `Method`

##### Instances
``` purescript
instance eqMethod :: Eq Method
instance methodIsForeign :: IsForeign Method
```

#### `XHRState`

``` purescript
data XHRState
  = Stale
  | Opened
  | Loaded
```

##### Instances
``` purescript
instance xhrStateEq :: Eq XHRState
instance xhrStateIsForeign :: IsForeign XHRState
```

#### `Location`

``` purescript
type Location = { x :: Number, y :: Number }
```

#### `ControlKey`

``` purescript
newtype ControlKey
  = ControlKey String
```

#### `XHRStats`

``` purescript
type XHRStats = { method :: Method, url :: String, async :: Boolean, user :: Maybe String, password :: Maybe String, state :: XHRState }
```


text:
  var SkipLastWithTimeObservable = (function (__super__) {
    inherits(SkipLastWithTimeObservable, __super__);
    function SkipLastWithTimeObservable(source, d, s) {
      this.source = source;
      this._d = d;
      this._s = s;
      __super__.call(this);
    }

    SkipLastWithTimeObservable.prototype.subscribeCore = function (o) {
      return this.source.subscribe(new SkipLastWithTimeObserver(o, this));
    };

    return SkipLastWithTimeObservable;
  }(ObservableBase));

  var SkipLastWithTimeObserver = (function (__super__) {
    inherits(SkipLastWithTimeObserver, __super__);

    function SkipLastWithTimeObserver(o, p) {
      this._o = o;
      this._s = p._s;
      this._d = p._d;
      this._q = [];
      __super__.call(this);
    }

    SkipLastWithTimeObserver.prototype.next = function (x) {
      var now = this._s.now();
      this._q.push({ interval: now, value: x });
      while (this._q.length > 0 && now - this._q[0].interval >= this._d) {
        this._o.onNext(this._q.shift().value);
      }
    };
    SkipLastWithTimeObserver.prototype.error = function (e) { this._o.onError(e); };
    SkipLastWithTimeObserver.prototype.completed = function () {
      var now = this._s.now();
      while (this._q.length > 0 && now - this._q[0].interval >= this._d) {
        this._o.onNext(this._q.shift().value);
      }
      this._o.onCompleted();
    };

    return SkipLastWithTimeObserver;
  }(AbstractObserver));

  /**
   *  Skips elements for the specified duration from the end of the observable source sequence, using the specified scheduler to run timers.
   * @description
   *  This operator accumulates a queue with a length enough to store elements received during the initial duration window.
   *  As more elements are received, elements older than the specified duration are taken from the queue and produced on the
   *  result sequence. This causes elements to be delayed with duration.
   * @param {Number} duration Duration for skipping elements from the end of the sequence.
   * @param {Scheduler} [scheduler]  Scheduler to run the timer on. If not specified, defaults to Rx.Scheduler.timeout
   * @returns {Observable} An observable sequence with the elements skipped during the specified duration from the end of the source sequence.
   */
  observableProto.skipLastWithTime = function (duration, scheduler) {
    isScheduler(scheduler) || (scheduler = defaultScheduler);
    return new SkipLastWithTimeObservable(this, duration, scheduler);
  };


text:
@interface ViewController : UIViewController < UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (nonatomic,strong) NSArray *words;

@property(nonatomic, readonly, retain) UIImageView *imageView;

@end


text:
layout: post
title: "Solitude, Leadership, and Creativity"
date: 2012-06-07 21:07
comments: true
categories: [posterous, old blog, leadership, solitude, character, intellectual integrity, understanding, introspection, creativity]
published: true
author: Byron Gibson
---

One of the [best essays][1] I've ever read.

TLDR: Leadership requires depth of understanding, intospection, and capacity for creativity, all of which require solitude to cultivate.

Also [reaffirmed by Steve Wozniak][2], on creativity.

[1]:    http://theamericanscholar.org/solitude-and-leadership/
[2]:    http://news.ycombinator.com/item?id=3627606


text:
package org.openhab.binding.megadevice.internal;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MegaDeviceActivator implements BundleActivator {

	private static Logger logger = LoggerFactory
			.getLogger(MegaDeviceActivator.class);

	private static BundleContext context;

	public void start(BundleContext context) throws Exception {
		logger.info("MegaDevice binding has been started.");
	}

	public void stop(BundleContext context) throws Exception {
		logger.debug("MegaDevice binding 0.1.2.4 has been stopped.");
	}

	/**
	 * Returns the bundle context of this bundle
	 *
	 * @return the bundle context
	 */
	public static BundleContext getContext() {
		return context;
	}

}


text:
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/zimbra/bin

# We must have a valid account 'zimbra'
[ -z "$(getent passwd zimbra)" ] && exit 0

#==============================================================================
# Don't run several instances
PROG=${0##*/}
LOCKFILE=/tmp/${PROG}.lock
if [ -s $LOCKFILE ]
then
        # The file exists so read the PID
        MYPID=$(< $LOCKFILE)
        [ -z "$(ps -p $MYPID | grep $MYPID)" ] || exit 0
fi

# The process is not running (or no lockfile exists)
echo $$ > $LOCKFILE
trap "rm -f $LOCKFILE /tmp/$$*; exit 0" 1 2 3 15 EXIT

DEBUG=0
[[ $- = *x* ]] && DEBUG=1

# Get the full hostname
THISHOST=$(hostname)
[[ $THISHOST = *.* ]] || THISHOST=$(hostname -f)
ZIMBRA_HOSTNAME=$(zmhostname)

# Run the whole script in "ionice" mode
ionice -c2 -n7 -p $$

# Determine whether we are on a "Network Edition" server or not
if [ -x /opt/zimbra/bin/zmlicense -a -x /opt/zimbra/bin/zmrestore -a -s /opt/zimbra/backup/accounts.xml ]
then
        ZIMBRA_NE=1
else
        ZIMBRA_NE=0
fi

# Use the multi-core version of gzip if possible
GZIP='gzip'
[ -x /usr/bin/pigz ] && GZIP='pigz'

# The list of system config files
FILELIST='/etc/firehol/firehol.conf /etc/network/interfaces
          /etc/hosts /etc/hostname /etc/resolv.conf
          /opt/zimbra/ssl/zimbra/commercial'

TODAY=$(date '+%F')

# Process options from the command line
OPTIONS=''
while getopts "ho:" OPTION
do
    case "${OPTION}" in
        o)  OPTIONS=${OPTARG}
            ;;
        *)
            cat << EOT
Usage: $0 [-o]

  Possible options (need to be seperated by a ',' [comma]:
  no-email  Backup only backup metadata (not emails)
EOT
            exit 1
            ;;
    esac
done
shift $((OPTIND-1))

# Create a directory for all backups
BKP_DIR='/backup/backups'
rm -rf $BKP_DIR
mkdir -p $BKP_DIR

LOGFILE="$BKP_DIR/../zos-backup.log"
LA=$(uptime | cut -dl -f2-)
date "+%F %T $0 starting: (l$LA)" >> $LOGFILE

# Get the number of CPU cores in the system
CPUs=$(grep -c CPU /proc/cpuinfo)
MAXLOAD=$(($(($CPUs + 1)) * 2))

##################
# Subroutines
##################
function LoadCheck() {

    # Wait until the load average settled somewhat
    LA=$(uptime | cut -dl -f2-)
    date "+%F %T Checking system load against $MAXLOAD (l$LA)" >> $LOGFILE
    until [ $(awk '{print int($1)}' /proc/loadavg) -lt $MAXLOAD ]
    do
        sleep 4
    done

    LA=$(uptime | cut -dl -f2-)
    date "+%F %T System load after check (l$LA)" >> $LOGFILE
}

function BkpAccount() {
    local BKP_DIR="$1"
    local ACCOUNT="$2"
    local TOTAL_USERS=$3
    local CUR_USER_NUM=$4

    LA=$(uptime | cut -dl -f2-)
    date "+%F %T Backing up account $ACCOUNT (l$LA)" >> $LOGFILE

    # Save the account's metadata (incl. password)
    nice zmprov -l ga $ACCOUNT >> $BKP_DIR/account.$ACCOUNT 2>> $LOGFILE

    # Save the account's filters
    nice zmmailbox -z -m $ACCOUNT getFilterRules >> $BKP_DIR/account.filters.$ACCOUNT 2>> $LOGFILE

    if [[ $OPTIONS =~ no-email ]]
    then
        # We only need the meta data for an account
        return
    fi

    local LASTFULL=''
    if [ $ZIMBRA_NE -ne 0 ]
    then
        # TB: Special case - create full backups for all domains
        #      but a few to prepare for migration to new server
        if [[ ! $ACCOUNT =~ .*domain1.* ]] && [[ ! $ACCOUNT =~ .*domain2.* ]]
        then
            LASTFULL=''
        else

        # On "Network Edition" servers do an incremental backup
        #  since the last full regular backup
        if [ -d /opt/zimbra/backup/sessions ]
        then
            # Get the day BEFORE the last full backup
            local RFB=$(ls -1t /opt/zimbra/backup/sessions/ | grep -m 1 full-)
            [ -z "$RFB" ] || LASTFULL=$(date +%D -d "${RFB:5:8} - 1 day")
        fi
        fi # end TB: Special case
    else
        # Is there a full backup for that account already?
#        local BKPDAY=$(($(/sbin/ifconfig eth0 | sed -n "s/.*inet addr:\([0-9.]*\).*/\1/p" | awk -F. '{print $NF}') % 7))
        # Full backups happen on Sundays
        local BKPDAY=0
        if [ $(date +%w) -ne $BKPDAY ]
        then
            # Get the date of the last backup
            # Note: Run full backups on the backup day
            [ -s /var/tmp/${ACCOUNT}.lastbkp ] && LASTFULL=$(< /var/tmp/${ACCOUNT}.lastbkp)
        fi
    fi

    # Wait until the load average settled somewhat
    LoadCheck

    # Get the account's data
    if [ -z "$LASTFULL" ]
    then
        # Save everything
        LA=$(uptime | cut -dl -f2-)
        date "+%F %T Full backup for account $ACCOUNT (l$LA)" >> $LOGFILE
        su - zimbra -c "nice zmmailbox -z -m $ACCOUNT getRestURL '//?fmt=tgz'" > $BKP_DIR/account-data.${ACCOUNT}.f${TODAY}.tgz 2>> $LOGFILE
    else
        # Save only from a last backup date on (incremental)
        LA=$(uptime | cut -dl -f2-)
        date "+%F %T Incremental backup for account $ACCOUNT (l$LA)" >> $LOGFILE
        su - zimbra -c "nice zmmailbox -z -m $ACCOUNT getRestURL '//?fmt=tgz&query=after:$LASTFULL'" > $BKP_DIR/account-data.${ACCOUNT}.i${TODAY}.tgz 2>> $LOGFILE
    fi

    # Save the (previous) day of this backup
    date '+%D' > /var/tmp/${ACCOUNT}.lastbkp
}

##################
# Main program
##################
if [ $DEBUG -eq 0 ]
then
    # Wait between 3 and 20 minutes
    ST=$(($RANDOM % 1200))
    [ $ST -lt 180 ] && ST=$(($ST + 180))
    LA=$(uptime | cut -dl -f2-)
    date "+%F %T Waiting $ST seconds (l$LA)" >> $LOGFILE
    sleep $ST
fi

# Local config
LoadCheck
LA=$(uptime | cut -dl -f2-)
date "+%F %T Backing up 'localconfig' (l$LA)" >> $LOGFILE
echo "# Zimbra Local Configuration (incl. passwords)" > $BKP_DIR/localconfig
nice zmlocalconfig -s >> $BKP_DIR/localconfig 2>> $LOGFILE

# Backup all databases
LoadCheck
LA=$(uptime | cut -dl -f2-)
date "+%F %T Backing up all databases (l$LA)" >> $LOGFILE
ROOT_SQL_PASSWORD=$(awk '/^mysql_root_password/ {print $NF}' $BKP_DIR/localconfig)
nice /opt/zimbra/mysql/bin/mysqldump -S /opt/zimbra/db/mysql.sock \
  -u root --password=$ROOT_SQL_PASSWORD -A --result-file=$BKP_DIR/fullzimbra.sql
nice ${GZIP} $BKP_DIR/fullzimbra.sql &

# Backups
grep pass $BKP_DIR/localconfig > $BKP_DIR/passwords

# All COS data (sorted by name)
INDEX=0
LoadCheck
nice zmprov gac | sort > /tmp/$$
TOTAL_COSS=$(sed -n '$=' /tmp/$$)
CUR_COS_NUM=1
for COS in $(< /tmp/$$)
do
    LoadCheck
    LA=$(uptime | cut -dl -f2-)
    date "+%F %T Backing up COS '$COS' (l$LA)" >> $LOGFILE
    echo "# Zimbra Class of Service: $COS" > $BKP_DIR/cos.$COS
    nice zmprov gc $COS >> $BKP_DIR/cos.$COS 2>> $LOGFILE &
    CUR_COS_NUM=$(($CUR_COS_NUM + 1))
    INDEX=$(($INDEX + 1))
    if [ $INDEX -gt 1 ]
    then
        # Only two COSes in parallel at any time
        wait
        INDEX=0
    fi
done
wait

# All servers (sorted by name)
INDEX=0
LoadCheck
nice zmprov gas | sort > /tmp/$$
TOTAL_SRVS=$(sed -n '$=' /tmp/$$)
CUR_SRV_NUM=1
for SERVER in $(< /tmp/$$)
do
    LoadCheck
    LA=$(uptime | cut -dl -f2-)
    date "+%F %T Backing up server '$SERVER' [$CUR_SRV_NUM of $TOTAL_SRVS] (l$LA)" >> $LOGFILE
    echo "# Zimbra Server: $SERVER" > $BKP_DIR/server.$SERVER
    nice zmprov gs $SERVER >> $BKP_DIR/server.$SERVER 2>> $LOGFILE &
    CUR_SRV_NUM=$(($CUR_SRV_NUM + 1))
    INDEX=$(($INDEX + 1))
    if [ $INDEX -gt 1 ]
    then
        # Only two servers in parallel at any time
        wait
        INDEX=0
    fi
done
wait

# All domains (sorted by name)
INDEX=0
LoadCheck
nice zmprov gad | sort > /tmp/$$
TOTAL_DOMS=$(sed -n '$=' /tmp/$$)
CUR_DOM_NUM=1
for DOMAIN in $(< /tmp/$$)
do
    # TB: Special case - ignore non-migrated domains
    [[ $DOMAIN =~ .*domain1.* ]] && continue
    [[ $DOMAIN =~ .*domain2.* ]] && continue

    LoadCheck
    LA=$(uptime | cut -dl -f2-)
    date "+%F %T Backing up domain '$DOMAIN' [$CUR_DOM_NUM of $TOTAL_DOMS] (l$LA)" >> $LOGFILE
    echo "# Zimbra Domain: $DOMAIN" > $BKP_DIR/domain.$DOMAIN
    nice zmprov gd $DOMAIN >> $BKP_DIR/domain.$DOMAIN 2>> $LOGFILE &
    CUR_DOM_NUM=$(($CUR_DOM_NUM + 1))
    INDEX=$(($INDEX + 1))
    if [ $INDEX -gt 1 ]
    then
        # Only two domains in parallel at any time
        wait
        INDEX=0
    fi
done
wait

# All accounts (sorted by size in descending order)
INDEX=0
LoadCheck
nice zmprov gqu $ZIMBRA_HOSTNAME | cut -d' ' -f1,3 | sort -k 2 -rn | cut -d' ' -f1 | \
  egrep -v '^(ham|spam|virus-quarantine|galsync|wiki)' > /tmp/$$
TOTAL_USERS=$(sed -n '$=' /tmp/$$)
CUR_USER_NUM=1
for ACCOUNT in $(< /tmp/$$)
do
    # TB: Special cases - ignore non-migrated domains
    [[ $ACCOUNT =~ .*domain1.* ]] && continue
    [[ $ACCOUNT =~ .*domain2.* ]] && continue

    BkpAccount $BKP_DIR $ACCOUNT $TOTAL_USERS $CUR_USER_NUM &
    CUR_USER_NUM=$(($CUR_USER_NUM + 1))
    INDEX=$(($INDEX + 1))
    if [ $INDEX -gt 1 ]
    then
        # Only two accounts in parallel at any time
        wait
        INDEX=0
    fi
done
wait

# All distribution lists (sorted by name)
INDEX=0
LoadCheck
nice zmprov gadl | sort > /tmp/$$
TOTAL_LISTS=$(sed -n '$=' /tmp/$$)
CUR_LIST_NUM=1
for LIST in $(< /tmp/$$)
do
    # TB: Special case - ignore non-migrated domains
    [[ $LIST =~ .*domain1.* ]] && continue
    [[ $LIST =~ .*domain2.* ]] && continue

    LoadCheck
    LA=$(uptime | cut -dl -f2-)
    date "+%F %T Backing up list '$LIST' [$CUR_LIST_NUM of $TOTAL_LISTS] (l$LA)" >> $LOGFILE
    echo "# Zimbra Distribution List: $LIST" > $BKP_DIR/list.$LIST
    nice zmprov gdl $LIST >> $BKP_DIR/list.$LIST 2>> $LOGFILE &
    CUR_LIST_NUM=$(($CUR_LIST_NUM + 1))
    INDEX=$(($INDEX + 1))
    if [ $INDEX -gt 1 ]
    then
        # Only two lists in parallel at any time
        wait
        INDEX=0
    fi
done
wait

# All calendars (sorted by name)
INDEX=0
LoadCheck
nice zmprov gacr | sort > /tmp/$$
TOTAL_CALS=$(sed -n '$=' /tmp/$$)
CUR_CAL_NUM=1
for CAL in $(< /tmp/$$)
do
    # TB: Special case - ignore non-migrated domains
    [[ $CAL =~ .*domain1.* ]] && continue
    [[ $CAL =~ .*domain2.* ]] && continue

    LoadCheck
    LA=$(uptime | cut -dl -f2-)
    date "+%F %T Backing up calendar '$CAL' [$CUR_CAL_NUM of $TOTAL_CALS] (l$LA)" >> $LOGFILE
    echo "# Zimbra Calendar: $CAL" > $BKP_DIR/calendar.$CAL
    nice zmprov gcr $CAL >> $BKP_DIR/calendar.$CAL 2>> $LOGFILE &
    CUR_CAL_NUM=$(($CUR_CAL_NUM + 1))
    INDEX=$(($INDEX + 1))
    if [ $INDEX -gt 1 ]
    then
        # Only two calendars in parallel at any time
        wait
        INDEX=0
    fi
done
wait

# Some misc. files
LoadCheck
LA=$(uptime | cut -dl -f2-)
date "+%F %T Backing up misc. files (l$LA)" >> $LOGFILE
[ -f /usr/local/sbin/LocalHealthCheck.sh ] && cp /usr/local/sbin/LocalHealthCheck.sh $BKP_DIR
[ -f /usr/local/etc/zos-MailRouting.cfg ] && cp /usr/local/etc/zos-MailRouting.cfg $BKP_DIR

# Delete any backups older than 8 days
LoadCheck
LA=$(uptime | cut -dl -f2-)
date "+%F %T Deleting old backups (l$LA)" >> $LOGFILE
nice find $BKP_DIR/.. -maxdepth 1 -type f \( -name "${THISHOST}.backup.*.tgz" -o -name "${THISHOST}.backup.*.tar" \) -mtime +7 -delete >> $LOGFILE 2>&1 &

# Gzip all file not yet compressed
LoadCheck
nice find $BKP_DIR/.. -type f '!' -name "*gz" -exec ${GZIP} \-9f '{}' ';'

# Tar up the whole backup directory and delete it
LoadCheck
LA=$(uptime | cut -dl -f2-)
date "+%F %T Taring up backups (l$LA)" >> $LOGFILE
nice tar cf $BKP_DIR/../${THISHOST}'.backup.'$(date '+%Y-%m-%d')'.tar' $BKP_DIR >> $LOGFILE 2>&1
RETCODE=$?
if [ $RETCODE -eq 0 ]
then
    nice rm -rf $BKP_DIR &
#	if [ $DEBUG -eq 0 ]
#	then
#                su - zimbra -c 'zmcontrol stop'
#                sleep 2
#                [ -x /usr/local/sbin/KillOldZimbraProcs.pl ] && KillOldZimbraProcs.pl
#                su - zimbra -c 'zmcontrol start'
#        fi
fi

#==============================================================================
# Create an archive of essential config files
LA=$(uptime | cut -dl -f2-)
date "+%F %T Creating archive (l$LA)" >> $LOGFILE
nice chown -R zimbra:zimbra /backup &> /dev/null
nice tar -cvz -f $BKP_DIR/../${THISHOST}.zosss.tgz $FILELIST >> $LOGFILE 2>&1

#==============================================================================
# Copy files to backup server (if possible)
DB1_BKP=
if [ ! -z "$DB1_BKP" ]
then
    ping -qc 3 $DB1_BKP &> /dev/null
    if [ $? -eq 0 -a -x /usr/bin/pscp ]
    then
        U=  # Username for pscp
        P=  # Password for pscp
        LoadCheck
        pscp -q -batch -4 -l $U -pw $P $BKP_DIR/../${THISHOST}.zosss.tgz $DB1_BKP:
    fi
fi

# Copy zimbra backups from this server to zimbra1/webmail.leadature.com
# The SSH parameters
SSH_SERVER=''
SSH_USERID=''
SSH_PASSWD=''
LOCALMOUNT='/tmp/sshbkp'
REM_MOUNT='/backup/zimbra2'

if [ ! -z "$SSH_SERVER" -a ! -z "$SSH_USERID" -a ! -z "$SSH_PASSWD" ]
then
    # Install "sshfs" if necessary
    dpkg-query -s sshfs &> /dev/null
    [ $? -ne 0 ] && apt-get -qy sshfs

    # Create SSHFS mountpoint
    mkdir -p $LOCALMOUNT

    # Create the tunnel
    LDEBUG=''
    [ "T$DEBUG" = 'T-v' ] && LDEBUG='-o sshfs_debug'
    # As per http://www.admin-magazine.com/HPC/Articles/Sharing-Data-with-SSHFS
    echo "$SSH_PASSWD" | \
        sshfs ${SSH_USERID}@${SSH_SERVER}:$REM_MOUNT $LOCALMOUNT -o password_stdin \
         -o nonempty -o ServerAliveInterval=60 -o cache=yes \
         -o kernel_cache -o compression=no $LDEBUG

    # Delete really old backups
    LA=$(uptime | cut -dl -f2-)
    date "+%F %T Deleting old backups on '$SSH_SERVER' (l$LA)" >> $LOGFILE
    find /opt/zimbra/backup $LOCALMOUNT -maxdepth 1 -type f -name "zimbrastore*tar" -mtime +2 -delete
    # Copy the remaining backups
    LA=$(uptime | cut -dl -f2-)
    date "+%F %T Copying backups to '$SSH_SERVER' (l$LA)" >> $LOGFILE
    rsync -rlptD $DEBUG --log-file=/tmp/zimbra-backup.log --delete --size-only --no-g \
      /opt/zimbra/backup/zimbrastore*tar $LOCALMOUNT
    LA=$(uptime | cut -dl -f2-)
    date "+%F %T Copied backups to '$SSH_SERVER' (l$LA)" >> $LOGFILE

    # Tear down the tunnel
    umount $LOCALMOUNT
fi

#==============================================================================
# Upgrade OS and reboot if necessary
[ -x /usr/local/sbin/OSUpdate.sh ] && /usr/local/sbin/OSUpdate.sh

#==============================================================================
# Restart zimbra services every other Sunday
if [ $(($(date +%-U) % 2)) -eq 0 -a $(date +%w) -eq 0 ]
then
    LA=$(uptime | cut -dl -f2-)
    date "+%F %T Restarting Zimbra services (l$LA)" >> $LOGFILE
    su - zimbra -c '/opt/zimbra/bin/zmcontrol restart'
fi

#==============================================================================
# We are done
LA=$(uptime | cut -dl -f2-)
date "+%F %T $0: done (l$LA)" >> $LOGFILE
exit 0


text:
package org.apache.zookeeper.server.util;

import javax.security.auth.kerberos.KerberosPrincipal;

public class KerberosUtil {
  public static String getDefaultRealm() throws IllegalArgumentException {
    return new KerberosPrincipal("tmp", 1).getRealm();
  }
}


text:
<OpenNI>
	<Licenses>
		<License vendor="PrimeSense" key="0KOIk2JeIBYClPWVnMoRKn5cdY4="/>
	</Licenses>
	<Log writeToConsole="false" writeToFile="false">
		<!-- 0 - Verbose, 1 - Info, 2 - Warning, 3 - Error (default) -->
		<LogLevel value="3"/>
		<Masks>
			<Mask name="ALL" on="true"/>
		</Masks>
		<Dumps>
		</Dumps>
	</Log>
	<ProductionNodes>

		<!-- Set global mirror -->
		<GlobalMirror on="true"/>

		<!-- Create a depth node and give it a name alias (useful if referenced ahead in this script) -->
		<Node type="Depth" name="MyDepth">
			<Query>

			</Query>
			<Configuration>
				<MapOutputMode xRes="640" yRes="480" FPS="30"/>
			</Configuration>
		</Node>

		<!-- Create an image node. If it fails, continue anyway. -->
		<Node type="Image" stopOnError="false" />

		<Node type="Hands" />
		<!--<Node type="Gesture" />
		<Node type="Scene" />
		-->
	</ProductionNodes>
</OpenNI>


text:
<!DOCTYPE HTML>

<link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff">
<title>HlsExtractorFactory (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../jquery/jquery-ui.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

All Classes

SEARCH:
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">

JavaScript is disabled on your browser.

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Package com.google.android.exoplayer2.source.hls

Interface HlsExtractorFactory

All Known Implementing Classes:

DefaultHlsExtractorFactory

public interface HlsExtractorFactory

Factory for HLS media chunk extractors.

Field Summary

Fields

Modifier and Type
Field
Description

static HlsExtractorFactory
DEFAULT

Method Summary

All Methods Instance Methods Abstract Methods

Modifier and Type
Method
Description

HlsMediaChunkExtractor
createExtractor(Uri uri,
               Format format,
               List<Format> muxedCaptionFormats,
               TimestampAdjuster timestampAdjuster,
               Map<String,List<String>> responseHeaders,
               ExtractorInput sniffingExtractorInput)

Creates an Extractor for extracting HLS media chunks.

Field Detail

DEFAULT

static final HlsExtractorFactory DEFAULT

Method Detail

createExtractor

HlsMediaChunkExtractor createExtractor(Uri uri,
                                       Format format,
                                       @Nullable
                                       List<Format> muxedCaptionFormats,
                                       TimestampAdjuster timestampAdjuster,
                                       Map<String,List<String>> responseHeaders,
                                       ExtractorInput sniffingExtractorInput)
                                throws IOException

Creates an Extractor for extracting HLS media chunks.

Parameters:

uri - The URI of the media chunk.

format - A Format associated with the chunk to extract.

muxedCaptionFormats - List of muxed caption Formats. Null if no closed caption
     information is available in the master playlist.

timestampAdjuster - Adjuster corresponding to the provided discontinuity sequence number.

responseHeaders - The HTTP response headers associated with the media segment or
     initialization section to extract.

sniffingExtractorInput - The first extractor input that will be passed to the returned
     extractor's Extractor.read(ExtractorInput, PositionHolder). Must only be used to
     call Extractor.sniff(ExtractorInput).

Returns:

An HlsMediaChunkExtractor.

Throws:

IOException - If an I/O error is encountered while sniffing.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

All Classes

JavaScript is disabled on your browser.

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
#ifndef SKY_ENGINE_WTF_FILEPRINTSTREAM_H_
#define SKY_ENGINE_WTF_FILEPRINTSTREAM_H_

#include <stdio.h>
#include "flutter/sky/engine/wtf/PassOwnPtr.h"
#include "flutter/sky/engine/wtf/PrintStream.h"

namespace WTF {

class WTF_EXPORT FilePrintStream final : public PrintStream {
public:
    enum AdoptionMode {
        Adopt,
        Borrow
    };

    FilePrintStream(FILE*, AdoptionMode = Adopt);
    virtual ~FilePrintStream();

    static PassOwnPtr<FilePrintStream> open(const char* filename, const char* mode);

    FILE* file() { return m_file; }

    virtual void vprintf(const char* format, va_list) override WTF_ATTRIBUTE_PRINTF(2, 0);
    virtual void flush() override;

private:
    FILE* m_file;
    AdoptionMode m_adoptionMode;
};

} // namespace WTF

using WTF::FilePrintStream;

#endif  // SKY_ENGINE_WTF_FILEPRINTSTREAM_H_


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

Lincoln (1992) (TV)

reviewed by
Brian L. Johnson

                                  LINCOLN
                       A film review by Ken Johnson
                        Copyright 1993 Ken Johnson

195 min., not rated, Documentary, 1992, Made-for-television
Director: Peter W. Kunhardt
Voices of: James Earl Jones, Jason Robards, Glenn Close, Dabney Coleman,
           Stacy Keach, Ossie Davis, Richard Dreyfus, Rod Steiger,
           Richard Widmark, Arnold Schwarzenegger, E.G. Marshall,
           Richard Thomas, Fred Gwynne, Eli Wallach, Oprah Winfrey,
           Burgess Meredith, Ned Beatty, Barnard Hughes,
           Cliff Robertson, Maureen Stapleton, Frank Langella,
           Henry Morgan, Keith Carradine, Blythe Danner, Robert Vaughn,
           Philip Bosco, Jim Dale, Jill Clayburgh, Robby Benson,
           Gordon Parks, John Shea, Laurence Luckinbill,
           Stockard Channing

     This is a documentary on one of America's greatest presidents,
Abraham Lincoln (voice of Jason Robards).  The documentary is narrated
by James Earl Jones and covers Lincoln from his start in politics to his
assassination by John Wilkes Booth (voice of Frank Langella).

     LINCOLN was made much in the same way that the PBS film THE CIVIL
WAR was made, using pictures of Lincoln and the other people featured in
the film.  I never saw the PBS film THE CIVIL WAR, so I can't say
whether this one came out better.  I think however, that LINCOLN was
very well done, and worth seeing if you get the chance.  If you missed
LINCOLN when it aired on television, it is also available on video
cassette, which runs for 45 minutes longer than the film did on
television.  On a scale of zero to five, I give LINCOLN a four.  LINCOLN
contains nothing that I think anyone would find objectionable.

     The voice talent for LINCOLN, I felt, for the most part is very
good.  I think that fact that the film had experienced actors for the
voices helped the film considerably.  Instead of one monotone voice
throughout the film, there were several different voices, which had some
emotion to them.  I think that it is good that the film had more than
just a narrator, because hearing the same voice for the entire length of
the film would get rather boring.  I feel that only one of the voices
was miscast, that was Arnold Schwarzenegger.  He is great in his action
films where he doesn't have much of a speaking role, and he was even
able to pull off KINDERGARTEN COP.  As just a voice talent, however, I
don't think that his voice makes it.  He doesn't have good diction, and
I feel that voice could have been better cast.  [Moderator's note: The
character he spoke was Bavarian-born, and probably had the same accent.]

     I liked how there were color shots of the buildings in the present
day mixed in with the portraits from the time.  That technique added
some variety to the film and kept all the old photographs from wearing
on the viewer.  The photographs were well picked and were well placed in
the film so that they fit in.

     The only other main problem that I had with the film is that I
think that it could have run for television time of two and a half to
three hours, instead of the four that it ran.  Even though the four
hours were well done, the film after a while seemed to be going on
forever.

--------
Ken Johnson
blj@mithrandir.cs.unh.edu

.

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

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

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

Broken URLs inthe reviews are the responsibility of the author.

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

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


text:
.. _usersguide_materials:

.. currentmodule:: openmc

=====================
Material Compositions
=====================

Materials in OpenMC are defined as a set of nuclides/elements at specified
densities and are created using the :class:`openmc.Material` class. Once a
material has been instantiated, nuclides can be added with
:meth:`Material.add_nuclide` and elements can be added with
:meth:`Material.add_element`. Densities can be specified using atom fractions or
weight fractions. For example, to create a material and add Gd152 at 0.5 atom
percent, you'd run::

   mat = openmc.Material()
   mat.add_nuclide('Gd152', 0.5, 'ao')

The third argument to :meth:`Material.add_nuclide` can also be 'wo' for weight
percent. The densities specified for each nuclide/element are relative and are
renormalized based on the total density of the material. The total density is
set using the :meth:`Material.set_density` method. The density can be specified
in gram per cubic centimeter ('g/cm3'), atom per barn-cm ('atom/b-cm'), or
kilogram per cubic meter ('kg/m3'), e.g.,

::

   mat.set_density('g/cm3', 4.5)

----------------
Natural Elements
----------------

The :meth:`Material.add_element` method works exactly the same as
:meth:`Material.add_nuclide`, except that instead of specifying a single isotope
of an element, you specify the element itself. For example,

::

   mat.add_element('C', 1.0)

This method can also accept case-insensitive element names such as

::

  mat.add_element('aluminium', 1.0)

Internally, OpenMC stores data on the atomic masses and natural abundances of
all known isotopes and then uses this data to determine what isotopes should be
added to the material. When the material is later exported to XML for use by the
:ref:`scripts_openmc` executable, you'll see that any natural elements were
expanded to the naturally-occurring isotopes.

The :meth:`Material.add_element` method can also be used to add uranium at a
specified enrichment through the `enrichment` argument. For example, the
following would add 3.2% enriched uranium to a material::

   mat.add_element('U', 1.0, enrichment=3.2)

In addition to U235 and U238, concentrations of U234 and U236 will be present
and are determined through a correlation based on measured data.

It is also possible to perform enrichment of any element that is composed
of two naturally-occurring isotopes (e.g., Li or B) in terms of atomic percent.
To invoke this, provide the additional argument `enrichment_target` to
:meth:`Material.add_element`. For example the following would enrich B10
to 30ao%::

   mat.add_element('B', 1.0, enrichment=30.0, enrichment_target='B10')

In order to enrich an isotope in terms of mass percent (wo%), provide the extra
argument `enrichment_type`. For example the following would enrich Li6 to 15wo%::

   mat.add_element('Li', 1.0, enrichment=15.0, enrichment_target='Li6',
                   enrichment_type='wo')

Often, cross section libraries don't actually have all naturally-occurring
isotopes for a given element. For example, in ENDF/B-VII.1, cross section
evaluations are given for O16 and O17 but not for O18. If OpenMC is aware of
what cross sections you will be using (through the
:envvar:`OPENMC_CROSS_SECTIONS` environment variable), it will attempt to only
put isotopes in your model for which you have cross section data. In the case of
oxygen in ENDF/B-VII.1, the abundance of O18 would end up being lumped with O16.

-----------------------
Thermal Scattering Data
-----------------------

If you have a moderating material in your model like water or graphite, you
should assign thermal scattering data (so-called :math:`S(\alpha,\beta)`) using
the :meth:`Material.add_s_alpha_beta` method. For example, to model light water,
you would need to add hydrogen and oxygen to a material and then assign the
``c_H_in_H2O`` thermal scattering data::

   water = openmc.Material()
   water.add_nuclide('H1', 2.0)
   water.add_nuclide('O16', 1.0)
   water.add_s_alpha_beta('c_H_in_H2O')
   water.set_density('g/cm3', 1.0)

.. _usersguide_naming:

------------------
Naming Conventions
------------------

OpenMC uses the GNDS_ naming convention for nuclides, metastable states, and
compounds:

:Nuclides: ``SymA`` where "A" is the mass number (e.g., ``Fe56``)
:Elements: ``Sym0`` (e.g., ``Fe0`` or ``C0``)
:Excited states: ``SymA_eN`` (e.g., ``V51_e1`` for the first excited state of
                 Vanadium-51.) This is only used in decay data.
:Metastable states: ``SymA_mN`` (e.g., ``Am242_m1`` for the first excited state
                    of Americium-242).
:Compounds: ``c_String_Describing_Material`` (e.g., ``c_H_in_H2O``). Used for
            thermal scattering data.

.. important:: The element syntax, e.g., ``C0``, is only used when the cross
               section evaluation is an elemental evaluation, like carbon in
               ENDF/B-VII.1! If you are adding an element via
               :meth:`Material.add_element`, just use ``Sym``.

.. _GNDS: https://www.oecd-nea.org/jcms/pl_39689/specifications-for-the-generalised-nuclear-database-structure-gnds

-----------
Temperature
-----------

Some Monte Carlo codes define temperature implicitly through the cross section
data, which is itself given only at a particular temperature. In OpenMC, the
material definition is decoupled from the specification of temperature. Instead,
temperatures are assigned to :ref:`cells <usersguide_cells>`
directly. Alternatively, a default temperature can be assigned to a material
that is to be applied to any cell where the material is used. In the absence of
any cell or material temperature specification, a global default temperature can
be set that is applied to all cells and materials. Anytime a material
temperature is specified, it will override the global default
temperature. Similarly, anytime a cell temperatures is specified, it will
override the material or global default temperature. All temperatures should be
given in units of Kelvin.

To assign a default material temperature, one should use the ``temperature``
attribute, e.g.,

::

   hot_fuel = openmc.Material()
   hot_fuel.temperature = 1200.0  # temperature in Kelvin

.. warning:: MCNP_ users should be aware that OpenMC does not use the concept of
             cross section suffixes like "71c" or "80c". Temperatures in Kelvin
             should be assigned directly per material or per cell using the
             :attr:`Material.temperature` or :attr:`Cell.temperature`
             attributes, respectively.

-----------------
Material Mixtures
-----------------

In OpenMC it is possible to mix any number of materials to create a new material
with the correct nuclide composition and density. The
:meth:`Material.mix_materials` method takes a list of materials and
a list of their mixing fractions. Mixing fractions can be provided as atomic
fractions, weight fractions, or volume fractions. The fraction type
can be specified by passing 'ao', 'wo', or 'vo' as the third argument, respectively.
For example, assuming the required materials have already been defined, a MOX
material with 3% plutonium oxide by weight could be created using the following:

::

   mox = openmc.Material.mix_materials([uo2, puo2], [0.97, 0.03], 'wo')

It should be noted that, if mixing fractions are specifed as atomic or weight
fractions, the supplied fractions should sum to one. If the fractions are specified
as volume fractions, and the sum of the fractions is less than one, then the remaining
fraction is set as void material.

.. warning:: Materials with :math:`S(\alpha,\beta)` thermal scattering data
             cannot be used in :meth:`Material.mix_materials`. However, thermal
             scattering data can be added to a material created by
             :meth:`Material.mix_materials`.

--------------------
Material Collections
--------------------

The :ref:`scripts_openmc` executable expects to find a ``materials.xml`` file
when it is run. To create this file, one needs to instantiate the
:class:`openmc.Materials` class and add materials to it. The :class:`Materials`
class acts like a list (in fact, it is a subclass of Python's built-in
:class:`list` class), so materials can be added by passing a list to the
constructor, using methods like ``append()``, or through the operator
``+=``. Once materials have been added to the collection, it can be exported
using the :meth:`Materials.export_to_xml` method.

::

   materials = openmc.Materials()
   materials.append(water)
   materials += [uo2, zircaloy]
   materials.export_to_xml()

   # This is equivalent
   materials = openmc.Materials([water, uo2, zircaloy])
   materials.export_to_xml()

Cross Sections
--------------

OpenMC uses a file called :ref:`cross_sections.xml <io_cross_sections>` to
indicate where cross section data can be found on the filesystem. This file
serves the same role that ``xsdir`` does for MCNP_ or ``xsdata`` does for
Serpent. Information on how to generate a cross section listing file can be
found in :ref:`create_xs_library`. Once you have a cross sections file that has
been generated, you can tell OpenMC to use this file either by setting
:attr:`Materials.cross_sections` or by setting the
:envvar:`OPENMC_CROSS_SECTIONS` environment variable to the path of the
``cross_sections.xml`` file. The former approach would look like::

   materials.cross_sections = '/path/to/cross_sections.xml'

.. _MCNP: https://mcnp.lanl.gov/