text:
define([
  "config",
  "jquery",
  "backbone",
  "underscore",
  "models/event"
  ], function(Config, $, Backbone, _, Event) {
    var EventCollection = Backbone.Collection.extend({
      model: Event,

      sync: function(method, model, options) {
          var params = _.extend({
              type: 'GET',
              dataType: 'jsonp',
              url: Config.MeetupUrl,
              processData: false
          }, options);

          return $.ajax(params);
      },

      parse: function(response) {
        return _.first(response.results, 5);
      }
    });

    return EventCollection;
});


text:
<?php

/**
 * filter function.
 *
 * @package bingo-functional
 * @author Lochemem Bruno Michael
 * @license Apache-2.0
 */

namespace Chemem\Bingo\Functional;

use function Chemem\Bingo\Functional\Internal\_fold;

const filter = __NAMESPACE__ . '\\filter';

/**
 * filter
 * selects list values that conform to a boolean predicate
 *
 * filter :: (a -> Bool) -> [a] -> [a]
 *
 * @param callable $func
 * @param array|object $list
 * @return array|object
 * @example
 *
 * filter(fn ($x) => $x % 2 === 0, range(4, 8))
 * => [4, 6, 8]
 */
function filter(callable $func, $list)
{
  return _fold(function ($acc, $val, $idx) use ($func) {
    if (!$func($val)) {
      if (\is_object($acc)) {
        unset($acc->{$idx});
      } elseif (\is_array($acc)) {
        unset($acc[$idx]);
      }
    }

    return $acc;
  }, $list, $list);
}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Linq;
using QuantConnect.Data;
using QuantConnect.Data.Market;
using QuantConnect.Orders;
using QuantConnect.Interfaces;

namespace QuantConnect.Algorithm.CSharp
{
    /// <summary>
    /// This is an option split regression algorithm
    /// </summary>
    /// <meta name="tag" content="options" />
    /// <meta name="tag" content="regression test" />
    public class OptionRenameRegressionAlgorithm : QCAlgorithm, IRegressionAlgorithmDefinition
    {
        private Symbol _optionSymbol;

        public override void Initialize()
        {
            // this test opens position in the first day of trading, lives through stock rename (NWSA->FOXA), dividends, and closes adjusted position on the third day
            SetStartDate(2013, 06, 28);
            SetEndDate(2013, 07, 02);
            SetCash(1000000);

            var option = AddOption("TFCFA");
            _optionSymbol = option.Symbol;

            // set our strike/expiry filter for this option chain
            option.SetFilter(-1, +1, TimeSpan.Zero, TimeSpan.MaxValue);

            // use the underlying equity as the benchmark
            SetBenchmark("TFCFA");
        }

        /// <summary>
        /// Event - v3.0 DATA EVENT HANDLER: (Pattern) Basic template for user to override for receiving all subscription data in a single event
        /// </summary>
        /// <param name="slice">The current slice of data keyed by symbol string</param>
        public override void OnData(Slice slice)
        {
            foreach (var dividend in slice.Dividends.Values)
            {
                if (dividend.ReferencePrice != 32.6m || dividend.Distribution != 3.82m)
                {
                    throw new Exception($"{Time} - Invalid dividend {dividend}");
                }
            }
            if (!Portfolio.Invested)
            {
                if (Time.Day == 28 && Time.Hour > 9 && Time.Minute > 0)
                {
                    OptionChain chain;
                    if (slice.OptionChains.TryGetValue(_optionSymbol, out chain))
                    {
                        var contract =
                            chain.OrderBy(x => x.Expiry)
                            .Where(x => x.Right == OptionRight.Call && x.Strike == 33 && x.Expiry.Date == new DateTime(2013, 08, 17))
                            .FirstOrDefault();

                        if (contract != null)
                        {
                            // Buying option
                            Buy(contract.Symbol, 1);

                            // Buying the underlying stock
                            var underlyingSymbol = contract.Symbol.Underlying;
                            Buy(underlyingSymbol, 100);

                            // checks
                            if (contract.AskPrice != 1.1m)
                            {
                                throw new Exception("Regression test failed: current ask price was not loaded from NWSA backtest file and is not $1.1");
                            }
                        }
                    }
                }
            }
            else
            {
                if (Time.Day == 2 && Time.Hour > 14 && Time.Minute > 0)
                {
                    // selling positions
                    Liquidate();

                    // checks
                    OptionChain chain;
                    if (slice.OptionChains.TryGetValue(_optionSymbol, out chain))
                    {
                        var contract =
                            chain.OrderBy(x => x.Expiry)
                            .Where(x => x.Right == OptionRight.Call && x.Strike == 33 && x.Expiry.Date == new DateTime(2013, 08, 17))
                            .FirstOrDefault();

                        if (contract.BidPrice != 0.05m)
                        {
                            throw new Exception("Regression test failed: current bid price was not loaded from FOXA file and is not $0.05");
                        }
                    }
                }
            }
        }

        /// <summary>
        /// Order fill event handler. On an order fill update the resulting information is passed to this method.
        /// </summary>
        /// <param name="orderEvent">Order event details containing details of the evemts</param>
        /// <remarks>This method can be called asynchronously and so should only be used by seasoned C# experts. Ensure you use proper locks on thread-unsafe objects</remarks>
        public override void OnOrderEvent(OrderEvent orderEvent)
        {
            Log(orderEvent.ToString());
        }

        /// <summary>
        /// This is used by the regression test system to indicate if the open source Lean repository has the required data to run this algorithm.
        /// </summary>
        public bool CanRunLocally { get; } = true;

        /// <summary>
        /// This is used by the regression test system to indicate which languages this algorithm is written in.
        /// </summary>
        public Language[] Languages { get; } = { Language.CSharp, Language.Python };

        /// <summary>
        /// This is used by the regression test system to indicate what the expected statistics are from running the algorithm
        /// </summary>
        public Dictionary<string, string> ExpectedStatistics => new Dictionary<string, string>
        {
            {"Total Trades", "4"},
            {"Average Win", "0%"},
            {"Average Loss", "-0.02%"},
            {"Compounding Annual Return", "-0.492%"},
            {"Drawdown", "0.000%"},
            {"Expectancy", "-1"},
            {"Net Profit", "-0.006%"},
            {"Sharpe Ratio", "-3.94"},
            {"Probabilistic Sharpe Ratio", "0%"},
            {"Loss Rate", "100%"},
            {"Win Rate", "0%"},
            {"Profit-Loss Ratio", "0"},
            {"Alpha", "0"},
            {"Beta", "0"},
            {"Annual Standard Deviation", "0.002"},
            {"Annual Variance", "0"},
            {"Information Ratio", "-3.94"},
            {"Tracking Error", "0.002"},
            {"Treynor Ratio", "0"},
            {"Total Fees", "$4.00"},
            {"Estimated Strategy Capacity", "$760000.00"},
            {"Lowest Capacity Asset", "NWSA VJ5IKAXU7WBQ|NWSA T3MO1488O0H1"},
            {"Fitness Score", "0"},
            {"Kelly Criterion Estimate", "0"},
            {"Kelly Criterion Probability Value", "0"},
            {"Sortino Ratio", "79228162514264337593543950335"},
            {"Return Over Maximum Drawdown", "-2.801"},
            {"Portfolio Turnover", "0.001"},
            {"Total Insights Generated", "0"},
            {"Total Insights Closed", "0"},
            {"Total Insights Analysis Completed", "0"},
            {"Long Insight Count", "0"},
            {"Short Insight Count", "0"},
            {"Long/Short Ratio", "100%"},
            {"Estimated Monthly Alpha Value", "$0"},
            {"Total Accumulated Estimated Alpha Value", "$0"},
            {"Mean Population Estimated Insight Value", "$0"},
            {"Mean Population Direction", "0%"},
            {"Mean Population Magnitude", "0%"},
            {"Rolling Averaged Population Direction", "0%"},
            {"Rolling Averaged Population Magnitude", "0%"},
            {"OrderListHash", "9f441a1cf21e08f48d430a4a4e44ca4b"}
        };
    }
}


text:
var Alloy = require("alloy"), _ = Alloy._, Backbone = Alloy.Backbone;

var Helper = require("Helper");

var ANDROID = Helper.ANDROID;

var IPHONE = Helper.IPHONE;

var IPAD = Helper.IPAD;

var BLACKBERRY = Helper.BLACKBERRY;

Ti.API.warn(" Device: " + Helper.device);

Ti.API.warn(" Device: " + Helper.ANDROID);

Ti.API.warn(" Device: " + Helper.IPHONE);

Ti.API.warn(" Device: " + Helper.IPAD);

Ti.API.warn(" Device: " + Helper.BLACKBERRY);

var splashBackgroundImage;

var backgroundImage;

var bigButtonHeight;

var bigButtonWidth;

if (ANDROID) {
    splashBackgroundImage = "earth_space_android.png";
    backgroundImage = "background_android.png";
    bigButtonHeight = 100;
    bigButtonWidth = "80%";
}

if (IPHONE) {
    splashBackgroundImage = "earth_space_iphone.png";
    backgroundImage = "background_iphone.png";
    bigButtonHeight = 100;
    bigButtonWidth = "80%";
}

if (true === Helper.IPAD) {
    splashBackgroundImage = "earth_space_ipad.png";
    backgroundImage = "background_ipad.png";
    bigButtonHeight = 130;
    bigButtonWidth = 408;
}

if (BLACKBERRY) {
    splashBackgroundImage = "earth_space_blackberry.png";
    backgroundImage = "background_blackberry.png";
}

Ti.API.warn("iPad images being selecgted chosen background image !!! " + splashBackgroundImage);

Alloy.CFG.splashBackground = "/images/" + splashBackgroundImage;

Alloy.CFG.backgroundImage = "/images/" + backgroundImage;

Alloy.CFG.bigButtonHeight = bigButtonHeight;

Alloy.CFG.bigButtonWidth = bigButtonWidth;

Ti.API.warn(Alloy.CFG.splashBackground + " chosen background image");

Alloy.CFG.addButton = "#0060C0";

Alloy.CFG.bgBlue = "#0060C0";

Alloy.CFG.nextPassListPadding = 20;

Alloy.CFG.locationsListPadding = 14;

Alloy.CFG.cloudSliderTop = 40;

Alloy.CFG.weatherCheckTimeOffset = 15;

Alloy.createController("index");


text:
namespace FakeItEasy.Creation
{
    using System;
    using System.Collections.Generic;
    using System.Reflection.Emit;
    using FakeItEasy.Core;
    using FakeItEasy.Creation.DelegateProxies;

    internal class ProxyGeneratorSelector
        : IProxyGenerator
    {
        private readonly DelegateProxyGenerator delegateProxyGenerator;
        private readonly IProxyGenerator defaultProxyGenerator;

        public ProxyGeneratorSelector(DelegateProxyGenerator delegateProxyGenerator, IProxyGenerator defaultProxyGenerator)
        {
            this.delegateProxyGenerator = delegateProxyGenerator;
            this.defaultProxyGenerator = defaultProxyGenerator;
        }

        public ProxyGeneratorResult GenerateProxy(Type typeOfProxy, System.Collections.Generic.IEnumerable<Type> additionalInterfacesToImplement, System.Collections.Generic.IEnumerable<object> argumentsForConstructor, IFakeCallProcessorProvider fakeCallProcessorProvider)
        {
            var generator = this.SelectProxyGenerator(typeOfProxy);

            return generator.GenerateProxy(typeOfProxy, additionalInterfacesToImplement, argumentsForConstructor, fakeCallProcessorProvider);
        }

        public ProxyGeneratorResult GenerateProxy(Type typeOfProxy, IEnumerable<Type> additionalInterfacesToImplement, IEnumerable<object> argumentsForConstructor, IEnumerable<CustomAttributeBuilder> customAttributeBuilders, IFakeCallProcessorProvider fakeCallProcessorProvider)
        {
            var generator = this.SelectProxyGenerator(typeOfProxy);

            return generator.GenerateProxy(typeOfProxy, additionalInterfacesToImplement, argumentsForConstructor, customAttributeBuilders, fakeCallProcessorProvider);
        }

        public bool MethodCanBeInterceptedOnInstance(System.Reflection.MethodInfo method, object callTarget, out string failReason)
        {
            var generator = this.SelectProxyGenerator(callTarget == null ? null : callTarget.GetType());

            return generator.MethodCanBeInterceptedOnInstance(method, callTarget, out failReason);
        }

        private static bool IsDelegateType(Type typeOfProxy)
        {
            return typeOfProxy != null && typeOfProxy.IsSubclassOf(typeof(Delegate));
        }

        private IProxyGenerator SelectProxyGenerator(Type typeOfProxy)
        {
            return IsDelegateType(typeOfProxy) ? this.delegateProxyGenerator : this.defaultProxyGenerator;
        }
    }
}


