text:
/**
 * @author   Viacheslav Nogin
 * @created  11.09.12 10:30
 */
/*global define,require*/
define(['jquery', 'bluz', 'bluz.notify', 'bluz.tools', 'bluz.ajax', 'vendor/jquery.mjs.nestedSortable'], function ($, bluz, notify, tools) {
    "use strict";

    $(function () {
        function sortableInit() {
            $('.sortable').nestedSortable({
                handle: 'div',
                items: 'li',
                toleranceElement: '> div'
            });
        }

        sortableInit();

        $('.category-page-wrapper').on('change', '.select-tree select', function () {

            var $this= $(this);
            $.ajax({
                url: '/categories/tree',
                data: {
                    id: $this.val()
                },
                success: function (resp) {
                    $('.tree-wrapper').remove();
                    $('.tree-container').html($(resp).find('.tree-wrapper'));

                    sortableInit();
                }
            });

        }).on('click', '#save', function (e) {

            $('.sortable li').each(function (key, value) {
                $(this).attr('data-order', key);
            });

            var arraied = $('ol.sortable').nestedSortable('toArray', {startDepthCount: 0});

            $.ajax({
                url: 'categories/order',
                type: 'post',
                dataType: 'json',
                data: {
                    tree: JSON.stringify(arraied),
                    treeParent: $('.tree-header').attr('data-parent-id')
                }
            });
        });

        $('.tree-container').on('success.ajax.bluz', '.remove', function () {
            $(this).parent().parent().remove();
        }).on('success.ajax.bluz', '.remove-root', function () {
            var $list = $('.root-category-list');
                $list.find('[value=' + $list.val() + ']').remove();

            if ($list.children().length === 0) {
                $('.message-wrapper').children().remove();
                $('.message-wrapper').append('
There are no categories
');
            }

            $list.trigger('change');
        });

        $('body').on('success.form.bluz', '.category-edit', function () {
            $.ajax({
                url: '/categories/tree',
                data: {
                    id: $('.select-tree select').val()
                },
                success: function (resp) {
                    $('.tree-wrapper').remove();
                    $('.tree-container').html($(resp).find('.tree-wrapper'));

                    sortableInit();
                }
            });
        }).on('success.form.bluz', '.category-form', function (e) {
            $.ajax({
                url: '/categories/tree',
                success: function (resp) {
                    $('.category-page-wrapper').html($(resp).children().unwrap());
                    sortableInit();
                }
            });
        }).on('success.form.bluz', '.add-child', function () {
            $.ajax({
                url: '/categories/tree',
                data: {
                    id: $('.select-tree select').val()
                },
                success: function () {
                    $('.root-category-list').trigger('change');
                    sortableInit();
                }
            });
            return false;
        }).on('blur', '#name', function () {
            var $alias = $("#alias");
            if ($alias.val() === "") {
                var title = tools.alias($(this).val());
                $alias.val(title);
            }
        });

    });

    return {};
});


text:
ExceptionNotifier.exception_recipients = %w(admins@example.com)
ExceptionNotifier.sender_address = %("Production Site" <errors@example.com>)

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Linq;
using StructureMap.Graph;
using StructureMap.Pipeline;

namespace StructureMap
{
    public class RootInstanceGraph : IInstanceGraph
    {
        private readonly PluginGraph _pluginGraph;

        public RootInstanceGraph(PluginGraph pluginGraph)
        {
            _pluginGraph = pluginGraph;
        }

        public Instance GetDefault(Type pluginType)
        {
            return _pluginGraph.Families[pluginType].GetDefaultInstance();
        }

        public bool HasDefaultForPluginType(Type pluginType)
        {
            return _pluginGraph.HasDefaultForPluginType(pluginType);
        }

        public bool HasInstance(Type pluginType, string instanceKey)
        {
            return _pluginGraph.HasInstance(pluginType, instanceKey);
        }

        public void EachInstance(Action<Type, Instance> action)
        {
            _pluginGraph.EachInstance(action);
        }

        public IEnumerable<Instance> GetAllInstances()
        {
            return _pluginGraph.Families.SelectMany(x => x.Instances);
        }

        public IEnumerable<Instance> GetAllInstances(Type pluginType)
        {
            return _pluginGraph.AllInstances(pluginType);
        }

        public Instance FindInstance(Type pluginType, string name)
        {
            return _pluginGraph.FindInstance(pluginType, name);
        }

        public IEnumerable<PluginFamily> UniqueFamilies()
        {
            return _pluginGraph.Families;
        }

        public ILifecycle DefaultLifecycleFor(Type pluginType)
        {
            if (pluginType == null) return null;

            if (!_pluginGraph.HasFamily(pluginType)) return null;

            return _pluginGraph.Families[pluginType].Lifecycle;
        }

        public ContainerRole Role
        {
            get { return ContainerRole.Root; }
        }

        public IEnumerable<Instance> ImmediateInstances()
        {
            return GetAllInstances();
        }
    }
}


text:
package org.ehcache.internal.store;

import org.ehcache.config.Eviction;
import org.ehcache.exceptions.CacheAccessException;
import org.ehcache.spi.cache.Store;
import org.ehcache.spi.test.After;
import org.ehcache.spi.test.LegalSPITesterException;
import org.ehcache.spi.test.SPITest;

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

/**
 * Test the {@link org.ehcache.spi.cache.Store#containsKey(Object)} contract of the
 * {@link org.ehcache.spi.cache.Store Store} interface.
 * <p/>
 *
 * @author Aurelien Broszniowski
 */

public class StoreContainsKeyTest<K, V> extends SPIStoreTester<K, V> {

  public StoreContainsKeyTest(final StoreFactory<K, V> factory) {
    super(factory);
  }

  protected Store<K, V> kvStore;
  protected Store kvStore2;

  @After
  public void tearDown() {
    if (kvStore != null) {
//      kvStore.close();
      kvStore = null;
    }
    if (kvStore2 != null) {
//      kvStore2.close();
      kvStore2 = null;
    }
  }

  @SPITest
  public void storeContainsKey()
      throws IllegalAccessException, InstantiationException, CacheAccessException, LegalSPITesterException {
    kvStore = factory.newStoreWithEvictionVeto(Eviction.<K, V>all());

    K key = factory.createKey(1);
    V value = factory.createValue(1);

    kvStore.put(key, value);

    try {
      assertThat(kvStore.containsKey(key), is(true));
    } catch (CacheAccessException e) {
      throw new LegalSPITesterException("Warning, an exception is thrown due to the SPI test");
    }
  }

  @SPITest
  public void nullKeyThrowsException()
      throws IllegalAccessException, InstantiationException, LegalSPITesterException {
    kvStore = factory.newStore();

    K key = null;

    try {
      kvStore.containsKey(key);
      throw new AssertionError("Expected NullPointerException because the key is null");
    } catch (NullPointerException e) {
      // expected
    } catch (CacheAccessException e) {
      throw new LegalSPITesterException("Warning, an exception is thrown due to the SPI test");
    }
  }

  @SPITest
  @SuppressWarnings({ "unchecked", "rawtypes" })
  public void wrongKeyTypeThrowsException()
      throws IllegalAccessException, InstantiationException, LegalSPITesterException {
    kvStore2 = factory.newStore();

    try {
      if (this.factory.getKeyType() == String.class) {
        kvStore2.containsKey(1.0f);
      } else {
        kvStore2.containsKey("key");
      }
      throw new AssertionError("Expected ClassCastException because the key is of the wrong type");
    } catch (ClassCastException e) {
      // expected
    } catch (CacheAccessException e) {
      throw new LegalSPITesterException("Warning, an exception is thrown due to the SPI test");
    }
  }
}


text:
namespace Chemicals.MongoData.MongoDb
{
    using System.Collections.Generic;

    using Models;
    using MongoDB.Driver;

    public class MongoExporter
    {
        private const string TradersCollectionName = "Traders";
        private const string ManufecturersCollectionName = "Manufecturers";

        public MongoExporter()
        {
        }

        public void ExportTraders(IMongoDatabase database, ICollection<Trader> traders)
        {
            var collection = database.GetCollection<Trader>(TradersCollectionName);

            collection.InsertManyAsync(traders).Wait();
        }

        public void ExportManufacturers(IMongoDatabase database, ICollection<Manufacturer> manufacturers)
        {
            var collection = database.GetCollection<Manufacturer>(ManufecturersCollectionName);

            collection.InsertManyAsync(manufacturers).Wait();
        }
    }
}


text:
var appControllers = angular.module('appControllers', []);

appControllers.controller('MainController', ['$rootScope', '$scope', 'Book', 'Subscriptions', '$state', '$interval', '$timeout',
    function ($rootScope, $scope, Book, Subscriptions, $state, $interval, $timeout) {

    $scope.feedbackEmail = 'info' + '@' + 'knigopis' + '.com';

    $scope.user = Parse.User.current();
    $scope.viewUser = null;
    $scope.loginLoading = 0;

    $scope.state = $state;
    $scope.loading = 0;

    $scope.authCallback = function (token) {
        $scope.loginLoading++;
        $scope.$apply();
        Parse.Cloud.run('getCredentials', {token: token}, {
            success: function (data) {
                Parse.User.logIn(data.username, data.password, {
                    success: function () {
                        $scope.user = Parse.User.current();
                        $scope.loginLoading = 0;
                        $scope.$apply();
                    },
                    error: function (user, error) {
                        $scope.loginLoading = 0;
                        $scope.showParseError(error);
                        $scope.$apply();
                    }
                });

            }
        });
    };
    window.authCallback = $scope.authCallback;

    $scope.showLoginLoading = function () {
        $scope.loginLoading++;
        $scope.$apply();
    };
    window.showLoginLoading = $scope.showLoginLoading;

    $scope.hideLoginLoading = function () {
        $scope.loginLoading--;
        $scope.$apply();
    };
    window.hideLoginLoading = $scope.hideLoginLoading;

    var subscriptionsService = new Subscriptions();

    $scope.logout = function () {
        Parse.User.logOut();
        $scope.user = null;
    };

    $scope.goToCurrentUserBooks = function(){
        $state.go("user_books", {nickname: $scope.user.get('nickname'), u: $scope.user.id});
    };

    $scope.loadUserData = function(userId) {
        $scope.showLoading();
        var query = new Parse.Query(Parse.User);
        return query.get(userId, {
            success: function(user) {
                $scope.viewUser = user;
                user.isInSubscriptions = isUserInSubscriptions(user);
                if ($scope.user && subscriptionsService.subscriptions.length) {
                    subscriptionsService.updateBooksInfoBySubUser($scope.viewUser);
                }
            },
            error: function() {
                $scope.viewUser = null;
            }
        }).fail($scope.showParseError).always(function(){
            $scope.hideLoading();
            $scope.$apply();
        });
    };

    $scope.hideLoading = function () {
        $scope.loading--;
    };

    $scope.showLoading = function () {
        $scope.loading++;
    };

    $scope.showParseError = function (error) {
        var message = error.message;
        if (error.code == 101) {
            message = 'Объект не найден';
        }
        $scope.errorMessage = message;

        $timeout(function(){
            $scope.errorMessage = null;
        }, 4000);
    };

    $scope.hideError = function(){
        $scope.errorMessage = null;
    };

    $scope.$on('$stateChangeStart', function(e, to) {
        $scope.hideError();
    });

    $scope.showIndexContent = true;
    $scope.$on('$stateChangeSuccess', function(e, to) {
        if (to.name === 'index') {
            $scope.showIndexContent = true;
        } else {
            $scope.showIndexContent = false;
        }
    });

    $scope.lastUsers = [];
    function loadLastUsers (){
        $scope.showLoading();
        var query = new Parse.Query(Parse.User);
        query.greaterThan("booksCount", 0);
        query.descending("updatedAt");
        query.limit(10);
        return query.find({
            success: function(result) {
                $scope.lastUsers = result;
            }
        }).fail($scope.showParseError).always(function(){
            $scope.hideLoading();
            $scope.$apply();
        });
    };
    loadLastUsers();

    /* subscriptions */

    $scope.subscriptions = [];
    function loadSubscriptions(){
            if ($scope.user) {
                $scope.showLoading();
                subscriptionsService.load($scope.user).done(function(){
                    $scope.subscriptions = subscriptionsService.subscriptions;
                }).fail($scope.showParseError).always(function () {
                    $scope.hideLoading();
                    $scope.$apply();
                });
            }
    };
    loadSubscriptions();

    $scope.subscribe = function (user, subUser) {
            $scope.showLoading();
            subscriptionsService.subscribe(user, subUser).done(function () {
                $scope.subscriptions = subscriptionsService.subscriptions;
                subUser.isInSubscriptions = true;
            }).fail($scope.showParseError).always(function () {
                $scope.hideLoading();
                $scope.$apply();
            });
     };

     $scope.unsubscribe = function (user, subUser) {
            $scope.showLoading();
            subscriptionsService.unsubscribe(user, subUser).done(function () {
                $scope.subscriptions = subscriptionsService.subscriptions;
                subUser.isInSubscriptions = false;
            }).fail($scope.showParseError).always(function () {
                $scope.hideLoading();
                $scope.$apply();
            });
     };

     var isUserInSubscriptions = function(subUser){
         if (!$scope.user || $scope.subscriptions.length === 0) {
             return false;
         }
         for (var i=0; i < $scope.subscriptions.length; i++) {
             if ($scope.subscriptions[i].get('subUser').id === subUser.id) {
                 return true;
             }
         }
         return false;
     };

     $scope.getSubscriptionBookCountDif = function(subscription){
         var dif = subscription.get('subUser').get('booksCount') - subscription.get('lastBooksCount');
         if (dif > 0) {
             return dif;
         }
     };
     /* end of subscriptions */

}]);

appControllers.controller('BookFormController', ['$scope', 'Book', function($scope, Book) {
        $scope.bookSaved = 0;

        $scope.saveBookAndReturn = function() {
            if (!$scope.form.$valid) {
                return;
            }
            $scope.showLoading();
            $scope.book.save($scope.user, function() {
                afterSave();
                $scope.bookSaved = 1;
                $scope.form.$setPristine();
                $scope.goToCurrentUserBooks();
            }).fail($scope.showParseError).always(function(){
                $scope.hideLoading();
                $scope.$apply();
            });
        };

        $scope.saveBookAndContinue = function() {
            if (!$scope.form.$valid) {
                return;
            }
            $scope.showLoading();
            $scope.book.save($scope.user, function() {
                afterSave();
                $scope.bookSaved = 1;
                var savedReadYear = $scope.book.readYear;
                $scope.book = new Book();
                $scope.book.readYear = savedReadYear;
                $scope.form.$setPristine();
            }).fail($scope.showParseError).always(function(){
                $scope.hideLoading();
                $scope.$apply();
            });
        };

        $scope.deleteBook = function() {
            $scope.showLoading();
            $scope.book.delete(function(){
                $scope.goToCurrentUserBooks();
            }).fail($scope.showParseError).always(function(){
                $scope.hideLoading();
                $scope.$apply();
            });
        };

        function afterSave() {
            if ($scope.book.wish) {
                $scope.book.wish.delete();
            }
        }
}]);

appControllers.controller('BookAddController', ['$scope', 'Book', 'Wish', '$stateParams', function($scope, Book, Wish, $stateParams) {
        $scope.book = new Book;
        $scope.book.readYear = (new Date()).getFullYear();

        if ($stateParams.w) {
            $scope.showLoading();
            var wish = new Wish;
            wish.load($stateParams.w, function(){
                $scope.book.title = wish.title;
                $scope.book.author = wish.author;
                var today = new Date();
                $scope.book.readYear = today.getFullYear();
                $scope.book.readMonth = today.getMonth()+1;
                $scope.book.readDay = today.getDate();

                $scope.book.wish = wish;
            }).fail($scope.showParseError).always(function() {
                $scope.hideLoading();
                $scope.$apply();
            });
        }

        if ($stateParams.ob) {
            $scope.showLoading();
            var otherBook = new Book;
            otherBook.load($stateParams.ob, function(){
                $scope.book.title = otherBook.title;
                $scope.book.author = otherBook.author;
            }).fail($scope.showParseError).always(function() {
                $scope.hideLoading();
                $scope.$apply();
            });
        }
}]);

appControllers.controller('BookEditController', ['$scope', 'Book', '$stateParams', function($scope, Book, $stateParams) {
        if ($stateParams.bookId) {
            $scope.showLoading();
            $scope.book = new Book;
            $scope.book.load($stateParams.bookId).fail($scope.showParseError).always(function() {
                $scope.hideLoading();
                $scope.$apply();
            });
        }
}]);

appControllers.controller('UserBooksController', ['$rootScope', '$scope', 'Book', '$stateParams', '$interval', '$state',
    function($rootScope, $scope, Book, $stateParams, $interval, $state) {
        $scope.loaded = false;
        if ($stateParams.u) {
            $scope.showLoading();
            var book = new Book;
            var user = new Parse.User();
            user.id = $stateParams.u;
            book.findOwnedByUser(user, function(books) {
                book.sortBooksByDate(books);
                $scope.booksDividedByYear = divideByYears(books);
                $scope.populateSideNavigation();
                $scope.loaded = true;

                if ($stateParams.y) {
                    $scope.scrollToYear($stateParams.y);
                }
            }, $scope.showParseError).always(function(){
                $scope.hideLoading();
                $scope.$apply();
            });
            $scope.loadUserData($stateParams.u);
        }

        function divideByYears(books) {
            var divided = {};

            var i, book, group;
            for (i in books) {
                book = books[i];
                if (book.readYear) {
                    group = book.readYear;
                } else {
                    group = 'other';
                }

                if (typeof divided[group] === 'undefined') {
                    divided[group] = [];
                }
                divided[group].push(book);
            }

            divided = sortObjectByKeys(divided);
            return divided;
        }

        function sortObjectByKeys(o) {
            var sorted = [],
                    key, a = [];

            for (key in o) {
                if (o.hasOwnProperty(key)) {
                    a.push(key);
                }
            }

            a.sort(function(a, b){
                if (a === 'other' && b !== 'other') {
                    return 1;
                }
                if (a !== 'other' && b === 'other') {
                    return -1;
                }
                if (a < b) {
                    return 1;
                }
                if (a > b) {
                    return -1;
                }
                return 0;
            });

            for (key = 0; key < a.length; key++) {
                sorted.push({'group': a[key], 'books': o[a[key]]});
            }
            return sorted;
        }

        $scope.populateSideNavigation = function(){
            $scope.navBookYears = [];
            for (var i in $scope.booksDividedByYear) {
                $scope.navBookYears.push($scope.booksDividedByYear[i].group);
            }
        };

        $scope.scrollToYear = function (year) {
            var scrolled = false;
            var intervalId = $interval(function () {
                if (scrolled) {
                    $interval.cancel(intervalId);
                    return;
                }
                var $elem = $('#year-' + year);
                if ($elem.length) {
                    window.scrollTo(0, $elem.offset().top - 80);
                    $('.sidenav-years > li.active').removeClass('active');
                    $('.sidenav-year-' + year).addClass('active');
                    scrolled = true;
                }
            }, 100);
        };
        $scope.goToYear = function (year) {
            $state.transitionTo('user_books', {nickname: $scope.viewUser.get('nickname'), u: $scope.viewUser.id, y: year}, {location: 'replace', inherit: false, notify: false});
            $scope.scrollToYear(year);
        };

        $scope.downloadCsv = function(){
            $scope.showLoading();
            Parse.Cloud.run('getBooksAsFile', {userId: $scope.viewUser.id}).done(function(file){
                location.href = file.url();
            }).fail($scope.showParseError).always(function(){
                $scope.hideLoading();
                $scope.$apply();
            });
        };

}]);

/* Wish */

appControllers.controller('WishController', ['$scope', 'Wish', '$stateParams', '$state',
    function($scope, Wish, $stateParams, $state) {

}]);
appControllers.controller('WishFormController', ['$scope', 'Wish', '$state', function($scope, Wish, $state) {
        $scope.bookSaved = 0;

        $scope.saveBookAndReturn = function() {
            if (!$scope.form.$valid) {
                return;
            }
            $scope.showLoading();
            $scope.book.save($scope.user, function() {
                $scope.bookSaved = 1;
                $scope.form.$setPristine();
                $state.go("wish.list");
            }).fail($scope.showParseError).always(function(){
                $scope.hideLoading();
                $scope.$apply();
            });
        };

        $scope.saveBookAndContinue = function() {
            if (!$scope.form.$valid) {
                return;
            }
            $scope.showLoading();
            $scope.book.save($scope.user, function() {
                $scope.bookSaved = 1;
                $scope.book = new Wish();
                $scope.book.priority = 50;
                $scope.form.$setPristine();
            }).fail($scope.showParseError).always(function(){
                $scope.hideLoading();
                $scope.$apply();
            });
        };

        $scope.deleteBook = function() {
            $scope.showLoading();
            $scope.book.delete(function(){
                $state.go("wish.list");
            }).fail($scope.showParseError).always(function(){
                $scope.hideLoading();
                $scope.$apply();
            });
        };
}]);

appControllers.controller('WishListController', ['$scope', 'Wish', '$stateParams', '$state',
    function($scope, Wish, $stateParams, $state) {
        $scope.wishList = [];
        $scope.loaded = false;
        $scope.showLoading();
            var book = new Wish;
            book.findOwnedByUser($scope.user, function(books) {
                $scope.wishList = books;
            }, $scope.showParseError).always(function(){
                $scope.loaded = true;
                $scope.hideLoading();
                $scope.$apply();
            });
}]);

appControllers.controller('WishAddController', ['$scope', 'Wish', 'Book', '$stateParams', function($scope, Wish, Book, $stateParams) {
        $scope.book = new Wish;
        $scope.book.priority = 50;

        if ($stateParams.ob) {
            $scope.showLoading();
            var otherBook = new Book;
            otherBook.loadWithUser($stateParams.ob, function(){
                $scope.book.title = otherBook.title;
                $scope.book.author = otherBook.author;
                $scope.book.notes = 'Увидел у ' + otherBook.user.get('nickname');
                if (otherBook.notes) {
                    $scope.book.notes += " с примечанием: " + otherBook.notes;
                }
            }).fail($scope.showParseError).always(function() {
                $scope.hideLoading();
                $scope.$apply();
            });
        }
}]);

appControllers.controller('WishEditController', ['$scope', 'Wish', '$stateParams', function($scope, Wish, $stateParams) {
        if ($stateParams.id) {
            $scope.showLoading();
            $scope.book = new Wish;
            $scope.book.load($stateParams.id).fail($scope.showParseError).always(function() {
                $scope.hideLoading();
                $scope.$apply();
            });
        }
}]);

/* End of Wish */

appControllers.controller('SettingsController', ['$scope', '$state', function($scope, $state) {
        $scope.settings = {
            nickname: $scope.user.get('nickname'),
            profile: $scope.user.get('profile')
        };
        $scope.saveUserSettings = function(){
            if (!$scope.settingsForm.$valid) {
                return;
            }
            $scope.showLoading();

            $scope.user.set('nickname', $scope.settings.nickname);
            $scope.user.set('profile', $scope.settings.profile);
            $scope.user.save().done(function(){
                $state.go("index");
            }).fail($scope.showParseError).always(function() {
                $scope.hideLoading();
                $scope.$apply();
            });;
        };
}]);


text:
<?php

namespace Speelpenning\Authentication\Http\Controllers;

use Illuminate\Contracts\Auth\Guard;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Http\RedirectResponse;
use Illuminate\Routing\Controller;
use Illuminate\View\View;
use Speelpenning\Authentication\Http\Middleware\Authenticate;
use Speelpenning\Authentication\Http\Requests\UpdateUserRequest;
use Speelpenning\Authentication\Jobs\UpdateUser;

class ProfileController extends Controller
{
    use DispatchesJobs;

    /**
     * @var Guard
     */
    protected $auth;

    /**
     * UserController constructor.
     *
     * @param Guard $auth
     */
    public function __construct(Guard $auth)
    {
        $this->middleware(Authenticate::class);

        $this->auth = $auth;
    }

    /**
     * Shows the user profile.
     *
     * @return View
     */
    public function show()
    {
        return view('authentication::profile.show')
            ->with('user', $this->auth->user());
    }

    /**
     * Shows the profile edit form.
     *
     * @return View
     */
    public function edit()
    {
        return view('authentication::profile.edit')
            ->with('user', $this->auth->user());
    }

    /**
     * Attempts to update the user profile.
     *
     * @param UpdateUserRequest $request
     * @return RedirectResponse
     */
    public function update(UpdateUserRequest $request)
    {
        $this->dispatch(new UpdateUser($this->auth->user()->id, $request->get('name'), $request->get('email')));
        return redirect()->route('authentication::profile.show');
    }
}


text:
/* */
'use strict';
Object.defineProperty(exports, "__esModule", {value: true});
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _reactAddonsPureRenderMixin = require('react-addons-pure-render-mixin');
var _reactAddonsPureRenderMixin2 = _interopRequireDefault(_reactAddonsPureRenderMixin);
var _svgIcon = require('../../svg-icon');
var _svgIcon2 = _interopRequireDefault(_svgIcon);
function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {default: obj};
}
var MapsLocalAirport = _react2.default.createClass({
  displayName: 'MapsLocalAirport',
  mixins: [_reactAddonsPureRenderMixin2.default],
  render: function render() {
    return _react2.default.createElement(_svgIcon2.default, this.props, _react2.default.createElement('path', {d: 'M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z'}));
  }
});
exports.default = MapsLocalAirport;
module.exports = exports['default'];


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/analytics/admin/v1alpha/resources.proto

