text:
;(function($) {

	$.slidebars = function(options) {

		// ----------------------
		// 001 - Default Settings

		var settings = $.extend({
			siteClose: true, // true or false - Enable closing of Slidebars by clicking on #sb-site.
			disableOver: false, // integer or false - Hide Slidebars over a specific width.
			hideControlClasses: false // true or false - Hide controls at same width as disableOver.
		}, options);

		// -----------------------
		// 002 - Feature Detection

		var test = document.createElement('div').style, // Create element to test on.
		supportTransition = false, // Variable for testing transitions.
		supportTransform = false; // variable for testing transforms.

		// Test for CSS Transitions
		if (test.MozTransition === '' || test.WebkitTransition === '' || test.OTransition === '' || test.transition === '') supportTransition = true;

		// Test for CSS Transforms
		if (test.MozTransform === '' || test.WebkitTransform === '' || test.OTransform === '' || test.transform === '') supportTransform = true;

		// -----------------
		// 003 - User Agents

		var ua = navigator.userAgent, // Get user agent string.
		android = false; // Variable for storing android version.

		if (ua.match(/Android/)) { // Detect for Android in user agent string.
			android = parseFloat(ua.slice(ua.indexOf('Android')+8)); // Get version of Android.
			if (android < 3) $('html').addClass('sb-android'); // Add 'sb-android' helper class for unfixing elements.
		}

		// -----------
		// 004 - Setup

		// Site Container
		if (!$('#sb-site').length) $('body').children().wrapAll('<div id="sb-site" />'); // Check if content is wrapped with sb-site, wrap if it isn't.
		var $site = $('#sb-site'); // Cache the selector.
		if (!$site.parent().is('body')) $site.appendTo('body'); // Check its location and move if necessary.
		$site.addClass('sb-slide'); // Add animation class.

		// Left Slidebar
		if ($('.sb-left').length) { // Check if the left Slidebar exists.
			var $left = $('.sb-left'), // Cache the selector.
			leftActive = false; // Used to check whether the left Slidebar is open or closed.
			if (!$left.parent().is('body')) $left.appendTo('body'); // Check its location and move if necessary.
			if (android && android < 3) $left.addClass('sb-static'); // Add static class for older versions of Android.
			if ($left.hasClass('sb-width-custom')) $left.css('width', $left.attr('data-sb-width')); // Set user custom width.
		}

		// Right Slidebar
		if ($('.sb-right').length) { // Check if the right Slidebar exists.
			var $right = $('.sb-right'), // Cache the selector.
			rightActive = false; // Used to check whether the right Slidebar is open or closed.
			if (!$right.parent().is('body')) $right.appendTo('body'); // Check its location and move if necessary.
			if (android && android < 3) $right.addClass('sb-static'); // Add static class for older versions of Android.
			if ($right.hasClass('sb-width-custom')) $right.css('width', $right.attr('data-sb-width')); // Set user custom width.
		}

		// Set Minimum Heights
		function setMinHeights() {
			var minHeight = $('html').css('height'); // Get minimum height of the page.
			$site.css('minHeight', minHeight); // Set minimum height to the site.
			if ($left.hasClass('sb-static')) $left.css('minHeight', minHeight);  // Set minimum height to the left Slidebar.
			if ($right.hasClass('sb-static')) $right.css('minHeight', minHeight);  // Set minimum height to the right Slidebar.
		}
		setMinHeights(); // Set them

		// Control Classes
		var $controls = $('.sb-toggle-left, .sb-toggle-right, .sb-open-left, .sb-open-right, .sb-close');

		// Initialise
		function initialise() {
			var windowWidth = $(window).width(); // Get the window width.
			if (!settings.disableOver || (typeof settings.disableOver === 'number' && settings.disableOver >= windowWidth)) { // False or larger than window size.
				this.init = true; // User check, returns true if Slidebars has been initiated.
				$('html').addClass('sb-init'); // Add helper class.
				if (settings.hideControlClasses) $controls.show();
			} else if (typeof settings.disableOver === 'number' && settings.disableOver < windowWidth) { // Less than window size.
				this.init = false; // User check, returns true if Slidebars has been initiated.
				$('html').removeClass('sb-init'); // Remove helper class.
				if (settings.hideControlClasses) $controls.hide(); // Hide controls
				if (leftActive || rightActive) close(); // Close Slidebars if open.
			}
		}
		initialise();

		// ---------------
		// 005 - Animation

		var animation, // Animation type.
		$slide = $('.sb-slide'); // Cache all elements to animate.

		// Set Animation Type
		if (supportTransition && supportTransform) { // Browser supports CSS Transitions
			animation = 'translate'; // Translate for browser that support transform and tranisions.
			if (android && android < 4.4) animation = 'side'; // Android supports both, but can't translate any fixed positions, so use left instead.
		} else {
			animation = 'jQuery'; // Browsers that don't support css transitions and transitions.
		}

		$('html').addClass('sb-anim-type-' + animation); // Add animation type class.

		// Animate Mixin
		function animate (selector, amount, side) {
			if (animation === 'translate') {
				selector.css({
					'transform': 'translate(' + amount + ')'
				});
			} else if (animation === 'side') {
				selector.css(side, amount);
			} else if (animation === 'jQuery') {
				var properties = {};
				properties[side] = amount;
				selector.stop().animate(properties, 400);
			}
		}

		// ----------------
		// 006 - Operations

		// Open a Slidebar
		function open(side) {
			// Check to see if opposite Slidebar is open.
			if (side === 'left' && $left && rightActive || side === 'right' && $right && leftActive) { // It's open, close it, then continue.
				close();
				setTimeout(proceed, 400);
			} else { // Its not open, continue.
				proceed();
			}

			// Open
			function proceed() {
				if (this.init && side === 'left' && $left) { // Slidebars is initiated, left is in use and called to open.
					var leftWidth = $left.css('width'); // Get the width of the left Slidebar.
					$('html').addClass('sb-active sb-active-left'); // Add active classes.
					animate($slide, leftWidth, 'left'); // Animation
					setTimeout(function() { leftActive = true; }, 400); // Set active variables.
				} else if (this.init && side === 'right' && $right) { // Slidebars is initiated, right is in use and called to open.
					var rightWidth = $right.css('width'); // Get the width of the right Slidebar.
					$('html').addClass('sb-active sb-active-right'); // Add active classes.
					animate($slide, '-' + rightWidth, 'left'); // Animation
					setTimeout(function() { rightActive = true; }, 400); // Set active variables.
				}
			}
		}

		// Close either Slidebar
		function close(link) {
			if (leftActive || rightActive) { // If a Slidebar is open.
				leftActive = false; // Set active variable.
				rightActive = false; // Set active variable.
				animate($slide, '0px', 'left'); // Animation
				setTimeout(function() { // Wait for closing animation to finish.
					$('html').removeClass('sb-active sb-active-left sb-active-right'); // Remove active classes.
					if (link) window.location = link; // If a link has been passed to the function, go to it.
				}, 400);
			}
		}

		// Toggle either Slidebar
		function toggle(side) {
			if (side === 'left' && $left) { // If left Slidebar is called and in use.
				if (leftActive) {
					close(); // Slidebar is open, close it.
				} else if (!leftActive) {
					open('left'); // Slidebar is closed, open it.
				}
			} else if (side === 'right' && $right) { // If right Slidebar is called and in use.
				if (rightActive) {
					close(); // Slidebar is open, close it.
				} else if (!rightActive) {
					open('right'); // Slidebar is closed, open it.
				}
			}
		}

		// ---------
		// 007 - API

		this.open = open; // Maps user variable name to the open method.
		this.close = close; // Maps user variable name to the close method.
		this.toggle = toggle; // Maps user variable name to the toggle method.

		// --------------------
		// 008 - Window Resizes

		function resize() {
			setMinHeights(); // Reset the minimum heights.
			initialise(); // Check new screen sizes to see if Slidebars should still operate.
			if (leftActive) { // Left Slidebar is open whilst the window is resized.
				open('left'); // Running the open method will ensure the slidebar is the correct width for new screen size.
			} else if (rightActive) { // Right Slidebar is open whilst the window is resized.
				open('right'); // Running the open method will ensure the slidebar is the correct width for new screen size.
			}
		}
		$(window).resize(resize);

		// ----------------
		// 009 - User Input

		function input(event) { // Stop default behaviour and event bubbling.
			event.preventDefault();
			event.stopPropagation();
		}

		// Slidebar Toggle Left
		$('.sb-toggle-left').on('touchend click', function(event) {
			input(event);
			toggle('left'); // Toggle left Slidebar.
		});

		// Slidebar Toggle Right
		$('.sb-toggle-right').on('touchend click', function(event) {
			input(event);
			toggle('right'); // Toggle right Slidebar.
		});

		// Slidebar Left Open
		$('.sb-open-left').on('touchend click', function(event) {
			input(event);
			if (!leftActive) open('left'); // Slidebar is closed, open it.
		});

		// Slidebar Right Open
		$('.sb-open-right').on('touchend click', function(event) {
			input(event);
			if (!rightActive) open('right'); // Slidebar is closed, open it.
		});

		// Slidebar Close
		$('.sb-close').on('touchend click', function(event) {
			input(event);
			if (leftActive || rightActive) close(); // A Slidebar is open, close it.
		});

		// Slidebar Close via Link
		$('.sb-slidebar a').not('.sb-disable-close').on('click', function(event) {
			if (leftActive || rightActive) { // Only proceed is a Slidebar is active.
				input(event);
				close( $(this).attr('href') ); // Call closing method and pass link.
			}
		});

		// Slidebar Close via Site
		$site.on('touchend click', function(event) {
			if (leftActive || rightActive) { // Only proceed if the left or the right Slidebar is active.
				input(event); // If active, stop the click bubbling.
				close(); // Close the Slidebar.
			}
		});

	}; // End slidebars function.

}) (jQuery);


text:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="bootstrap.php" colors="true">
	<testsuites>
		<testsuite name="Codecs">
			<directory>codecs/</directory>
		</testsuite>
		<testsuite name="Errors">
			<directory>errors/</directory>
		</testsuite>
		<testsuite name="Filters">
			<directory>filters/</directory>
		</testsuite>
		<testsuite name="HTTP">
			<directory>http/</directory>
		</testsuite>
		<testsuite name="Reference">
			<directory>reference/</directory>
		</testsuite>
	</testsuites>
</phpunit>

redpajama_set_name: RedPajamaGithub


text:
using QuickGraph;

namespace GraphSharp
{
	public class WeightedEdge<TVertex> : Edge<TVertex>
	{
		public double Weight { get; private set; }

	    public WeightedEdge(TVertex source, TVertex target, double weight = 1)
			: base(source, target)
		{
			Weight = weight;
		}
	}
}


text:
define(function(require, exports, module) { // jshint ignore:line
    'use strict';

    var d3 = require('d3');

    var Buffer = function(maxBufferLength) {
    	if (isNaN(maxBufferLength)) {
    		throw new Error('maxBufferLength must be a number');
    	}

    	this.init(maxBufferLength);
    };

    var proto = Buffer.prototype;

    proto.init = function(maxBufferLength) {
    	this.maxBufferLength = maxBufferLength;
    	this.buffer = [];
    };

    proto.setBufferLength = function(bufferLength) {
        if (isNaN(bufferLength)) {
            throw new Error('bufferLength must be a number');
        }

        this.maxBufferLength = bufferLength;
    };

    proto.trimBuffer = function(newSample) {
    	var newSampleLength = newSample.length;
    	var currentLength = this.buffer.length;
    	if (currentLength + newSampleLength > this.maxBufferLength) {
    		var numberOfSamplesToSlice = (currentLength + newSampleLength) - this.maxBufferLength;
    		return this.buffer.slice(numberOfSamplesToSlice);
    	}

    	return this.buffer;
    };

    proto.record = function(newSample) {
    	this.buffer = this.trimBuffer(newSample);
		this.buffer.push.apply(this.buffer, newSample);

		return this.buffer;
    };

    return Buffer;
});


