text:
require 'spec_helper'
# Speccing out the Ebird ruby gem

module EBird
	describe "AvianKnowledge" do
	ak = AvianKnowledge.new()
		it "should provide a parsed list of countries from the Ebird API" do
			expect(ak.country_list.class).to eq(Array)
		end #country_list spec
		it "should provide a parsed list of states" do
			expect(ak.subnational1_list.class).to eq(Array)
		end #subnat_1 spec
	end #describe AvianKnowledge
end #EBird Module

redpajama_set_name: RedPajamaGithub


text:
<?xml version='1.0' encoding='ISO-8859-1'?>

<!--

shapes:
circle, square, roundsquare, triangle, star
octagon, ellipse, cross, pentagon, hexagon

colors:
RGB in HEX format
white=FFFFFF, black=000000, red=FF0000, etc.

-->

<tuio>

<!--
the definition of the various object classes
you can define the shape, color and name of each object
-->

<class name="red star" shape="star" color="FF0000" description="red star"/>

<class name="white triangle" shape="triangle" color="DDDDDD" description="white triangle"/>
<class name="black triangle" shape="triangle" color="222222" description="black triangle"/>

<class name="white square" shape="square" color="DDDDDD" description="white square"/>
<class name="black square" shape="square" color="222222" description="black square"/>

<class name="white hexagon" shape="hexagon" color="DDDDDD" description="white hexagon"/>
<class name="black hexagon" shape="hexagon" color="222222" description="black hexagon"/>

<class name="white cross" shape="cross" color="DDDDDD" description="white cross"/>
<class name="black cross" shape="cross" color="222222" description="black cross"/>

<class name="white round" shape="round" color="DDDDDD" description="white round"/>
<class name="black round" shape="round" color="222222" description="black round"/>

<!--
the definition of the actual object instances
you can define the type, IDs and position  each object
-->

<!-- YESNO triangles -->
<!-- FIXME these are a bit fiddly, so replace them (in simulator) with two/three 1-fid pieces? -->
<object class="white triangle" fiducials="100,101,102" active="true" xpos="120" ypos="100" angle="0"/>
<object class="black triangle" fiducials="200,201,202" active="true" xpos="680" ypos="500" angle="180"/>

<object class="red star" fiducials="0" active="false" xpos="400" ypos="30" angle="0"/>

<!-- White shapes -->
<!-- Squares -->
<object class="white square" fiducials="1" active="false" xpos="30" ypos="30" angle="0"/>
<object class="white square" fiducials="1" active="false" xpos="30" ypos="80" angle="0"/>
<object class="white square" fiducials="1" active="false" xpos="30" ypos="130" angle="0"/>
<!-- Diamonds -->
<object class="white hexagon" fiducials="2" active="false" xpos="30" ypos="180" angle="0"/>
<object class="white hexagon" fiducials="2" active="false" xpos="30" ypos="230" angle="0"/>
<object class="white hexagon" fiducials="2" active="false" xpos="30" ypos="280" angle="0"/>
<!-- Factories -->
<object class="white cross" fiducials="3" active="false" xpos="30" ypos="330" angle="0"/>
<object class="white cross" fiducials="3" active="false" xpos="30" ypos="380" angle="0"/>
<object class="white cross" fiducials="3" active="false" xpos="30" ypos="430" angle="0"/>
<!-- Gliders -->
<object class="white round" fiducials="4" active="false" xpos="30" ypos="480" angle="0"/>
<object class="white round" fiducials="4" active="false" xpos="30" ypos="530" angle="0"/>
<object class="white round" fiducials="4" active="false" xpos="30" ypos="580" angle="0"/>

<!-- Black shapes -->
<!-- Squares -->
<object class="black square" fiducials="1" active="false" xpos="770" ypos="30" angle="0"/>
<object class="black square" fiducials="1" active="false" xpos="770" ypos="80" angle="0"/>
<object class="black square" fiducials="1" active="false" xpos="770" ypos="130" angle="0"/>
<!-- Diamonds -->
<object class="black hexagon" fiducials="2" active="false" xpos="770" ypos="180" angle="0"/>
<object class="black hexagon" fiducials="2" active="false" xpos="770" ypos="230" angle="0"/>
<object class="black hexagon" fiducials="2" active="false" xpos="770" ypos="280" angle="0"/>
<!-- Factories -->
<object class="black cross" fiducials="3" active="false" xpos="770" ypos="330" angle="0"/>
<object class="black cross" fiducials="3" active="false" xpos="770" ypos="380" angle="0"/>
<object class="black cross" fiducials="3" active="false" xpos="770" ypos="430" angle="0"/>
<!-- Gliders -->
<object class="black round" fiducials="4" active="false" xpos="770" ypos="480" angle="0"/>
<object class="black round" fiducials="4" active="false" xpos="770" ypos="530" angle="0"/>
<object class="black round" fiducials="4" active="false" xpos="770" ypos="580" angle="0"/>

</tuio>


text:
typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic_kernel;

typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron>     AABB_primitive;
typedef CGAL::AABB_traits<Epic_kernel,AABB_primitive>           AABB_traits;
typedef CGAL::AABB_tree<AABB_traits>                            AABB_tree;

class Q_DECL_EXPORT Scene_aabb_item : public Scene_item_with_display_list
{
  Q_OBJECT
public:
  Scene_aabb_item(const AABB_tree& tree_) : tree(tree_) {}

  bool isFinite() const { return true; }
  bool isEmpty() const { return tree.empty(); }
  Bbox bbox() const {
    const CGAL::Bbox_3 bbox = tree.bbox();
    return Bbox(bbox.xmin(),
                bbox.ymin(),
                bbox.zmin(),
                bbox.xmax(),
                bbox.ymax(),
                bbox.zmax());
  }

  Scene_aabb_item* clone() const {
    return 0;
  }

  QString toolTip() const {
    return
      tr("
%1 (mode: %2, color: %3)
"
         "AABB_tree
"
         "
Number of nodes: %4
")
      .arg(this->name())
      .arg(this->renderingModeName())
      .arg(this->color().name())
      .arg(tree.size());
  }

  // Indicate if rendering mode is supported
  bool supportsRenderingMode(RenderingMode m) const {
    return (m == Wireframe);
  }

  // Wireframe OpenGL drawing in a display list
  void direct_draw() const {
    CGAL::AABB_drawing_traits<AABB_primitive, CGAL::AABB_node<AABB_traits> > traits;
    tree.traversal(0, traits);
  }

public:
  const AABB_tree& tree;
}; // end class Scene_aabb_item

class Q_DECL_EXPORT Scene_edges_item : public Scene_item
{
  Q_OBJECT
public:
  bool isFinite() const { return true; }
  bool isEmpty() const { return edges.empty(); }
  Bbox bbox() const {
    if(isEmpty())
      return Bbox();
    CGAL::Bbox_3 bbox = edges.begin()->bbox();
    for(size_t i = 1, end = edges.size(); i < end; ++i) {
      bbox = bbox + edges[i].bbox();
    }
    return Bbox(bbox.xmin(),
                bbox.ymin(),
                bbox.zmin(),
                bbox.xmax(),
                bbox.ymax(),
                bbox.zmax());
  }

  Scene_edges_item* clone() const {
    Scene_edges_item* item = new Scene_edges_item;
    item->edges = edges;
    return item;
  }