text:
<?php

namespace App\Http\Requests\Alloys;

use Illuminate\Validation\Rule;
use \App\Http\Requests\FormRequest;
use \App\Models\Alloy;

class ListAlloys extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return ($this->isEmployeeLogged());
    }

    public function rules() {return [];}
}


text:
package org.apache.drill.exec.rpc.user.security;

import org.apache.drill.common.config.DrillConfig;
import org.apache.drill.exec.exception.DrillbitStartupException;
import org.apache.drill.exec.util.ImpersonationUtil;
import org.apache.hadoop.security.UserGroupInformation;

import java.io.IOException;

/*
 * Implement {@link org.apache.drill.exec.rpc.user.security.UserAuthenticator} for testing UserAuthenticator and
 * authentication of users from Java client to Drillbit.
 */
@UserAuthenticatorTemplate(type = UserAuthenticatorTestImpl.TYPE)
public class UserAuthenticatorTestImpl implements UserAuthenticator {
  public static final String TYPE = "drillTestAuthenticator";

  public static final String TEST_USER_1 = "testUser1";
  public static final String TEST_USER_2 = "testUser2";
  public static final String ADMIN_USER = "admin";
  public static final String PROCESS_USER = ImpersonationUtil.getProcessUserName();
  public static final String TEST_USER_1_PASSWORD = "testUser1Password";
  public static final String TEST_USER_2_PASSWORD = "testUser2Password";
  public static final String ADMIN_USER_PASSWORD = "adminUserPw";
  public static final String PROCESS_USER_PASSWORD = "processUserPw";

  public static final String ADMIN_GROUP = "admingrp";

  static {
    UserGroupInformation.createUserForTesting("testUser1", new String[]{"g1", ADMIN_GROUP});
    UserGroupInformation.createUserForTesting("testUser2", new String[]{ "g1" });
    UserGroupInformation.createUserForTesting("admin", new String[]{ ADMIN_GROUP });
  }

  @Override
  public void setup(DrillConfig drillConfig) throws DrillbitStartupException {
    // Nothing to setup.
  }

  @Override
  public void authenticate(String user, String password) throws UserAuthenticationException {

    if ("anonymous".equals(user)) {
      // Allow user "anonymous" for test framework to work.
      return;
    }

    if (!(TEST_USER_1.equals(user) && TEST_USER_1_PASSWORD.equals(password)) &&
        !(TEST_USER_2.equals(user) && TEST_USER_2_PASSWORD.equals(password)) &&
        !(ADMIN_USER.equals(user) && ADMIN_USER_PASSWORD.equals(password)) &&
        !(PROCESS_USER.equals(user) && PROCESS_USER_PASSWORD.equals(password))) {
      throw new UserAuthenticationException();
    }
  }

  @Override
  public void close() throws IOException {
    // Nothing to cleanup.
  }
}


text:
.class public Landroid/app/PackageInstallObserver;
.super Ljava/lang/Object;
.source "PackageInstallObserver.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/app/PackageInstallObserver$1;
    }
.end annotation

# instance fields
.field private final mBinder:Landroid/content/pm/IPackageInstallObserver2$Stub;

# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    new-instance v0, Landroid/app/PackageInstallObserver$1;

    invoke-direct {v0, p0}, Landroid/app/PackageInstallObserver$1;-><init>(Landroid/app/PackageInstallObserver;)V

    iput-object v0, p0, Landroid/app/PackageInstallObserver;->mBinder:Landroid/content/pm/IPackageInstallObserver2$Stub;

    return-void
.end method

# virtual methods
.method public getBinder()Landroid/content/pm/IPackageInstallObserver2;
    .locals 1

    iget-object v0, p0, Landroid/app/PackageInstallObserver;->mBinder:Landroid/content/pm/IPackageInstallObserver2$Stub;

    return-object v0
.end method

.method public onPackageInstalled(Ljava/lang/String;ILjava/lang/String;Landroid/os/Bundle;)V
    .locals 0

    return-void
.end method

.method public onUserActionRequired(Landroid/content/Intent;)V
    .locals 0

    return-void
.end method


text:
<?php
/**
 * If you're writing an addon, make sure you extend from this class.
 *
 * @since 1.1
 */
abstract class CampTix_Addon {
	public function __construct() {
		add_action( 'camptix_init', array( $this, 'camptix_init' ) );
	}
	public function camptix_init() {}
}

function camptix_register_addon( $classname ) {
	return $GLOBALS['camptix']->register_addon( $classname );
}


text:
/**
 * @fileOverview The [Language](https://ckeditor.com/cke4/addon/language) plugin.
 */

'use strict';

( function() {

	var allowedContent = 'span[!lang,!dir]',
		requiredContent = 'span[lang,dir]';

	CKEDITOR.plugins.add( 'language', {
		requires: 'menubutton',
		lang: 'ar,az,bg,ca,cs,cy,da,de,de-ch,el,en,en-au,en-gb,eo,es,es-mx,eu,fa,fi,fo,fr,gl,he,hr,hu,id,it,ja,km,ko,ku,nb,nl,no,oc,pl,pt,pt-br,ro,ru,sk,sl,sq,sv,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
		icons: 'language', // %REMOVE_LINE_CORE%
		hidpi: true, // %REMOVE_LINE_CORE%

		init: function( editor ) {
			var languagesConfigStrings = ( editor.config.language_list || [ 'ar:Arabic:rtl', 'fr:French', 'es:Spanish' ] ),
				plugin = this,
				lang = editor.lang.language,
				items = {},
				parts,
				curLanguageId, // 2-letter language identifier.
				languageButtonId, // Will store button namespaced identifier, like "language_en".
				i;

			// Registers command.
			editor.addCommand( 'language', {
				allowedContent: allowedContent,
				requiredContent: requiredContent,
				contextSensitive: true,
				exec: function( editor, languageId ) {
					var item = items[ 'language_' + languageId ];

					if ( item )
						editor[ item.style.checkActive( editor.elementPath(), editor ) ? 'removeStyle' : 'applyStyle' ]( item.style );
				},
				refresh: function( editor ) {
					this.setState( plugin.getCurrentLangElement( editor ) ?
						CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );
				}
			} );

			// Parse languagesConfigStrings, and create items entry for each lang.
			for ( i = 0; i < languagesConfigStrings.length; i++ ) {
				parts = languagesConfigStrings[ i ].split( ':' );
				curLanguageId = parts[ 0 ];
				languageButtonId = 'language_' + curLanguageId;

				items[ languageButtonId ] = {
					label: parts[ 1 ],
					langId: curLanguageId,
					group: 'language',
					order: i,
					// Tells if this language is left-to-right oriented (default: true).
					ltr: ( '' + parts[ 2 ] ).toLowerCase() != 'rtl',
					onClick: function() {
						editor.execCommand( 'language', this.langId );
					},
					role: 'menuitemcheckbox'
				};

				// Init style property.
				items[ languageButtonId ].style = new CKEDITOR.style( {
					element: 'span',
					attributes: {
						lang: curLanguageId,
						dir: items[ languageButtonId ].ltr ? 'ltr' : 'rtl'
					}
				} );
			}

			// Remove language indicator button.
			items.language_remove = {
				label: lang.remove,
				group: 'language_remove',
				state: CKEDITOR.TRISTATE_DISABLED,
				order: items.length,
				onClick: function() {
					var currentLanguagedElement = plugin.getCurrentLangElement( editor );

					if ( currentLanguagedElement )
						editor.execCommand( 'language', currentLanguagedElement.getAttribute( 'lang' ) );
				}
			};

			// Initialize groups for menu.
			editor.addMenuGroup( 'language', 1 );
			editor.addMenuGroup( 'language_remove' ); // Group order is skipped intentionally, it will be placed at the end.
			editor.addMenuItems( items );

			editor.ui.add( 'Language', CKEDITOR.UI_MENUBUTTON, {
				label: lang.button,
				// MenuButtons do not (yet) has toFeature method, so we cannot do this:
				// toFeature: function( editor ) { return editor.getCommand( 'language' ); }
				// Set feature's properties directly on button.
				allowedContent: allowedContent,
				requiredContent: requiredContent,
				toolbar: 'bidi,30',
				command: 'language',
				onMenu: function() {
					var activeItems = {},
						currentLanguagedElement = plugin.getCurrentLangElement( editor );

					for ( var prop in items )
						activeItems[ prop ] = CKEDITOR.TRISTATE_OFF;

					activeItems.language_remove = currentLanguagedElement ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED;

					if ( currentLanguagedElement )
						activeItems[ 'language_' + currentLanguagedElement.getAttribute( 'lang' ) ] = CKEDITOR.TRISTATE_ON;

					return activeItems;
				}
			} );

			// Prevent of removing `span` element with `lang` and `dir` attribute (#779).
			if ( editor.addRemoveFormatFilter ) {
				editor.addRemoveFormatFilter( function( element ) {
					return !( element.is( 'span' ) && element.getAttribute( 'dir' ) && element.getAttribute( 'lang' ) );
				} );
			}
		},

		// Gets the first language element for the current editor selection.
		// @param {CKEDITOR.editor} editor
		// @returns {CKEDITOR.dom.element} The language element, if any.
		getCurrentLangElement: function( editor ) {
			var elementPath = editor.elementPath(),
				activePath = elementPath && elementPath.elements,
				pathMember, ret;

			// IE8: upon initialization if there is no path elementPath() returns null.
			if ( elementPath ) {
				for ( var i = 0; i < activePath.length; i++ ) {
					pathMember = activePath[ i ];

					if ( !ret && pathMember.getName() == 'span' && pathMember.hasAttribute( 'dir' ) && pathMember.hasAttribute( 'lang' ) )
						ret = pathMember;
				}
			}

			return ret;
		}
	} );
} )();

/**
 * Specifies the list of languages available in the
 * [Language](https://ckeditor.com/cke4/addon/language) plugin. Each entry
 * should be a string in the following format:
 *
 *		<languageCode>:<languageLabel>[:<textDirection>]
 *
 * * _languageCode_: The language code used for the `lang` attribute in ISO 639 format.
 * 	Language codes can be found [here](http://www.loc.gov/standards/iso639-2/php/English_list.php).
 * 	You can use both 2-letter ISO-639-1 codes and 3-letter ISO-639-2 codes, though
 * 	for consistency it is recommended to stick to ISO-639-1 2-letter codes.
 * * _languageLabel_: The label to show for this language in the list.
 * * _textDirection_: (optional) One of the following values: `rtl` or `ltr`,
 * 	indicating the reading direction of the language. Defaults to `ltr`.
 *
 * See the [SDK sample](https://sdk.ckeditor.com/samples/language.html).
 *
 *		config.language_list = [ 'he:Hebrew:rtl', 'pt:Portuguese', 'de:German' ];
 *
 * @cfg {Array} [language_list = [ 'ar:Arabic:rtl', 'fr:French', 'es:Spanish' ]]
 * @member CKEDITOR.config
 */


text:
package shiver.me.timbers.waiting;

import shiver.me.timbers.waiting.factory.ClearWaitingExcludeFactory;
import shiver.me.timbers.waiting.factory.ClearWaitingExcludeMethodFactory;
import shiver.me.timbers.waiting.factory.WaitingDefaultsMethodFactory;
import shiver.me.timbers.waiting.factory.WaitingExcludeMethodFactory;

public abstract class AbstractITAspectWaiterExcludePropertyMethod extends AbstractITAspectWaiterExcludeProperty {

    @Override
    public WaitingDefaultsMethodFactory defaultsFactory() {
        return new WaitingDefaultsMethodFactory();
    }