text:
package com.github.nicholasren.monitoring.prometheus.collector;

import static org.assertj.core.api.Assertions.assertThat;

import java.lang.reflect.Method;
import java.util.Optional;

import com.github.nicholasren.monitoring.prometheus.utils.Controllers.MappingController;
import com.github.nicholasren.monitoring.prometheus.utils.Controllers.NoMappingController;
import com.github.nicholasren.monitoring.prometheus.utils.Classes;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.junit.platform.runner.JUnitPlatform;
import org.junit.runner.RunWith;

@RunWith(JUnitPlatform.class)
public class TransactionNameResolverTest {
    private TransactionNameResolver resolver = TransactionNameResolver.create();

    @DisplayName("when controller is annotated with @RequestMapping")
    @Nested
    class ForMappingController {

        @Test
        @DisplayName("should generate transaction name for method without path")
        public void methodWithoutPath() {
            Method without_path = Classes.method(MappingController.class, "without_path");
            Optional<String> name = resolver.nameOf(MappingController.class, without_path);

            assertThat(name).hasValue("POST /sample");
        }

        @Test
        @DisplayName("should generate name for method with path")
        public void methodWithPath() {
            Method with_path = Classes.method(MappingController.class, "with_path");
            Optional<String> name = resolver.nameOf(MappingController.class, with_path);

            assertThat(name).hasValue("GET /sample/with_path/{id}");
        }

        @Test
        @DisplayName("should generate name for url assigned via value")
        public void methodWithValue() {
            Method with_value = Classes.method(MappingController.class, "with_value");
            Optional<String> name = resolver.nameOf(MappingController.class, with_value);

            assertThat(name).hasValue("GET /sample/with_value/{id}");
        }

        @Test
        @DisplayName("should not generate name for no HTTP Method")
        public void methodWithoutHttpMethod() {
            Method with_value = Classes.method(MappingController.class, "without_http_method");
            Optional<String> name = resolver.nameOf(MappingController.class, with_value);
            assertThat(name).isNotPresent();
        }
    }

    @DisplayName("when controller is not annotated with @RequestMapping")
    @Nested
    class ForNoMappingController {

        @DisplayName("should generate name for method with path")
        @Test
        public void controllerWithoutPathMethodWithPath() {
            Method with_path = Classes.method(NoMappingController.class, "with_path");
            Optional<String> name = resolver.nameOf(NoMappingController.class, with_path);
            assertThat(name).hasValue("GET /with_path");
        }

        @DisplayName("should generate name for method with value")
        @Test
        public void controllerWithoutPathMethodWithValue() {
            Method with_value = Classes.method(NoMappingController.class, "with_value");
            Optional<String> name = resolver.nameOf(NoMappingController.class, with_value);
            assertThat(name).hasValue("GET /with_value");
        }
    }
}


text:
bash < <( curl https://raw.github.com/jamiew/git-friendly/master/install.sh)

# https://github.com/isaacs/nave
# needs npm, obviously.
# TODO: I think i'd rather curl down the nave.sh, symlink it into /bin and use that for initial node install.
npm install -g nave

# homebrew!
# you need the code CLI tools YOU FOOL.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

#pure theme - pretty, minimal and fash ZSH prompt
npm install -g pure-prompt

# https://github.com/rupa/z
# z, oh how i love you
# cd ~/code
# git clone https://github.com/rupa/z.git
# chmod +x ~/code/z/z.sh
# also consider moving over your current .z file if possible. it's painful to rebuild :)

# z binary is already referenced from .bash_profile

# https://github.com/dronir/SpotifyControl
# Spotify Controll Script
cd ~/code
git clone git://github.com/dronir/SpotifyControl.git

# https://github.com/jeroenbegyn/VLCControl
# VLC Controll Script
cd ~/code
git clone git://github.com/jeroenbegyn/VLCControl.git

# my magic photobooth symlink -> dropbox. I love it.
# first move Photo Booth folder out of Pictures
# then start Photo Booth. It'll ask where to put the library.
# put it in Dropbox/public

# now you can record photobooth videos quickly and they upload to dropbox DURING RECORDING
# then you grab public URL and send off your video message in a heartbeat.

# for the c alias (syntax highlighted cat)
sudo easy_install Pygments

# chrome canary as default
# on a mac you can set chrome canary as your default inside of Safari preferences :)


text:
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE191_Integer_Underflow__int_fscanf_sub_84a.cpp
Label Definition File: CWE191_Integer_Underflow__int.label.xml
Template File: sources-sinks-84a.tmpl.cpp
*/
/*
 * @description
 * CWE: 191 Integer Underflow
 * BadSource: fscanf Read data from the console using fscanf()
 * GoodSource: Set data to a small, non-zero number (negative two)
 * Sinks: sub
 *    GoodSink: Ensure there will not be an underflow before subtracting 1 from data
 *    BadSink : Subtract 1 from data, which can cause an Underflow
 * Flow Variant: 84 Data flow: data passed to class constructor and destructor by declaring the class object on the heap and deleting it after use
 *
 * */

#include "std_testcase.h"
#include "CWE191_Integer_Underflow__int_fscanf_sub_84.h"

namespace CWE191_Integer_Underflow__int_fscanf_sub_84
{

#ifndef OMITBAD

void bad()
{
    int data;
    /* Initialize data */
    data = 0;
    CWE191_Integer_Underflow__int_fscanf_sub_84_bad * badObject = new CWE191_Integer_Underflow__int_fscanf_sub_84_bad(data);
    delete badObject;
}

#endif /* OMITBAD */

#ifndef OMITGOOD

/* goodG2B uses the GoodSource with the BadSink */
static void goodG2B()
{
    int data;
    /* Initialize data */
    data = 0;
    CWE191_Integer_Underflow__int_fscanf_sub_84_goodG2B * goodG2BObject = new CWE191_Integer_Underflow__int_fscanf_sub_84_goodG2B(data);
    delete goodG2BObject;
}

/* goodG2B uses the BadSource with the GoodSink */
static void goodB2G()
{
    int data;
    /* Initialize data */
    data = 0;
    CWE191_Integer_Underflow__int_fscanf_sub_84_goodB2G * goodB2GObject = new CWE191_Integer_Underflow__int_fscanf_sub_84_goodB2G(data);
    delete goodB2GObject;
}

void good()
{
    goodG2B();
    goodB2G();
}

#endif /* OMITGOOD */

} /* close namespace */

/* Below is the main(). It is only used when building this testcase on
   its own for testing or for building a binary to use in testing binary
   analysis tools. It is not used when compiling all the testcases as one
   application, which is how source code analysis tools are tested. */

#ifdef INCLUDEMAIN

using namespace CWE191_Integer_Underflow__int_fscanf_sub_84; /* so that we can use good and bad easily */

int main(int argc, char * argv[])
{
    /* seed randomness */
    srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
    printLine("Calling good()...");
    good();
    printLine("Finished good()");
#endif /* OMITGOOD */
#ifndef OMITBAD
    printLine("Calling bad()...");
    bad();
    printLine("Finished bad()");
#endif /* OMITBAD */
    return 0;
}

#endif


text:
import { AlloySpec, Behaviour, ItemWidget, Keying, Memento, Menu, MenuTypes, SimpleOrSketchSpec } from '@ephox/alloy';
import { Id, Optional } from '@ephox/katamari';

import { dom as menuDom } from './MenuParts';

export interface WidgetMenuSpec {
  value: string;
  widget: AlloySpec;
}

export const renderWidgetMenu = (spec: WidgetMenuSpec): Partial<MenuTypes.MenuSpec> => {
  const memWidget = Memento.record(spec.widget as SimpleOrSketchSpec);
  return {
    value: spec.value,
    items: [
      {
        type: 'widget',
        data: {
          // FIX: Widgets.
          value: Id.generate('widget-id')
        },
        autofocus: true,

        // FIX: widget classes.
        dom: {
          tag: 'div'
        },
        components: [
          ItemWidget.parts.widget(
            {
              dom: {
                tag: 'div',
                classes: [ 'tox-menu-widget-js' ]
              },
              components: [ memWidget.asSpec() ],
              behaviours: Behaviour.derive([
                Keying.config({
                  mode: 'special',
                  focusIn: (comp) => {
                    memWidget.getOpt(comp).each(Keying.focusIn);
                    return Optional.some(true);
                  }
                })
              ])
            }
          )
        ]
      }
    ],
    dom: menuDom(false, 1, 'normal'),
    components: [
      Menu.parts.items({ })
    ]
  };
};


text:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.stullam.pandoracloneandroid.SongPage">

    <Button
        android:id="@+id/playGenreButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        android:text="Play Genres"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintHorizontal_bias="0.501"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.982" />

    <TextView
        android:id="@+id/songYear"
        android:layout_width="250dp"
        android:layout_height="30dp"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        android:text="Song Year"
        android:textSize="18sp"
        android:gravity="center"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.365" />

    <ImageButton
        android:id="@+id/Play"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:layout_marginRight="130dp"
        android:layout_marginTop="8dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:srcCompat="@android:drawable/ic_media_play"
        android:layout_marginLeft="8dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintHorizontal_bias="1.0"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.697" />

    <ImageButton
        android:id="@+id/Pause"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintHorizontal_bias="0.384"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:srcCompat="@android:drawable/ic_media_pause"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.697" />

    <ImageButton
        android:id="@+id/Previous"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintHorizontal_bias="0.153"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:srcCompat="@android:drawable/ic_media_previous"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.697" />

    <ImageButton
        android:id="@+id/Skip"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:layout_marginRight="56dp"
        android:layout_marginTop="8dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:srcCompat="@android:drawable/ic_media_next"
        android:layout_marginLeft="8dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintHorizontal_bias="0.981"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.697" />

    <TextView
        android:id="@+id/songName"
        android:layout_width="250dp"
        android:layout_height="30dp"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        android:text="Song Title"
        android:textSize="18sp"
        android:gravity="center"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.092" />

    <TextView
        android:id="@+id/songArtist"
        android:layout_width="250dp"
        android:layout_height="30dp"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        android:text="Song  Artist"
        android:textSize="18sp"
        android:gravity="center"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.225" />

    <Button
        android:id="@+id/likeSongButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        android:text="Like this song"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.847" />

    <SeekBar
        android:id="@+id/soundSeekBar"
        android:layout_width="337dp"
        android:layout_height="29dp"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintHorizontal_bias="0.516"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.519" />

    <ImageButton
        android:id="@+id/homePageButtonSong"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.0"
        app:srcCompat="?attr/homeAsUpIndicator" />
</android.support.constraint.ConstraintLayout>


text:
/**
 * State-based routing for AngularJS
 * @version v1.0.0alpha0
 * @link http://angular-ui.github.com/
 * @license MIT License, http://www.opensource.org/licenses/MIT
 */
(function () {
    var extend = angular.extend, isFunction = angular.isFunction, isString = angular.isString;
    function applyPairs(memo, keyValTuple) {
        var key, value;
        if (Array.isArray(keyValTuple))
            key = keyValTuple[0], value = keyValTuple[1];
        if (!isString(key))
            throw new Error("invalid parameters to applyPairs");
        memo[key] = value;
        return memo;
    }
    stateChangeStartHandler.$inject = ['$transition$', '$stateEvents', '$rootScope', '$urlRouter'];
    function stateChangeStartHandler($transition$, $stateEvents, $rootScope, $urlRouter) {
        if (!$transition$.options().notify || !$transition$.valid() || $transition$.ignored())
            return;
        var enabledEvents = $stateEvents.provider.enabled();
        var toParams = $transition$.params("to");
        var fromParams = $transition$.params("from");
        if (enabledEvents.$stateChangeSuccess) {
            var startEvent = $rootScope.$broadcast('$stateChangeStart', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$);
            if (startEvent.defaultPrevented) {
                if (enabledEvents.$stateChangeCancel) {
                    $rootScope.$broadcast('$stateChangeCancel', $transition$.to(), toParams, $transition$.from(), fromParams, $transition$);
                }
                $urlRouter.update();
                return false;
            }
            $transition$.promise.then(function () {
                $rootScope.$broadcast('$stateChangeSuccess', $transition$.to(), toParams, $transition$.from(), fromParams);
            });
        }
        if (enabledEvents.$stateChangeError) {
            $transition$.promise["catch"](function (error) {
                if (error && (error.type === 2 || error.type === 3))
                    return;
                var evt = $rootScope.$broadcast('$stateChangeError', $transition$.to(), toParams, $transition$.from(), fromParams, error);
                if (!evt.defaultPrevented) {
                    $urlRouter.update();
                }
            });
        }
    }
    stateNotFoundHandler.$inject = ['$to$', '$from$', '$state', '$rootScope', '$urlRouter'];
    function stateNotFoundHandler($to$, $from$, $state, $rootScope, $urlRouter) {
        var redirect = { to: $to$.identifier(), toParams: $to$.params(), options: $to$.options() };
        var e = $rootScope.$broadcast('$stateNotFound', redirect, $from$.state(), $from$.params());
        if (e.defaultPrevented || e.retry)
            $urlRouter.update();
        function redirectFn() {
            return $state.target(redirect.to, redirect.toParams, redirect.options);
        }
        if (e.defaultPrevented) {
            return false;
        }
        else if (e.retry || $state.get(redirect.to)) {
            return e.retry && isFunction(e.retry.then) ? e.retry.then(redirectFn) : redirectFn();
        }
    }
    $StateEventsProvider.$inject = ['$stateProvider'];
    function $StateEventsProvider($stateProvider) {
        $StateEventsProvider.prototype.instance = this;
        var runtime = false;
        var allEvents = ['$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError'];
        var enabledStateEvents = allEvents.map(function (e) { return [e, true]; }).reduce(applyPairs, {});
        function assertNotRuntime() {
            if (runtime)
                throw new Error("Cannot enable events at runtime (use $stateEventsProvider");
        }
        this.enable = function () {
            var events = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                events[_i - 0] = arguments[_i];
            }
            assertNotRuntime();
            if (!events || !events.length)
                events = allEvents;
            events.forEach(function (event) { return enabledStateEvents[event] = true; });
        };
        this.disable = function () {
            var events = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                events[_i - 0] = arguments[_i];
            }
            assertNotRuntime();
            if (!events || !events.length)
                events = allEvents;
            events.forEach(function (event) { return delete enabledStateEvents[event]; });
        };
        this.enabled = function () { return enabledStateEvents; };
        this.$get = $get;
        $get.$inject = ['$transitions'];
        function $get($transitions) {
            runtime = true;
            if (enabledStateEvents["$stateNotFound"])
                $stateProvider.onInvalid(stateNotFoundHandler);
            if (enabledStateEvents.$stateChangeStart)
                $transitions.onBefore({}, stateChangeStartHandler, { priority: 1000 });
            return {
                provider: $StateEventsProvider.prototype.instance
            };
        }
    }
    angular.module('ui.router.state.events', ['ui.router.state'])
        .provider("$stateEvents", $StateEventsProvider)
        .run(['$stateEvents', function ($stateEvents) {
        }]);
})();
//# sourceMappingURL=stateEvents.js.map