  QString toolTip() const {
    return
      tr("
%1 (mode: %2, color: %3)
"
         "Edges
"
         "
Number of edges: %4
")
      .arg(this->name())
      .arg(this->renderingModeName())
      .arg(this->color().name())
      .arg(edges.size());
  }

  // Indicate if rendering mode is supported
  bool supportsRenderingMode(RenderingMode m) const {
    return (m == Wireframe);
  }

  // Flat/Gouraud OpenGL drawing
  void draw() const {}

  // Wireframe OpenGL drawing
  void draw_edges() const {
    ::glBegin(GL_LINES);
    for(size_t i = 0, end = edges.size();
        i < end; ++i)
    {
      const Epic_kernel::Point_3& a = edges[i].source();
      const Epic_kernel::Point_3& b = edges[i].target();
      ::glVertex3d(a.x(), a.y(), a.z());
      ::glVertex3d(b.x(), b.y(), b.z());
    }
    ::glEnd();
  }

public:
  std::vector<Epic_kernel::Segment_3> edges;
}; // end class Scene_edges_item

class Polyhedron_demo_cut_plugin :
  public QObject,
  public Polyhedron_demo_plugin_interface
{
  Q_OBJECT
  Q_INTERFACES(Polyhedron_demo_plugin_interface)

public:
  Polyhedron_demo_cut_plugin() : QObject(), edges_item(0) {
  }

  virtual ~Polyhedron_demo_cut_plugin();

  bool applicable() const {
    return true;
  }

  void init(QMainWindow* mainWindow, Scene_interface* scene_interface,
            Messages_interface* m);
  QList<QAction*> actions() const;

public slots:
  void createCutPlane();
  void enableAction();
  void cut();
  void reset_edges() {
    edges_item = 0;
  }

private:
  Scene_interface* scene;
  Messages_interface* messages;
  Scene_plane_item* plane_item;
  Scene_edges_item* edges_item;
  QAction* actionCreateCutPlane;

  typedef std::map<QObject*,  AABB_tree*> Trees;
  Trees trees;
}; // end Polyhedron_demo_cut_plugin

Polyhedron_demo_cut_plugin::~Polyhedron_demo_cut_plugin()
{
  for ( Trees::iterator it = trees.begin(), end = trees.end() ;
       it != end ; ++it)
  {
    delete it->second;
  }
}

void Polyhedron_demo_cut_plugin::init(QMainWindow* mainWindow,
                                      Scene_interface* scene_interface,
                                      Messages_interface* m)
{
  scene = scene_interface;
  messages = m;
  actionCreateCutPlane = new QAction(tr("Create cutting plane"), mainWindow);
  connect(actionCreateCutPlane, SIGNAL(triggered()),
          this, SLOT(createCutPlane()));
}

QList<QAction*> Polyhedron_demo_cut_plugin::actions() const {
  return QList<QAction*>() << actionCreateCutPlane;
}

void Polyhedron_demo_cut_plugin::createCutPlane() {
  plane_item = new Scene_plane_item(scene);
  const Scene_interface::Bbox& bbox = scene->bbox();
  plane_item->setPosition((bbox.xmin+bbox.xmax)/2.f,
                          (bbox.ymin+bbox.ymax)/2.f,
                          (bbox.zmin+bbox.zmax)/2.f);
  plane_item->setNormal(0., 0., 1.);
  connect(plane_item, SIGNAL(destroyed()),
          this, SLOT(enableAction()));
  plane_item->setManipulatable(true);
  plane_item->setClonable(false);
  plane_item->setColor(Qt::green);
  plane_item->setName(tr("Cutting plane"));
  connect(plane_item->manipulatedFrame(), SIGNAL(modified()),
          this, SLOT(cut()));
  scene->addItem(plane_item);
  actionCreateCutPlane->setEnabled(false);

  // Hide polyhedrons and call cut() (avoid that nothing shows up until user
  // decides to move the plane item)
  for(int i = 0, end = scene->numberOfEntries(); i < end; ++i) {
    Scene_item* item = scene->item(i);
    Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(item);
    if ( NULL != poly_item )
      poly_item->setVisible(false);
  }
  cut();
}

void Polyhedron_demo_cut_plugin::cut() {
  QApplication::setOverrideCursor(Qt::WaitCursor);
  if(!edges_item) {
    edges_item = new Scene_edges_item;
    edges_item->setName("Edges of the cut");
    edges_item->setColor(Qt::red);
    connect(edges_item, SIGNAL(destroyed()),
            this, SLOT(reset_edges()));
    scene->addItem(edges_item);
  }
  const qglviewer::Vec& pos = plane_item->manipulatedFrame()->position();
  const qglviewer::Vec& n =
    plane_item->manipulatedFrame()->inverseTransformOf(qglviewer::Vec(0.f, 0.f, 1.f));
  Epic_kernel::Plane_3 plane(n[0], n[1],  n[2], - n * pos);
  //std::cerr << plane << std::endl;
  edges_item->edges.clear();
  QTime time;
  time.start();
  for(int i = 0, end = scene->numberOfEntries(); i < end; ++i) {
    Scene_item* item = scene->item(i);
    Scene_polyhedron_item* poly_item = qobject_cast<Scene_polyhedron_item*>(item);
    if(!poly_item) continue;
    Trees::iterator it = trees.find(poly_item);
    if(it == trees.end()) {
      it = trees.insert(trees.begin(),
                        std::make_pair(poly_item,
                                       new AABB_tree(poly_item->polyhedron()->facets_begin(),
                                                     poly_item->polyhedron()->facets_end(),
                                                     *poly_item->polyhedron() )));
      Scene_aabb_item* aabb_item = new Scene_aabb_item(*it->second);
      aabb_item->setName(tr("AABB tree of %1").arg(poly_item->name()));
      aabb_item->setRenderingMode(Wireframe);
      aabb_item->setVisible(false);
      scene->addItem(aabb_item);
      //std::cerr << "size: " << it->second->size() << std::endl;
    }

    if(!CGAL::do_intersect(plane, it->second->bbox()))
      continue;

    std::vector<AABB_tree::Object_and_primitive_id> intersections;
    it->second->all_intersections(plane, std::back_inserter(intersections));

    for ( std::vector<AABB_tree::Object_and_primitive_id>::iterator it = intersections.begin(),
         end = intersections.end() ; it != end ; ++it )
    {
      const Epic_kernel::Segment_3* inter_seg =
        CGAL::object_cast<Epic_kernel::Segment_3>(&(it->first));

      if ( NULL != inter_seg )
        edges_item->edges.push_back(*inter_seg);
    }
  }

  messages->information(QString("cut (%1 ms). %2 edges.").arg(time.elapsed()).arg(edges_item->edges.size()));
  scene->itemChanged(edges_item);
  QApplication::restoreOverrideCursor();
}

void Polyhedron_demo_cut_plugin::enableAction() {
  actionCreateCutPlane->setEnabled(true);
}

Q_EXPORT_PLUGIN2(Polyhedron_demo_cut_plugin, Polyhedron_demo_cut_plugin)

#include "Polyhedron_demo_cut_plugin.moc"


text:
(function () {
  var CONFIG = {
    COMPONENT_ID: 'component',
    COMPONENT_WRAPPER: undefined
  };

  window.CONFIG = CONFIG;

  CONFIG.COMPONENT_WRAPPER = addInvisibleElementToFullyRenderComponents();

  function addInvisibleElementToFullyRenderComponents() {
    var div = document.createElement("div");
    div.id = CONFIG.COMPONENT_ID;
    div.style = 'position: absolute; opacity: 0.01;'
    document.body.appendChild(div);

    return div;
  }
}());


text:
import React from "react"
import PropTypes from "prop-types"
import { view } from "./view.module.css"

const View = ({ title, children }) => (

{title}

    {children}

)

View.propTypes = {
  title: PropTypes.string.isRequired,
}

export default View


text:
#import <AVFoundation/AVAssetInspector.h>

@interface AVStreamingResourceInspector : AVAssetInspector
{
}

- (CDStruct_1b6d18a9)duration;

@end


text:
/* ----------------------------------------------------------------------
 * Project:      CMSIS DSP Library
 * Title:        arm_sin_cos_f32.c
 * Description:  Sine and Cosine calculation for floating-point values
 *
 * $Date:        18. March 2019
 * $Revision:    V1.6.0
 *
 * Target Processor: Cortex-M cores
 * -------------------------------------------------------------------- */
/*
 * Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * 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
 *
 * 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.
 */

#include "arm_math.h"
#include "arm_common_tables.h"

/**
  @ingroup groupController
 */

/**
  @defgroup SinCos Sine Cosine

  Computes the trigonometric sine and cosine values using a combination of table lookup
  and linear interpolation.
  There are separate functions for Q31 and floating-point data types.
  The input to the floating-point version is in degrees while the
  fixed-point Q31 have a scaled input with the range
  [-1 0.9999] mapping to [-180 +180] degrees.

  The floating point function also allows values that are out of the usual range. When this happens, the function will
  take extra time to adjust the input value to the range of [-180 180].

  The result is accurate to 5 digits after the decimal point.

  The implementation is based on table lookup using 360 values together with linear interpolation.
  The steps used are:
   -# Calculation of the nearest integer table index.
   -# Compute the fractional portion (fract) of the input.
   -# Fetch the value corresponding to \c index from sine table to \c y0 and also value from \c index+1 to \c y1.
   -# Sine value is computed as  *psinVal = y0 + (fract * (y1 - y0)).
   -# Fetch the value corresponding to \c index from cosine table to \c y0 and also value from \c index+1 to \c y1.
   -# Cosine value is computed as  *pcosVal = y0 + (fract * (y1 - y0)).
 */

/**
  @addtogroup SinCos
  @{
 */

/**
  @brief         Floating-point sin_cos function.
  @param[in]     theta    input value in degrees
  @param[out]    pSinVal  points to processed sine output
  @param[out]    pCosVal  points to processed cosine output
  @return        none
 */

void arm_sin_cos_f32(
	float32_t theta,
	float32_t *pSinVal,
	float32_t *pCosVal)
{
	float32_t fract, in;                             /* Temporary input, output variables */
	uint16_t indexS, indexC;                         /* Index variable */
	float32_t f1, f2, d1, d2;                        /* Two nearest output values */
	float32_t Dn, Df;
	float32_t temp, findex;

	/* input x is in degrees */
	/* Scale input, divide input by 360, for cosine add 0.25 (pi/2) to read sine table */
	in = theta * 0.00277777777778f;

	if (in < 0.0f) {
		in = -in;
	}

	in = in - (int32_t)in;

	/* Calculate the nearest index */
	findex = (float32_t)FAST_MATH_TABLE_SIZE * in;
	indexS = ((uint16_t)findex) & 0x1ff;
	indexC = (indexS + (FAST_MATH_TABLE_SIZE / 4)) & 0x1ff;

	/* Calculation of fractional value */
	fract = findex - (float32_t) indexS;

	/* Read two nearest values of input value from the cos & sin tables */
	f1 =  sinTable_f32[indexC  ];
	f2 =  sinTable_f32[indexC + 1];
	d1 = -sinTable_f32[indexS  ];
	d2 = -sinTable_f32[indexS + 1];

	temp = (1.0f - fract) * f1 + fract * f2;

	Dn = 0.0122718463030f; /* delta between the two points (fixed), in this case 2*pi/FAST_MATH_TABLE_SIZE */
	Df = f2 - f1;          /* delta between the values of the functions */

	temp = Dn * (d1 + d2) - 2 * Df;
	temp = fract * temp + (3 * Df - (d2 + 2 * d1) * Dn);
	temp = fract * temp + d1 * Dn;

	/* Calculation of cosine value */
	*pCosVal = fract * temp + f1;

	/* Read two nearest values of input value from the cos & sin tables */
	f1 = sinTable_f32[indexS  ];
	f2 = sinTable_f32[indexS + 1];
	d1 = sinTable_f32[indexC  ];
	d2 = sinTable_f32[indexC + 1];

	temp = (1.0f - fract) * f1 + fract * f2;

	Df = f2 - f1; // delta between the values of the functions
	temp = Dn * (d1 + d2) - 2 * Df;
	temp = fract * temp + (3 * Df - (d2 + 2 * d1) * Dn);
	temp = fract * temp + d1 * Dn;

	/* Calculation of sine value */
	*pSinVal = fract * temp + f1;

	if (theta < 0.0f) {
		*pSinVal = -*pSinVal;
	}
}

/**
  @} end of SinCos group
 */


text: require 'ansi_up/rails'


text:
The MIT License (MIT)

Copyright (C) 2013-2015 David McCuskey. All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

--]]

--====================================================================--
--== DMC Corona Library : AutoStore
--====================================================================--

-- Semantic Versioning Specification: http://semver.org/

local VERSION = "2.1.0"

--====================================================================--
--== DMC Corona Library Config
--====================================================================--

--====================================================================--
--== Support Functions

local Utils = {} -- make copying from Utils easier

--== Start: copy from lua_utils ==--

-- extend()
-- Copy key/values from one table to another
-- Will deep copy any value from first table which is itself a table.
--
-- @param fromTable the table (object) from which to take key/value pairs
-- @param toTable the table (object) in which to copy key/value pairs
-- @return table the table (object) that received the copied items
--
function Utils.extend( fromTable, toTable )

	if not fromTable or not toTable then
		error( "table can't be nil" )
	end
	function _extend( fT, tT )

		for k,v in pairs( fT ) do

			if type( fT[ k ] ) == "table" and
				type( tT[ k ] ) == "table" then

				tT[ k ] = _extend( fT[ k ], tT[ k ] )

			elseif type( fT[ k ] ) == "table" then
				tT[ k ] = _extend( fT[ k ], {} )

			else
				tT[ k ] = v
			end
		end

		return tT
	end

	return _extend( fromTable, toTable )
end

--== End: copy from lua_utils ==--

--====================================================================--
--== Configuration

local dmc_lib_data, dmc_lib_info

-- boot dmc_corona with boot script or
-- setup basic defaults if it doesn't exist
--
if false == pcall( function() require( 'dmc_corona_boot' ) end ) then
	_G.__dmc_corona = {
		dmc_corona={},
	}
end

dmc_lib_data = _G.__dmc_corona
dmc_lib_info = dmc_lib_data.dmc_corona

--====================================================================--
--== DMC AutoStore
--====================================================================--

--====================================================================--
--== Configuration

dmc_lib_data.dmc_autostore = dmc_lib_data.dmc_autostore or {}