    @Override
    public WaitingExcludeMethodFactory excludesFactory() {
        return new WaitingExcludeMethodFactory();
    }

    @Override
    public ClearWaitingExcludeFactory clearExcludesFactory() {
        return new ClearWaitingExcludeMethodFactory();
    }
}


text:
<?php //-->

class Eden_Twitter_Tests_Twitter_SuggestionsTest extends \PHPUnit_Framework_TestCase
{
    public function setUp()
    {
        $this->consumerKey = '';
        $this->consumerSecret = '';

        $this->accessToken = '';
        $this->accessSecret = '';

        $this->slug = '';
        $this->lang = null;
        $this->id = '';
        $this->count = '';
        $this->sinceId = '';
        $this->maxId = '';
    }

    public function testGetCategory()
    {
        $getCategory = eden('twitter')
            ->suggestions($this->consumerKey, $this->consumerSecret, $this->accessToken, $this->accessSecret)
            ->getCategory($this->slug, $this->lang);
        $this->assertArrayHasKey('id', $getCategory);
    }

    public function testGetFavorites()
    {
        $getFavorites = eden('twitter')
            ->suggestions($this->consumerKey, $this->consumerSecret, $this->accessToken, $this->accessSecret)
            ->getFavorites($this->id);
        $this->assertArrayHasKey('id', $getFavorites[0]);
    }

    public function testGetUserByStatus()
    {
        $getUserByStatus = eden('twitter')
            ->suggestions($this->consumerKey, $this->consumerSecret, $this->accessToken, $this->accessSecret)
            ->getUserByStatus($this->slug);
        $this->assertArrayHasKey('id', $getUserByStatus[0]);
    }

    public function testSetCount()
    {
        $count = eden('twitter')
            ->suggestions($this->consumerKey, $this->consumerSecret, $this->accessToken, $this->accessSecret)
            ->setCount($this->count);
        $this->assertObjectHasAttribute('query', $count);
    }

    public function testSetSinceId()
    {
        $since = eden('twitter')
            ->suggestions($this->consumerKey, $this->consumerSecret, $this->accessToken, $this->accessSecret)
            ->setSinceId($this->sinceId);
        $this->assertObjectHasAttribute('query', $since);
    }

    public function testSetMaxId()
    {
        $max = eden('twitter')
            ->suggestions($this->consumerKey, $this->consumerSecret, $this->accessToken, $this->accessSecret)
            ->setMaxId($this->maxId);
        $this->assertObjectHasAttribute('query', $max);
    }

    public function testIncludeEntities()
    {
        $entities = eden('twitter')
            ->suggestions($this->consumerKey, $this->consumerSecret, $this->accessToken, $this->accessSecret)
            ->includeEntities();
        $this->assertObjectHasAttribute('query', $entities);
    }
}


text:
var SchemaPlugin = require('./SchemaPlugin');
var lifeFlagEnum = require('./enums').LifeFlag;

var plugin = new SchemaPlugin({
    name: 'LifeFlag',
    prop: 'lFlg',
    type: {type: String, enum: lifeFlagEnum.values(), required: false},
    use: function(schema, options){
        //Add the property to schema
        var path = {};
        path[this.prop] = this.type;
        schema.add(path);

        //Add a save method's Preprocessor for LifeFlag auto-populating
        var prop = this.prop;
        schema.pre('save', function (next) {
            if(!this[prop]){
                this[prop] = lifeFlagEnum.Active;
            }
            next();
        });
    }
});

module.exports = plugin;


text:
module Elasticsearch
  module Resources
    module Configuration
      class Cluster < Settings
        def client
          @client ||= Elasticsearch::Client.new(host: host)
        end

        def indexes
          @indexes ||= default_indexes
        end

        def index(key)
          indexes[key.to_sym].tap do |t|
            yield(t) if block_given?
          end
        end

        def host
          @host ||= '127.0.0.1:9200'
        end

        def host=(host)
          raise NullHostError.new if host.nil?
          @host = host
        end

        class NullHostError < ArgumentError
          def initialize
            super(message)
          end

          def message
            I18n.t('elasticsearch.resources.configuration.cluster.null_host_error.message')
          end
        end

        protected

        def default_indexes
          {}
        end
      end
    end
  end
end


text:
@implementation SZLaborHour

@end


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

THREE.FilmPass = function ( noiseIntensity, scanlinesIntensity, scanlinesCount, grayscale ) {

	THREE.Pass.call( this );

	if ( THREE.FilmShader === undefined )
		console.error( "THREE.FilmPass relies on THREE.FilmShader" );

	var shader = THREE.FilmShader;

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

	this.material = new THREE.ShaderMaterial( {

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

	} );

	if ( grayscale !== undefined )	this.uniforms.grayscale.value = grayscale;
	if ( noiseIntensity !== undefined ) this.uniforms.nIntensity.value = noiseIntensity;
	if ( scanlinesIntensity !== undefined ) this.uniforms.sIntensity.value = scanlinesIntensity;
	if ( scanlinesCount !== undefined ) this.uniforms.sCount.value = scanlinesCount;

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

	this.quad = new THREE.Mesh( new THREE.PlaneBufferGeometry( 2, 2 ), null );
	this.quad.frustumCulled = false; // Avoid getting clipped
	this.scene.add( this.quad );

};

THREE.FilmPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), {

	constructor: THREE.FilmPass,

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

		this.uniforms[ "tDiffuse" ].value = readBuffer.texture;
		this.uniforms[ "time" ].value += delta;

		if ( this.renderToScreen ) {

			renderer.renderPass( this.material );

		} else {

			renderer.renderPass( this.material, writeBuffer, this.clear );

		}

	}

} );


text:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Magento_Backend::admin">
                <resource id="Magento_Backend::content">
                    <resource id="TCK_Blog::blog_content" title="Noticias" sortOrder="10" >
                        <resource id="TCK_Blog::post" title="Entradas" sortOrder="40">
                            <resource id="TCK_Blog::save" title="Guardar entrada" sortOrder="10" />
                            <resource id="TCK_Blog::post_delete" title="Eliminar entrada" sortOrder="20" />
                        </resource>
                    </resource>
                    <resource id="TCK_Blog::category" sortOrder="20" title="Categorias">
<!--                        <resource id="TCK_Blog::Category_save" sortOrder="10" title="Guardar Categoria"/>
                        <resource id="TCK_Blog::Category_delete" sortOrder="20" title="Eliminar Categoria"/>
                        <resource id="TCK_Blog::Category_update" sortOrder="30" title="Editar Categoria"/>
                        <resource id="TCK_Blog::Category_view" sortOrder="40" title="Ver Categoria"/>-->
                    </resource>
                </resource>
            </resource>
        </resources>
    </acl>
</config>


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.gdgssu.rowclient" >

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-feature android:name="android.hardware.type.watch" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@android:style/Theme.DeviceDefault" >

        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

        <activity
            android:name=".main.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".remote.RemoteActivity" >
        </activity>
    </application>

</manifest>


text:
package nayuki.huffmancoding;

import java.io.IOException;
import java.io.OutputStream;

/**
 * A stream where bits can be written to. Because they are written to an underlying byte stream, the end of the stream is padded with 0's up to a multiple of 8 bits. The bits are written in big endian.
 */
public final class BitOutputStream {

	// Underlying byte stream to write to.
	private OutputStream output;

	// The accumulated bits for the current byte. Always in the range 0x00 to 0xFF.
	private int currentByte;

	// The number of accumulated bits in the current byte. Always between 0 and 7 (inclusive).
	private int numBitsInCurrentByte;

	// Creates a bit output stream based on the given byte output stream.
	public BitOutputStream(OutputStream out) {
		if (out == null)
			throw new NullPointerException("Argument is null");
		output = out;
		currentByte = 0;
		numBitsInCurrentByte = 0;
	}

	// Writes a bit to the stream. The specified bit must be 0 or 1.
	public void write(int b) throws IOException {
		if (!(b == 0 || b == 1))
			throw new IllegalArgumentException("Argument must be 0 or 1");
		currentByte = currentByte << 1 | b;
		numBitsInCurrentByte++;
		if (numBitsInCurrentByte == 8) {
			output.write(currentByte);
			numBitsInCurrentByte = 0;
		}
	}

	// Closes this stream and the underlying OutputStream. If called when this bit stream is not at a byte boundary,
	// then the minimum number of "0" bits (between 0 and 7 of them) are written as padding to reach the next byte boundary.
	public void close() throws IOException {
		while (numBitsInCurrentByte != 0)
			write(0);
		output.close();
	}

}


text:
package com.foc.vaadin.gui.components.report;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Iterator;

import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.xml.sax.Attributes;

import com.foc.Globals;
import com.foc.dataWrapper.FocDataWrapper;
import com.foc.dataWrapper.FocListWrapper;
import com.foc.desc.FocDesc;
import com.foc.desc.FocObject;
import com.foc.list.FocList;
import com.foc.pivot.FPivotBreakdown;
import com.foc.pivot.FPivotRow;
import com.foc.pivot.FPivotRowNode;
import com.foc.pivot.FPivotRowTree;
import com.foc.pivot.FPivotTable;
import com.foc.shared.dataStore.IFocData;
import com.foc.tree.TreeScanner;
import com.foc.tree.objectTree.FObjectTree;
import com.foc.vaadin.gui.FocXMLGuiComponent;
import com.foc.vaadin.gui.FocXMLGuiComponentDelegate;
import com.foc.vaadin.gui.FocXMLGuiComponentStatic;
import com.foc.vaadin.gui.components.FVCheckBox;
import com.foc.vaadin.gui.components.FVTableColumn;
import com.foc.vaadin.gui.components.ITableTree;
import com.foc.vaadin.gui.components.TableTreeDelegate;
import com.foc.vaadin.gui.components.pivot.PivotChartDelegate;
import com.foc.vaadin.gui.layouts.FVVerticalLayout;
import com.foc.vaadin.gui.xmlForm.FXML;
import com.foc.vaadin.gui.xmlForm.FocXMLAttributes;
import com.foc.vaadin.gui.xmlForm.FocXMLLayout;
import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.ui.Field;

@SuppressWarnings("serial")
public class FVReport extends FVVerticalLayout implements FocXMLGuiComponent, ITableTree{

	private FocXMLGuiComponentDelegate delegate   = null;
	private PivotChartDelegate pivotChartDelegate = null;
	private FocListWrapper     focListWrapper     = null;
	private FPivotTable        pivotTable         = null;
	private FocXMLLayout       focXMLLayout       = null;
	private Attributes         attributes         = null;
	private HashMap<String, FVReportGroup> breakdownName_GroupHashMap  = null;

	public FVReport(Attributes attributes, FocXMLLayout focXMLLayout) {
		setFocXmlLayout(focXMLLayout);
		init(attributes);
	}

	private void init(Attributes attributes){
		delegate = new FocXMLGuiComponentDelegate(this);
		getPivotChartDelegate().init(attributes, this);
		setAttributes(attributes);
	}

	@Override
	public void dispose() {
		super.dispose();
		if(delegate != null){
			delegate.dispose();
			delegate = null;
		}
		focListWrapper = null;
		focXMLLayout   = null;
		if(pivotTable != null){
			pivotTable.dispose();
			pivotTable = null;
		}
		if(pivotChartDelegate != null){
			pivotChartDelegate.dispose();
			pivotChartDelegate = null;
		}
		attributes = null;
		if(breakdownName_GroupHashMap != null){
			Iterator<String> iterator = breakdownName_GroupHashMap.keySet().iterator();
			while(iterator.hasNext()){
				String breakdownName = iterator.next();
				FVReportGroup iReport_Group = breakdownName_GroupHashMap.get(breakdownName);
				if(iReport_Group != null){
					iReport_Group.dispose();
				}
			}
		}
	}

	public void setFocXmlLayout(FocXMLLayout focXMLLayout){
		this.focXMLLayout = focXMLLayout;
	}

	public FocXMLLayout getFocXmlLayout(){
		return focXMLLayout;
	}

	public void build(){
		getReportValues();
	}