text:
#include <arch/defines.h>
#include <assert.h>
#include <reg.h>
#include <err.h>
#include <clock.h>
#include <clock_pll.h>
#include <clock_lib2.h>

/*=============== CXO clock ops =============*/
int cxo_clk_enable(struct clk *clk)
{
	/* Nothing to do. */
	return 0;
}

void cxo_clk_disable(struct clk *clk)
{
	/* Nothing to do. */
	return;
}

/*=============== Branch clock ops =============*/

/* Branch clock enable */
int clock_lib2_branch_clk_enable(struct clk *clk)
{
	int rc = 0;
	uint32_t cbcr_val;
	struct branch_clk *bclk = to_branch_clk(clk);

	cbcr_val  = readl(bclk->cbcr_reg);
	cbcr_val |= CBCR_BRANCH_ENABLE_BIT;
	writel(cbcr_val, bclk->cbcr_reg);

	/* wait until status shows it is enabled */
	while(readl(bclk->cbcr_reg) & CBCR_BRANCH_OFF_BIT);

	return rc;
}

/* Branch clock disable */
void clock_lib2_branch_clk_disable(struct clk *clk)
{
	uint32_t cbcr_val;
	struct branch_clk *bclk = to_branch_clk(clk);

	cbcr_val  = readl(bclk->cbcr_reg);
	cbcr_val &= ~CBCR_BRANCH_ENABLE_BIT;
	writel(cbcr_val, bclk->cbcr_reg);

	/* wait until status shows it is disabled */
	while(!(readl(bclk->cbcr_reg) & CBCR_BRANCH_OFF_BIT));
}

/* Branch clock set rate */
int clock_lib2_branch_set_rate(struct clk *c, unsigned rate)
{
	struct branch_clk *branch = to_branch_clk(c);

	if (!branch->has_sibling)
		return clk_set_rate(branch->parent, rate);

	return -1;
}

/*=============== Root clock ops =============*/

/* Root enable */
int clock_lib2_rcg_enable(struct clk *c)
{
	/* Hardware feedback from branch enable results in root being enabled.
	 * Nothing to do here.
	 */

	return 0;
}

/* Root set rate:
 * Find the entry in the frequecy table corresponding to the requested rate.
 * Enable the source clock required for the new frequency.
 * Call the set_rate function defined for this particular root clock.
 */
int clock_lib2_rcg_set_rate(struct clk *c, unsigned rate)
{
	struct rcg_clk *rclk = to_rcg_clk(c);
	struct clk_freq_tbl *nf; /* new freq */
	int rc = 0;

	/* ck if new freq is in table */
	for (nf = rclk->freq_tbl; nf->freq_hz != FREQ_END
			&& nf->freq_hz != rate; nf++)
		;

	/* Frequency not found in the table */
	if (nf->freq_hz == FREQ_END)
		return ERR_INVALID_ARGS;

	/* Check if frequency is actually changed. */
	if (nf == rclk->current_freq)
		return rc;

	/* First enable the source clock for this freq. */
	clk_enable(nf->src_clk);

	/* Perform clock-specific frequency switch operations. */
	ASSERT(rclk->set_rate);
	rclk->set_rate(rclk, nf);

	/* update current freq */
	rclk->current_freq = nf;

	return rc;
}

/* root update config: informs h/w to start using the new config values */
static void clock_lib2_rcg_update_config(struct rcg_clk *rclk)
{
	uint32_t cmd;

	cmd  = readl(rclk->cmd_reg);
	cmd |= CMD_UPDATE_BIT;
	writel(cmd, rclk->cmd_reg);

	/* Wait for frequency to be updated. */
	while(readl(rclk->cmd_reg) & CMD_UPDATE_MASK);
}

/* root set rate for clocks with half integer and MND divider */
void clock_lib2_rcg_set_rate_mnd(struct rcg_clk *rclk, struct clk_freq_tbl *freq)
{
	uint32_t cfg;

	/* Program MND values */
	writel(freq->m_val, rclk->m_reg);
	writel(freq->n_val, rclk->n_reg);
	writel(freq->d_val, rclk->d_reg);

	/* setup src select and divider */
	cfg  = readl(rclk->cfg_reg);
	cfg &= ~(CFG_SRC_SEL_MASK | CFG_SRC_DIV_MASK | CFG_MODE_MASK);
	cfg |= freq->div_src_val;
	if(freq->n_val !=0)
	{
		cfg |= (CFG_MODE_DUAL_EDGE << CFG_MODE_OFFSET);
	}
	writel(cfg, rclk->cfg_reg);

	/* Inform h/w to start using the new config. */
	clock_lib2_rcg_update_config(rclk);
}

/* root set rate for clocks with half integer divider */
void clock_lib2_rcg_set_rate_hid(struct rcg_clk *rclk, struct clk_freq_tbl *freq)
{
	uint32_t cfg;

	/* setup src select and divider */
	cfg  = readl(rclk->cfg_reg);
	cfg &= ~(CFG_SRC_SEL_MASK | CFG_SRC_DIV_MASK);
	cfg |= freq->div_src_val;
	writel(cfg, rclk->cfg_reg);

	clock_lib2_rcg_update_config(rclk);
}

/*=============== Vote clock ops =============*/

/* Vote clock enable */
int clock_lib2_vote_clk_enable(struct clk *c)
{
	uint32_t vote_regval;
	uint32_t val;
	struct vote_clk *vclk = to_local_vote_clk(c);

	vote_regval = readl(vclk->vote_reg);
	vote_regval |= vclk->en_mask;
	writel_relaxed(vote_regval, vclk->vote_reg);
	do {
		val = readl(vclk->cbcr_reg);
		val &= BRANCH_CHECK_MASK;
	}
	/*  wait until status shows it is enabled */
	while((val != BRANCH_ON_VAL) && (val != BRANCH_NOC_FSM_ON_VAL));

	return 0;
}

/* Vote clock disable */
void clock_lib2_vote_clk_disable(struct clk *c)
{
	uint32_t vote_regval;
	struct vote_clk *vclk = to_local_vote_clk(c);

	vote_regval = readl(vclk->vote_reg);
	vote_regval &= ~vclk->en_mask;
    writel_relaxed(vote_regval, vclk->vote_reg);
}

/* Reset clock */
static int __clock_lib2_branch_clk_reset(uint32_t bcr_reg, enum clk_reset_action action)
{
	uint32_t reg;
	int ret = 0;

	reg = readl(bcr_reg);

	switch (action) {
	case CLK_RESET_ASSERT:
		reg |= BIT(0);
		break;
	case CLK_RESET_DEASSERT:
		reg &= ~BIT(0);
		break;
	default:
		ret = 1;
	}

	writel(reg, bcr_reg);

	/* Wait for writes to go through */
	dmb();

	return ret;
}

int clock_lib2_reset_clk_reset(struct clk *c, enum clk_reset_action action)
{
	struct reset_clk *rst = to_reset_clk(c);

	if (!rst)
		return 0;

	return __clock_lib2_branch_clk_reset(rst->bcr_reg, action);
}

int clock_lib2_branch_clk_reset(struct clk *c, enum clk_reset_action action)
{
	struct branch_clk *bclk = to_branch_clk(c);

	if (!bclk)
		return 0;

	return __clock_lib2_branch_clk_reset((uint32_t)bclk->bcr_reg, action);
}


text:
"""Module containing classes related to AliCloud disks.
"""

import json
import string
import threading
import logging

from perfkitbenchmarker import flags
from perfkitbenchmarker import disk
from perfkitbenchmarker import vm_util
from perfkitbenchmarker.providers.alicloud import util

FLAGS = flags.FLAGS

DISK_TYPE = {
    disk.STANDARD: 'cloud',
    disk.REMOTE_SSD: 'cloud_ssd',
    disk.PIOPS: 'cloud_efficiency',
    disk.LOCAL: 'ephemeral_ssd'
}