namespace Google\Analytics\Admin\V1alpha;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Singleton resource under a WebDataStream, configuring measurement of
 * additional site interactions and content.
 *
 * Generated from protobuf message google.analytics.admin.v1alpha.EnhancedMeasurementSettings
 */
class EnhancedMeasurementSettings extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Resource name of this Data Stream.
     * Format:
     * properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings
     * Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings"
     *
     * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
     */
    private $name = '';
    /**
     * Indicates whether Enhanced Measurement Settings will be used to
     * automatically measure interactions and content on this web stream.
     * Changing this value does not affect the settings themselves, but determines
     * whether they are respected.
     *
     * Generated from protobuf field bool stream_enabled = 2;
     */
    private $stream_enabled = false;
    /**
     * Output only. If enabled, capture a page view event each time a page loads or the
     * website changes the browser history state.
     *
     * Generated from protobuf field bool page_views_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     */
    private $page_views_enabled = false;
    /**
     * If enabled, capture scroll events each time a visitor gets to the bottom of
     * a page.
     *
     * Generated from protobuf field bool scrolls_enabled = 4;
     */
    private $scrolls_enabled = false;
    /**
     * If enabled, capture an outbound click event each time a visitor clicks a
     * link that leads them away from your domain.
     *
     * Generated from protobuf field bool outbound_clicks_enabled = 5;
     */
    private $outbound_clicks_enabled = false;
    /**
     * If enabled, capture a view search results event each time a visitor
     * performs a search on your site (based on a query parameter).
     *
     * Generated from protobuf field bool site_search_enabled = 7;
     */
    private $site_search_enabled = false;
    /**
     * If enabled, capture video play, progress, and complete events as visitors
     * view embedded videos on your site.
     *
     * Generated from protobuf field bool video_engagement_enabled = 9;
     */
    private $video_engagement_enabled = false;
    /**
     * If enabled, capture a file download event each time a link is clicked with
     * a common document, compressed file, application, video, or audio extension.
     *
     * Generated from protobuf field bool file_downloads_enabled = 10;
     */
    private $file_downloads_enabled = false;
    /**
     * Output only. If enabled, capture a page view event each time a page loads.
     *
     * Generated from protobuf field bool page_loads_enabled = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
     */
    private $page_loads_enabled = false;
    /**
     * If enabled, capture a page view event each time the website changes the
     * browser history state.
     *
     * Generated from protobuf field bool page_changes_enabled = 13;
     */
    private $page_changes_enabled = false;
    /**
     * Required. URL query parameters to interpret as site search parameters.
     * Max length is 1024 characters. Must not be empty.
     *
     * Generated from protobuf field string search_query_parameter = 16 [(.google.api.field_behavior) = REQUIRED];
     */
    private $search_query_parameter = '';
    /**
     * Additional URL query parameters.
     * Max length is 1024 characters.
     *
     * Generated from protobuf field string uri_query_parameter = 17;
     */
    private $uri_query_parameter = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only. Resource name of this Data Stream.
     *           Format:
     *           properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings
     *           Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings"
     *     @type bool $stream_enabled
     *           Indicates whether Enhanced Measurement Settings will be used to
     *           automatically measure interactions and content on this web stream.
     *           Changing this value does not affect the settings themselves, but determines
     *           whether they are respected.
     *     @type bool $page_views_enabled
     *           Output only. If enabled, capture a page view event each time a page loads or the
     *           website changes the browser history state.
     *     @type bool $scrolls_enabled
     *           If enabled, capture scroll events each time a visitor gets to the bottom of
     *           a page.
     *     @type bool $outbound_clicks_enabled
     *           If enabled, capture an outbound click event each time a visitor clicks a
     *           link that leads them away from your domain.
     *     @type bool $site_search_enabled
     *           If enabled, capture a view search results event each time a visitor
     *           performs a search on your site (based on a query parameter).
     *     @type bool $video_engagement_enabled
     *           If enabled, capture video play, progress, and complete events as visitors
     *           view embedded videos on your site.
     *     @type bool $file_downloads_enabled
     *           If enabled, capture a file download event each time a link is clicked with
     *           a common document, compressed file, application, video, or audio extension.
     *     @type bool $page_loads_enabled
     *           Output only. If enabled, capture a page view event each time a page loads.
     *     @type bool $page_changes_enabled
     *           If enabled, capture a page view event each time the website changes the
     *           browser history state.
     *     @type string $search_query_parameter
     *           Required. URL query parameters to interpret as site search parameters.
     *           Max length is 1024 characters. Must not be empty.
     *     @type string $uri_query_parameter
     *           Additional URL query parameters.
     *           Max length is 1024 characters.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Analytics\Admin\V1Alpha\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Resource name of this Data Stream.
     * Format:
     * properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings
     * Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings"
     *
     * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Output only. Resource name of this Data Stream.
     * Format:
     * properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings
     * Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings"
     *
     * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Indicates whether Enhanced Measurement Settings will be used to
     * automatically measure interactions and content on this web stream.
     * Changing this value does not affect the settings themselves, but determines
     * whether they are respected.
     *
     * Generated from protobuf field bool stream_enabled = 2;
     * @return bool
     */
    public function getStreamEnabled()
    {
        return $this->stream_enabled;
    }

    /**
     * Indicates whether Enhanced Measurement Settings will be used to
     * automatically measure interactions and content on this web stream.
     * Changing this value does not affect the settings themselves, but determines
     * whether they are respected.
     *
     * Generated from protobuf field bool stream_enabled = 2;
     * @param bool $var
     * @return $this
     */
    public function setStreamEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->stream_enabled = $var;

        return $this;
    }

    /**
     * Output only. If enabled, capture a page view event each time a page loads or the
     * website changes the browser history state.
     *
     * Generated from protobuf field bool page_views_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @return bool
     */
    public function getPageViewsEnabled()
    {
        return $this->page_views_enabled;
    }

    /**
     * Output only. If enabled, capture a page view event each time a page loads or the
     * website changes the browser history state.
     *
     * Generated from protobuf field bool page_views_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @param bool $var
     * @return $this
     */
    public function setPageViewsEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->page_views_enabled = $var;

        return $this;
    }

    /**
     * If enabled, capture scroll events each time a visitor gets to the bottom of
     * a page.
     *
     * Generated from protobuf field bool scrolls_enabled = 4;
     * @return bool
     */
    public function getScrollsEnabled()
    {
        return $this->scrolls_enabled;
    }

    /**
     * If enabled, capture scroll events each time a visitor gets to the bottom of
     * a page.
     *
     * Generated from protobuf field bool scrolls_enabled = 4;
     * @param bool $var
     * @return $this
     */
    public function setScrollsEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->scrolls_enabled = $var;

        return $this;
    }

    /**
     * If enabled, capture an outbound click event each time a visitor clicks a
     * link that leads them away from your domain.
     *
     * Generated from protobuf field bool outbound_clicks_enabled = 5;
     * @return bool
     */
    public function getOutboundClicksEnabled()
    {
        return $this->outbound_clicks_enabled;
    }

    /**
     * If enabled, capture an outbound click event each time a visitor clicks a
     * link that leads them away from your domain.
     *
     * Generated from protobuf field bool outbound_clicks_enabled = 5;
     * @param bool $var
     * @return $this
     */
    public function setOutboundClicksEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->outbound_clicks_enabled = $var;

        return $this;
    }

    /**
     * If enabled, capture a view search results event each time a visitor
     * performs a search on your site (based on a query parameter).
     *
     * Generated from protobuf field bool site_search_enabled = 7;
     * @return bool
     */
    public function getSiteSearchEnabled()
    {
        return $this->site_search_enabled;
    }

    /**
     * If enabled, capture a view search results event each time a visitor
     * performs a search on your site (based on a query parameter).
     *
     * Generated from protobuf field bool site_search_enabled = 7;
     * @param bool $var
     * @return $this
     */
    public function setSiteSearchEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->site_search_enabled = $var;

        return $this;
    }

    /**
     * If enabled, capture video play, progress, and complete events as visitors
     * view embedded videos on your site.
     *
     * Generated from protobuf field bool video_engagement_enabled = 9;
     * @return bool
     */
    public function getVideoEngagementEnabled()
    {
        return $this->video_engagement_enabled;
    }

    /**
     * If enabled, capture video play, progress, and complete events as visitors
     * view embedded videos on your site.
     *
     * Generated from protobuf field bool video_engagement_enabled = 9;
     * @param bool $var
     * @return $this
     */
    public function setVideoEngagementEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->video_engagement_enabled = $var;

        return $this;
    }

    /**
     * If enabled, capture a file download event each time a link is clicked with
     * a common document, compressed file, application, video, or audio extension.
     *
     * Generated from protobuf field bool file_downloads_enabled = 10;
     * @return bool
     */
    public function getFileDownloadsEnabled()
    {
        return $this->file_downloads_enabled;
    }

    /**
     * If enabled, capture a file download event each time a link is clicked with
     * a common document, compressed file, application, video, or audio extension.
     *
     * Generated from protobuf field bool file_downloads_enabled = 10;
     * @param bool $var
     * @return $this
     */
    public function setFileDownloadsEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->file_downloads_enabled = $var;

        return $this;
    }

    /**
     * Output only. If enabled, capture a page view event each time a page loads.
     *
     * Generated from protobuf field bool page_loads_enabled = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @return bool
     */
    public function getPageLoadsEnabled()
    {
        return $this->page_loads_enabled;
    }

    /**
     * Output only. If enabled, capture a page view event each time a page loads.
     *
     * Generated from protobuf field bool page_loads_enabled = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @param bool $var
     * @return $this
     */
    public function setPageLoadsEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->page_loads_enabled = $var;

        return $this;
    }

    /**
     * If enabled, capture a page view event each time the website changes the
     * browser history state.
     *
     * Generated from protobuf field bool page_changes_enabled = 13;
     * @return bool
     */
    public function getPageChangesEnabled()
    {
        return $this->page_changes_enabled;
    }

    /**
     * If enabled, capture a page view event each time the website changes the
     * browser history state.
     *
     * Generated from protobuf field bool page_changes_enabled = 13;
     * @param bool $var
     * @return $this
     */
    public function setPageChangesEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->page_changes_enabled = $var;

        return $this;
    }

    /**
     * Required. URL query parameters to interpret as site search parameters.
     * Max length is 1024 characters. Must not be empty.
     *
     * Generated from protobuf field string search_query_parameter = 16 [(.google.api.field_behavior) = REQUIRED];
     * @return string
     */
    public function getSearchQueryParameter()
    {
        return $this->search_query_parameter;
    }

    /**
     * Required. URL query parameters to interpret as site search parameters.
     * Max length is 1024 characters. Must not be empty.
     *
     * Generated from protobuf field string search_query_parameter = 16 [(.google.api.field_behavior) = REQUIRED];
     * @param string $var
     * @return $this
     */
    public function setSearchQueryParameter($var)
    {
        GPBUtil::checkString($var, True);
        $this->search_query_parameter = $var;

        return $this;
    }

    /**
     * Additional URL query parameters.
     * Max length is 1024 characters.
     *
     * Generated from protobuf field string uri_query_parameter = 17;
     * @return string
     */
    public function getUriQueryParameter()
    {
        return $this->uri_query_parameter;
    }

    /**
     * Additional URL query parameters.
     * Max length is 1024 characters.
     *
     * Generated from protobuf field string uri_query_parameter = 17;
     * @param string $var
     * @return $this
     */
    public function setUriQueryParameter($var)
    {
        GPBUtil::checkString($var, True);
        $this->uri_query_parameter = $var;

        return $this;
    }

}