	public FVReportGroup pushReportGroup(String breakdownName){
		FVReportGroup reportGroup = null;
		if(breakdownName != null && !breakdownName.isEmpty()){
			reportGroup = getBreakdownName_GroupHashMap(true).get(breakdownName);
			if(reportGroup == null){
				reportGroup = new FVReportGroup(this);
				getBreakdownName_GroupHashMap(true).put(breakdownName, reportGroup);
			}
		}
		return reportGroup;
	}

	public FVReportGroup newReportGroup(FocXMLAttributes xmlAttributes){
		FVReportGroup reportGroupHeader = null;
		if(xmlAttributes != null){
			String breakdownName = xmlAttributes.getValue(FXML.ATT_BREAKDOWN_NAME);
			if(breakdownName != null){
				reportGroupHeader = getBreakdownName_GroupHashMap(true).get(breakdownName);
				if(reportGroupHeader == null){
					reportGroupHeader = new FVReportGroup(this);

					getBreakdownName_GroupHashMap(true).put(breakdownName, reportGroupHeader);
				}
			}
		}
		return reportGroupHeader;
	}

	@Override
	public void setFocData(IFocData focData) {
		if(focData != null){
			if(focData instanceof FocList){
				setDataFocList((FocList) focData);
			}else if(focData instanceof FObjectTree){
				setDataFocList(((FObjectTree)focData).getFocList());
			}
      if(focData instanceof FocListWrapper){
        this.focListWrapper = (FocListWrapper) focData;
        FocList focList = ((FocListWrapper) focData).getFocListFiltered();
        setDataFocList(focList);
      }else if(focData instanceof FocList){
        FocList list = (FocList) focData;
        list.loadIfNotLoadedFromDB();
        this.focListWrapper = new FocListWrapper(list);
      }
    }else{
      this.focListWrapper = null;
    }
	}

	@Override
	public FVCheckBox getEditableCheckBox() {
		return null;
	}

	@Override
	public void setEditable(boolean editable) {
	}

	@Override
	public FocDesc getFocDesc() {
		return null;
	}

	@Override
	public FocList getFocList() {
		return (focListWrapper != null) ? focListWrapper.getFocList() : null;
	}

	@Override
	public FocDataWrapper getFocDataWrapper() {
		return focListWrapper;
	}

	@Override
	public void open(FocObject focObject) {
	}

	@Override
	public void delete(long ref) {
	}

	@Override
	public FVTableColumn addColumn(FocXMLAttributes attributes) {
		return getPivotChartDelegate().addColumn(attributes);
	}

	@Override
	public TableTreeDelegate getTableTreeDelegate() {
  	return null;
  }

	@Override
	public void applyFocListAsContainer() {
		getPivotChartDelegate().applyFocListAsContainer();
	}

	@Override
	public void computeFooter(FVTableColumn col) {
	}

	@Override
	public void refreshRowCache_Foc() {
	}

	@Override
	public void afterAddItem(FocObject fatherObject, FocObject newObject) {
	}

	@Override
	public boolean setRefreshGuiDisabled(boolean disabled) {
		return false;
	}

	@Override
	public String getXMLType() {
		return FXML.TAG_REPORT;
	}

	private void setDataFocList(FocList list){
		if(pivotTable == null){
			pivotTable = new FPivotTable(list);
		}else{
			pivotTable.dispose_Contents();
			pivotTable.setNativeDataFocList(list);
			pivotTable.init();
		}
	}

	public FPivotTable getPivotTable() {
		return pivotTable;
	}

	public PivotChartDelegate getPivotChartDelegate() {
    if(pivotChartDelegate == null){
    	pivotChartDelegate = new PivotChartDelegate();
    }
    return pivotChartDelegate;
  }

	@Override
	public FocXMLGuiComponentDelegate getDelegate() {
		return delegate;
	}

	@Override
	public IFocData getFocData() {
		return null;
	}

	@Override
	public Field getFormField() {
		return null;
	}

	@Override
	public boolean copyGuiToMemory() {
		return false;
	}

	@Override
	public void copyMemoryToGui() {
	}

	@Override
	public Attributes getAttributes() {
		return attributes;
	}

	@Override
	public void setAttributes(Attributes attributes) {
		this.attributes = attributes;
    FocXMLGuiComponentStatic.applyAttributes(this, attributes);
	}

	@Override
	public String getValueString() {
		return null;
	}

	@Override
	public void setValueString(String value) {
	}

	@Override
	public void setDelegate(FocXMLGuiComponentDelegate delegate) {
		this.delegate = delegate;
	}

	public FVReportGroup getReportGroup(String breakdownName){
		return getBreakdownName_GroupHashMap(false).get(breakdownName);
	}

	private HashMap<String, FVReportGroup> getBreakdownName_GroupHashMap(boolean create){
		if(breakdownName_GroupHashMap == null && create){
			breakdownName_GroupHashMap = new HashMap<String, FVReportGroup>();
		}
		return breakdownName_GroupHashMap;
	}

	private void getReportValues(){
		PivotChartDelegate pivotChartDelegate = getPivotChartDelegate();
		FPivotRowTree pivotRowTree  = pivotChartDelegate != null ? pivotChartDelegate.getFPivotRowTree() : null;
		FPivotTable   pivotTable    = pivotChartDelegate != null ? pivotChartDelegate.getFPivotTable()   : null;

		if(pivotTable != null && pivotRowTree != null){
			pivotRowTree.scan(new TreeScanner<FPivotRowNode>() {

				@Override
				public boolean beforChildren(FPivotRowNode node) {
					layoutBreakdownSection(node, true);
					return true;
				}

				@Override
				public void afterChildren(FPivotRowNode node) {
					layoutBreakdownSection(node, false);
				}

				public void layoutBreakdownSection(FPivotRowNode node, boolean header){
					FPivotRow pivotRow = node != null ? node.getObject() : null;
					if(pivotRow != null){
						FPivotBreakdown breakdown = pivotRow.getPivotBreakdownStart();
						HashMap<String, FVReportGroup> map = getBreakdownName_GroupHashMap(false);
						if(map != null && breakdown != null){
//							FVReportGroup repGroup = map.get(breakdown.getName());
							String groupByName = breakdown.getGroupBy();
							if(groupByName == null || groupByName.isEmpty()){
								groupByName = breakdown.getName();
							}
							FVReportGroup repGroup = map.get(groupByName);
							if(repGroup != null){
								String xmlString = header ? repGroup.getHeaderXML() : repGroup.getFooterXML();
								if(xmlString != null && !xmlString.isEmpty()){
//									Uncomment For Debug
									Globals.logString("Node Name = "+node.getTitle()+" breakdown ="+groupByName);
									Globals.logString("  -Parsing This Section:"+xmlString+"THE END");
									ByteArrayInputStream bais = new ByteArrayInputStream(xmlString.getBytes());
									FocXMLLayoutForReport layout = new FocXMLLayoutForReport(bais);
									layout.init(getWindow(), null, pivotRow);
									layout.parseXMLAndBuildGui();
									addComponent(layout);
								}
							}
						}
					}
				}
			});
		}
	}

	public class FocXMLLayoutForReport extends FocXMLLayout {

		private InputStream xmlInputStream = null;

		public FocXMLLayoutForReport(InputStream xmlInputStream){
			this.xmlInputStream = xmlInputStream;
		}

		public void dispose(){
			super.dispose();
			xmlInputStream = null;
		}

		@Override
		public void parseXMLAndBuildGui() {
			beforeLayoutConstruction();
			try{
				SAXParserFactory factory = SAXParserFactory.newInstance();
				SAXParser saxParser = factory.newSAXParser();
				saxParser.parse(xmlInputStream, new FocXMLHandler());
			}catch(Exception e){
				Globals.logException(e);
				goBack(null);
			}
			mapDataPath2ListenerAction_ApplyVisibilityFormulas();
			afterLayoutConstruction();
		}

	}

	@Override
	public FocObject getSelectedObject() {
		return null;
	}

	@Override
	public void setSelectedObject(FocObject selectedObject) {
	}

	@Override
	public void addItemClickListener(ItemClickListener itemClickListener) {

	}
}


text:
This file describes methods to access the columns and rows contained in the `DataFrame`. The `baseball_players` dataset
is used in all examples. You can load it using:

```julia
julia> filename = joinpath(Pkg.dir("JuliaCookbook"), "datasets", "baseball_players.tsv") # Locate the dataset
julia> df = readtable(filename; allowcomments=true)                                      # Read the DataFrame
```

## Listing out columns

A list of columns in the DataFrame can be obtained by running `names(DATAFRAME)`:

```julia
julia> names(df)
6-element Array{Symbol,1}:
 :Name
 :Team
 :Position
 :Height_inches_
 :Weight_pounds_
 :Age
 ```

 The data types contained in the columns can be list out using `eltypes(DATAFRAME)`:

 ```julia
 julia> eltypes(df)
 6-element Array{Type,1}:
 String
 String
 String
 Int64
 Int64
 Float64
 ```

## Selecting Columns

The `DataFrame` object behaves like a 2D array. Therefore, the first column (Name) can be extracted by simply running:
```julia
julia> df[1]
1034-element DataArrays.DataArray{String,1}:
 "Adam_Donachie"
 "Paul_Bako"
 "Ramon_Hernandez"
 "Kevin_Millar"
 "Chris_Gomez"
 ⋮
 "Brad_Thompson"
 "Tyler_Johnson"
 "Chris_Narveson"
 "Randy_Keisler"
 "Josh_Kinney"

```

Columns can also be extracted by specifying a column-name. The column-name is supplied using a Symbol.

```julia
julia> df[:Age]
1034-element DataArrays.DataArray{Float64,1}:
 22.99
 34.69
 30.78
 35.43
 35.71
  ⋮
 25.08
 25.73
 25.19
 31.01
 27.92
```

## Selecting Rows

The `DataFrame` object's 2D array behavior can be used to fetch rows, in a Sub-DataFrame.

```julia
julia> df[1:5, :]
5×6 DataFrames.DataFrame
│ Row │ Name              │ Team  │ Position        │ Height_inches_ │ Weight_pounds_ │ Age   │
├─────┼───────────────────┼───────┼─────────────────┼────────────────┼────────────────┼───────┤
│ 1   │ "Adam_Donachie"   │ "BAL" │ "Catcher"       │ 74             │ 180            │ 22.99 │
│ 2   │ "Paul_Bako"       │ "BAL" │ "Catcher"       │ 74             │ 215            │ 34.69 │
│ 3   │ "Ramon_Hernandez" │ "BAL" │ "Catcher"       │ 72             │ 210            │ 30.78 │
│ 4   │ "Kevin_Millar"    │ "BAL" │ "First_Baseman" │ 72             │ 210            │ 35.43 │
│ 5   │ "Chris_Gomez"     │ "BAL" │ "First_Baseman" │ 73             │ 188            │ 35.71 │
```

A subset of columns can also be fetched:

```julia
julia> df[1:5, [:Name, :Position, :Age]]
5×3 DataFrames.DataFrame
│ Row │ Name              │ Position        │ Age   │
├─────┼───────────────────┼─────────────────┼───────┤
│ 1   │ "Adam_Donachie"   │ "Catcher"       │ 22.99 │
│ 2   │ "Paul_Bako"       │ "Catcher"       │ 34.69 │
│ 3   │ "Ramon_Hernandez" │ "Catcher"       │ 30.78 │
│ 4   │ "Kevin_Millar"    │ "First_Baseman" │ 35.43 │
│ 5   │ "Chris_Gomez"     │ "First_Baseman" │ 35.71 │
```

## Null Values

Real world data samples are often incomplete, and therefore the `DataFrames` package uses the `NA` object to denote a null value, or the absence of data.

The `NA` objects poisons the data, and must be removed before any data analysis can be done. For example,
`Kirk_Saarloos`'s weight is missing in the dataset (Row 641). Therefore, it's not possible to calculate the mean weight
of baseball players until his data is removed.

```julia
julia> mean(df[:Weight_pounds_])         # Poisoned data
NA

julia> mean(dropna(df[:Weight_pounds_])) # Mean of un-poisoned data
201.6892545982575
```

Alternatively, the entire row containing `Kirk_Saarloos`'s data can be deleted.
```julia
deleterows!(df, 641)
```