local DMC_AUTOSTORE_DEFAULTS = {
	data_filename = 'dmc_autostore',
	plugin_file = nil,
	timer_min = 1000,
	timer_max = 4000
}

local dmc_autostore_data = Utils.extend( dmc_lib_data.dmc_autostore, DMC_AUTOSTORE_DEFAULTS )

--====================================================================--
--== Imports

local json = require 'json'
local Error = require 'lib.dmc_lua.lua_error'
local Files = require 'dmc_files'
local Objects = require 'dmc_objects'

--====================================================================--
--== Setup, Constants

-- aliases to make code cleaner
local newClass = Objects.newClass
local ObjectBase = Objects.ObjectBase

-- STATE_ACTIVE flag
-- false when initializing, true when everything is loaded
-- so that changes in data don't fire AutoStore saving
-- will be true after main branch is initialized
--
local STATE_ACTIVE = false

-- need to pre-declare these so everything syncs

local addPixieDust
local AutoStore, autostore_singleton = nil
local TableProxy
local createTableProxy

--====================================================================--
--== Table Proxy Support Functions

-- mtIndexFunc
-- enhanced metatable lookup function
--
local function mtIndexFunc( t, k )
	--print( "mtIndexFunc: " .. tostring( t ) .. " " .. tostring( k ) )

	local val, mt

	-- for lookup, let's do Table Proxy, then the table

	-- check TableProxy Class
	val = TableProxy[ k ]

	if val == nil then
		-- nothing, so check the table
		mt = getmetatable( t )
		val = mt.__dmc.dt[ k ]

		-- we have a value, but if the value is of type "table"
		-- then we need to use its proxy
		if type( val ) == "table" then
			--print( "getting next table" )
			mt = getmetatable( val )
			val = mt.__dmc.prx
		end
	end

	return val
end

-- mtNewIndexFunc
-- enhanced metatable set function
--
local function mtNewIndexFunc( t, k, v )
	--print( "mtNewIndexFunc" )
	local mt = getmetatable( t )
	local dmc = mt ~= nil and mt.__dmc or nil

	assert( type(dmc)=='table', "AutoStore: eeks, deep dark error" )

	dmc.dt[ k ] = v
	if type( v ) == "table" then
		--print( "found table: " .. tostring( k ) .. " : " .. tostring( v ) )
		local p = addPixieDust( v, t )
	end

	if dmc ~= nil and STATE_ACTIVE == true then dmc.root:_markDirty() end

end

-- createTableProxy()
-- creates the "magic" handle for data retrieval
-- 'data_table' is actual Lua table in original data structure
--
createTableProxy = function( data_table )
	--print( "CreateTableProxy" )

	local magic = {} -- this is to be empty, always

	-- references to important data
	local refs = {
		dt = data_table,
		root = autostore_singleton,
	}

	-- our metable to store on data handle
	local mt = {
		__index = mtIndexFunc,
		__newindex = mtNewIndexFunc,
		__dmc = refs
	}
	setmetatable( magic, mt )

	return magic
end

-- addPixieDust()
-- wraps all data with Table Proxy
--
addPixieDust = function( data_table, parent )
	-- print( "adding pixie dust: " .. tostring( data_table ) )

	-- hiding our info on the metatable
	local proxy = createTableProxy( data_table )

	-- references to important data
	local refs = {
			prx = proxy
	}

	-- our metable to store on data table
	local mt = {
		__dmc = refs
	}
	setmetatable( data_table, mt )

	-- check children to make sure they all have magic pixie dust
	if type( data_table ) == "table" then
		for _, v in pairs( data_table ) do
			if type( v ) == "table" then
				--print( tostring( _ ) .. " >> " .. tostring( v ) )
				local p = addPixieDust( v, data_table )
			end
		end
	end

	return proxy
end

--====================================================================--
--== Table Proxy Class
--====================================================================--

--[[
This mixin-class allows us to add functionality
to a data table node when doing lookup.
This essentially adds additional 'API' to each node
--]]

TableProxy = {}
TableProxy.NAME = "Table Proxy"

--====================================================================--
--== Private Methods

-- __data()
-- gets the raw data from the proxy
-- used primarily when encoding JSON
--
function TableProxy:__data()
	--print( "TableProxy:__data" )
	local mt = getmetatable( self )
	return mt.__dmc.dt
end

--====================================================================--
--== Public Methods

--[[
The following are methods to interface with the Lua table library
since the table library doesn't "eat its own dogfood"
--]]

-- clone()
-- convert autostore data back into regular Lua table
-- this makes a deep copy
--
function TableProxy:clone()
	-- print( "TableProxy:clone" )
	local mt = getmetatable( self )
	local dt = mt.__dmc.dt

	local _extendTable -- forward declare, recursive

	_extendTable = function( fT, tT )

		for k,v in pairs( fT ) do
			if type( fT[ k ] ) == 'table' and
				type( tT[ k ] ) == 'table' then
				tT[ k ] = _extendTable( fT[ k ], tT[ k ] )

			elseif type( fT[ k ] ) == 'table' then
				tT[ k ] = _extendTable( fT[ k ], {} )

			else
				tT[ k ] = v

			end
		end

		return tT
	end

	return _extendTable( dt, {} )
end

-- len()
-- get the length of the table
-- replacement for table.len( tbl )
-- or #tbl
--
function TableProxy:len()
	--print( "TableProxy:len" )
	local mt = getmetatable( self )
	local dt = mt.__dmc.dt

	return #dt
end

-- ipairs()
-- use this in an array-type iteration
--
function TableProxy:ipairs()
	--print( "TableProxy:ipairs" )

	-- custom iterator
	-- @param tp ref: TableProxy (ie, self)
	-- @param i integer: index of item to get
	local f = function( tp, i )
		i = i+1
		local v = tp[i]
		if v ~= nil then
			return i,v
		else
			return nil
		end
	end

	return f, self, 0
end

-- pairs()
-- use this in an hash-type iteration
--
function TableProxy:pairs()
	--print( "TableProxy:pairs" )

	local mt = getmetatable( self )
	local dt = mt.__dmc.dt

	-- custom iterator
	-- @param tp ref: TableProxy (ie, self)
	-- @param key string: key of previous item
	local f = function( tp, k )
		local key,_ = next( dt, k )
		if key ~= nil then
			return key,tp[key]
		else
			return nil
		end
	end

	return f, self, nil
end

-- insert()
-- insert a value into the table
--
function TableProxy:insert( value, pos )
	--print( "TableProxy:insert" )
	local mt = getmetatable( self )

	local root = mt.__dmc.root
	local dt = mt.__dmc.dt

	if pos == nil then
		table.insert( dt, value )
	else
		table.insert( dt, pos, value )
	end

	if type( value ) == "table" then
		p = addPixieDust( value, dt )
	end

	if STATE_ACTIVE == true then root:_markDirty() end
end

-- remove()
-- remove a value from the table
--
function TableProxy:remove( pos )
	--print( "TableProxy:remove" )
	local mt = getmetatable( self )

	local root = mt.__dmc.root
	local dt = mt.__dmc.dt

	if STATE_ACTIVE == true then root:_markDirty() end

	if pos == nil then
		return table.remove( dt )
	else
		return table.remove( dt, pos )
	end

end

--====================================================================--
--== AutoStore Class
--====================================================================--

local AutoStore = newClass( ObjectBase, { name="AutoStore" } )

--== Class Constants ==--

AutoStore.CONFIG_FILE = 'dmc_autostore.cfg'

--== Event Constants ==--

AutoStore.EVENT = 'autostore_event'

AutoStore.START_MIN_TIMER = 'start_min_timer'
AutoStore.STOP_MIN_TIMER = 'stop_min_timer'
AutoStore.START_MAX_TIMER = 'start_max_timer'
AutoStore.STOP_MAX_TIMER = 'stop_max_timer'
AutoStore.DATA_SAVED = 'data_saved'

--======================================================--
-- Start: Setup DMC Objects

function AutoStore:__init__()
	-- print( "AutoStore:__init__" )

	--== Create Properties ==--

	self._data = nil
	self._is_new_file = false

	self.__debug_on = false

	-- timer references
	self._timer_min = nil
	self._timer_max = nil

	self._preSave_f = nil
	self._postRead_f = nil

end

function AutoStore:__initComplete__()
	-- print( "AutoStore:__initComplete__" )

	STATE_ACTIVE = false

	self:_checkTimerValues()
	self:_loadPlugins()

end

-- END: Setup DMC Objects
--======================================================--

--====================================================================--
--== Public Methods

function AutoStore.__getters:is_new_file()
	return self._is_new_file
end

function AutoStore.__getters:data()
	return self._data
end

function AutoStore.__setters:debug( value )
	self.__debug_on = value
end

--====================================================================--
--== Private Methods

-- _checkTimerValues()
-- make sure that the timer values work well
--
function AutoStore:_checkTimerValues()
	local dmc = dmc_autostore_data

	assert( type(dmc.timer_min)=='number', "AutoStore: TIMER MIN not a number" )
	assert( type(dmc.timer_max)=='number', "AutoStore: TIMER MAX not a number" )
	assert( dmc.timer_min >=0, "AutoStore: TIMER MIN not >= 0" )
	assert( dmc.timer_min < dmc.timer_max, "AutoStore: TIMER MIN > TIMER MAX" )
end

-- _getDataFilePath()
-- create full path name for file read/write
--
function AutoStore:_getDataFilePath()
	local file_name = dmc_autostore_data.data_filename .. '.json'
	local file_path = system.pathForFile( file_name, system.DocumentsDirectory )

	return file_path
end

-- _loadPlugins()
-- load and save contents of plugin file
--
function AutoStore:_loadPlugins()
	-- print( "AutoStore:_loadPlugins" )

	if not dmc_autostore_data.plugin_file then return end

	if self.__debug_on then
		print( "AutoStore: Loading plugin file", dmc_autostore_data.plugin_file )
	end

	local plugin = require( dmc_autostore_data.plugin_file )
	assert( type(plugin)=='table', "AutoStore: plugin file must return a table" )

	if plugin.preSaveFunction then self._preSave_f = plugin.preSaveFunction end
	if plugin.postReadFunction then self._postRead_f = plugin.postReadFunction end

end

-- _loadData()
-- loads data from JSON format
--
function AutoStore:_loadData()
	-- print( "AutoStore:_loadData" )

	local file_path = self:_getDataFilePath()
	local data

	try{
		function()
			data = Files.readFileContents( file_path )
			if self._postRead_f then data = self._postRead_f( data ) end
			data = json.decode( data )
			self._is_new_file = false
			self._data = addPixieDust( data )
		end,

		catch{
			function( err )
				self._is_new_file = true
				self._data = addPixieDust( {} )
			end
		}
	}

	STATE_ACTIVE = true

end