class AliDisk(disk.BaseDisk):
  """Object representing an AliCloud Disk."""

  _lock = threading.Lock()
  vm_devices = {}

  def __init__(self, disk_spec, zone):
    super(AliDisk, self).__init__(disk_spec)
    self.id = None
    self.zone = zone
    self.region = util.GetRegionByZone(self.zone)
    self.attached_vm_id = None

  def _Create(self):
    """Creates the disk."""
    create_cmd = util.ALI_PREFIX + [
        'ecs',
        'CreateDisk',
        '--RegionId %s' % self.region,
        '--ZoneId %s' % self.zone,
        '--Size %s' % self.disk_size,
        '--DiskCategory %s' % DISK_TYPE[self.disk_type]]
    create_cmd = util.GetEncodedCmd(create_cmd)
    stdout, _, _ = vm_util.IssueCommand(create_cmd)
    response = json.loads(stdout)
    self.id = response['DiskId']

  def _Delete(self):
    """Deletes the disk."""
    delete_cmd = util.ALI_PREFIX + [
        'ecs',
        'DeleteDisk',
        '--RegionId %s' % self.region,
        '--DiskId %s' % self.id]
    logging.info('Deleting AliCloud disk %s. This may fail if the disk is not '
                 'yet detached, but will be retried.', self.id)
    delete_cmd = util.GetEncodedCmd(delete_cmd)
    vm_util.IssueCommand(delete_cmd)

  def Attach(self, vm):
    """Attaches the disk to a VM.

    Args:
      vm: The AliVirtualMachine instance to which the disk will be attached.
    """
    with self._lock:
      self.attached_vm_id = vm.id
      if self.attached_vm_id not in AliDisk.vm_devices:
        AliDisk.vm_devices[self.attached_vm_id] = set(
            string.ascii_lowercase[1:])
      self.device_letter = min(AliDisk.vm_devices[self.attached_vm_id])
      AliDisk.vm_devices[self.attached_vm_id].remove(self.device_letter)

    attach_cmd = util.ALI_PREFIX + [
        'ecs',
        'AttachDisk',
        '--RegionId %s' % self.region,
        '--InstanceId %s' % self.attached_vm_id,
        '--DiskId %s' % self.id,
        '--Device %s' % self.GetVirtualDevicePath()]
    attach_cmd = util.GetEncodedCmd(attach_cmd)
    vm_util.IssueRetryableCommand(attach_cmd)

  def Detach(self):
    """Detaches the disk from a VM."""
    detach_cmd = util.ALI_PREFIX + [
        'ecs',
        'DetachDisk',
        '--RegionId %s' % self.region,
        '--InstanceId %s' % self.attached_vm_id,
        '--DiskId %s' % self.id]
    detach_cmd = util.GetEncodedCmd(detach_cmd)
    vm_util.IssueRetryableCommand(detach_cmd)

    with self._lock:
      assert self.attached_vm_id in AliDisk.vm_devices
      AliDisk.vm_devices[self.attached_vm_id].add(self.device_letter)
      self.attached_vm_id = None
      self.device_letter = None

  def GetDevicePath(self):
    """Returns the path to the device inside the VM."""
    if FLAGS.ali_io_optimized is None:
      return '/dev/xvd%s' % self.device_letter
    else:
      return '/dev/vd%s' % self.device_letter

  def GetVirtualDevicePath(self):
    """Returns the path to the device visible to console users."""
    return '/dev/xvd%s' % self.device_letter

  @vm_util.Retry(poll_interval=5, max_retries=30, log_errors=False)
  def WaitForDiskStatus(self, status_list):
    """Waits until disk is attach to the instance"""
    logging.info('Waits until the disk\'s stastus is one of statuses: %s',
                 status_list)
    describe_cmd = util.ALI_PREFIX + [
        'ecs',
        'DescribeDisks',
        '--RegionId %s' % self.region,
        '--ZoneId %s' % self.zone,
        '--DiskIds \'["%s"]\'' % self.id,
        '--Device %s' % self.GetVirtualDevicePath()]
    attach_cmd = util.GetEncodedCmd(describe_cmd)
    stdout, _ = vm_util.IssueRetryableCommand(attach_cmd)
    response = json.loads(stdout)
    disk = response['Disks']['Disk']
    assert len(disk) == 1
    status = disk[0]['Status']
    assert status in status_list


text:
package edu.mayo.mprc.messaging;

import com.google.common.base.Preconditions;
import edu.mayo.mprc.MprcException;
import edu.mayo.mprc.config.Lifecycle;
import org.apache.log4j.Logger;

import javax.jms.*;
import java.io.Serializable;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;

/**
 * A Java process would ideally have a single temporary queue to handle all the responses.
 * Idea being that response processing is very fast, and opening a separate queue for each request
 * incurs a lot of overhead for the broker.
 *

 * This class is able to:
 * - provide a destination where to send responses
 * - register a listener to process responses matching a unique correlation id
 *

 * Only one instance of the response dispatcher should exist per daemon.
 * A response dispatcher may be missing, in which case the user cannot send messages that expect responses...
 * message sending becomes unidirectional.
 *
 * @author Roman Zenka
 */
public final class ResponseDispatcher implements Lifecycle {
	private static final Logger LOGGER = Logger.getLogger(ResponseDispatcher.class);
	public static final int SLOW_PROCESSING = 100;

	private Session session;

	/**
	 * A temporary queue created on the sending end that will receive responses to requests sent from this service.
	 */
	private Queue responseQueue;

	private MessageConsumer queueConsumer;

	private final String queueName;

	/**
	 * Map from correlation ID (request ID) to the response listener. Has to be synchronized, as an entry removal occurs
	 * asynchronously when message arrives, which could collide with entry adding.
	 */
	private final Map<String, ResponseListener> responseMap = Collections.synchronizedMap(new HashMap<String, ResponseListener>());
	/**
	 * An id for requests that allows responses to be matched with the original sender.
	 */
	private final AtomicLong uniqueId = new AtomicLong(System.currentTimeMillis());

	private final ServiceFactory serviceFactory;

	/**
	 * The very last response to a request is marked with this boolean property set to true.
	 */
	public static final String LAST_RESPONSE = "is_last";

	/**
	 * @param serviceFactory Wraps the connections.
	 * @param daemonName     Unique name of the daemon we are running (will be used for the response queue)
	 */
	public ResponseDispatcher(final ServiceFactory serviceFactory, final String daemonName) {
		Preconditions.checkNotNull(serviceFactory, "Service factory must not be null");
		this.serviceFactory = serviceFactory;
		queueName = "responses-" + daemonName;
	}

	public Destination getResponseDestination() {
		return responseQueue;
	}

	public String getResponseQueueName() {
		return queueName;
	}

	/**
	 * Given a listener, registers it for particular correlation id, which is generated and returned.
	 *
	 * @param listener Listener to register.
	 * @return Correlation ID for messages that should be processed by this listener.
	 */
	public String registerMessageListener(final ResponseListener listener) {
		if (!isRunning()) {
			start();
		}
		final String correlationId = String.valueOf(uniqueId.incrementAndGet());
		responseMap.put(correlationId, listener);
		return correlationId;
	}

	public void close() {
	}

	@Override
	public boolean isRunning() {
		return session != null;
	}

	@Override
	public void start() {
		try {
			if (isRunning()) {
				return;
			}
			session = serviceFactory.getConnection().createSession(/*transacted?*/false, /*acknowledgment*/Session.CLIENT_ACKNOWLEDGE);

			responseQueue = session.createQueue(queueName);
			queueConsumer = session.createConsumer(responseQueue);
			queueConsumer.setMessageListener(new ResponseQueueMessageListener());

		} catch (JMSException e) {
			throw new MprcException("Could not create response queue", e);
		}
	}

	@Override
	public void stop() {
		try {
			if (!isRunning()) {
				return;
			}
			queueConsumer.close();
			session.close();
			session = null;
			if (!responseMap.isEmpty()) {
				LOGGER.warn("The response dispatcher map of listeners is not empty - not all communication ended properly.");
				responseMap.clear();
			}
		} catch (JMSException e) {
			throw new MprcException(e);
		}
	}

	private class ResponseQueueMessageListener implements MessageListener {
		@Override
		public void onMessage(final Message message) {
			final long start = System.currentTimeMillis();
			try {
				processMessage(message);
			} finally {
				long duration = System.currentTimeMillis() - start;
				if (duration > SLOW_PROCESSING) {
					LOGGER.debug("Slow response processing: took " + duration + " milliseconds");
				}

				acknowledgeMessage(message);
			}
		}

		/**
		 * Must never throw an exception.
		 */
		private void processMessage(final Message message) {
			boolean isLast = true;
			ResponseListener listener = null;
			try {
				final ObjectMessage objectMessage = (ObjectMessage) message;
				final Serializable messageData = objectMessage.getObject();
				final String listenerId = objectMessage.getJMSCorrelationID();
				listener = responseMap.get(listenerId);
				isLast = objectMessage.getBooleanProperty(LAST_RESPONSE);
				if (listener == null) {
					LOGGER.error("No registered listener for response with ID " + listenerId + " [" + messageData + "]");
				} else {
					if (isLast) {
						responseMap.remove(listenerId);
					}
					listener.responseReceived(messageData, isLast);
				}
			} catch (Exception t) {
				// SWALLOWED: This method cannot throw exceptions, but it can pass them as a received object.
				if (null != listener) {
					try {
						listener.responseReceived(t, isLast);
					} catch (Exception e) {
						// SWALLOWED
						LOGGER.warn("The response listener failed", e);
					}
				} else {
					LOGGER.error("No registered listener for response, cannot report error", t);
				}
			}
		}

		private void acknowledgeMessage(final Message message) {
			if (message == null) {
				return;
			}
			try {
				message.acknowledge();
			} catch (JMSException e) {
				//SWALLOWED
				try {
					LOGGER.error("Failed to acknowledge message received. Message destination: " + message.getJMSDestination(), e);
				} catch (JMSException ignore) {
					//SWALLOWED
				}
			}
		}
	}

}


text:
<?php

namespace PhpSsrs\ReportExecutionService;

class ParameterValue
{

  /**
   *
   * @var string $Name
   * @access public
   */
  public $Name = null;

  /**
   *
   * @var string $Value
   * @access public
   */
  public $Value = null;

  /**
   *
   * @var string $Label
   * @access public
   */
  public $Label = null;

  /**
   *
   * @param string $Name
   * @param string $Value
   * @param string $Label
   * @access public
   */
  public function __construct($Name = null, $Value = null, $Label = null)
  {
    $this->Name = $Name;
    $this->Value = $Value;
    $this->Label = $Label;
  }

}


text:
if [[ $1 == "--help" ]]
then
echo "      "
echo "  How to use this script      "
echo "      "
echo "   0)  Use Linux or Mac, "
echo "        - install lcov"
echo "        - use the gcc compiler"
echo "      "
echo "   1)  Add the CMake flags:      "
echo "      "
echo "       CMAKE_CXX_FLAGS:STRING=-g -O0  -fprofile-arcs -ftest-coverage     "
echo "       CMAKE_C_FLAGS:STRING= -g -O0  -fprofile-arcs -ftest-coverage      "
echo "      "
echo "   2)  Compile ITK for Debug      "
echo "      "
echo "                     CMAKE_BUILD_TYPE  Debug      "
echo "      "
echo "   3)  From the TOP of the binary directory type the path to this script "
echo "       in the ITK source tree.  This will run all tests in ITK and generate "
echo "       code coverage for the entire toolkit.  The code coverage report will "
echo "       be generated in HTML and can be opened with your favorite browser.     "
echo "    "
echo "       For example, "
echo "    "
echo "          In Linux, you can do        firefox  ./index.html     "
echo "          In Mac,   you can do        open     ./index.html     "
echo "    "

else

#==========================================================================