text:
// ----------------------------------------------------------------------------
// Copyright 2006-2010, GeoTelematic Solutions, Inc.
// All rights reserved
// ----------------------------------------------------------------------------
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ----------------------------------------------------------------------------
// Change History:
//  2008/08/17  Martin D. Flynn
//     -Initial release
//  2009/04/02  Martin D. Flynn
//     -Added 'arg' parameter to 'sendDevicePing'
// ----------------------------------------------------------------------------
package org.opengts.db;

import java.lang.*;
import java.util.*;

import org.opengts.util.*;
import org.opengts.dbtools.*;
import org.opengts.db.tables.*;

public interface PingDispatcher
{

    // ------------------------------------------------------------------------

    /**
    *** Returns true if 'ping' is supported for the specified device
    *** @param device The device
    *** @return True if 'ping' is supported for the specified device
    **/
    public boolean isPingSupported(Device device);

    /**
    *** Sends a 'ping' notification to the specified Device
    *** @param device  The device to which the command is to be sent.
    *** @param cmdType The command type (DCServerConfig.COMMAND_*)
    *** @param cmdName The command name
    *** @param cmdArgs The argument to the "ping" command sent to the device.
    *** @return True if the 'ping' was sent successfully.
    **/
    public boolean sendDeviceCommand(Device device, String cmdType, String cmdName, String cmdArgs[]);

    // ------------------------------------------------------------------------

}


text:
INTERFACE mmcbr;

#
# Called by the mmcbus to setup the IO pins correctly, the voltage to use
# for the card, the type of selects, power modes and bus width.
#
METHOD int update_ios {
	device_t	brdev;
	device_t	reqdev;
};

#
# Called by the mmcbus or its children to schedule a mmc request.  These
# requests are queued.  Time passes.  The bridge then gets notification
# of the status of request, who then notifies the requesting device via
# the xfer_done mmcbus method.
#
METHOD int request {
	device_t	brdev;
	device_t	reqdev;
	struct mmc_request *req;
};

#
# Called by mmcbus to get the read only status bits.
#
METHOD int get_ro {
	device_t	brdev;
	device_t	reqdev;
};

#
# Claim the current bridge, blocking the current thread until the host
# is no longer busy.
#
METHOD int acquire_host {
	device_t	brdev;
	device_t	reqdev;
}

#
# Release the current bridge.
#
METHOD int release_host {
	device_t	brdev;
	device_t	reqdev;
}


text:
using System;

namespace Cvv.WebUtility.Mvc
{
    internal class Function
    {
        private string _methodName;
        private Object _dataObject;
        private Type _type;

        public Function(string methodName, Object dataObject)
        {
            _methodName = methodName;
            _dataObject = dataObject;
            _type = dataObject.GetType();
        }

        public Function(string methodName, Object dataObject, Type type)
        {
            _methodName = methodName;
            _dataObject = dataObject;
            _type = type;
        }

        public string MethodName
        {
            get { return _methodName; }
        }

        public Object DataObject
        {
            get { return _dataObject; }
        }

        public Type Type
        {
            get { return _type; }
        }
    }
}


text:
<config>
    <searches>

        <!-- in this case, we have a CSV (space delimited file) so we define the line once, and then reuse it over
        and again for each value -->
        <search id="QUERY-LINE"><![CDATA[\s*{ipAddress}\s+{numbers}\s+{numbers}\s+{numbers}\s+{numbers}\s+{numbers}\s+{numbersThenText}]]></search>

        <search id="inetInline"><![CDATA[{inet} {inet}]]></search>
        <search id="inet4"><![CDATA[inet.0:\s*{inet}]]></search>
        <search id="inet6"><![CDATA[inet6.0:\s*{inet}]]></search>
        <search id="inet"><![CDATA[{numbers}/{numbers}/{numbers}]]></search>

        <!-- Some rules for finding text, to make the values a little easier below -->
        <search id="numbers"><![CDATA[(\d+)]]></search>
        <search id="numbersThenText"><![CDATA[(\d+\S+)]]></search>
        <search id="string"><![CDATA[(\S+?)]]></search>
        <search id="ipAddress"><![CDATA[(\d+(\.\d+){3})]]></search>
        <search id="EOL"><![CDATA[[\n\r]]]></search>
    </searches>

    <!-- the record starts with a line with an ip address and ends with either an inet6 line, or where the ids are at
    the end of the line-->
    <delim retain="true">{ipAddress}.*(\/\d+)\s*{EOL}</delim>
    <delim>\s*({inet6})</delim>

    <!--
    This is the last line of the header
     -->
    <header-delim><![CDATA[Peer\s+AS\s+InPkt]]></header-delim>

    <!--
    Files look like this:

    10.247.68.182         65550     131725   28179233       0      11     6w3d17h Establ
      inet.0: 4/5/1
      inet6.0: 0/0/0

      or

    192.0.2.100           65551    1269381    1363320       0       1      9w5d6h 2/3/0 0/0/0
  -->
    <values>
        <!-- here we reuse the line pattern, only we pull out different group values -->
        <value id="remoteIp" group="1"><![CDATA[{QUERY-LINE}]]></value>
        <value id="uptime" group="8"><![CDATA[{QUERY-LINE}]]></value>

        <!-- here we check for values in the inet* lines and use these -->
        <value id="activeV4" group="1"><![CDATA[{inet4}]]></value>
        <value id="receivedV4" group="2"><![CDATA[{inet4}]]></value>
        <value id="accepted_V4" group="3"><![CDATA[{inet4}]]></value>

        <value id="activeV6" group="1"><![CDATA[{inet6}]]></value>
        <value id="receivedV6" group="2"><![CDATA[{inet6}]]></value>
        <value id="accepted_V6" group="3"><![CDATA[{inet6}]]></value>

        <!--
        here we check for values at the end of the query line, and use these
         NOTE: since we only set non-null values, these will not overwrite any values set above
        -->
        <value id="activeV4" group="9"><![CDATA[{QUERY-LINE}\s*{inetInline}]]></value>
        <value id="receivedV4" group="10"><![CDATA[{QUERY-LINE}\s*{inetInline}]]></value>
        <value id="accepted_V4" group="11"><![CDATA[{QUERY-LINE}\s*{inetInline}]]></value>
        <value id="activeV6" group="12"><![CDATA[{QUERY-LINE}\s*{inetInline}]]></value>
        <value id="receivedV6" group="13"><![CDATA[{QUERY-LINE}\s*{inetInline}]]></value>
        <value id="accepted_V6" group="14"><![CDATA[{QUERY-LINE}\s*{inetInline}]]></value>

    </values>
</config>


text:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">

  <title>Qt 4.3: QStandardItemEditorCreator Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />

  	Home · All Classes · Main Classes · Grouped Classes · Modules · Functions

QStandardItemEditorCreator Class Reference
[QtGui module]

The QStandardItemEditorCreator class provides the possibility to register widgets without having to subclass QItemEditorCreatorBase. More...

 #include <QStandardItemEditorCreator>

Inherits QItemEditorCreatorBase.

This class was introduced in Qt 4.2.

List of all members, including inherited members

Public Functions

QStandardItemEditorCreator ()

2 public functions inherited from QItemEditorCreatorBase

Detailed Description

The QStandardItemEditorCreator class provides the possibility to register widgets without having to subclass QItemEditorCreatorBase.

This convenience template class makes it possible to register widgets without having to subclass QItemEditorCreatorBase.

Example:

 QItemEditorFactory *editorFactory = new QItemEditorFactory;
 QItemEditorCreatorBase *creator = new QStandardItemEditorCreator<MyFancyDateTimeEdit>();
 editorFactory->registerEditor(QVariant::DateType, creator);

Setting the <tt>editorFactory</tt> created above in an item delegate via QItemDelegate::setItemEditorFactory() makes sure that all values of type QVariant::DateTime will be edited in <tt>MyFancyDateTimeEdit</tt>.