-- _saveData()
-- saves data into JSON format
--
function AutoStore:_saveData()
	-- print( "AutoStore:_saveData" )

	local file_path = self:_getDataFilePath()
	local data

	try{
		function()
			data = json.encode( self._data:__data() )
			if self._preSave_f then data = self._preSave_f( data ) end
			Files.saveFile( file_path, data )
			self._is_new_file = false
			self:dispatchEvent( self.DATA_SAVED )
		end,

		catch{
			function( err )
				print( "AutoStore: error saving file" )
				error( err )
			end
		}
	}

end

function AutoStore:_stopMinTimer()
	-- print( "AutoStore:_stopMinTimer" )

	if self._timer_min == nil then return end

	timer.cancel( self._timer_min )
	self:dispatchEvent( self.STOP_MIN_TIMER )
	self._timer_min = nil
end

function AutoStore:_startMinTimer( )
	-- print( "AutoStore:_startMinTimer" )

	self:_stopMinTimer()

	local f = function()
		self:_stopMinTimer()
		self:_stopMaxTimer()
		self:_saveData()
	end
	self._timer_min = timer.performWithDelay( dmc_autostore_data.timer_min, f )
	self:dispatchEvent( self.START_MIN_TIMER, { time=dmc_autostore_data.timer_min }, { merge=true } )

end

function AutoStore:_stopMaxTimer()
	-- print( "AutoStore:_stopMaxTimer" )

	if self._timer_max == nil then return end

	timer.cancel( self._timer_max )
	self:dispatchEvent( self.STOP_MAX_TIMER )
	self._timer_max = nil
end

function AutoStore:_startMaxTimer( )
	-- print( "AutoStore:_startMaxTimer" )

	self:_stopMaxTimer()

	local f = function()
		self:_stopMinTimer()
		self:_stopMaxTimer()
		self:_saveData()
	end
	self._timer_max = timer.performWithDelay( dmc_autostore_data.timer_max, f )
	self:dispatchEvent( self.START_MAX_TIMER, { time=dmc_autostore_data.timer_max }, { merge=true } )

end

-- _markDirty()
-- sets timers in motion to save data
--
function AutoStore:_markDirty()
	-- print( "AutoStore:_markDirty" )

	self:_startMinTimer()

	if self._timer_max == nil then
		self:_startMaxTimer()
	end

end

--===================================================================--
-- Singleton Setup
--===================================================================--

--== Create Singleton ==--

autostore_singleton = AutoStore:new()
autostore_singleton:_loadData()

return autostore_singleton


text:
<?xml version="1.0" encoding="UTF-8"?>
<Tokens version="1.0">
	<File path="Classes/MBCacheWriteOperation.html">

		<Token>
			<TokenIdentifier>//apple_ref/occ/cl/MBCacheWriteOperation</TokenIdentifier>
			<Abstract type="html">An NSOperation subclass used by MBFilesystemCaches to handle persistence
for cache objects.</Abstract>
			<DeclaredIn>MBCacheOperations.h</DeclaredIn>

			<NodeRef refid="5"/>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/clm/MBCacheWriteOperation/operationForWritingObject:toFile:forCache:</TokenIdentifier>
			<Abstract type="html">Creates a new MBCacheWriteOperation instance that can be used to write
a cache object to a file.</Abstract>
			<DeclaredIn>MBCacheOperations.h</DeclaredIn>

			<Declaration>+ (nonnull instancetype)operationForWritingObject:(nonnull id)obj toFile:(nonnull NSString *)path forCache:(nonnull MBFilesystemCache *)fc</Declaration>
			<Parameters>
				<Parameter>
					<Name>obj</Name>
					<Abstract type="html">The cache object to be written to a file.</Abstract>
				</Parameter><Parameter>
					<Name>path</Name>
					<Abstract type="html">The filesystem path of the file to be written by the returned
            operation.</Abstract>
				</Parameter><Parameter>
					<Name>fc</Name>
					<Abstract type="html">The MBFilesystemCache responsible for managing the cached
            object obj.</Abstract>
				</Parameter>
			</Parameters>
			<ReturnValue><Abstract type="html">The newly-created MBFileWriteOperation instance.</Abstract></ReturnValue>
			<Anchor>//api/name/operationForWritingObject:toFile:forCache:</Anchor>
            <NodeRef refid="5"/>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/instm/MBCacheWriteOperation/initWithObject:inCache:forFilePath:</TokenIdentifier>
			<Abstract type="html">Initializes the receiver so it can be used to write to the specified file.</Abstract>
			<DeclaredIn>MBCacheOperations.h</DeclaredIn>

			<Declaration>- (nonnull instancetype)initWithObject:(nonnull id)obj inCache:(nonnull MBFilesystemCache *)fc forFilePath:(nonnull NSString *)path</Declaration>
			<Parameters>
				<Parameter>
					<Name>obj</Name>
					<Abstract type="html">The cache object to be written to a file.</Abstract>
				</Parameter><Parameter>
					<Name>fc</Name>
					<Abstract type="html">The MBFilesystemCache responsible for managing the cached
            object obj.</Abstract>
				</Parameter><Parameter>
					<Name>path</Name>
					<Abstract type="html">The filesystem path of the file to be written by the returned
            operation.</Abstract>
				</Parameter>
			</Parameters>
			<ReturnValue><Abstract type="html">The receiver.</Abstract></ReturnValue>
			<Anchor>//api/name/initWithObject:inCache:forFilePath:</Anchor>
            <NodeRef refid="5"/>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/instm/MBCacheWriteOperation/setCacheObject:</TokenIdentifier>
			<Abstract type="html">Returns the cache object to be written to the filesystem by this
    operation. </Abstract>
			<DeclaredIn>MBCacheOperations.h</DeclaredIn>

			<Declaration>@property (nonnull, nonatomic, readonly) id cacheObject</Declaration>

			<Anchor>//api/name/cacheObject</Anchor>
            <NodeRef refid="5"/>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/instm/MBCacheWriteOperation/cacheObject</TokenIdentifier>
			<Abstract type="html">Returns the cache object to be written to the filesystem by this
    operation. </Abstract>
			<DeclaredIn>MBCacheOperations.h</DeclaredIn>

			<Declaration>@property (nonnull, nonatomic, readonly) id cacheObject</Declaration>

			<Anchor>//api/name/cacheObject</Anchor>
            <NodeRef refid="5"/>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/instp/MBCacheWriteOperation/cacheObject</TokenIdentifier>
			<Abstract type="html">Returns the cache object to be written to the filesystem by this
    operation. </Abstract>
			<DeclaredIn>MBCacheOperations.h</DeclaredIn>

			<Declaration>@property (nonnull, nonatomic, readonly) id cacheObject</Declaration>

			<Anchor>//api/name/cacheObject</Anchor>
            <NodeRef refid="5"/>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/instm/MBCacheWriteOperation/setCache:</TokenIdentifier>
			<Abstract type="html">Returns the MBFilesystemCache instance responsible for managing the
    cache object associated with this operation. </Abstract>
			<DeclaredIn>MBCacheOperations.h</DeclaredIn>

			<Declaration>@property (nonnull, nonatomic, readonly) MBFilesystemCache *cache</Declaration>

			<Anchor>//api/name/cache</Anchor>
            <NodeRef refid="5"/>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/instm/MBCacheWriteOperation/cache</TokenIdentifier>
			<Abstract type="html">Returns the MBFilesystemCache instance responsible for managing the
    cache object associated with this operation. </Abstract>
			<DeclaredIn>MBCacheOperations.h</DeclaredIn>

			<Declaration>@property (nonnull, nonatomic, readonly) MBFilesystemCache *cache</Declaration>

			<Anchor>//api/name/cache</Anchor>
            <NodeRef refid="5"/>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/instp/MBCacheWriteOperation/cache</TokenIdentifier>
			<Abstract type="html">Returns the MBFilesystemCache instance responsible for managing the
    cache object associated with this operation. </Abstract>
			<DeclaredIn>MBCacheOperations.h</DeclaredIn>

			<Declaration>@property (nonnull, nonatomic, readonly) MBFilesystemCache *cache</Declaration>

			<Anchor>//api/name/cache</Anchor>
            <NodeRef refid="5"/>
		</Token>

	</File>
</Tokens>


text:
<!doctype html>

  <title>Token Event Calculater</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
  <meta name="description" content="Calculate the loveca needed to be used in Event" />
  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/css/bootstrap-datetimepicker.min.css" integrity="sha256-xGyxPu25BXvN4fnXOkrmO/PnXXQQal4uXQ3bbEXLYeg=" crossorigin="anonymous" />

Token Event Calculater

  <form class="form-horizontal">

      Current Rank:

        <input type="number" pattern="\d*" class="form-control" id="current-rank">

      Current Exp:

        <input type="number" pattern="\d*" class="form-control" id="current-exp">

      Current Lp:

        <input type="number" pattern="\d*" class="form-control" id="current-lp">

      Normal Song Difficulty:

        <select class="form-control" id="normal-difficulty">
          <option value="0">Master</option>
          <option value="0" selected>Expert</option>
          <option value="1">Hard</option>
          <option value="2">Normal</option>
          <option value="3">Easy</option>
        </select>

      Normal Song Multiplier:

        <select class="form-control" id="normal-song-multiplier">
          <option value="0" selected>1</option>
          <option value="1">2</option>
          <option value="2">3</option>
          <option value="3">4</option>
        </select>

      Event Song Difficulty:

        <select class="form-control" id="event-difficulty">
          <option value="0" selected>Expert</option>
          <option value="1">Hard</option>
          <option value="2">Normal</option>
          <option value="3">Easy</option>
        </select>

      Event Song Multiplier:

        <select class="form-control" id="event-song-multiplier">
          <option value="0">1</option>
          <option value="1">2</option>
          <option value="2">3</option>
          <option value="3" selected>4</option>
        </select>

      Score:

        <select class="form-control" id="score">
          <option value="0" selected>S</option>
          <option value="1">A</option>
          <option value="2">B</option>
          <option value="3">C</option>
          <option value="4">None</option>
        </select>

      Combo:

        <select class="form-control" id="combo">
          <option value="0">S</option>
          <option value="1" selected>A</option>
          <option value="2">B</option>
          <option value="3">C</option>
          <option value="4">None</option>
        </select>

      Current Token:

        <input type="number" pattern="\d*" class="form-control" id="current-token">

      Current Pt:

        <input type="number" pattern="\d*" class="form-control" id="current-pt">

      Target Pt:

        <input type="number" pattern="\d*" class="form-control" id="target-pt">

      End Time:

          <input type="text" class="form-control" id="end-datetime">

        <button type="button" class="btn btn-default" id="sif-calculate">Calculate</button>

  </form>

    <link href="css/main.css" rel="stylesheet">


text: The repository for the leaveunnc.space


text:
<?xml version="1.0" encoding="UTF-8"?>
<!-- *
 * Copyright 2021 ThoughtWorks, Inc.
 *
 * 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.
 * -->