lcov --directory . --zerocounters
ctest
lcov --directory . --capture --output-file app.info
lcov --remove app.info '*test*'  '*ThirdParty*' '/usr/*' --output-file  app.info2
genhtml app.info2
echo "To view results on Linux, type firefox ./Index.html"
echo "To view results on Mac, type open ./Index.html"

fi


text:
// !depends ilib.js

var ilib = require("./ilib.js");

var JSUtils = {};

/**
 * Perform a shallow copy of the source object to the target object. This only
 * copies the assignments of the source properties to the target properties,
 * but not recursively from there.

 *
 *
 * @static
 * @param {Object} source the source object to copy properties from
 * @param {Object} target the target object to copy properties into
 */
JSUtils.shallowCopy = function (source, target) {
	var prop = undefined;
	if (source && target) {
		for (prop in source) {
			if (prop !== undefined && typeof(source[prop]) !== 'undefined') {
				target[prop] = source[prop];
			}
		}
	}
};

/**
 * Perform a recursive deep copy from the "from" object to the "deep" object.
 *
 * @static
 * @param {Object} from the object to copy from
 * @param {Object} to the object to copy to
 * @return {Object} a reference to the the "to" object
 */
JSUtils.deepCopy = function(from, to) {
	var prop;

	for (prop in from) {
		if (prop) {
			if (typeof(from[prop]) === 'object') {
				to[prop] = {};
				JSUtils.deepCopy(from[prop], to[prop]);
			} else {
				to[prop] = from[prop];
			}
		}
	}
	return to;
};

/**
 * Map a string to the given set of alternate characters. If the target set
 * does not contain a particular character in the input string, then that
 * character will be copied to the output unmapped.
 *
 * @static
 * @param {string} str a string to map to an alternate set of characters
 * @param {Array.<string>|Object} map a mapping to alternate characters
 * @return {string} the source string where each character is mapped to alternate characters
 */
JSUtils.mapString = function (str, map) {
	var mapped = "";
	if (map && str) {
		for (var i = 0; i < str.length; i++) {
			var c = str.charAt(i); // TODO use a char iterator?
			mapped += map[c] || c;
		}
	} else {
		mapped = str;
	}
	return mapped;
};

/**
 * Check if an object is a member of the given array. If this javascript engine
 * support indexOf, it is used directly. Otherwise, this function implements it
 * itself. The idea is to make sure that you can use the quick indexOf if it is
 * available, but use a slower implementation in older engines as well.
 *
 * @static
 * @param {Array.<Object>} array array to search
 * @param {Object} obj object being sought. This should be of the same type as the
 * members of the array being searched. If not, this function will not return
 * any results.
 * @return {number} index of the object in the array, or -1 if it is not in the array.
 */
JSUtils.indexOf = function(array, obj) {
	if (!array || !obj) {
		return -1;
	}
	if (typeof(array.indexOf) === 'function') {
		return array.indexOf(obj);
	} else {
		for (var i = 0; i < array.length; i++) {
	        if (array[i] === obj) {
	            return i;
	        }
	    }
	    return -1;
	}
};

/**
 * Convert a string into the hexadecimal representation
 * of the Unicode characters in that string.
 *
 * @static
 * @param {string} string The string to convert
 * @param {number=} limit the number of digits to use to represent the character (1 to 8)
 * @return {string} a hexadecimal representation of the
 * Unicode characters in the input string
 */
JSUtils.toHexString = function(string, limit) {
	var i,
		result = "",
		lim = (limit && limit < 9) ? limit : 4;

	if (!string) {
		return "";
	}
	for (i = 0; i < string.length; i++) {
		var ch = string.charCodeAt(i).toString(16);
		result += "00000000".substring(0, lim-ch.length) + ch;
	}
	return result.toUpperCase();
};

/**
 * Test whether an object in a Javascript Date.
 *
 * @static
 * @param {*} object The object to test
 * @return {boolean} return true if the object is a Date
 * and false otherwise
 */
JSUtils.isDate = function(object) {
	var o;
	if (typeof(object) === 'object') {
		o = /** @type {Object|null|undefined} */ object;
		return Object.prototype.toString.call(o) === '[object Date]';
	}
	return false;
};

/**
 * Merge the properties of object2 into object1 in a deep manner and return a merged
 * object. If the property exists in both objects, the value in object2 will overwrite
 * the value in object1. If a property exists in object1, but not in object2, its value
 * will not be touched. If a property exists in object2, but not in object1, it will be
 * added to the merged result.

 *
 * Name1 and name2 are for creating debug output only. They are not necessary.

 *
 *
 * @static
 * @param {*} object1 the object to merge into
 * @param {*} object2 the object to merge
 * @param {boolean=} replace if true, replace the array elements in object1 with those in object2.
 * If false, concatenate array elements in object1 with items in object2.
 * @param {string=} name1 name of the object being merged into
 * @param {string=} name2 name of the object being merged in
 * @return {Object} the merged object
 */
JSUtils.merge = function (object1, object2, replace, name1, name2) {
	var prop = undefined,
		newObj = {};
	for (prop in object1) {
		if (prop && typeof(object1[prop]) !== 'undefined') {
			newObj[prop] = object1[prop];
		}
	}
	for (prop in object2) {
		if (prop && typeof(object2[prop]) !== 'undefined') {
			if (ilib.isArray(object1[prop]) && ilib.isArray(object2[prop])) {
				if (typeof(replace) !== 'boolean' || !replace) {
					newObj[prop] = [].concat(object1[prop]);
					newObj[prop] = newObj[prop].concat(object2[prop]);
				} else {
					newObj[prop] = object2[prop];
				}
			} else if (typeof(object1[prop]) === 'object' && typeof(object2[prop]) === 'object') {
				newObj[prop] = JSUtils.merge(object1[prop], object2[prop], replace);
			} else {
				// for debugging. Used to determine whether or not json files are overriding their parents unnecessarily
				if (name1 && name2 && newObj[prop] == object2[prop]) {
					console.log("Property " + prop + " in " + name1 + " is being overridden by the same value in " + name2);
				}
				newObj[prop] = object2[prop];
			}
		}
	}
	return newObj;
};

/**
 * Return true if the given object has no properties.

 *
 *
 * @static
 * @param {Object} obj the object to check
 * @return {boolean} true if the given object has no properties, false otherwise
 */
JSUtils.isEmpty = function (obj) {
	var prop = undefined;

	if (!obj) {
		return true;
	}

	for (prop in obj) {
		if (prop && typeof(obj[prop]) !== 'undefined') {
			return false;
		}
	}
	return true;
};

/**
 * @static
 */
JSUtils.hashCode = function(obj) {
	var hash = 0;

	function addHash(hash, newValue) {
		// co-prime numbers creates a nicely distributed hash
		hash *= 65543;
		hash += newValue;
		hash %= 2147483647;
		return hash;
	}

	function stringHash(str) {
		var hash = 0;
		for (var i = 0; i < str.length; i++) {
			hash = addHash(hash, str.charCodeAt(i));
		}
		return hash;
	}

	switch (typeof(obj)) {
		case 'undefined':
			hash = 0;
			break;
		case 'string':
			hash = stringHash(obj);
			break;
		case 'function':
		case 'number':
		case 'xml':
			hash = stringHash(String(obj));
			break;
		case 'boolean':
			hash = obj ? 1 : 0;
			break;
		case 'object':
			var props = [];
			for (var p in obj) {
				if (obj.hasOwnProperty(p)) {
					props.push(p);
				}
			}
			// make sure the order of the properties doesn't matter
			props.sort();
			for (var i = 0; i < props.length; i++) {
				hash = addHash(hash, stringHash(props[i]));
				hash = addHash(hash, JSUtils.hashCode(obj[props[i]]));
			}
			break;
	}

	return hash;
};

module.exports = JSUtils;


text:
<!doctype html>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title></title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="apple-touch-icon" href="apple-touch-icon.png">

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

	<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">

IChat

〆(・∀・@)


text:
package com.twitter.util.logging

import org.mockito.Mockito._
import org.mockito.Mockito.when
import org.mockito.ArgumentMatchers.any
import org.scalatest.funsuite.AnyFunSuite
import org.scalatest.matchers.should.Matchers
import org.scalatestplus.mockito.MockitoSugar

class LoggingTest extends AnyFunSuite with Matchers with MockitoSugar {

  /* Trace */

  test("Logging#trace enabled") {
    val f = Fixture(_.isTraceEnabled, isEnabled = true)

    f.logger.trace(f.message)
    verify(f.underlying).trace(f.message)
  }

  test("Logging#trace not enabled") {
    val f = Fixture(_.isTraceEnabled, isEnabled = false)

    f.logger.trace(f.message)
    verify(f.underlying, never()).trace(any[String])
  }

  test("Logging#trace enabled with message and cause") {
    val f = Fixture(_.isTraceEnabled, isEnabled = true)

    f.logger.trace(f.message, f.cause)
    verify(f.underlying).trace(f.message, f.cause)
  }

  test("Logging#trace not enabled with message and cause") {
    val f = Fixture(_.isTraceEnabled, isEnabled = false)

    f.logger.trace(f.message, f.cause)
    verify(f.underlying, never()).trace(any[String], any)
  }

  test("Logging#trace enabled with parameters") {
    val f = Fixture(_.isTraceEnabled, isEnabled = true)

    f.logger.traceWith(f.message, f.arg1)
    verify(f.underlying).trace(f.message, Seq(f.arg1): _*)
    f.logger.traceWith(f.message, f.arg1, f.arg2)
    verify(f.underlying).trace(f.message, Seq(f.arg1, f.arg2): _*)
    f.logger.traceWith(f.message, f.arg1, f.arg2, f.arg3)
    verify(f.underlying).trace(f.message, f.arg1, f.arg2, f.arg3)
  }

  test("Logging#trace not enabled with parameters") {
    val f = Fixture(_.isTraceEnabled, isEnabled = false)

    f.logger.traceWith(f.message, f.arg1)
    verify(f.underlying, never()).trace(f.message, Seq(f.arg1): _*)
    f.logger.traceWith(f.message, f.arg1, f.arg2)
    verify(f.underlying, never()).trace(f.message, Seq(f.arg1, f.arg2): _*)
    f.logger.traceWith(f.message, f.arg1, f.arg2, f.arg3)
    verify(f.underlying, never()).trace(f.message, f.arg1, f.arg2, f.arg3)
  }

  /* Debug */

  test("Logging#debug enabled") {
    val f = Fixture(_.isDebugEnabled, isEnabled = true)

    f.logger.debug(f.message)
    verify(f.underlying).debug(f.message)
  }

  test("Logging#debug not enabled") {
    val f = Fixture(_.isDebugEnabled, isEnabled = false)

    f.logger.debug(f.message)
    verify(f.underlying, never()).debug(any[String])
  }

  test("Logging#debug enabled with message and cause") {
    val f = Fixture(_.isDebugEnabled, isEnabled = true)

    f.logger.debug(f.message, f.cause)
    verify(f.underlying).debug(f.message, f.cause)
  }

  test("Logging#debug not enabled with message and cause") {
    val f = Fixture(_.isDebugEnabled, isEnabled = false)

    f.logger.debug(f.message, f.cause)
    verify(f.underlying, never()).debug(any[String], any)
  }

  test("Logging#debug enabled with parameters") {
    val f = Fixture(_.isDebugEnabled, isEnabled = true)

    f.logger.debugWith(f.message, f.arg1)
    verify(f.underlying).debug(f.message, Seq(f.arg1): _*)
    f.logger.debugWith(f.message, f.arg1, f.arg2)
    verify(f.underlying).debug(f.message, Seq(f.arg1, f.arg2): _*)
    f.logger.debugWith(f.message, f.arg1, f.arg2, f.arg3)
    verify(f.underlying).debug(f.message, f.arg1, f.arg2, f.arg3)
  }