text:
package abi42_0_0.host.exp.exponent;

import java.util.List;

import abi42_0_0.org.unimodules.core.interfaces.Package;
import expo.modules.core.interfaces.SingletonModule;
import abi42_0_0.host.exp.exponent.modules.universal.ExpoModuleRegistryAdapter;

public interface ExponentPackageDelegate {
  ExpoModuleRegistryAdapter getScopedModuleRegistryAdapterForPackages(List<Package> packages, List<SingletonModule> singletonModules);
}


text:
Let us assume that you already have a working Go environment. You need to make sure that your `$GOPATH/bin` is included in your PATH.

### Install vim, if not already done
```
sudo apt-get install vim
```

### Install and setup vim-go

The following link has detailed instructions on setting up `vim-go` on your system and using the shortcuts.
- https://github.com/fatih/vim-go-tutorial#quick-setup

The following is an extract of the command required to install on Ubuntu.
### Step 1: Download the vim-plugin and vim-go plugins
```
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
git clone https://github.com/fatih/vim-go.git ~/.vim/plugged/vim-go
```

### Step 2: Setup vimrc to use the downloaded plugins

Create `~/.vimrc` with following content:
```
call plug#begin()
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
call plug#end()
```

### Step 3: Verify plugins are installed and initialize go dependencies
Launch vim. In the vim editor, type the following:
```
:PlugInstall
```
The above should show a window that Plugins are installed.