<testsuite time="0.207326" tests="7" errors="1" assertions="8" name="PostsControllerTest" failures="0">
  <testcase time="0.1755" assertions="2" name="test_should_create_post">
  </testcase>
  <testcase time="0.005411" assertions="2" name="test_should_destroy_post">
  </testcase>
  <testcase time="0.009792" assertions="1" name="test_should_get_edit">
  </testcase>
  <testcase time="0.001781" assertions="0" name="test_should_get_index">
    <error type="RuntimeError" message="there was some error">
there was some error (RuntimeError)
/tmp/foo/app/controllers/posts_controller.rb:5:in `index'
/var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:1331:in `send'
/var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:1331:in `perform_action_without_filters'
/var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:617:in `call_filters'
/var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
/var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
/var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/flash.rb:146:in `perform_action'
/var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:532:in `send'
/var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:532:in `process_without_filters'
/var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:606:in `process'
/var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/test_process.rb:567:in `process_with_test'
/var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/test_process.rb:447:in `process'
/var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/test_process.rb:398:in `get'
./test/functional/posts_controller_test.rb:5:in `test_should_get_index'
/var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/testing/setup_and_teardown.rb:62:in `__send__'
/var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/testing/setup_and_teardown.rb:62:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `run_suite'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:67:in `start_mediator'
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:41:in `start'
/usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:29:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'
/usr/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
/usr/lib/ruby/1.8/test/unit.rb:278
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5    </error>
  </testcase>
  <testcase time="0.005875" assertions="1" name="test_should_get_new">
  </testcase>
  <testcase time="0.004666" assertions="1" name="test_should_show_post">
  </testcase>
  <testcase time="0.00387" assertions="1" name="test_should_update_post">
  </testcase>
  <system-out>
    <![CDATA[]]>
  </system-out>
  <system-err>
    <![CDATA[]]>
  </system-err>
</testsuite>


text:
#ifndef __ENUM_H
#define __ENUM_H

#include "Serializable.h"
#include "Printable.h"

/**
 * \file Enum.h
 * \brief defines the Enum class for serialization and printing of enums
 */

/// this namespace contains the helper methods for printing, serializing, and deserializing references from enums.  (Not documented)
namespace EnumNS {

inline void printRef(std::ostream& out, const int8_t& val)      { out << val; }
inline void printRef(std::ostream& out, const int16_t& val)     { out << val; }
inline void printRef(std::ostream& out, const int32_t& val)     { out << val; }
inline void printRef(std::ostream& out, const int64_t& val)     { out << val; }
inline void printRef(std::ostream& out, const uint8_t& val)     { out << val; }
inline void printRef(std::ostream& out, const uint16_t& val)    { out << val; }
inline void printRef(std::ostream& out, const uint32_t& val)    { out << val; }
inline void printRef(std::ostream& out, const uint64_t& val)    { out << val; }
inline void serializeRef(std::string& str, const int8_t& val)   { mace::serialize(str, &val); }
inline void serializeRef(std::string& str, const int16_t& val)  { mace::serialize(str, &val); }
inline void serializeRef(std::string& str, const int32_t& val)  { mace::serialize(str, &val); }
inline void serializeRef(std::string& str, const int64_t& val)  { mace::serialize(str, &val); }
inline void serializeRef(std::string& str, const uint8_t& val)  { mace::serialize(str, &val); }
inline void serializeRef(std::string& str, const uint16_t& val) { mace::serialize(str, &val); }
inline void serializeRef(std::string& str, const uint32_t& val) { mace::serialize(str, &val); }
inline void serializeRef(std::string& str, const uint64_t& val) { mace::serialize(str, &val); }
inline void sqlizeRef(mace::LogNode* node, const int8_t& val)   { mace::sqlize(&val, node); }
inline void sqlizeRef(mace::LogNode* node, const int16_t& val)  { mace::sqlize(&val, node); }
inline void sqlizeRef(mace::LogNode* node, const int32_t& val)  { mace::sqlize(&val, node); }
inline void sqlizeRef(mace::LogNode* node, const int64_t& val)  { mace::sqlize(&val, node); }
inline void sqlizeRef(mace::LogNode* node, const uint8_t& val)  { mace::sqlize(&val, node); }
inline void sqlizeRef(mace::LogNode* node, const uint16_t& val) { mace::sqlize(&val, node); }
inline void sqlizeRef(mace::LogNode* node, const uint32_t& val) { mace::sqlize(&val, node); }
inline void sqlizeRef(mace::LogNode* node, const uint64_t& val) { mace::sqlize(&val, node); }
inline int  deserializeRef(std::istream& in, int8_t& val)       { return mace::deserialize(in, &val); }
inline int  deserializeRef(std::istream& in, int16_t& val)      { return mace::deserialize(in, &val); }
inline int  deserializeRef(std::istream& in, int32_t& val)      { return mace::deserialize(in, &val); }
inline int  deserializeRef(std::istream& in, int64_t& val)      { return mace::deserialize(in, &val); }
inline int  deserializeRef(std::istream& in, uint8_t& val)      { return mace::deserialize(in, &val); }
inline int  deserializeRef(std::istream& in, uint16_t& val)     { return mace::deserialize(in, &val); }
inline int  deserializeRef(std::istream& in, uint32_t& val)     { return mace::deserialize(in, &val); }
inline int  deserializeRef(std::istream& in, uint64_t& val)     { return mace::deserialize(in, &val); }

template<typename T> int deserializeRef(std::istream& in, const int8_t& val,   T& tval)  { int8_t v;   int rv = mace::deserialize(in, &v); tval = (T)v; return rv;}
template<typename T> int deserializeRef(std::istream& in, const int16_t& val,  T& tval)  { int16_t v;  int rv = mace::deserialize(in, &v); tval = (T)v; return rv;}
template<typename T> int deserializeRef(std::istream& in, const int32_t& val,  T& tval)  { int32_t v;  int rv = mace::deserialize(in, &v); tval = (T)v; return rv;}
template<typename T> int deserializeRef(std::istream& in, const int64_t& val,  T& tval)  { int64_t v;  int rv = mace::deserialize(in, &v); tval = (T)v; return rv;}
template<typename T> int deserializeRef(std::istream& in, const uint8_t& val,  T& tval)  { uint8_t v;  int rv = mace::deserialize(in, &v); tval = (T)v; return rv;}
template<typename T> int deserializeRef(std::istream& in, const uint16_t& val, T& tval)  { uint16_t v; int rv = mace::deserialize(in, &v); tval = (T)v; return rv;}
template<typename T> int deserializeRef(std::istream& in, const uint32_t& val, T& tval)  { uint32_t v; int rv = mace::deserialize(in, &v); tval = (T)v; return rv;}
template<typename T> int deserializeRef(std::istream& in, const uint64_t& val, T& tval)  { uint64_t v; int rv = mace::deserialize(in, &v); tval = (T)v; return rv;}

#ifdef __CYGWIN32__
inline void printRef(std::ostream& out, const int& val)     { out << val; }
inline void serializeRef(std::string& str, const int& val)  { mace::serialize(str, &val); }
inline int  deserializeRef(std::istream& in, int& val)      { return mace::deserialize(in, &val); }
template<typename T> int deserializeRef(std::istream& in, const int& val,  T& tval)  { int v;  int rv = mace::deserialize(in, &v); tval = (T)v; return rv;}

inline void printRef(std::ostream& out, const unsigned int& val)     { out << val; }
inline void serializeRef(std::string& str, const unsigned int& val)  { mace::serialize(str, &val); }
inline int  deserializeRef(std::istream& in, unsigned int& val)      { return mace::deserialize(in, &val); }
template<typename T> int deserializeRef(std::istream& in, const unsigned int& val,  T& tval)  { unsigned int v;  int rv = mace::deserialize(in, &v); tval = (T)v; return rv;}
#else
// inline void printRef(std::ostream& out, const long int& val)     { out << val; }
// inline void serializeRef(std::string& str, const long int& val)  { mace::serialize(str, &val); }
// inline int  deserializeRef(std::istream& in, long int& val)      { return mace::deserialize(in, &val); }
// template<typename T> int deserializeRef(std::istream& in, const long int& val,  T& tval)  { long int v;  int rv = mace::deserialize(in, &v); tval = (T)v; return rv;}

// inline void printRef(std::ostream& out, const unsigned long int& val)     { out << val; }
// inline void serializeRef(std::string& str, const unsigned long int& val)  { mace::serialize(str, &val); }
// inline int  deserializeRef(std::istream& in, unsigned long int& val)      { return mace::deserialize(in, &val); }
// template<typename T> int deserializeRef(std::istream& in, const unsigned long int& val,  T& tval)  { unsigned long int v;  int rv = mace::deserialize(in, &v); tval = (T)v; return rv;}
#endif

} //namespace EnumNS

/**
 * \brief A template class for enumerations which allows them to be printable and serializable.
 *
 * Should work transparently in place of an enum when templated on that enum
 * type.  It auto-casts to the enum type and can be compared or assigned based
 * on the enum type.
 *
 * Example:
 * \code
 * enum _state_type { init, joined, joining };
 * typedef Enum<_state_type> state_type;
 * state_type s = init;
 * maceout << "The state s is " << s << Log::endl;
 * \endcode
 */
template<class E> class Enum : public mace::PrintPrintable, public mace::Serializable {
private:
  E e; ///< internally stores an enum object.
public:
#ifndef __clang__
  operator E() { return e; } ///< auto-cast to the templated enumeration type
#endif //__clang__
  operator E() const { return e; } ///< const auto-cast to the templated enumeration type
#ifndef __clang__
#if (__GNUC__ * 100 + __GNUC_MINOR__) <= 404
  operator int64_t() const { return e; } // int overload up till gcc-4.4
#endif
#endif //__clang__
  Enum& operator=(const Enum& oe) { e = oe.e; return *this; } ///< assignment operator for another Enum object
  Enum& operator=(const E& oe) { e = oe; return *this; } ///< assignment operator that takes a templated enumeration type
  bool operator==(const E& oe) const { return e == oe; } ///< equality with another Enum object
  bool operator!=(const E& oe) const { return e != oe; } ///< inequality with another Enum object
  Enum() : e() {} ///< default constructor
  Enum(const E& oe) : e(oe) {} ///< constructor which takes a templated enumeration type object
  Enum(const Enum& oe) : e(oe.e) {} ///< copy-constructor
  void print(std::ostream& out) const {
    EnumNS::printRef(out, e);
  }

  int deserialize(std::istream& in) throw(mace::SerializationException) {
    return EnumNS::deserializeRef(in, e, e);
  }
  void serialize(std::string& str) const {
    EnumNS::serializeRef(str, e);
  }

  void sqlize(mace::LogNode* node) const {
    EnumNS::sqlizeRef(node, e);
  }

  int deserializeXML_RPC(std::istream& in) throw(mace::SerializationException) {
    return EnumNS::deserializeRef(in, e, e);
  }
  void serializeXML_RPC(std::string& str) const throw(mace::SerializationException) {
    EnumNS::serializeRef(str, e);
  }
};

#endif //__ENUM_H


text:
package com.hellonativeuicomponent;

import com.facebook.react.uimanager.SimpleViewManager;
import com.facebook.react.uimanager.ThemedReactContext;
import com.facebook.react.uimanager.annotations.ReactProp;

import javax.annotation.Nullable;

/**
 * Created by shailesh on 15/03/16.
 */
public class HelloViewManager extends SimpleViewManager<HelloView> {

    @Override
    public String getName() {
        return "HelloView";
    }

    @Override
    protected HelloView createViewInstance(ThemedReactContext reactContext) {
        return new HelloView(reactContext);
    }

    @ReactProp(name = "message")
    public void setMessage(HelloView helloView, @Nullable String message) {
        helloView.setMessage(message);
    }
}


text:
We really welcome contributions.

## A quick guide on how to contribute

1. Clone the repo:

        git clone git@github.com:gds-operations/vcloud-launcher.git

2. Run `bundle` to get the required dependecies

3. Run the tests. Pull requests that add features must include unit tests,
   so it is good to ensure you've got them passing to begin with.

        bundle exec rake

   If you have access to a live environment for testing, it would be great
   if you could run the integration tests too - for more details on the
   set-up for that, please see the [integration tests README]
   (https://github.com/gds-operations/vcloud-launcher/blob/master/spec/integration/README.md)

4. Add your functionality or bug fix and a test for your change. Only refactoring and
   documentation changes do not require tests. If the functionality is at all complicated
   then it is likely that more than one test will be required. If you would like help
   with writing tests please do ask us.

5. Make sure all the tests pass, including the integration tests if possible.

6. Update the [CHANGELOG](https://github.com/gds-operations/vcloud-launcher/blob/master/CHANGELOG.md)
   with a short description of what the change is. This may be a feature, a bugfix, or an
   API change. If your change is documenation or refactoring, you do not need to add a line
   to the CHANGELOG.

7. Fork the repo, push to your fork, and submit a pull request.

## How soon will we respond?

We will comment on your pull request within two working days. However, we might not be able to review it immediately.

We may come back to you with comments and suggestions, and if we would like you to make changes, we will close the pull request as well as adding details of the changes we'd like you to make.

If you feel your pull request has been outstanding too long, please feel free to bump it by making a comment on it.

## Guidelines for making a pull request

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
    "SHOULD NOT", "RECOMMENDED",  "MAY", and "OPTIONAL" in this document are to be
    interpreted as described in RFC 2119.

## In order for a pull request to be accepted, it MUST

- Include at least one test (unless it is documentation or refactoring). If you have any questions about how to write tests, please ask us, we will be happy to help
- Follow our [Git style guide](https://github.com/alphagov/styleguides/blob/master/git.md)
- Include a clear summary in the pull request comments as to what the change is and why
  you are making it
- Be readable - we might ask you to change unclear variable names or obscure syntactic sugar
- Have [good commit messages](http://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message)
  that explain the change being made in that commit. Don't be afraid to write a lot in the
  detail.

## In order for a pull request to be accepted, it SHOULD

- Include a line in the CHANGELOG unless it is a refactoring or documentation change
- If it is code, follow our [Ruby style guide](https://github.com/alphagov/styleguides/blob/master/ruby.md)
- If it is documentation, follow the [GDS content style guide](https://www.gov.uk/design-principles/style-guide/style-points)


text:
package de.maxikg.osuapi.model;

import com.google.common.collect.Lists;
import org.junit.Test;

import java.util.Set;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;

/**
 * @author maxikg
 */
public class ModTest {

    @Test
    public void testCreateSum() {
        int tmp = 0;
        for (Mod mod : Mod.values())
            tmp |= mod.getFlag();

        assertThat(Mod.createSum(Lists.newArrayList(Mod.values())), equalTo(tmp));
    }

    @Test
    public void testIsEnabled() {
        int allModsSum = Mod.createSum(Lists.newArrayList(Mod.values()));

        for (Mod mod : Mod.values())
            assertThat(mod.isEnabled(allModsSum), equalTo(true));
    }

    @Test
    public void testParseFlagSum() {
        Set<Mod> enabledMods = Mod.parseFlagSum(Mod.createSum(Lists.newArrayList(Mod.values())));
        for (Mod mod : Mod.values())
            assertThat(enabledMods.contains(mod), equalTo(true));
    }
}


text:
package com.battlelancer.seriesguide.ui;

import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.database.Cursor;
import android.graphics.drawable.GradientDrawable;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.support.v7.app.ActionBar;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.battlelancer.seriesguide.Constants;
import com.battlelancer.seriesguide.R;
import com.battlelancer.seriesguide.dataliberation.model.Show;
import com.battlelancer.seriesguide.items.Episode;
import com.battlelancer.seriesguide.provider.SeriesGuideContract.Episodes;
import com.battlelancer.seriesguide.provider.SeriesGuideContract.Seasons;
import com.battlelancer.seriesguide.provider.SeriesGuideContract.Shows;
import com.battlelancer.seriesguide.service.NotificationService;
import com.battlelancer.seriesguide.settings.DisplaySettings;
import com.battlelancer.seriesguide.ui.EpisodeDetailsActivity.EpisodePagerAdapter;
import com.battlelancer.seriesguide.util.DBUtils;
import com.battlelancer.seriesguide.util.SeasonTools;
import com.battlelancer.seriesguide.util.Shadows;
import com.battlelancer.seriesguide.util.Utils;
import com.battlelancer.seriesguide.widgets.SlidingTabLayout;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
import timber.log.Timber;

/**
 * Hosts a fragment which displays episodes of a season. On larger screen hosts a {@link ViewPager}
 * displaying the episodes.
 */
public class EpisodesActivity extends BaseNavDrawerActivity {

    public static final int EPISODES_LOADER_ID = 100;
    public static final int EPISODE_LOADER_ID = 101;
    public static final int ACTIONS_LOADER_ID = 102;

    @Nullable @BindView(R.id.pagerEpisodes) ViewPager episodeDetailsPager;
    @Nullable @BindView(R.id.tabsEpisodes) SlidingTabLayout episodeDetailsTabs;
    @Nullable @BindView(R.id.imageViewEpisodesBackground) ImageView backgroundImageView;
    @Nullable @BindView(R.id.viewEpisodesShadowStart) View shadowStart;
    @Nullable @BindView(R.id.viewEpisodesShadowEnd) View shadowEnd;

    private EpisodesFragment episodesListFragment;
    private EpisodePagerAdapter episodeDetailsAdapter;
    private ArrayList<Episode> episodes;

    private int showTvdbId;
    private int seasonTvdbId;
    private int seasonNumber;

    private boolean isDualPane;

    /**
     * All values have to be integer. Only one is required.
     */
    public interface InitBundle {

        String SEASON_TVDBID = "season_tvdbid";

        String EPISODE_TVDBID = "episode_tvdbid";
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_episodes);
        setupNavDrawer();

        // if coming from a notification, set last cleared time
        NotificationService.handleDeleteIntent(this, getIntent());

        // check for dual pane layout
        ButterKnife.bind(this);
        isDualPane = episodeDetailsPager != null;

        boolean isFinishing = false;

        // check if we have a certain episode to display
        final int episodeId = getIntent().getIntExtra(InitBundle.EPISODE_TVDBID, 0);
        if (episodeId != 0) {
            if (!isDualPane) {
                // display just the episode pager in its own activity
                Intent intent = new Intent(this, EpisodeDetailsActivity.class);
                intent.putExtra(EpisodeDetailsActivity.InitBundle.EPISODE_TVDBID, episodeId);
                startActivity(intent);
                isFinishing = true;
            } else {
                // get season id
                final Cursor episode = getContentResolver().query(
                        Episodes.buildEpisodeUri(String.valueOf(episodeId)), new String[] {
                                Episodes._ID, Seasons.REF_SEASON_ID
                        }, null, null, null
                );
                if (episode != null && episode.moveToFirst()) {
                    seasonTvdbId = episode.getInt(1);
                } else {
                    // could not get season id
                    isFinishing = true;
                }
                if (episode != null) {
                    episode.close();
                }
            }
        }

        if (isFinishing) {
            finish();
            return;
        }

        if (seasonTvdbId == 0) {
            seasonTvdbId = getIntent().getIntExtra(InitBundle.SEASON_TVDBID, 0);
        }

        // get show id and season number
        final Cursor season = getContentResolver().query(
                Seasons.buildSeasonUri(String.valueOf(seasonTvdbId)), new String[] {
                        Seasons._ID, Seasons.COMBINED, Shows.REF_SHOW_ID
                }, null, null, null
        );
        if (season != null && season.moveToFirst()) {
            seasonNumber = season.getInt(1);
            showTvdbId = season.getInt(2);
        } else {
            isFinishing = true;
        }
        if (season != null) {
            season.close();
        }

        if (isFinishing) {
            finish();
            return;
        }

        final Show show = DBUtils.getShow(this, showTvdbId);
        if (show == null) {
            finish();
            return;
        }

        setupActionBar(show);
        setupViews(savedInstanceState, show, episodeId);

        updateShowDelayed(showTvdbId);
    }

    private void setupActionBar(Show show) {
        setupActionBar();
        // setup ActionBar
        String showTitle = show.title;
        String seasonString = SeasonTools.getSeasonString(this, seasonNumber);
        setTitle(showTitle + " " + seasonString);
        ActionBar actionBar = getSupportActionBar();
        if (actionBar != null) {
            actionBar.setDisplayShowTitleEnabled(true);
            actionBar.setDisplayHomeAsUpEnabled(true);

            actionBar.setTitle(showTitle);
            actionBar.setSubtitle(seasonString);
        }
    }

    private void setupViews(Bundle savedInstanceState, Show show, int episodeId) {
        // check if we should start with a specific episode
        int startPosition = 0;
        if (isDualPane) {
            // also builds episode list for view pager
            startPosition = updateEpisodeList(episodeId);
        }

        // set up the episode list fragment
        if (savedInstanceState == null) {
            episodesListFragment = EpisodesFragment.newInstance(showTvdbId, seasonTvdbId,
                    seasonNumber, startPosition);
            FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
            ft.add(R.id.fragment_episodes, episodesListFragment, "episodes").commit();
        } else {
            episodesListFragment = (EpisodesFragment) getSupportFragmentManager().findFragmentByTag(
                    "episodes");
        }

        // if displaying details pane, set up the episode details pager
        if (isDualPane) {
            // set the pager background
            //noinspection ConstantConditions
            Utils.loadPosterBackground(this, backgroundImageView, show.poster);

            // pager setup
            episodeDetailsAdapter = new EpisodePagerAdapter(this, getSupportFragmentManager(),
                    episodes, true);
            //noinspection ConstantConditions
            episodeDetailsPager.setAdapter(episodeDetailsAdapter);

            // tabs setup
            //noinspection ConstantConditions
            episodeDetailsTabs.setCustomTabView(R.layout.tabstrip_item_transparent,
                    R.id.textViewTabStripItem);
            episodeDetailsTabs.setSelectedIndicatorColors(ContextCompat.getColor(this,
                    SeriesGuidePreferences.THEME == R.style.Theme_SeriesGuide_DarkBlue
                            ? R.color.white
                            : Utils.resolveAttributeToResourceId(getTheme(), R.attr.colorPrimary)));
            episodeDetailsTabs.setViewPager(episodeDetailsPager);

            // set page listener afterwards to avoid null pointer for non-existing content view
            episodeDetailsPager.setCurrentItem(startPosition, false);
            episodeDetailsTabs.setOnPageChangeListener(mOnPageChangeListener);

            if (shadowStart != null) {
                Shadows.getInstance().setShadowDrawable(this, shadowStart,
                        GradientDrawable.Orientation.RIGHT_LEFT);
            }
            if (shadowEnd != null) {
                Shadows.getInstance().setShadowDrawable(this, shadowEnd,
                        GradientDrawable.Orientation.LEFT_RIGHT);
            }
        } else {
            // Make sure no fragments are left over from a config change
            for (Fragment fragment : getActiveFragments()) {
                if (fragment.getTag() == null) {
                    Timber.d("Removing a leftover fragment");
                    getSupportFragmentManager().beginTransaction().remove(fragment).commit();
                }
            }
        }
    }

    @Override
    protected void onStart() {
        super.onStart();

        if (isDualPane) {
            PreferenceManager.getDefaultSharedPreferences(this)
                    .registerOnSharedPreferenceChangeListener(mSortOrderChangeListener);
        }
    }

    @Override
    protected void onStop() {
        super.onStop();

        if (isDualPane) {
            PreferenceManager.getDefaultSharedPreferences(this)
                    .unregisterOnSharedPreferenceChangeListener(mSortOrderChangeListener);
        }
    }

    List<WeakReference<Fragment>> mFragments = new ArrayList<>();

    @Override
    public void onAttachFragment(Fragment fragment) {
        mFragments.add(new WeakReference<>(fragment));
    }

    public ArrayList<Fragment> getActiveFragments() {
        ArrayList<Fragment> ret = new ArrayList<>();
        for (WeakReference<Fragment> ref : mFragments) {
            Fragment f = ref.get();
            if (f != null) {
                if (f.isAdded()) {
                    ret.add(f);
                }
            }
        }
        return ret;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        int itemId = item.getItemId();
        if (itemId == android.R.id.home) {
            Intent upIntent;
            upIntent = new Intent(this, OverviewActivity.class);
            upIntent.putExtra(OverviewFragment.InitBundle.SHOW_TVDBID, showTvdbId);
            upIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(upIntent);
            return true;
        }
        return super.onOptionsItemSelected(item);
    }

    /**
     * Switch to the given page, update the highlighted episode.
     *
     * <p> Only call this if the episode list and episode view pager are available.
     */
    public void setCurrentPage(int position) {
        if (episodeDetailsPager != null) {
            episodeDetailsPager.setCurrentItem(position, true);
        }
    }

    /**
     * Updates the episode list, using the current sort order.
     */
    private void updateEpisodeList() {
        updateEpisodeList(0);
    }

    /**
     * Updates the episode list, using the current sorting. If a valid initial episode id is given
     * it will return its position in the created list.
     */
    private int updateEpisodeList(int initialEpisodeId) {
        Constants.EpisodeSorting sortOrder = DisplaySettings.getEpisodeSortOrder(this);

        Cursor episodeCursor = getContentResolver().query(
                Episodes.buildEpisodesOfSeasonWithShowUri(String.valueOf(seasonTvdbId)),
                new String[] {
                        Episodes._ID, Episodes.NUMBER
                }, null, null, sortOrder.query()
        );

        ArrayList<Episode> episodeList = new ArrayList<>();
        int startPosition = 0;
        if (episodeCursor != null) {
            while (episodeCursor.moveToNext()) {
                Episode ep = new Episode();
                ep.episodeId = episodeCursor.getInt(0);
                if (ep.episodeId == initialEpisodeId) {
                    startPosition = episodeCursor.getPosition();
                }
                ep.episodeNumber = episodeCursor.getInt(1);
                ep.seasonNumber = seasonNumber;
                episodeList.add(ep);
            }

            episodeCursor.close();
        }

        episodes = episodeList;

        return startPosition;
    }

    private OnPageChangeListener mOnPageChangeListener = new OnPageChangeListener() {
        @Override
        public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
            // do nothing
        }

        @Override
        public void onPageSelected(int position) {
            // update currently checked episode
            episodesListFragment.setItemChecked(position);
        }

        @Override
        public void onPageScrollStateChanged(int state) {
            // do nothing
        }
    };

    private OnSharedPreferenceChangeListener mSortOrderChangeListener
            = new OnSharedPreferenceChangeListener() {
        @Override
        public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
            if (DisplaySettings.KEY_EPISODE_SORT_ORDER.equals(key)
                    && episodeDetailsPager != null && episodeDetailsTabs != null) {
                // save currently selected episode
                int oldPosition = episodeDetailsPager.getCurrentItem();
                int episodeId = episodes.get(oldPosition).episodeId;

                // reorder and update tabs
                updateEpisodeList();
                episodeDetailsAdapter.updateEpisodeList(episodes);
                episodeDetailsTabs.setViewPager(episodeDetailsPager);

                // scroll to previously selected episode
                setCurrentPage(getPositionForEpisode(episodeId));
            }
        }
    };

    private int getPositionForEpisode(int episodeTvdbId) {
        // find page index for this episode
        for (int position = 0; position < episodes.size(); position++) {
            if (episodes.get(position).episodeId == episodeTvdbId) {
                return position;
            }
        }

        return 0;
    }
}


text:
import React from 'react';
import Helmet from 'react-helmet';
import { FormattedMessage } from 'react-intl';
import Section1 from 'components/Section1';
import Container from 'components/Container';
import H2 from 'components/H2';
import H1 from 'components/H1';
import TextBox from 'components/TextBox';
import Article from 'components/Article';
import FlexContainer from 'components/FlexContainer';
import TextBoxMargin from './TextBoxMargin';
import ImgTW from './ImgTW';
import ImgC1 from './ImgC1';
import ImgC2 from './ImgC2';
import ImgFamily from './ImgFamily';
import WrapImgFamily from './WrapImgFamily';
import TextFamily from './TextFamily';
import WrapImgTW from './WrapImgTW';
import messages from './messages';
import Video from './Video';
import Video2 from './Video2';
import Table from './Table';
import Td from './Td';
import TdHead from './TdHead';
import HighLightText from './HighLightText';
import twad1 from './tw-ad1.png';
import twad2 from './tw-ad2.png';
import compare1 from './compare1.png';
import compare2 from './compare2.png';
import familycase from './familycase.png';
import FlexContainerR from './FlexContainerR';
import Rectangle from './Rectangle';
import Triangle from './Triangle';
import CompareSection from './CompareSection';
import CompareContent from './CompareContent';
import FlexLeft from './FlexLeft';
import FlexRight from './FlexRight';

export default class FeaturePage extends React.Component { // eslint-disable-line react/prefer-stateless-function

  // Since state and props are static,
  // there's no need to re-render this component
  shouldComponentUpdate() {
    return false;
  }

  render() {
    return (

        <Helmet
          title="Product Introduction"
          meta={[
            { name: 'description', content: 'Product Introduction' },
          ]}
        />
        <Section1>
          <Container>

                  <FormattedMessage {...messages.header} />

                <FormattedMessage {...messages.video1Header} />

              <Video />

                <FormattedMessage {...messages.compareHeader} />

              <CompareSection>
                <ImgC1 src={compare1} alt="" />
                <CompareContent>
                  <FlexContainer justify="space-between">
                    <TextBox width="35%" background="#444444"><FormattedMessage {...messages.tradWindFram} /></TextBox>
                    <TextBox width="35%" background="#444444"><FormattedMessage {...messages.newWindFarm} /></TextBox>
                  </FlexContainer>
                  <FlexContainerR wrap="wrap">
                    <FlexLeft>
                      <TextBoxMargin width="66%" background="#FFAA33"><FormattedMessage {...messages.lowCost} /></TextBoxMargin>
                    </FlexLeft>
                    <FlexRight>
                      <TextBoxMargin width="66%" background="#886600"><FormattedMessage {...messages.noNoice} /></TextBoxMargin>
                      <TextBoxMargin width="66%" background="#888800"><FormattedMessage {...messages.lowLoss} /></TextBoxMargin>
                      <TextBoxMargin width="66%" background="#EE7700"><FormattedMessage {...messages.highEff} /></TextBoxMargin>
                      <TextBoxMargin width="66%" background="#666666"><FormattedMessage {...messages.modular} /></TextBoxMargin>
                    </FlexRight>
                    <Rectangle width="100%" height="10px" />
                  </FlexContainerR>
                  <Triangle />
                </CompareContent>
                <ImgC2 src={compare2} alt="" />
              </CompareSection>

                    <FormattedMessage {...messages.t1r1c1} />
                    <FormattedMessage {...messages.t1r1c2} />

                    <FormattedMessage {...messages.t1r2c1} />
                    <FormattedMessage {...messages.t1r2c2} />

                    <FormattedMessage {...messages.t1r3c1} />
                    <FormattedMessage {...messages.t1r3c2} />

                    <FormattedMessage {...messages.t1r4c1} />
                    <FormattedMessage {...messages.t1r4c2} />

                    <FormattedMessage {...messages.t1r5c1} />
                    <FormattedMessage {...messages.t1r5c2} />

                    <FormattedMessage {...messages.t1r6c1} />
                    <FormattedMessage {...messages.t1r6c2} />

                    <FormattedMessage {...messages.t1r7c1} />
                    <FormattedMessage {...messages.t1r7c2} />

                    <FormattedMessage {...messages.t1r8c1} />
                    <FormattedMessage {...messages.t1r8c2} />

                    <FormattedMessage {...messages.t1r9c1} />
                    <FormattedMessage {...messages.t1r9c2} />

                    <FormattedMessage {...messages.t1r10c1} />
                    <FormattedMessage {...messages.t1r10c2} />

                    <FormattedMessage {...messages.t1r11c1} />
                    <FormattedMessage {...messages.t1r11c2} />

                  <FormattedMessage {...messages.searchHeader} />

              <Video2 />

                  <FormattedMessage {...messages.taiwanAdvantage} />

              <FlexContainer justify="space-evenly" wrap="wrap">
                <WrapImgTW>
                  <ImgTW src={twad1} alt="台灣平均風速" />
                </WrapImgTW>
                <WrapImgTW>
                  <ImgTW src={twad2} alt="台灣平均風速" />
                </WrapImgTW>
              </FlexContainer>

                  <FormattedMessage {...messages.familyCaseHeader} />

              <FlexContainer wrap="wrap" justify="center">
                <WrapImgFamily>
                  <ImgFamily src={familycase} alt="台灣平均風速" />
                </WrapImgFamily>
                <TextFamily> <FormattedMessage {...messages.familyCaset1} /></TextFamily>
                <TextFamily> <FormattedMessage {...messages.familyCaset2} /></TextFamily>
              </FlexContainer>

                  <FormattedMessage {...messages.baseUsageHeader} />

                    <TdHead ><FormattedMessage {...messages.t2r1c1} /></TdHead>
                    <TdHead ><FormattedMessage {...messages.t2r1c2} /></TdHead>
                    <TdHead ><FormattedMessage {...messages.t2r1c3} /></TdHead>
                    <TdHead ><FormattedMessage {...messages.t2r1c4} /></TdHead>

                    <TdHead odd><FormattedMessage {...messages.t2r2c1} /></TdHead>
                    900
                    8<FormattedMessage {...messages.hour} />*30<FormattedMessage {...messages.day} />=240
                    216

                    <TdHead><FormattedMessage {...messages.t2r3c1} /></TdHead>
                    130
                    24<FormattedMessage {...messages.hour} />*30<FormattedMessage {...messages.day} />=720
                    93.6

                    <TdHead odd><FormattedMessage {...messages.t2r4c1} /></TdHead>
                    140
                    2<FormattedMessage {...messages.hour} />*30<FormattedMessage {...messages.day} />=120
                    8.4

                    <TdHead><FormattedMessage {...messages.t2r5c1} /></TdHead>
                    420
                    1<FormattedMessage {...messages.hour} />*30<FormattedMessage {...messages.day} />=30
                    12.6

                    <TdHead odd><FormattedMessage {...messages.t2r6c1} /></TdHead>
                    370
                    2<FormattedMessage {...messages.hour} />*30<FormattedMessage {...messages.day} />=120
                    22.2

                    <TdHead><FormattedMessage {...messages.t2r7c1} /></TdHead>
                    15
                    1<FormattedMessage {...messages.hour} />*30<FormattedMessage {...messages.day} />=30
                    0.45

                    <TdHead odd><FormattedMessage {...messages.t2r8c1} /></TdHead>
                    25*6=150
                    5<FormattedMessage {...messages.hour} />*30<FormattedMessage {...messages.day} />=150
                    22.5

                    <TdHead><FormattedMessage {...messages.t2r9c1} /></TdHead>
                    17*6=102
                    5<FormattedMessage {...messages.hour} />*30<FormattedMessage {...messages.day} />=150
                    15.3

                    <TdHead odd></TdHead>

                    <FormattedMessage {...messages.total} /><HighLightText> 391 </HighLightText><FormattedMessage {...messages.premoth} />

          </Container>
        </Section1 >

    );
  }
}


text:
package mysqlctl

import (
	"context"
	"flag"

	"vitess.io/vitess/go/mysql"
	"vitess.io/vitess/go/vt/logutil"
	"vitess.io/vitess/go/vt/mysqlctl/backupstorage"
	"vitess.io/vitess/go/vt/proto/vtrpc"
	"vitess.io/vitess/go/vt/vterrors"
)

var (
	// BackupEngineImplementation is the implementation to use for BackupEngine
	backupEngineImplementation = flag.String("backup_engine_implementation", builtin, "which implementation to use for the backup method, builtin or xtrabackup")
)

// BackupEngine is the interface to the backup engine
type BackupEngine interface {
	ExecuteBackup(ctx context.Context, cnf *Mycnf, mysqld MysqlDaemon, logger logutil.Logger, bh backupstorage.BackupHandle, backupConcurrency int, hookExtraEnv map[string]string) (bool, error)
	ExecuteRestore(ctx context.Context, cnf *Mycnf, mysqld MysqlDaemon, logger logutil.Logger, dir string, bhs []backupstorage.BackupHandle, restoreConcurrency int, hookExtraEnv map[string]string) (mysql.Position, error)
}

// BackupEngineMap contains the registered implementations for BackupEngine
var BackupEngineMap = make(map[string]BackupEngine)

// GetBackupEngine returns the current BackupEngine implementation.
// Should be called after flags have been initialized.
func GetBackupEngine() (BackupEngine, error) {
	be, ok := BackupEngineMap[*backupEngineImplementation]
	if !ok {
		return nil, vterrors.New(vtrpc.Code_NOT_FOUND, "no registered implementation of BackupEngine")
	}
	return be, nil
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Sing Your Creativity">
    <meta name="keywords" content="sing your creativity,eva klirowska,chant thérapeutique,ateliers,concerts">
    <meta name="author" content="Sylvester Klirowski">

    <title>Sing Your Creativity</title>

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

    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Merriweather:400,300,300italic,400italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="../font-awesome/css/font-awesome.min.css" type="text/css">

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

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

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

    <link rel="icon" type="image/png" href="../img/logos/SYC-logo.png"/>

                <button type="button" class="navbar-toggle collapsed alternate" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    Toggle navigation

                </button>
                 Sing Your Creativity

                        Services

Teambuilding

Cours individuels / Chant thérapeutique

Atelier / Chanter ensemble

Direction Chorale

Échantillons de musique

Événements

                        À propos de nous

Notre mission

Notre équipe

Media

Contact

                        Inscription

            x

                        "Quelle est la conclusion la plus importante que j'ai tiré de mes 23 ans d'expérience dans l'enseignement ? La musique – et surtout le chant, puisque l'instrument utilisé est notre propre corps – est la méthode la plus amusante, saine et efficace de diminuer le stress tout en stimulant notre créativité naturelle. Ma mission est de partager ma passion et mon expérience avec les participants des ateliers SYC!" ~ Eva Klirowska

Eva est une chanteuse professionnelle, chef de chœurs et professeur. Elle a 23 ans d'expérience dans l'enseignement de la musique aux adultes et aux adolescents. Au cours de sa carrière, elle a donnée des concerts aux Etats-Unis,
                        en Suisse et en Pologne. Elle pratique le chant avec passion et l'utilise comme thérapie.

Animatrice des ateliers de chant thérapeutique

Chanter ensemble pour son bien-être

Quartier culturel de l'hôpital psychiatrique Malevoz à Monthey (depuis mars 2017)

Haute Ecole Pédagogique à St-Maurice, formation continue, (depuis septembre 2017)

Conscience corporelle par le chant

Quartier culturel de l'hôpital psychiatrique Malevoz à Monthey, (depuis octobre 2017)

Professeur de chant / chant therapeutique

"Sing Your Creativity" à Monthey (depuis 2010)

"La Source" à Renens, VD  (1998-2003)

"EJMA Valais" à Martigny, VS (2003-2005)

"Alfa" à Sion, VS (2005-2010)

Leçons de la technique vocale et d'interprétation du répertoire

Directrice chorale

"Chœur Mixte de Morgins" à Morgins, VS (depuis 2010)

"Esperance" à Troistorrents, VS (depuis 2008)

"Choeur d'Hommes" à Val d'Illiez, VS (depuis 2014)

"Savièse Chante" à Savièse, VS (2000-2007)

"Polyphonia" à Vernayaz, VS (2000-2002)

Répétitions régulières et nombreux concerts

Les Divadevas

Fondateur du groupe vocal "Les Divadevas" (2003 - 2020)

Formation musicale

Formation vocale et des études de musique classique au Conservatoire de musique de Nowowiejski à Szczecin, Pologne (1984-1989)

Études de jazz au Berklee College of Music à Boston, États-Unis (1993-1997)

Expérience en danse

Danseuse dans un groupe de danse classique et contemporain "Rytm" en Pologne (1975-1986)

(Les gagnants consécutifs dans les compétitions nationales annuelles)

                        "A chaque fois que je revois les vidéos réalisées pour Sing Your Creativity, je suis impressionné de constater à quel point les participants s'impliquent pour travailler ensemble de manière positive, alors que bien souvent ils se connaissent à peine! Cet atelier a vraiment un effet puissant sur les équipes." ~ Olivier Gallen

Après avoir géré des projets d'achats informatiques pour de grandes entreprises pendant plus de 10 ans, Olivier a décidé de suivre sa passion pour la photographie, les médias et la randonnée. Il s'intéresse particulièrement à
                        ce qui permet aux gens de trouver leur passion intérieure et de la mettre au service de leur vie personnelle et professionnelle.

Profil d'Olivier

Galerie d'Olivier

                        "Après avoir passé suffisamment de temps dans de nombreux groupes et paramètres de l'entreprise, je suis venu à comprendre l'importance des séminaires de renforcement de l'équipe. SYC offre une expérience tout à fait unique en ce qu'elle met de la musique dans le mélange." ~ Sylvester Klirowski

Avec une formation en informatique, au cours de la dernière décennie Sylvester a été impliqué dans de nombreux domaines de l'industrie du logiciel, à partir d'analyste au conseil aux ventes. Plus récemment, il a fait la
                        transition vers le Web et le développement d'applications, qu'il trouve fascinant et passionnant.

Le site de Sylvester

Profil de Sylvester

                        "Avocate de jour et danseuse de nuit, j'échange mes habits de travail pour ceux de danse tous les jours. Je crois fortement que l'art et la musique nous permettent de rester équilibrés, et font ressortir le meilleur de nous. C'est ce que SYC fait si bien - le programme réveille l'Artiste qui sommeille en nous, et est parfaitement adapté à notre environnement de travail." ~ Marlena Wisniak

Avec une formation en droit et relations internationales, Marlena a pratiqué le droit dans une Etude d'avocats basée à Genève, au sein de laquelle elle conseillait des clients du secteur privé et des associations à but non-lucratif. Travaillant actuellement dans le domaine des droits de l'homme et du développement international, elle est aussi danseuse professionnelle avec 10 ans d'expérience dans l'enseignement. Elle conçoit SYC comme une belle opportunité pour combiner le travail et le plaisir de sorte à s'épanouir, et supporte grandement sa mission.

Profil de Marlena

Notre mission

À SYC, nous croyons fortement que le succès ne se mesure pas par performance individuelle, mais par la façon dont nous travaillons en équipe. Notre mission est d'apporter la musique dans le processus d'interaction, car elle
                        est l'une des meilleures plates-formes pour la connectivité humaine.

Rencontrez notre équipe

                                Eva Klirowska

                                Animatrice de l'atelier

                                Olivier Gallen

                                Producteur Multimédia

                                Sylvester Klirowski

                                Web Designer

                                Marlena Wisniak

                                Conseillère Juridique


text:
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base:%%KOLLA_TAG%%
MAINTAINER Kolla Project (https://launchpad.net/kolla)

RUN yum -y install libvirt-daemon \
        libguestfs \
        qemu-system-x86 \
        libvirt-daemon-driver-nwfilter \
        libvirt-daemon-config-nwfilter \
        libvirt-daemon-driver-lxc \
        && yum clean all

VOLUME [ "/sys/fs/cgroup" ]

COPY start.sh /

COPY config-external.sh /opt/kolla/

CMD ["/start.sh"]