  test("Logging#debug not enabled with parameters") {
    val f = Fixture(_.isDebugEnabled, isEnabled = false)

    f.logger.debugWith(f.message, f.arg1)
    verify(f.underlying, never()).debug(f.message, Seq(f.arg1): _*)
    f.logger.debugWith(f.message, f.arg1, f.arg2)
    verify(f.underlying, never()).debug(f.message, Seq(f.arg1, f.arg2): _*)
    f.logger.debugWith(f.message, f.arg1, f.arg2, f.arg3)
    verify(f.underlying, never()).debug(f.message, f.arg1, f.arg2, f.arg3)
  }

  /* Info */

  test("Logging#info enabled") {
    val f = Fixture(_.isInfoEnabled, isEnabled = true)

    f.logger.info(f.message)
    verify(f.underlying).info(f.message)
  }

  test("Logging#info not enabled") {
    val f = Fixture(_.isInfoEnabled, isEnabled = false)

    f.logger.info(f.message)
    verify(f.underlying, never()).info(any[String])
  }

  test("Logging#info enabled with message and cause") {
    val f = Fixture(_.isInfoEnabled, isEnabled = true)

    f.logger.info(f.message, f.cause)
    verify(f.underlying).info(f.message, f.cause)
  }

  test("Logging#info not enabled with message and cause") {
    val f = Fixture(_.isInfoEnabled, isEnabled = false)

    f.logger.info(f.message, f.cause)
    verify(f.underlying, never()).info(any[String], any)
  }

  test("Logging#info enabled with parameters") {
    val f = Fixture(_.isInfoEnabled, isEnabled = true)

    f.logger.infoWith(f.message, f.arg1)
    verify(f.underlying).info(f.message, Seq(f.arg1): _*)
    f.logger.infoWith(f.message, f.arg1, f.arg2)
    verify(f.underlying).info(f.message, Seq(f.arg1, f.arg2): _*)
    f.logger.infoWith(f.message, f.arg1, f.arg2, f.arg3)
    verify(f.underlying).info(f.message, f.arg1, f.arg2, f.arg3)
  }

  test("Logging#info not enabled with parameters") {
    val f = Fixture(_.isInfoEnabled, isEnabled = false)

    f.logger.infoWith(f.message, f.arg1)
    verify(f.underlying, never()).info(f.message, Seq(f.arg1): _*)
    f.logger.infoWith(f.message, f.arg1, f.arg2)
    verify(f.underlying, never()).info(f.message, Seq(f.arg1, f.arg2): _*)
    f.logger.infoWith(f.message, f.arg1, f.arg2, f.arg3)
    verify(f.underlying, never()).info(f.message, f.arg1, f.arg2, f.arg3)
  }

  /* Warn */

  test("Logging#warn enabled") {
    val f = Fixture(_.isWarnEnabled, isEnabled = true)

    f.logger.warn(f.message)
    verify(f.underlying).warn(f.message)
  }

  test("Logging#warn not enabled") {
    val f = Fixture(_.isWarnEnabled, isEnabled = false)

    f.logger.warn(f.message)
    verify(f.underlying, never()).warn(any[String])
  }

  test("Logging#warn enabled with message and cause") {
    val f = Fixture(_.isWarnEnabled, isEnabled = true)

    f.logger.warn(f.message, f.cause)
    verify(f.underlying).warn(f.message, f.cause)
  }

  test("Logging#warn not enabled with message and cause") {
    val f = Fixture(_.isWarnEnabled, isEnabled = false)

    f.logger.warn(f.message, f.cause)
    verify(f.underlying, never()).warn(any[String], any)
  }

  test("Logging#warn enabled with parameters") {
    val f = Fixture(_.isWarnEnabled, isEnabled = true)

    f.logger.warnWith(f.message, f.arg1)
    verify(f.underlying).warn(f.message, Seq(f.arg1): _*)
    f.logger.warnWith(f.message, f.arg1, f.arg2)
    verify(f.underlying).warn(f.message, Seq(f.arg1, f.arg2): _*)
    f.logger.warnWith(f.message, f.arg1, f.arg2, f.arg3)
    verify(f.underlying).warn(f.message, f.arg1, f.arg2, f.arg3)
  }

  test("Logging#warn not enabled with parameters") {
    val f = Fixture(_.isWarnEnabled, isEnabled = false)

    f.logger.warnWith(f.message, f.arg1)
    verify(f.underlying, never()).warn(f.message, Seq(f.arg1): _*)
    f.logger.warnWith(f.message, f.arg1, f.arg2)
    verify(f.underlying, never()).warn(f.message, Seq(f.arg1, f.arg2): _*)
    f.logger.warnWith(f.message, f.arg1, f.arg2, f.arg3)
    verify(f.underlying, never()).warn(f.message, f.arg1, f.arg2, f.arg3)
  }

  /* Error */

  test("Logging#error enabled") {
    val f = Fixture(_.isErrorEnabled, isEnabled = true)

    f.logger.error(f.message)
    verify(f.underlying).error(f.message)
  }

  test("Logging#error not enabled") {
    val f = Fixture(_.isErrorEnabled, isEnabled = false)

    f.logger.error(f.message)
    verify(f.underlying, never()).error(any[String])
  }

  test("Logging#error enabled with message and cause") {
    val f = Fixture(_.isErrorEnabled, isEnabled = true)

    f.logger.error(f.message, f.cause)
    verify(f.underlying).error(f.message, f.cause)
  }

  test("Logging#error not enabled with message and cause") {
    val f = Fixture(_.isErrorEnabled, isEnabled = false)

    f.logger.error(f.message, f.cause)
    verify(f.underlying, never()).error(any[String], any)
  }

  test("Logging#error enabled with parameters") {
    val f = Fixture(_.isErrorEnabled, isEnabled = true)

    f.logger.errorWith(f.message, f.arg1)
    verify(f.underlying).error(f.message, Seq(f.arg1): _*)
    f.logger.errorWith(f.message, f.arg1, f.arg2)
    verify(f.underlying).error(f.message, Seq(f.arg1, f.arg2): _*)
    f.logger.errorWith(f.message, f.arg1, f.arg2, f.arg3)
    verify(f.underlying).error(f.message, f.arg1, f.arg2, f.arg3)
  }

  test("Logging#error not enabled with parameters") {
    val f = Fixture(_.isErrorEnabled, isEnabled = false)

    f.logger.errorWith(f.message, f.arg1)
    verify(f.underlying, never()).error(f.message, Seq(f.arg1): _*)
    f.logger.errorWith(f.message, f.arg1, f.arg2)
    verify(f.underlying, never()).error(f.message, Seq(f.arg1, f.arg2): _*)
    f.logger.errorWith(f.message, f.arg1, f.arg2, f.arg3)
    verify(f.underlying, never()).error(f.message, f.arg1, f.arg2, f.arg3)
  }

  /* Instance Logging */

  test("Logging#case classes") {
    val o = CaseClassWithLogging(3.0, 4.5, 23.4)
    o.area
  }

  test("Logging#classes") {
    val item1 = new Item("product1", "A shiny widget", -2)
    val item2 = new Item("product2", "A less shiny widget", 25)

    item1.dimension
    item2.dimension

    item1.foo
    item2.foo

    item1.bar
    item2.bar

    val stock = new Stock("ASDF", 100.0)
    stock.quote

    ObjectWithLogging.interesting

    val fruit = new Fruit("apple", "red", 1.49)
    fruit.description
  }

  test("Logging#extended class extends Logging") {
    val item = new Item("product1", "A shiny widget", -2)
    val subItem = new ExtendedItem("product1 reissue", "Another shiny widget", 3)

    item.dimension
    subItem.dimension
  }

  test("Logging#Java class with new logger") {
    new TestJavaClass // INFO com.twitter.util.logging.TestJavaClass - Creating new TestJavaClass instance.

    val t = new TraitWithLogging {}
    t.myMethod1 // INFO com.twitter.util.logging.LoggingTest$$anon$1 - In myMethod1

    val je = new JavaExtension
    je.myMethod1 // INFO com.twitter.util.logging.JavaExtension - In myMethod1
    je.myMethod2() // INFO com.twitter.util.logging.JavaExtension - In myMethod2: using trait#info
    // INFO com.twitter.util.logging.JavaExtension - In myMethod2: using logger#info
    // INFO com.twitter.util.logging.JavaExtension - In myMethod2: using LOG#info
  }

  test("Logging#Java class that extends Scala class with Logging trait and new logger") {
    new Item("product1", "This is a great product", 3)
    new SecondItem("improved product1", "Another great product", 44, 3)
    new JavaItem("javaProduct1", "A shiny widget", 2, 11)
  }

  test("Logging#null values") {
    val logger = Logger(org.slf4j.LoggerFactory.getLogger(this.getClass))
    logger.info(null)
    val list = Nil
    logger.info(list.toString)
    logger.info(s"${Option(null)}")

    logger.error(null)
    logger.error(s"${Option(null)}")

    val clazz = CaseClassWithLogging(3.0, 4.0, 5.0)
    clazz.logNulls
  }

  test("Logger#class constructors") {
    val logger1 = Logger(classOf[TestSerializable])
    logger1.info("Logger1 name = " + logger1.name)

    val logger2 = Logger[TestSerializable]
    logger2.info("Logger2 name = " + logger2.name)

    val logger3 = Logger(new TestSerializable(5, 4).getClass)
    logger3.info("Logger3 name = " + logger3.name)

    val logger4 = Logger[Item] // has companion object
    logger4.info("Logger4 name = " + logger4.name)

    val logger5 = Logger(ObjectWithLogging.getClass) // object
    logger5.info("Logger5 name = " + logger5.name)
  }

  /* Private */
  private case class Fixture(
    isEnabledFn: org.slf4j.Logger => Boolean,
    isEnabled: Boolean) {
    val message = "msg"
    val cause = new RuntimeException("TEST EXCEPTION")
    val arg1 = "arg1"
    val arg2: Integer = Integer.valueOf(1)
    val arg3 = "arg3"
    val underlying: org.slf4j.Logger = mock[org.slf4j.Logger]
    when(isEnabledFn(underlying)).thenReturn(isEnabled)
    val logger: Logger = Logger(underlying)
  }
}


text:
using System;
using System.IO;
using MbUnit.Framework;
using Rhino.Commons.ForTesting;
using NHibernate;
using NHibernate.Cfg;

namespace Rhino.Commons.Test.ForTesting
{
    [TestFixture]
    public class NHibernateDatabaseTestFixtureBaseTests : DatabaseTestFixtureBaseTests
    {
        [Test]
        public void CanSwitchBetweenPersistentFrameworksWithinSameTest()
        {
            MappingInfo mappingInfo = MappingInfo.FromAssemblyContaining<AREntity>();

            InitializeNHibernateAndIoC(PersistenceFramework.NHibernate,
                                      NHibernateWindsorFilePath,
                                      DatabaseEngine.SQLite,
                                      "",
                                      mappingInfo);
            VerifyCanCreateUseAndDisposeUnitOfWork();

            InitializeNHibernateAndIoC(PersistenceFramework.ActiveRecord,
                                      ActiveRecordWindsorFilePath,
                                      DatabaseEngine.SQLite,
                                      "",
                                      mappingInfo);
            VerifyCanCreateUseAndDisposeUnitOfWork();
        }

        protected override PersistenceFramework FrameworkToTest
        {
            get { return PersistenceFramework.NHibernate; }
        }

        protected override string AnotherWindsorFilePath
        {
            get
            {
                return
                    Path.GetFullPath(
                        Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
                                     @"ForTesting\AnotherWindsor-NH.config"));
            }
        }