Now, run the following in the same vim editor:
```
:GoInstallBinaries
```

You should see the dependent go binaries downloaded and installed in your `GOPATH/bin`.

### Using vim-go

The `vim-go` repository provides a large number of additional plugins and shortcuts that can be added to the `.vimrc`. However, with the default `.vimrc` use above, you can already get going:
- Initiate the build `:GoBuild`.
- Navigate to the definition `ctrl-{`.
- Navigate back `ctrl-o`.


text:
cask 'optionspace' do
  version '1.0.3'
  sha256 '826d2ec636044c466d49dd0aa72b8a3a9cc674aea9988d7c0eb3b91274c9800f'

  url "https://optionspace.co/download/OptionSpace_v#{version}.dmg"
  appcast 'https://optionspace.co/app/appcast.xml',
          checkpoint: '858fff1f446633e2143699f290e0f267ab3b2414ec319f101ba3bb9cac8f7d63'
  name 'OptionSpace'
  homepage 'https://optionspace.co'
  license :freemium

  app 'OptionSpace.app'

  zap delete: [
                '~/Library/Application Support/OptionSpace',
                '~/Library/Preferences/org.sparkle-project.Sparkle.Autoupdate.plist',
                '~/Library/Preferences/MeAndUser.OptionSpace.plist',
              ]
end