The editor must provide a user property that will contain the editing data. The property is used by QItemDelegates to set and retrieve the data (using Qt's meta-object system). You set the user property with the USER keyword:

     Q_PROPERTY(QColor color READ color WRITE setColor USER true)

See also QItemEditorCreatorBase, QItemEditorCreator, QItemEditorFactory, QItemDelegate, and Color Editor Factory Example.

Member Function Documentation

QStandardItemEditorCreator::QStandardItemEditorCreator ()

Constructs an editor creator object.

<address>

Copyright © 2008 Trolltech
Trademarks

Qt 4.3.5

</address>


text:
import './browser_sdk.js';

self.BrowserSDK = self.BrowserSDK || {};
BrowserSDK = BrowserSDK || {};


text:
<?php

namespace Opteck\Responses;

use Opteck\Exceptions\EmailAlreadyExistsException;
use Opteck\Payload;
use Opteck\Response;

class CreateLead extends Response
{
    const FIELD_LEAD_ID = 'leadID';

    const RETURN_CODE_EMAIL_ALREADY_EXISTS = 11;

    public function __construct(Payload $payload)
    {
        $this->data = $payload;
        if ($this->getReturnCode() == static::RETURN_CODE_EMAIL_ALREADY_EXISTS) {
            throw new EmailAlreadyExistsException($this, 'Email already exists');
        }
        parent::__construct($payload);
    }

    public function getLeadId()
    {
        return $this->data[static::FIELD_DATA][static::FIELD_LEAD_ID];
    }
}


text:
'use strict';

angular.module('classActApp')
  .controller('AboutCtrl', function ($scope, CONSTANTS, moment) {
    $scope.CONSTANTS = CONSTANTS;

    $scope.translationData = function() {
      return {
        APP_VERSION: CONSTANTS.APP_VERSION,
        APP_VERSION_DATE:moment(new Date(Date.parse(CONSTANTS.APP_VERSION_DATE))).format("LL")
      };
    }

  });


text:
An ASP.NET Core Tag Helper for [GitHub's Octicon](https://octicons.github.com/) icon set.

## Setup
1. Install via NuGet
```powershell
Install-Package Octicons.TagHelper
```
2. Add the tag helper to your view or `_ViewImports.cshtml` to access from any view.
```csharp
@addTagHelper *, Octicons.TagHelper
```

## Usage
To render a symbol, use the `<octicon>` tag.

# <img src="https://raw.githubusercontent.com/alex-gausman/Octicons.TagHelper/alpha/octicon-in-action.gif">

If you want to optimize your page size, use the sprite sheet tag helper.

1. Add this to your layout page
```html
<octicon-sprite-sheet></octicon-sprite-sheet>
````

2. Add attribute `use-sprite` to the octicon tag. This will reference the svg path in the sprite sheet
```html
<octicon symbol="Octoface" use-sprite></octicon>
```

You can go a step further and use the `<include>` tag to define only those icons that you actually use.
```html
<octicon-sprite-sheet>
    <include symbol="Lock"></include>
    <include symbol="Package"></include>
</octicon-sprite-sheet>
```
The above markup will create an svg tag with Lock and Package being the only icons on your page.


text:
require 'spec_helper'

describe AdditionalField, type: :model do

  describe 'Associations' do
    it { is_expected.to have_many(:additional_field_options).dependent(:destroy) }
  end

  describe 'Validations' do
    it { is_expected.to validate_presence_of(:name) }
    it { should validate_uniqueness_of(:name).case_insensitive}
    it { should allow_value('test', 'aghsfdhga123 wasd').for(:name)}
    it { should_not allow_value('test!@@#').for(:name).with_message(I18n.t('must_contain_only_letters_numbers_space'))}
    it { should accept_nested_attributes_for(:additional_field_options).allow_destroy(true) }
  end

end


text:
<?php

namespace ApplicationTest;

use Zend\Mvc\Application;
use Zend\Mvc\MvcEvent;
use Zend\Mvc\Service\ServiceManagerConfig;
use Zend\ServiceManager\ServiceManager;

class bootstrap {

    static $serviceManager;

    static function go() {
        // Make everything relative to the root
        chdir(dirname(__DIR__));

        // Setup autoloading
        require_once( __DIR__ . '/../init_autoloader.php' );

        // Run application
        $config = require('config/application.config.php');
        Application::init($config);

        $serviceManager = new ServiceManager(new ServiceManagerConfig());
        $serviceManager->setService('ApplicationConfig', $config);
        $serviceManager->get('ModuleManager')->loadModules();

        self::$serviceManager = $serviceManager;
    }

    static public function getServiceManager() {

        return self::$serviceManager;
    }

    public function onBootstrap(MvcEvent $e) {
        $sm = $e->getApplication()->getServiceManager();
        $e->getTarget()->getEventManager()->getSharedManager()
                ->attach('Admin', MvcEvent::EVENT_DISPATCH, function($e) use ($sm) {
                    $auth = $sm->get('AuthService');
                    $currentRouteName = $e->getRouteMatch()->getMatchedRouteName();
                    $allowed = array(
                        'admin/login',
                        'admin/',
                    );
                    if (in_array($currentRouteName, $allowed)) {
                        return;
                    }
                    if (!$auth->hasIdentity()) {
                        $url = $e->getRouter()->assemble(array(), array('name' => 'admin/login'));
                        $response = $e->getResponse();
                        $response->getHeaders()->addHeaderLine('Location', $url);
                        $response->setStatusCode(302);
                        $response->sendHeaders();
                    }
                });
    }

}

bootstrap::go();


text:
from __future__ import division

# I/O Libraries
from os import listdir
from os.path import isfile, join

# import local python files
from read_mnist_data_from_files import *
from Utilities import *

import numpy as np

__author__ = 'c.kormaris'

###############

class NNParams:
    num_input_nodes = 1000  # D: number of nodes in the input layers (aka: no of features)
    num_hidden_nodes = 3  # M: number of nodes in the hidden layer
    num_output_nodes = 2  # K: number of nodes in the output layer (aka: no of categories)
    # Gradient descent parameters
    eta = 0.001  # the learning rate of gradient descent
    reg_lambda = 0.01  # the regularization parameter

###############

# FUNCTIONS #

# Feed-Forward
def forward(X, W1, W2):
    s1 = X.dot(W1.T)  # s1: NxM
    o1 = np.tanh(s1)  # o1: NxM
    grad = tanh_output_to_derivative(o1)  # the gradient of tanh function, grad: NxM
    o1 = concat_ones_vector(o1)  # o1: NxM+1
    s2 = o1.dot(W2.T)  # s2: NxK
    o2 = sigmoid(s2)  # o2: NxK
    return s1, o1, grad, s2, o2

# Helper function to evaluate the total loss of the dataset
def loss_function(X, t, W1, W2):
    num_examples = len(X)  # N: training set size

    # Feed-Forward to calculate our predictions
    _, _, _, _, o2 = forward(X, W1, W2)

    # Calculating the mean square error loss
    squared_error = np.square(o2 - t)
    data_loss = np.sum(squared_error) / 2

    # Add regularization term to loss (optional)
    data_loss += NNParams.reg_lambda / 2 * (np.sum(np.square(W1)) + np.sum(np.square(W2)))
    return data_loss / num_examples  # divide by number of examples and return

def test(X, W1, W2):
    # Feed-Forward
    _, _, _, _, o2 = forward(X, W1, W2)
    return np.argmax(o2, axis=1)

# This function learns the parameter weights W1, W2 for the neural network and returns them.
# - iterations: Number of iterations through the training data for gradient descent.
# - print_loss: If True, print the loss.
def train(X, t, W1, W2, epochs=50, tol=1e-6, print_loss=False):

    # Run Stochastic Gradient Descent
    num_examples = X.shape[0]
    s_old = -np.inf
    for e in range(epochs):

        s = 0
        for i in range(num_examples):
            xi = np.matrix(X[i, :])
            ti = np.matrix(t[i, :])
            W1, W2, _, _ = gradient_descent(xi, ti, W1, W2)
            s = s + loss_function(xi, ti, W1, W2)

        # Optionally print the loss.
        if print_loss:
            print("Mean squared error loss after epoch %i: %f" % (e, loss_function(X, t, W1, W2)))

        if np.abs(s - s_old) <= tol:
            break

        s_old = s

    return W1, W2

# Update the Weight matrices using Gradient Descent
def gradient_descent(X, t, W1, W2):
    # W1: MxD+1 = num_hidden_nodes X_train num_of_features
    # W2: KxM+1 = num_of_categories X_train num_hidden_nodes

    # Feed-Forward
    _, o1, grad, _, o2 = forward(X, W1, W2)

    # Back-Propagation
    delta1 = o2 - t  # delta1: NxK
    W2_reduce = W2[np.ix_(np.arange(W2.shape[0]), np.arange(1, W2.shape[1]))]  # skip the first column of W2: KxM
    delta2 = np.dot(delta1, W2_reduce)  # delta2: NxM
    delta3 = np.multiply(delta2, grad)  # element-wise multiplication, delta3: NxM

    dW1 = np.dot(delta3.T, X)  # MxD+1
    dW2 = np.dot(delta1.T, o1)  # KxM+1

    # Add regularization terms
    dW1 = dW1 + NNParams.reg_lambda * W1
    dW2 = dW2 + NNParams.reg_lambda * W2

    # Update gradient descent parameters
    W1 = W1 - NNParams.eta * dW1
    W2 = W2 - NNParams.eta * dW2

    return W1, W2, dW1, dW2

# IT DOES NOT WORK CORRECTLY YET!
def gradient_check(X, t, W1, W2):
    _, _, gradEw1, gradEw2 = gradient_descent(X, t, W1, W2)
    epsilon = 1e-6

    # gradient_check for parameter W1
    numgradEw1 = np.zeros(W1.shape)
    for i in range(W1.shape[0]):
        for j in range(W1.shape[1]):
            W1tmp = W1
            W1tmp[i, j] = W1[i, j] + epsilon
            Ewplus = loss_function(X, t, W1tmp, W2)

            W1tmp = W1
            W1tmp[i, j] = W1[i, j] - epsilon
            Ewminus = loss_function(X, t, W1tmp, W2)

            numgradEw1[i, j] = (Ewplus - Ewminus) / (2 * epsilon)
    diff1 = np.linalg.norm(gradEw1 - numgradEw1) / np.linalg.norm(gradEw1 + numgradEw1)
    print('The maximum absolute norm for parameter W1, in the gradient_check is: ' + str(diff1))

    # gradient_check for parameter W2
    numgradEw2 = np.zeros(W2.shape)
    for i in range(W2.shape[0]):
        for j in range(W2.shape[1]):
            W2tmp = W2
            W2tmp[i, j] = W2[i, j] + epsilon
            Ewplus = loss_function(X, t, W1, W2tmp)

            W2tmp = W2
            W2tmp[i, j] = W2[i, j] - epsilon
            Ewminus = loss_function(X, t, W1, W2tmp)

            numgradEw2[i, j] = (Ewplus - Ewminus) / (2 * epsilon)
    diff2 = np.linalg.norm(gradEw2 - numgradEw2) / np.linalg.norm(gradEw2 + numgradEw2)
    print('The maximum absolute norm for parameter W2, in the gradient_check is: ' + str(diff2))

###############

# MAIN #

feature_dictionary_dir = "feature_dictionary.txt"

spam_train_dir = "./LingspamDataset/spam-train/"
ham_train_dir = "./LingspamDataset/nonspam-train/"
spam_test_dir = "./LingspamDataset/spam-test/"
ham_test_dir = "./LingspamDataset/nonspam-test/"

# read feature dictionary from file
feature_tokens = read_dictionary_file(feature_dictionary_dir)
NNParams.num_input_nodes = len(feature_tokens)

print("Reading TRAIN files...")
spam_train_files = sorted([f for f in listdir(spam_train_dir) if isfile(join(spam_train_dir, f))])
ham_train_files = sorted([f for f in listdir(ham_train_dir) if isfile(join(ham_train_dir, f))])
train_files = list(spam_train_files)
train_files.extend(ham_train_files)
train_labels = [1] * len(spam_train_files)
train_labels.extend([0] * len(ham_train_files))
X_train, y_train = get_classification_data(spam_train_dir, ham_train_dir, train_files, train_labels, feature_tokens, 'train')

print('')

print("Reading TEST files...")
spam_test_files = sorted([f for f in listdir(spam_test_dir) if isfile(join(spam_test_dir, f))])
ham_test_files = sorted([f for f in listdir(ham_test_dir) if isfile(join(ham_test_dir, f))])
test_files = list(spam_test_files)
test_files.extend(ham_test_files)
test_true_labels = [1] * len(spam_test_files)
test_true_labels.extend([0] * len(ham_test_files))
X_test, y_test_true = get_classification_data(spam_test_dir, ham_test_dir, test_files, test_true_labels, feature_tokens, 'test')

print('')

# normalize the data using mean normalization
X_train = X_train - np.mean(X_train)
X_test = X_test - np.mean(X_test)

# concat ones vector
X_train = concat_ones_vector(X_train)
X_test = concat_ones_vector(X_test)

# t_train: 1-hot matrix for the categories y_train
t_train = np.zeros((y_train.shape[0], NNParams.num_output_nodes))
t_train[np.arange(y_train.shape[0]), y_train] = 1

# Initialize the parameters to random values. We need to learn these.
np.random.seed(0)
W1 = np.random.randn(NNParams.num_hidden_nodes, NNParams.num_input_nodes) / np.sqrt(
    NNParams.num_input_nodes)  # W1: MxD
W2 = np.random.randn(NNParams.num_output_nodes, NNParams.num_hidden_nodes) / np.sqrt(
    NNParams.num_hidden_nodes)  # W2: KxM

# concat ones vector
W1 = concat_ones_vector(W1)  # W1: MxD+1
W2 = concat_ones_vector(W2)  # W2: KxM+1

# Do a gradient check first
# SKIP THIS PART FOR FASTER EXECUTION
'''
print('Running gradient check...')
ch = np.random.permutation(X_train.shape[0])
ch = ch[0:20]  # get the 20 first data
gradient_check(X_train[ch, :], t_train[ch, :], W1, W2)
'''

print('')

# train the Neural Network Model
W1, W2 = train(X_train, t_train, W1, W2, epochs=50, tol=1e-6, print_loss=True)

# test the Neural Network Model
predicted = test(X_test, W1, W2)

# check predictions
wrong_counter = 0  # the number of wrong classifications made by Logistic Regression
spam_counter = 0  # the number of spam files
ham_counter = 0  # the number of ham files
wrong_spam_counter = 0  # the number of spam files classified as ham
wrong_ham_counter = 0  # the number of ham files classified as spam

print('')
print('checking predictions...')
for i in range(len(predicted)):
    if predicted[i] == 1 and y_test_true[i] == 1:
        print("data" + str(i) + ' classified as: SPAM -> correct')
        spam_counter = spam_counter + 1
    elif predicted[i] == 1 and y_test_true[i] == 0:
        print("data" + str(i) + ' classified as: SPAM -> WRONG!')
        ham_counter = ham_counter + 1
        wrong_ham_counter = wrong_ham_counter + 1
        wrong_counter = wrong_counter + 1
    elif predicted[i] == 0 and y_test_true[i] == 1:
        print("data" + str(i) + ' classified as: HAM -> WRONG!')
        spam_counter = spam_counter + 1
        wrong_spam_counter = wrong_spam_counter + 1
        wrong_counter = wrong_counter + 1
    elif predicted[i] == 0 and y_test_true[i] == 0:
        print("data" + str(i) + ' classified as: HAM -> correct')
        ham_counter = ham_counter + 1

print('')

# Accuracy

accuracy = ((len(X_test) - wrong_counter) / len(X_test)) * 100
print("accuracy: " + str(accuracy) + " %")
print('')

# Calculate Precision-Recall

print("number of wrong classifications: " + str(wrong_counter) + ' out of ' + str(len(X_test)) + ' files')
print("number of wrong spam classifications: " + str(wrong_spam_counter) + ' out of ' + str(spam_counter) + ' spam files')
print("number of wrong ham classifications: " + str(wrong_ham_counter) + ' out of ' + str(ham_counter) + ' ham files')

print('')

spam_precision = (spam_counter - wrong_spam_counter) / (spam_counter - wrong_spam_counter + wrong_ham_counter)
print("precision for spam files: " + str(spam_precision))
ham_precision = (ham_counter - wrong_ham_counter) / (ham_counter - wrong_ham_counter + wrong_spam_counter)
print("precision for ham files: " + str(ham_precision))

spam_recall = (spam_counter - wrong_spam_counter) / spam_counter
print("recall for spam files: " + str(spam_recall))
ham_recall = (ham_counter - wrong_ham_counter) / ham_counter
print("recall for ham files: " + str(ham_recall))


text:
@implementation XVimArgumentEvaluator
@synthesize keyStroke = _keyStroke;

- (XVimEvaluator*)eval:(XVimKeyStroke*)keyStroke{
    self.keyStroke = keyStroke;
    return [self onArgumentProvided:keyStroke];
}

- (XVimEvaluator*)onArgumentProvided:(XVimKeyStroke*)key{
    return nil;
}

- (void)dealloc{
    self.keyStroke = nil;
    [super dealloc];
}

@end


text:
"use strict";
var timers;

module.exports = function(ecs, game) { // eslint-disable-line no-unused-vars
    ecs.addEach(function(entity) {
        timers = game.entities.get(entity, "timers");
        if (!timers.show_name.running && !timers.animate_name.running) {
            if (game.inputs.button("home")) {
                 game.switchScene("title");
            }
            if (game.inputs.button("credits")) {
                 game.switchScene("credits");
            }
            if (game.inputs.button("play")) {
                 game.switchScene("main");
            }
        }
    },"camera");
};


text:
import json
import subprocess

"""
Execute the given command and return the
output as a list of lines
"""
def command_output(cmd):
    output = []
    if (cmd):
        p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, \
                                 stderr=subprocess.STDOUT)
        for line in p.stdout.readlines():
            output.append(line.rstrip())
    return output

def output_to_dict(output_list):
    output_string = ""
    for line in output_list:
        output_string += line
    return json.loads(output_string)

def find_windows(tree_dict, window_list):
    if (tree_dict.has_key("nodes") and len(tree_dict["nodes"]) > 0):
        for node in tree_dict["nodes"]:
            find_windows(node, window_list)
    else:
        if (tree_dict["layout"] != "dockarea" and
            not tree_dict["name"].startswith("i3bar for output") and
            not tree_dict["window"] == None):
            window_list.append(tree_dict)

    return window_list

def main():
    output = command_output("i3-msg -t get_tree")
    tree = output_to_dict(output)
    window_list = find_windows(tree, [])

    next_index = -1
    for i in range(len(window_list)):
        if (window_list[i]["focused"] == True):
            next_index = i+1
            break

    # next_index = len(window_list)
    # for i in range(len(window_list)-1, -1, -1):
    #     if (window_list[i]["focused"] == True):
    #         next_index = i-1
    #         break

    next_id = 0;
    if next_index == -1 or next_index == len(window_list):
        next_id = window_list[0]["window"]
    else:
        next_id = window_list[next_index]["window"]

    print next_id

main()


text:
rm *.ipk
palm-package package application srv
palm-install *.ipk
#palm-launch -p "{mojoConfig: {debuggingEnabled:true}}" info.mobo.syncml


text:
### 1.5.1 Release Note

### Changes

- Ensure data-widget won't be empty
- Improve widget cache performance when widget have arguments
- Update out of date nuget package dependency


text:
This package is a set of module to build a backend.

```bash
$ composer require webup/laravel-helium dev-master
```

Install the [core](./src/Core/README.md) for a start,
then pick the module you wish.

- [contact](./src/Contact/README.md)
- [setting](./src/Setting/README.md)


text:
<html>
<body>

<!-- language=java and we check if implicit import works -->

true

</body>
</html>


text:
import {
  ArtifactCustomProperties,
  ArtifactProperties,
  ExecutionCustomProperties,
  ExecutionProperties,
} from './Api';
import { ArtifactTypeMap, ExecutionTypeMap } from './LineageApi';
import { Artifact, Execution, Value } from 'src/third_party/mlmd';
import { LineageTypedResource } from './LineageTypes';
import { Struct } from 'google-protobuf/google/protobuf/struct_pb';
import { ArtifactHelpers, ExecutionHelpers } from './MlmdUtils';

const ARTIFACT_FIELD_REPOS = [ArtifactProperties, ArtifactCustomProperties];
const EXECUTION_FIELD_REPOS = [ExecutionProperties, ExecutionCustomProperties];

type RepoType =
  | typeof ArtifactCustomProperties
  | typeof ArtifactProperties
  | typeof ExecutionCustomProperties
  | typeof ExecutionProperties;

export function getResourceProperty(
  resource: Artifact | Execution,
  propertyName: string,
  fromCustomProperties = false,
): string | number | Struct | null {
  const props = fromCustomProperties
    ? resource.getCustomPropertiesMap()
    : resource.getPropertiesMap();

  return (props && props.get(propertyName) && getMetadataValue(props.get(propertyName))) || null;
}

export function getResourcePropertyViaFallBack(
  res: Artifact | Execution,
  fieldRepos: RepoType[],
  fields: string[],
): string {
  const prop =
    fields.reduce(
      (value: string, field: string) =>
        value ||
        fieldRepos.reduce(
          (v: string, repo: RepoType, isCustomProp) =>
            v || // eslint-disable-next-line no-sequences
            ((field in repo && getResourceProperty(res, repo[field], !!isCustomProp)) as string),
          '',
        ),
      '',
    ) || '';
  return prop as string;
}

export function getResourceName(typedResource: LineageTypedResource): string {
  return typedResource.type === 'artifact'
    ? ArtifactHelpers.getName(typedResource.resource)
    : ExecutionHelpers.getName(typedResource.resource);
}

/**
 * Promisified sleep operation
 * @param t Time to sleep for in ms
 */
export const sleep = (t: number): Promise<void> => new Promise(res => setTimeout(res, t));

export function getResourceDescription(typedResource: LineageTypedResource): string {
  return getResourcePropertyViaFallBack(
    typedResource.resource,
    typedResource.type === 'artifact' ? ARTIFACT_FIELD_REPOS : EXECUTION_FIELD_REPOS,
    ['RUN_ID', 'RUN', 'PIPELINE_NAME', 'WORKSPACE'],
  );
}

export function getTypeName(typeId: number, artifactTypes: ArtifactTypeMap): string {
  return artifactTypes && artifactTypes.get(typeId!)
    ? artifactTypes.get(typeId!)!.getName()
    : String(typeId);
}

export function getExecutionTypeName(typeId: number, executionTypes: ExecutionTypeMap): string {
  return executionTypes && executionTypes.get(typeId!)
    ? executionTypes.get(typeId!)!.getName()
    : String(typeId);
}

export function getMetadataValue(value?: Value): string | number | Struct | undefined {
  if (!value) {
    return '';
  }

  switch (value.getValueCase()) {
    case Value.ValueCase.DOUBLE_VALUE:
      return value.getDoubleValue();
    case Value.ValueCase.INT_VALUE:
      return value.getIntValue();
    case Value.ValueCase.STRING_VALUE:
      return value.getStringValue();
    case Value.ValueCase.STRUCT_VALUE:
      return value.getStructValue();
    case Value.ValueCase.VALUE_NOT_SET:
      return '';
  }
}


text:
module TrustlyEngine
	class Result < ActiveRecord::Base
    include TrustlyEngine::Signature

    attr_accessible :signature, :uuid, :method, :order_id, :url

    belongs_to :request

    validates :signature, :presence => true
    validates :uuid, :presence => true
    validates :order_id, :presence => true
    validates :url, :presence => true
    validates :method, :presence => true
    validates :method, inclusion: { in: %w( Withdraw debit ApproveWithdrawal DenyWithdrawal),  message: "%{value} is not an accepted method." }

    after_initialize :set_defaults

    #validate :check_signature

    def check_signature(data)

      if !verify(self.method, self.uuid, data, self.signature)
        raise SecurityException
      end
    end

    def set_defaults

    	if self.new_record?

    		self.request = Request.find_by_uuid(self.uuid)
    		self.save(:validate => false)

    	end
    end

    def status

    end

    # Used to parse result from withdrawal approve and denied methods
    #def parse_result_json_rpc(result = nil)

      #self.order_id = result["result"]["data"]["orderid"]
      #self.signature = result["result"]["signature"]
      #self.method = request["result"]["method"]
      #self.result = result["result"]["data"]["result"]

      #check_signature(result["result"]["data"])

      #self.save

    #end

    # Used to respond when trustly sends notification
    def parse_json(request = nil)

      self.order_id = request["result"]["data"]["orderid"]
      self.url = request["result"]["data"]["url"]
      self.method = request["result"]["method"]

      self.signature = request["result"]["signature"]
      self.uuid = request["result"]["uuid"]

      self.save

    end
  end
end


text:
+++
weight = 11
draft = false
title = "Amberial"
slug = "amberial-2"
image = "https://img.itch.zone/aW1hZ2UvNjkxNjU4LzM4MTQwMDMucG5n/347x500/X3cE5k.png"
aliases = [
	"amberial-2"
]
category = "games"
items = ["Web game"]
synopsis = "Design & Development, own project"
externalUrl = "https://www.kongregate.com/games/oddgoo/amberial"
+++
First game I ever published! (and still the most popular one)

[Play it on Kongregate](http://www.kongregate.com/games/oddgoo/amberial)

[[gallery-grid
![](http://oddgoo.io.s3.amazonaws.com/covers/Amberial.jpg)
]]


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

namespace GoPro.Hero.Utilities
{
    public class M3U8Parser
    {
        private const string TARGET_DURATION = "#EXT-X-TARGETDURATION";
        private const string VERSION = "#EXT-X-VERSION";
        private const string ALLOW_CACHE = "#EXT-X-ALLOW-CACHE";
        private const string SEQUENCE = "#EXT-X-MEDIA-SEQUENCE";
        private const string INFO = "#EXTINF";

        private readonly Dictionary<string, string> _content = new Dictionary<string, string>();
        private readonly Queue<string> _files = new Queue<string>();

        public M3U8Parser(Stream stream)
        {
            using (var sr = new StreamReader(stream))
            {
                var line = string.Empty;
                do
                {
                    if (string.IsNullOrEmpty(line) || line.EndsWith(","))
                    {
                        line += sr.ReadLine();
                        continue;
                    }

                    if (line.StartsWith(INFO))
                        _files.Enqueue(line);
                    else
                    {
                        var split = line.Split(':');
                        _content.Add(split.First(), split.Last());
                    }

                    line = string.Empty;
                } while (!sr.EndOfStream || !string.IsNullOrEmpty(line));
            }
        }

        public string this[string key]
        {
            get { return _content.ContainsKey(key) ? _content[key] : null; }
        }

        public float TargetDuration
        {
            get { return GetValue<float>(TARGET_DURATION); }
        }

        public string Version
        {
            get { return GetValue<string>(VERSION); }
        }

        public bool AllowCache
        {
            get
            {
                var allowCache = this[ALLOW_CACHE];
                return allowCache != null && (allowCache == "YES");
            }
        }

        public int Sequence
        {
            get { return GetValue<int>(SEQUENCE); }
        }

        public string Dequeue()
        {
            return _files.Dequeue().Split(',').Last();
        }

        public IEnumerable<string> All()
        {
            return _files.Select(x => x.Split(',').Last());
        }

        private T GetValue<T>(string key)
        {
            return _content.ContainsKey(key) ? (T) Convert.ChangeType(_content[key], typeof (T), null) : default(T);
        }
    }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Class ComposedCommandBusinessValidator<T>
   </title>
    <meta name="viewport" content="width=device-width">
    <meta name="title" content="Class ComposedCommandBusinessValidator<T>
   ">
    <meta name="generator" content="docfx 2.9.3.0">

    <link rel="shortcut icon" href="../favicon.ico">
    <link rel="stylesheet" href="../styles/docfx.vendor.css">
    <link rel="stylesheet" href="../styles/docfx.css">
    <link rel="stylesheet" href="../styles/main.css">
    <meta property="docfx:navrel" content="../toc.html">
    <meta property="docfx:tocrel" content="toc.html">

              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                Toggle navigation

              </button>

              <form class="navbar-form navbar-right" role="search" id="search">

                  <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">

              </form>

          Show / Hide Table of Contents

Class ComposedCommandBusinessValidator<T>

Represents a command business validator that is constructed from discovered rules.

Inheritance

System.Object

FluentValidation.AbstractValidator<T>

BusinessValidator<T>

ComposedCommandBusinessValidator<T>

Inherited Members

                  BusinessValidator<T>.ModelRule()

                  BusinessValidator<T>.RuleForConcept<TProperty>(Expression<Func<T, TProperty>>)

                  BusinessValidator<T>.Validate(T)

                  BusinessValidator<T>.Validate(T, String)

                  FluentValidation.AbstractValidator<T>.FluentValidation.IValidator.Validate(System.Object)

                  FluentValidation.AbstractValidator<T>.FluentValidation.IValidator.ValidateAsync(System.Object, System.Threading.CancellationToken)

                  FluentValidation.AbstractValidator<T>.FluentValidation.IValidator.Validate(FluentValidation.ValidationContext)

                  FluentValidation.AbstractValidator<T>.FluentValidation.IValidator.ValidateAsync(FluentValidation.ValidationContext, System.Threading.CancellationToken)

                  FluentValidation.AbstractValidator<T>.ValidateAsync(T, System.Threading.CancellationToken)

                  FluentValidation.AbstractValidator<T>.Validate(FluentValidation.ValidationContext<T>)

                  FluentValidation.AbstractValidator<T>.ValidateAsync(FluentValidation.ValidationContext<T>, System.Threading.CancellationToken)

                  FluentValidation.AbstractValidator<T>.AddRule(FluentValidation.IValidationRule)

                  FluentValidation.AbstractValidator<T>.CreateDescriptor()

                  FluentValidation.AbstractValidator<T>.FluentValidation.IValidator.CanValidateInstancesOfType(System.Type)

                  FluentValidation.AbstractValidator<T>.RuleFor<TProperty>(System.Linq.Expressions.Expression<System.Func<T, TProperty>>)

                  FluentValidation.AbstractValidator<T>.RuleForEach<TProperty>(System.Linq.Expressions.Expression<System.Func<T, System.Collections.Generic.IEnumerable<TProperty>>>)

                  FluentValidation.AbstractValidator<T>.Custom(System.Func<T, FluentValidation.Results.ValidationFailure>)

                  FluentValidation.AbstractValidator<T>.Custom(System.Func<T, FluentValidation.ValidationContext<T>, FluentValidation.Results.ValidationFailure>)

                  FluentValidation.AbstractValidator<T>.CustomAsync(System.Func<T, System.Threading.Tasks.Task<FluentValidation.Results.ValidationFailure>>)

                  FluentValidation.AbstractValidator<T>.CustomAsync(System.Func<T, FluentValidation.ValidationContext<T>, System.Threading.CancellationToken, System.Threading.Tasks.Task<FluentValidation.Results.ValidationFailure>>)

                  FluentValidation.AbstractValidator<T>.RuleSet(System.String, System.Action)

                  FluentValidation.AbstractValidator<T>.When(System.Func<T, System.Boolean>, System.Action)

                  FluentValidation.AbstractValidator<T>.Unless(System.Func<T, System.Boolean>, System.Action)

                  FluentValidation.AbstractValidator<T>.WhenAsync(System.Func<T, System.Threading.Tasks.Task<System.Boolean>>, System.Action)

                  FluentValidation.AbstractValidator<T>.UnlessAsync(System.Func<T, System.Threading.Tasks.Task<System.Boolean>>, System.Action)

                  FluentValidation.AbstractValidator<T>.Include(FluentValidation.IValidator<T>)

                  FluentValidation.AbstractValidator<T>.GetEnumerator()

                  FluentValidation.AbstractValidator<T>.System.Collections.IEnumerable.GetEnumerator()

                  FluentValidation.AbstractValidator<T>.CascadeMode

                  System.Object.ToString()

                  System.Object.Equals(System.Object)

                  System.Object.Equals(System.Object, System.Object)

                  System.Object.ReferenceEquals(System.Object, System.Object)

                  System.Object.GetHashCode()

                  System.Object.GetType()

                  System.Object.MemberwiseClone()

Namespace:Bifrost.FluentValidation.Commands

Assembly:Bifrost.FluentValidation.dll

Syntax

public class ComposedCommandBusinessValidator<T> : BusinessValidator<T>, IValidator<T>, IEnumerable<IValidationRule>, IEnumerable, IValidateBusinessRules<T>, ICanValidate<T>, ICommandBusinessValidator, ICanValidate, IValidator, IConvention where T : class, ICommand

Type Parameters

                    Name
                    Description

                    T

Constructors

                |
                <a href="https://github.com/dolittle/bifrost/new/master/Source/Documentation/apispec/new?filename=Bifrost_FluentValidation_Commands_ComposedCommandBusinessValidator_1__ctor_System_Collections_Generic_IDictionary_System_Type_System_Collections_Generic_IEnumerable_FluentValidation_IValidator___.md&value=---%0Auid%3A%20Bifrost.FluentValidation.Commands.ComposedCommandBusinessValidator%601.%23ctor(System.Collections.Generic.IDictionary%7BSystem.Type%2CSystem.Collections.Generic.IEnumerable%7BFluentValidation.IValidator%7D%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

ComposedCommandBusinessValidator(IDictionary<Type, IEnumerable<IValidator>>)

Instantiates an Instance of a ComposedCommandBusinessValidator<T>.

Declaration

public ComposedCommandBusinessValidator(IDictionary<Type, IEnumerable<IValidator>> propertyTypesAndValidators)

Parameters

                    Type
                    Name
                    Description

                    System.Collections.Generic.IDictionary<System.Type, System.Collections.Generic.IEnumerable<FluentValidation.IValidator>>
                    propertyTypesAndValidators

A collection of dynamically discovered validators to use.

Methods

                |
                Improve this Doc

                View Source

              <h4 id="Bifrost_FluentValidation_Commands_ComposedCommandBusinessValidator_1_ValidateFor__0_" data-uid="Bifrost.FluentValidation.Commands.ComposedCommandBusinessValidator`1.ValidateFor(`0)">ValidateFor(T)

Declaration

public virtual IEnumerable<ValidationResult> ValidateFor(T command)

Parameters

                    Type
                    Name
                    Description

                    T
                    command

Returns

                    Type
                    Description

                    System.Collections.Generic.IEnumerable<ValidationResult>

Implements

ICanValidate<T>.ValidateFor(T)

                |
                <a href="https://github.com/dolittle/bifrost/new/master/Source/Documentation/apispec/new?filename=Bifrost_FluentValidation_Commands_ComposedCommandBusinessValidator_1_ValidateFor_Bifrost_Commands_ICommand_.md&value=---%0Auid%3A%20Bifrost.FluentValidation.Commands.ComposedCommandBusinessValidator%601.ValidateFor(Bifrost.Commands.ICommand)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

ValidateFor(ICommand)

Declaration

public IEnumerable<ValidationResult> ValidateFor(ICommand command)

Parameters

                    Type
                    Name
                    Description

                    ICommand
                    command

Returns

                    Type
                    Description

                    System.Collections.Generic.IEnumerable<ValidationResult>

Explicit Interface Implementations

                |
                <a href="https://github.com/dolittle/bifrost/new/master/Source/Documentation/apispec/new?filename=Bifrost_FluentValidation_Commands_ComposedCommandBusinessValidator_1_Bifrost_Validation_ICanValidate_ValidateFor_System_Object_.md&value=---%0Auid%3A%20Bifrost.FluentValidation.Commands.ComposedCommandBusinessValidator%601.Bifrost%23Validation%23ICanValidate%23ValidateFor(System.Object)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

ICanValidate.ValidateFor(Object)

Declaration

IEnumerable<ValidationResult> ICanValidate.ValidateFor(object target)

Parameters

                    Type
                    Name
                    Description

                    System.Object
                    target

Returns

                    Type
                    Description

                    System.Collections.Generic.IEnumerable<ValidationResult>

Implements

ICanValidate.ValidateFor(Object)

Extension Methods

                  ICanValidateExtensions.ValidateFor(ICanValidate, Object, String, Boolean)

                  AbstractValidatorExtensions.AddRuleForConcept<T, TProperty>(AbstractValidator<T>, Expression<Func<T, TProperty>>)

                  ConceptExtensions.IsConcept(Object)

                  ConceptExtensions.GetConceptValue(Object)

                  DynamicExtensions.AsExpandoObject(Object)

                  MethodCalls.CallGenericMethod<TOut, T, T1, T2, T3>(T, Expression<Func<T, Func<T1, T2, T3, TOut>>>, T1, T2, T3, Type[])

                  MethodCalls.CallGenericMethod<TOut, T, T1, T2>(T, Expression<Func<T, Func<T1, T2, TOut>>>, T1, T2, Type[])

                  MethodCalls.CallGenericMethod<TOut, T, T1>(T, Expression<Func<T, Func<T1, TOut>>>, T1, Type[])

                  MethodCalls.CallGenericMethod<TOut, T>(T, Expression<Func<T, Func<TOut>>>, Type[])

                  MethodCalls.Generics<T>(T)

                    Improve this Doc

                    View Source

              Back to top

            Copyright © 2008-2017 Dolittle


text:
using HedgeLib.Sets;
using System.Collections.Generic;
using System.IO;

namespace HedgeEdit
{
    public class GameEntry
    {
        // Variables/Constants
        public Dictionary<string, SetObjectType> ObjectTemplates =
            new Dictionary<string, SetObjectType>();

        public string ResourcesDir
        {
            get => Path.Combine(Program.StartupPath,
                Program.ResourcesPath, ShortName);
        }

        public string Name, ShortName;
        public float UnitMultiplier = 1;
    }
}


text:
package com.linkedin.metadata.builders.graph.relationship;

import com.linkedin.common.urn.DatasetUrn;
import com.linkedin.dataset.DatasetLineageType;
import com.linkedin.dataset.Upstream;
import com.linkedin.dataset.UpstreamArray;
import com.linkedin.dataset.UpstreamLineage;
import com.linkedin.metadata.builders.graph.GraphBuilder;
import com.linkedin.metadata.dao.internal.BaseGraphWriterDAO;
import com.linkedin.metadata.relationship.DownstreamOf;
import java.util.Arrays;
import java.util.List;
import org.testng.annotations.Test;

import static com.linkedin.metadata.testing.Urns.*;
import static com.linkedin.metadata.utils.TestUtils.*;
import static org.testng.Assert.*;

public class DownstreamOfBuilderFromUpstreamLineageTest {
  @Test
  public void testBuildRelationships() {
    DatasetUrn datasetSource = makeDatasetUrn("source");
    DatasetUrn datasetDest1 = makeDatasetUrn("dest1");
    DatasetUrn datasetDest2 = makeDatasetUrn("dest2");

    Upstream upstream1 = new Upstream()
        .setDataset(datasetDest1)
        .setType(DatasetLineageType.TRANSFORMED);
    Upstream upstream2 = new Upstream()
        .setDataset(datasetDest2)
        .setType(DatasetLineageType.COPY);
    UpstreamLineage upstreamLineage = new UpstreamLineage().setUpstreams(new UpstreamArray(Arrays.asList(upstream1, upstream2)));

    List<GraphBuilder.RelationshipUpdates> operations =
        new DownstreamOfBuilderFromUpstreamLineage().buildRelationships(datasetSource, upstreamLineage);

    assertEquals(operations.size(), 1);
    assertEquals(operations.get(0).getRelationships(),
        Arrays.asList(makeDownstreamOf(datasetSource, datasetDest1, DatasetLineageType.TRANSFORMED),
            makeDownstreamOf(datasetSource, datasetDest2, DatasetLineageType.COPY)));
    assertEquals(operations.get(0).getPreUpdateOperation(),
        BaseGraphWriterDAO.RemovalOption.REMOVE_ALL_EDGES_FROM_SOURCE);
  }

  private DownstreamOf makeDownstreamOf(DatasetUrn source, DatasetUrn destination,
      DatasetLineageType type) {
    return new DownstreamOf()
        .setSource(source)
        .setDestination(destination)
        .setType(type);
  }
}


text: export { default } from 'ember-ui-components/components/uic-button-group';