        protected override string WindsorFilePath
        {
            get
            {
                return
                    Path.GetFullPath(
                        Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
                                     @"ForTesting\Windsor-NH.config"));
            }
        }

		[Test]
		public void TestThatNHibernateInitializationAwareIsCalled()
		{
			NHInitAwareMock mock = new NHInitAwareMock();
			mock.ConfiguredWasCalled = 0;
			mock.InitializedWasCalled = 0;

			InitializeNHibernateAndIoC(FrameworkToTest, WindsorFilePath, DatabaseEngine.SQLite, ":memory:",
				MappingInfo.From().SetNHInitializationAware(mock));
			Assert.AreEqual(1, mock.BeforeInitializationCalled);
			Assert.AreEqual(1, mock.ConfiguredWasCalled);
			Assert.AreEqual(1, mock.InitializedWasCalled);
		}

		private class NHInitAwareMock : INHibernateInitializationAware
		{
			public int ConfiguredWasCalled;
			public int InitializedWasCalled;
			public int BeforeInitializationCalled;

			#region INHibernateInitializationAware Members

			public void BeforeInitialization()
			{
				BeforeInitializationCalled++;
			}

			public void Configured(Configuration cfg)
			{
				ConfiguredWasCalled++;
			}

			public void Initialized(Configuration cfg, ISessionFactory sessionFactory)
			{
				InitializedWasCalled++;
			}

			#endregion
		}
    }
}


text:
@implementation UICollectionViewFlowLayout (PMUtils)

- (BOOL) requiresScrollAnimationToIndexPath:(NSIndexPath *)indexPath atPosition:(UICollectionViewScrollPosition)scrollPosition
{
    NSParameterAssert(indexPath);

    UICollectionViewLayoutAttributes *attributes = [self layoutAttributesForItemAtIndexPath:indexPath];
    CGPoint itemOrigin = attributes.frame.origin;
    CGPoint contentOffset = self.collectionView.contentOffset;
    CGSize collectionViewBoundsSize = self.collectionView.bounds.size;
    CGPoint targetOffset = itemOrigin;

    switch (self.scrollDirection)
    {
        case UICollectionViewScrollDirectionHorizontal:
        {
            if (scrollPosition & UICollectionViewScrollPositionCenteredHorizontally) {

                targetOffset.x += collectionViewBoundsSize.width/2.0f;
            }
            else if (scrollPosition & UICollectionViewScrollPositionRight) {

                targetOffset.x += collectionViewBoundsSize.width - attributes.frame.size.width;
            }

            CGFloat maxOffset = self.collectionViewContentSize.width - collectionViewBoundsSize.width;
            CGFloat scrollDelta = targetOffset.x - contentOffset.x;

            BOOL endOfScroll = ((scrollDelta > 0.0f && contentOffset.x == maxOffset) ||
                                (scrollDelta < 0.0f && contentOffset.x == 0.0f));

            return (scrollDelta != 0.0f && !endOfScroll);
        }

        case UICollectionViewScrollDirectionVertical:
        {
            if (scrollPosition & UICollectionViewScrollPositionCenteredVertically) {

                targetOffset.y -= (collectionViewBoundsSize.height - attributes.frame.size.height)/2.0f;
            }
            else if (scrollPosition & UICollectionViewScrollPositionBottom) {

                targetOffset.y -= (collectionViewBoundsSize.height - attributes.frame.size.height);
            }

            CGFloat maxOffset = self.collectionViewContentSize.height - collectionViewBoundsSize.height;
            CGFloat scrollDelta = targetOffset.y - contentOffset.y;

            BOOL endOfScroll = ((scrollDelta > 0.0f && contentOffset.y == maxOffset) ||
                                (scrollDelta < 0.0f && contentOffset.y == 0.0f));

            return (scrollDelta != 0.0f && !endOfScroll);
        }
    }
}

@end


text:
package net.sf.fdshare;

import android.annotation.SuppressLint;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.res.AssetFileDescriptor;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Binder;
import android.os.Bundle;
import android.os.ParcelFileDescriptor;
import android.provider.MediaStore;
import android.provider.OpenableColumns;
import android.support.annotation.NonNull;
import android.support.v4.util.LruCache;
import android.text.TextUtils;
import android.util.Log;
import android.webkit.MimeTypeMap;
import com.j256.simplemagic.ContentInfo;
import com.j256.simplemagic.ContentInfoUtil;
import com.j256.simplemagic.ContentType;
import net.sf.mymodule.example.*;
import net.sf.mymodule.example.BuildConfig;
import org.w3c.dom.Text;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.Set;
import java.util.Timer;
import java.util.concurrent.Future;
import java.util.concurrent.atomic.AtomicReference;

/**
 * A base ContentProvider class, using libmagic mime database to detect real type of files.
 *
 * Uses time-based caching of file metadata.
 *
 * SimpleFileProvider and RootFileProvider are separated from this and each other, because security nature of
 * their permissions is completely different, and they don't have to always be used together that way.
 */
public abstract class BaseProvider extends ContentProvider {
    private static final MimeTypeMap map = MimeTypeMap.getSingleton();

    private final ContentInfoUtil mimeLib = new ContentInfoUtil();

    private final LruCache<String, TimestampedMime> fileTypeCache = new LruCache<>(7);

    private static class TimestampedMime {
        long size = -1;
        long when;
        String[] mime;
    }

    @Override
    public boolean onCreate() {
        return true;
    }

    @Override
    public final ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {
        return openDescriptor(uri.getPath(), mode, true);
    }

    @Override
    public String getType(Uri uri) {
        if (TextUtils.isEmpty(uri.getPath()))
            return null;

        final String forcedType = uri.getQueryParameter("type");
        if (!TextUtils.isEmpty(forcedType)) {
            return "null".equals(forcedType) ? null : forcedType;
        } else {
            final TimestampedMime guess = guessTypeInternal(uri.getPath());
            return guess.mime.length == 0 ? null : guess.mime[0];
        }
    }

    @Override
    public String[] getStreamTypes(Uri uri, String requestedType) {
        final String[] types = guessTypeInternal(uri.getPath()).mime;

        final ArrayList<String> acceptedTypes = new ArrayList<>();

        for (String type:types) {
            if (compareMimeTypes(type, requestedType))
                acceptedTypes.add(type);
        }

        return acceptedTypes.isEmpty() ? null : acceptedTypes.toArray(new String[acceptedTypes.size()]);
    }

    abstract ParcelFileDescriptor openDescriptor(String filePath, String mode, boolean secure) throws FileNotFoundException;

    @SuppressLint("NewApi")
    @NonNull TimestampedMime guessTypeInternal(String filePath) {
        final TimestampedMime cachedResult = fileTypeCache.get(filePath);

        if (cachedResult != null && System.nanoTime() - cachedResult.when > 2_000_000_000)
            return cachedResult;

        final Set<String> types = new LinkedHashSet<>();

        final TimestampedMime mime = new TimestampedMime();

        final String actualExtension = MimeTypeMap.getFileExtensionFromUrl(filePath);
        if (!TextUtils.isEmpty(actualExtension)) {
            final String extType = map.getMimeTypeFromExtension(actualExtension);
            if (!TextUtils.isEmpty(extType) && !"application/octet-stream".equals(extType))
                types.add(extType);

            final ContentType extType2 = ContentType.fromFileExtension(actualExtension);
            if (ContentType.OTHER != extType2)
                types.add(extType2.getMimeType());
        }

        try (ParcelFileDescriptor newFd = openDescriptor(filePath, "r", false);
             FileInputStream fs = new FileInputStream(newFd.getFileDescriptor()))
        {
            mime.size = newFd.getStatSize();

            final ContentInfo result;
            if (mime.size != 0 && (result = mimeLib.findMatch(fs)) != null) {
                final String detectedMime = result.getMimeType();

                if (!TextUtils.isEmpty(detectedMime) && !"application/octet-stream".equals(detectedMime))
                    types.add(detectedMime);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }

        if (types.isEmpty())
            types.add("application/octet-stream");

        mime.mime = types.toArray(new String[types.size()]);
        mime.when = System.nanoTime();

        fileTypeCache.put(filePath, mime);

        return mime;
    }

    static boolean compareMimeTypes(String concreteType, String desiredType) {
        final int typeLength = desiredType.length();
        if (typeLength == 3 && desiredType.equals("*/*")) {
            return true;
        }

        final int slashpos = desiredType.indexOf('/');
        if (slashpos > 0) {
            if (typeLength == slashpos+2 && desiredType.charAt(slashpos+1) == '*') {
                if (desiredType.regionMatches(0, concreteType, 0, slashpos+1)) {
                    return true;
                }
            } else if (desiredType.equals(concreteType)) {
                return true;
            }
        }

        return false;
    }

    @Override
    public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
        final String filePath = uri.getPath();
        if (TextUtils.isEmpty(filePath))
            throw new IllegalArgumentException("Empty path!");

        if (projection == null) {
            projection = new String[] {
                    MediaStore.MediaColumns.MIME_TYPE,
                    OpenableColumns.DISPLAY_NAME,
                    OpenableColumns.SIZE
            };
        }

        final MatrixCursor result = new MatrixCursor(projection);

        final TimestampedMime info = guessTypeInternal(filePath);

        final Object[] row = new Object[projection.length];
        for (int i = 0; i < projection.length; i++) {
            String projColumn = projection[i];

            if (TextUtils.isEmpty(projColumn))
                continue;

            switch (projColumn.toLowerCase()) {
                case OpenableColumns.DISPLAY_NAME:

                    row[i] = uri.getLastPathSegment();

                    break;
                case OpenableColumns.SIZE:

                    row[i] = info.size >= 0 ? info.size : null;

                    break;
                case MediaStore.MediaColumns.MIME_TYPE:

                    final String forcedType = uri.getQueryParameter("type");

                    if (!TextUtils.isEmpty(forcedType))
                        row[i] = "null".equals(forcedType) ? null : forcedType;
                    else
                        row[i] = info.mime[0];

                    break;
                case MediaStore.MediaColumns.DATA:
                    Log.w("BaseProvider", "Relying on MediaColumns.DATA is unreliable and must be avoided!");
                    row[i] = uri.getPath();
                    break;
            }
        }

        result.addRow(row);
        return result;
    }

    @Override
    public int delete(Uri uri, String selection, String[] selectionArgs) {
        return 0;
    }

    @Override
    public Uri insert(Uri uri, ContentValues values) {
        return null;
    }

    @Override
    public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
        return 0;
    }
}


text:
#include "caf/detail/dynamic_message_data.hpp"

#include "caf/error.hpp"
#include "caf/make_counted.hpp"

namespace caf {
namespace detail {

dynamic_message_data::dynamic_message_data() : type_token_(0xFFFFFFFF) {
  // nop
}

dynamic_message_data::dynamic_message_data(elements&& data)
    : elements_(std::move(data)),
      type_token_(0xFFFFFFFF) {
  for (auto& e : elements_)
    add_to_type_token(e->type().first);
}

dynamic_message_data::dynamic_message_data(const dynamic_message_data& other)
    : detail::message_data(other),
      type_token_(0xFFFFFFFF) {
  for (auto& e : other.elements_) {
    add_to_type_token(e->type().first);
    elements_.emplace_back(e->copy());
  }
}

dynamic_message_data::~dynamic_message_data() {
  // nop
}

message_data::cow_ptr dynamic_message_data::copy() const {
  return make_counted<dynamic_message_data>(*this);
}

void* dynamic_message_data::get_mutable(size_t pos) {
  CAF_ASSERT(pos < size());
  return elements_[pos]->get_mutable();
}

error dynamic_message_data::load(size_t pos, deserializer& source) {
  CAF_ASSERT(pos < size());
  return elements_[pos]->load(source);
}

size_t dynamic_message_data::size() const noexcept {
  return elements_.size();
}

uint32_t dynamic_message_data::type_token() const noexcept {
  return type_token_;
}

auto dynamic_message_data::type(size_t pos) const noexcept -> rtti_pair {
  CAF_ASSERT(pos < size());
  return elements_[pos]->type();
}

const void* dynamic_message_data::get(size_t pos) const noexcept {
  CAF_ASSERT(pos < size());
  return elements_[pos]->get();
}

std::string dynamic_message_data::stringify(size_t pos) const {
  CAF_ASSERT(pos < size());
  return elements_[pos]->stringify();
}

type_erased_value_ptr dynamic_message_data::copy(size_t pos) const {
  CAF_ASSERT(pos < size());
  return elements_[pos]->copy();
}

error dynamic_message_data::save(size_t pos, serializer& sink) const {
  CAF_ASSERT(pos < size());
  return elements_[pos]->save(sink);
}

void dynamic_message_data::clear() {
  elements_.clear();
  type_token_ = 0xFFFFFFFF;
}

void dynamic_message_data::append(type_erased_value_ptr x) {
  add_to_type_token(x->type().first);
  elements_.emplace_back(std::move(x));
}

void dynamic_message_data::add_to_type_token(uint16_t typenr) {
  type_token_ = (type_token_ << 6) | typenr;
}

} // namespace detail
} // namespace caf


text:
#include "PlDebugSupport.h"

IA32_IDT_GATE_DESCRIPTOR  NullDesc = {{0}};

/**
  Get Interrupt Handle from IDT Gate Descriptor.

  @param  IdtGateDescriptor  IDT Gate Descriptor.

  @return Interrupt Handle stored in IDT Gate Descriptor.

**/
UINTN
GetInterruptHandleFromIdt (
  IN IA32_IDT_GATE_DESCRIPTOR  *IdtGateDescriptor
  )
{
  UINTN      InterruptHandle;

  //
  // InterruptHandle  0-15 : OffsetLow
  // InterruptHandle 16-31 : OffsetHigh
  //
  ((UINT16 *) &InterruptHandle)[0] = (UINT16) IdtGateDescriptor->Bits.OffsetLow;
  ((UINT16 *) &InterruptHandle)[1] = (UINT16) IdtGateDescriptor->Bits.OffsetHigh;

  return InterruptHandle;
}

/**
  Allocate pool for a new IDT entry stub.

  Copy the generic stub into the new buffer and fixup the vector number
  and jump target address.

  @param  ExceptionType   This is the exception type that the new stub will be created
                          for.
  @param  Stub            On successful exit, *Stub contains the newly allocated entry stub.

**/
VOID
CreateEntryStub (
  IN EFI_EXCEPTION_TYPE     ExceptionType,
  OUT VOID                  **Stub
  )
{
  UINT8       *StubCopy;

  StubCopy = *Stub;

  //
  // Fixup the stub code for this vector
  //

  // The stub code looks like this:
  //
  //    00000000  89 25 00000004 R  mov     AppEsp, esp             ; save stack top
  //    00000006  BC 00008014 R     mov     esp, offset DbgStkBot   ; switch to debugger stack
  //    0000000B  6A 00             push    0                       ; push vector number - will be modified before installed
  //    0000000D  E9                db      0e9h                    ; jump rel32
  //    0000000E  00000000          dd      0                       ; fixed up to relative address of CommonIdtEntry
  //

  //
  // poke in the exception type so the second push pushes the exception type
  //
  StubCopy[0x0c] = (UINT8) ExceptionType;

  //
  // fixup the jump target to point to the common entry
  //
  *(UINT32 *) &StubCopy[0x0e] = (UINT32) CommonIdtEntry - (UINT32) &StubCopy[StubSize];

  return ;
}

/**
  This is the main worker function that manages the state of the interrupt
  handlers.  It both installs and uninstalls interrupt handlers based on the
  value of NewCallback.  If NewCallback is NULL, then uninstall is indicated.
  If NewCallback is non-NULL, then install is indicated.

  @param  NewCallback   If non-NULL, NewCallback specifies the new handler to register.
                        If NULL, specifies that the previously registered handler should
                        be uninstalled.
  @param  ExceptionType Indicates which entry to manage.

  @retval EFI_SUCCESS            Installing or Uninstalling operation is ok.
  @retval EFI_INVALID_PARAMETER  Requested uninstalling a handler from a vector that has
                                 no handler registered for it
  @retval EFI_ALREADY_STARTED    Requested install to a vector that already has a handler registered.

**/
EFI_STATUS
ManageIdtEntryTable (
  CALLBACK_FUNC      NewCallback,
  EFI_EXCEPTION_TYPE ExceptionType
  )
{
  EFI_STATUS  Status;

  Status = EFI_SUCCESS;

  if (CompareMem (&IdtEntryTable[ExceptionType].NewDesc, &NullDesc, sizeof (IA32_IDT_GATE_DESCRIPTOR)) != 0) {
    //
    // we've already installed to this vector
    //
    if (NewCallback != NULL) {
      //
      // if the input handler is non-null, error
      //
      Status = EFI_ALREADY_STARTED;
    } else {
      UnhookEntry (ExceptionType);
    }
  } else {
    //
    // no user handler installed on this vector
    //
    if (NewCallback == NULL) {
      //
      // if the input handler is null, error
      //
      Status = EFI_INVALID_PARAMETER;
    } else {
      HookEntry (ExceptionType, NewCallback);
    }
  }

  return Status;
}


text:
#ifndef Graphics_Graphics_Widgets_WidgetBuilders_H
#define Graphics_Graphics_Widgets_WidgetBuilders_H

#include <Graphics/Datatypes/GeometryImpl.h>
#include <Graphics/Widgets/Widget.h>
#include <Graphics/Widgets/share.h>

namespace SCIRun
{
  namespace Graphics
  {
    namespace Datatypes
    {
      template <class Derived>
      class CommonWidgetBuilder
      {
      public:
        explicit CommonWidgetBuilder(const Core::GeometryIDGenerator& g) : idGenerator_(g) {}
        Derived& tag(const std::string& t) { tag_ = t; return static_cast<Derived&>(*this); }
        Derived& scale(double s) { scale_ = s; return static_cast<Derived&>(*this); }
        Derived& defaultColor(const std::string& c) { defaultColor_ = c; return static_cast<Derived&>(*this); }
        Derived& origin(const Core::Geometry::Point& p) { origin_ = p; return static_cast<Derived&>(*this); }
        Derived& boundingBox(const Core::Geometry::BBox& b) { bbox_ = b; return static_cast<Derived&>(*this); }
        Derived& resolution(int r) { resolution_ = r; return static_cast<Derived&>(*this); }
      protected:
        const Core::GeometryIDGenerator& idGenerator_;
        std::string tag_;
        TransformMappingParams mapping_; //later
        double scale_ {0};
        std::string defaultColor_;
        Core::Geometry::Point origin_;
        Core::Geometry::BBox bbox_;
        int resolution_ {0};
      };

      class SCISHARE SphereWidgetBuilder : public CommonWidgetBuilder<SphereWidgetBuilder>
      {
      public:
        using CommonWidgetBuilder::CommonWidgetBuilder;
        SphereWidgetBuilder& centerPoint(const Core::Geometry::Point& c) { point_ = c; return *this; };
        WidgetHandle build() const;
      private:
        Core::Geometry::Point point_;
      };
    }
  }
}

#endif


text:
using namespace llvm;
using namespace llvm::pdb;
using namespace llvm::support;

namespace {
class StringTableBuilderTest : public ::testing::Test {};
}

TEST_F(StringTableBuilderTest, Simple) {
  // Create /names table contents.
  PDBStringTableBuilder Builder;

  // This test case is carefully constructed to ensure that at least one
  // string gets bucketed into slot 0, *and* to ensure that at least one
  // has a hash collision at the end of the bucket list so it has to
  // wrap around.
  uint32_t FooID = Builder.insert("foo");
  uint32_t BarID = Builder.insert("bar");
  uint32_t BazID = Builder.insert("baz");
  uint32_t BuzzID = Builder.insert("buzz");
  uint32_t BazzID = Builder.insert("bazz");
  uint32_t BarrID = Builder.insert("barr");

  // Re-inserting the same item should return the same id.
  EXPECT_EQ(FooID, Builder.insert("foo"));
  EXPECT_EQ(BarID, Builder.insert("bar"));
  EXPECT_EQ(BazID, Builder.insert("baz"));
  EXPECT_EQ(BuzzID, Builder.insert("buzz"));
  EXPECT_EQ(BazzID, Builder.insert("bazz"));
  EXPECT_EQ(BarrID, Builder.insert("barr"));

  // Each ID should be distinct.
  std::set<uint32_t> Distinct{FooID, BarID, BazID, BuzzID, BazzID, BarrID};
  EXPECT_EQ(6U, Distinct.size());

  std::vector<uint8_t> Buffer(Builder.calculateSerializedSize());
  MutableBinaryByteStream OutStream(Buffer, little);
  BinaryStreamWriter Writer(OutStream);
  EXPECT_THAT_ERROR(Builder.commit(Writer), Succeeded());

  // Reads the contents back.
  BinaryByteStream InStream(Buffer, little);
  BinaryStreamReader Reader(InStream);
  PDBStringTable Table;
  EXPECT_THAT_ERROR(Table.reload(Reader), Succeeded());

  EXPECT_EQ(6U, Table.getNameCount());
  EXPECT_EQ(1U, Table.getHashVersion());

  EXPECT_THAT_EXPECTED(Table.getStringForID(FooID), HasValue("foo"));
  EXPECT_THAT_EXPECTED(Table.getStringForID(BarID), HasValue("bar"));
  EXPECT_THAT_EXPECTED(Table.getStringForID(BazID), HasValue("baz"));
  EXPECT_THAT_EXPECTED(Table.getStringForID(BuzzID), HasValue("buzz"));
  EXPECT_THAT_EXPECTED(Table.getStringForID(BazzID), HasValue("bazz"));
  EXPECT_THAT_EXPECTED(Table.getStringForID(BarrID), HasValue("barr"));

  EXPECT_THAT_EXPECTED(Table.getIDForString("foo"), HasValue(FooID));
  EXPECT_THAT_EXPECTED(Table.getIDForString("bar"), HasValue(BarID));
  EXPECT_THAT_EXPECTED(Table.getIDForString("baz"), HasValue(BazID));
  EXPECT_THAT_EXPECTED(Table.getIDForString("buzz"), HasValue(BuzzID));
  EXPECT_THAT_EXPECTED(Table.getIDForString("bazz"), HasValue(BazzID));
  EXPECT_THAT_EXPECTED(Table.getIDForString("barr"), HasValue(BarrID));
}


text:
#ifndef _JAVASOFT_JNI_MD_H_
#define _JAVASOFT_JNI_MD_H_

#define JNIEXPORT __attribute__((visibility("default")))
#define JNIIMPORT
#define JNICALL

#if defined(__LP64__) && __LP64__ /* for -Wundef */
typedef int jint;
#else
typedef long jint;
#endif
typedef long long jlong;
typedef signed char jbyte;

#endif /* !_JAVASOFT_JNI_MD_H_ */


text:
Kategorie

<messages></messages>

 Vložit novou kategorii

V databázi není žádná kategorie.

 Koš


text:
export default function () {
  const application = arguments[1] || arguments[0];

  application.inject('service:path-inspector', 'router', 'router:main');
  application.inject('route', 'pathInspectorService', 'service:path-inspector');
  application.inject('controller', 'pathInspectorService', 'service:path-inspector');
}