text:
This will be a collection of bullet points aimed at having consistency across our individual contributions to the pool of ideas for the group project. It is by no means comprehensive so add/edit it as you see fit.

## Concept name

Placeholder name for the project

## Description

Brief description of what the project is about

## Goals

List every issue that the project aims to solve. In my case, regarding the "money-saver" project, it will simply be a way to help people save money, by tapping into the lifestyle of London being unsustainable to most. List marketability as well and why it could work.

## Target Audience

The scope of this topic is the initial phase of deplyment. Again, in my project, the initial scope will be Goldsmiths students, seeing as most students are thin on cash. List possible steps towards market/user research

## Resources

List resources that will be used in the production of the project. App development would mean coding/learning Java/Kotlin for Android or Swift/Objective-C for iOS development. Further resources would mean have a dedicated server handling traffic, domain registry, and others.

## Future Plans / Deployment Stages

List what the project could turn into, given the time and/or resources. Deployment stages for my project would mean an initial stage using Goldsmiths students as a test bed, Stage 2 being deploying to university students and Stage 3 being general population.

## Timeline

This will be entirely conceptual and open to changes but if you could include some form of targets to be met by so and so date. So maybe by 1st of December, look into infrastructure. By 1st of January, learn basics of language, and others.

## Issues

Be really detailed here. It's important to show our supervisor that we are aware of issues that might arise. List possible solutions but don't dwell on them too much. At this stage we're still just debating which concept to go with


text:
package com.jloisel.akka.math;

final class Work {

	private final int start;
	private final int nbOfElements;

	Work(final int start, final int nbOfElements) {
		super();
		this.start = start;
		this.nbOfElements = nbOfElements;
	}

	int getStart() {
		return start;
	}

	int getNbOfElements() {
		return nbOfElements;
	}
}

redpajama_set_name: RedPajamaGithub


text:
// <copyright file="ColorQuantizerResultTests.cs" company="Jérémy Ansel">
// Copyright (c) 2014-2019 Jérémy Ansel
// </copyright>
// <license>
// Licensed under the MIT license. See LICENSE.txt
// </license>

namespace JeremyAnsel.ColorQuant.Tests
{
    using System;
    using Xunit;

    /// <summary>
    /// Tests for <see cref="ColorQuantizerResult"/>.
    /// </summary>
    public class ColorQuantizerResultTests
    {
        /// <summary>
        /// Tests the constructor's parameters.
        /// </summary>
        [Fact]
        public void NewResultParameters()
        {
            Assert.Throws<ArgumentOutOfRangeException>("size", () => new ColorQuantizerResult(0, 1));
            Assert.Throws<ArgumentOutOfRangeException>("colorCount", () => new ColorQuantizerResult(1, 0));
            Assert.Throws<ArgumentOutOfRangeException>("colorCount", () => new ColorQuantizerResult(1, 257));
        }

        /// <summary>
        /// Tests a new result.
        /// </summary>
        [Fact]
        public void NewResult()
        {
            var result = new ColorQuantizerResult(1, 1);

            Assert.Single(result.Bytes);
            Assert.Equal(4, result.Palette.Length);
        }
    }
}


text:
var frameCommon = require("./frame-common");
var trace = require("trace");
var enums = require("ui/enums");
var utils = require("utils/utils");
var view = require("ui/core/view");
var uiUtils = require("ui/utils");
var types = require("utils/types");
var application = require("application");
global.moduleMerge(frameCommon, exports);
var ENTRY = "_entry";
var NAV_DEPTH = "_navDepth";
var TRANSITION = "_transition";
var navDepth = -1;
var Frame = (function (_super) {
    __extends(Frame, _super);
    function Frame() {
        var _this = this;
        _super.call(this);
        this._shouldSkipNativePop = false;
        this._ios = new iOSFrame(this);
        var that = this;
        application.ios.addNotificationObserver(UIApplicationDidChangeStatusBarFrameNotification, function (notification) {
            that._handleHigherInCallStatusBarIfNeeded();
            if (_this._ios.controller.owner.currentPage) {
                _this._ios.controller.owner.currentPage.requestLayout();
            }
        });
    }
    Frame.prototype.onLoaded = function () {
        _super.prototype.onLoaded.call(this);
        if (this._paramToNavigate) {
            this.navigate(this._paramToNavigate);
            this._paramToNavigate = undefined;
        }
    };
    Frame.prototype.navigate = function (param) {
        if (this.isLoaded) {
            _super.prototype.navigate.call(this, param);
        }
        else {
            this._paramToNavigate = param;
        }
    };
    Frame.prototype._navigateCore = function (backstackEntry) {
        trace.write(this + "._navigateCore(pageId: " + backstackEntry.resolvedPage.id + ", backstackVisible: " + this._isEntryBackstackVisible(backstackEntry) + ", clearHistory: " + backstackEntry.entry.clearHistory + "), navDepth: " + navDepth, trace.categories.Navigation);
        var viewController = backstackEntry.resolvedPage.ios;
        if (!viewController) {
            throw new Error("Required page does not have a viewController created.");
        }
        navDepth++;
        var animated = this.currentPage ? this._getIsAnimatedNavigation(backstackEntry.entry) : false;
        var navigationTransition = this._getNavigationTransition(backstackEntry.entry);
        if (animated && navigationTransition) {
            viewController[TRANSITION] = navigationTransition;
        }
        backstackEntry[NAV_DEPTH] = navDepth;
        viewController[ENTRY] = backstackEntry;
        this._updateActionBar(backstackEntry.resolvedPage);
        if (!this._currentEntry) {
            this._ios.controller.pushViewControllerAnimated(viewController, animated);
            trace.write(this + ".pushViewControllerAnimated(" + viewController + ", " + animated + "); depth = " + navDepth, trace.categories.Navigation);
            return;
        }
        if (backstackEntry.entry.clearHistory) {
            viewController.navigationItem.hidesBackButton = true;
            var newControllers = NSMutableArray.alloc().initWithCapacity(1);
            newControllers.addObject(viewController);
            this._ios.controller.setViewControllersAnimated(newControllers, animated);
            trace.write(this + ".setViewControllersAnimated([" + viewController + "], " + animated + "); depth = " + navDepth, trace.categories.Navigation);
            return;
        }
        if (!this._isEntryBackstackVisible(this._currentEntry)) {
            var newControllers = NSMutableArray.alloc().initWithArray(this._ios.controller.viewControllers);
            if (newControllers.count === 0) {
                throw new Error("Wrong controllers count.");
            }
            viewController.navigationItem.hidesBackButton = this.backStack.length === 0;
            newControllers.removeLastObject();
            newControllers.addObject(viewController);
            this._ios.controller.setViewControllersAnimated(newControllers, animated);
            trace.write(this + ".setViewControllersAnimated([originalControllers - lastController + " + viewController + "], " + animated + "); depth = " + navDepth, trace.categories.Navigation);
            return;
        }
        this._ios.controller.pushViewControllerAnimated(viewController, animated);
        trace.write(this + ".pushViewControllerAnimated(" + viewController + ", " + animated + "); depth = " + navDepth, trace.categories.Navigation);
    };
    Frame.prototype._goBackCore = function (backstackEntry) {
        navDepth = backstackEntry[NAV_DEPTH];
        trace.write(this + "._goBackCore(pageId: " + backstackEntry.resolvedPage.id + ", backstackVisible: " + this._isEntryBackstackVisible(backstackEntry) + ", clearHistory: " + backstackEntry.entry.clearHistory + "), navDepth: " + navDepth, trace.categories.Navigation);
        if (!this._shouldSkipNativePop) {
            var controller = backstackEntry.resolvedPage.ios;
            var animated = this._currentEntry ? this._getIsAnimatedNavigation(this._currentEntry.entry) : false;
            this._updateActionBar(backstackEntry.resolvedPage);
            trace.write(this + ".popToViewControllerAnimated(" + controller + ", " + animated + "); depth = " + navDepth, trace.categories.Navigation);
            this._ios.controller.popToViewControllerAnimated(controller, animated);
        }
    };
    Frame.prototype._updateActionBar = function (page) {
        _super.prototype._updateActionBar.call(this, page);
        var page = page || this.currentPage;
        var newValue = this._getNavBarVisible(page);
        this._ios.showNavigationBar = newValue;
        if (this._ios.controller.navigationBar) {
            this._ios.controller.navigationBar.userInteractionEnabled = this.navigationQueueIsEmpty();
        }
    };
    Frame.prototype._getNavBarVisible = function (page) {
        switch (this._ios.navBarVisibility) {
            case enums.NavigationBarVisibility.always:
                return true;
            case enums.NavigationBarVisibility.never:
                return false;
            case enums.NavigationBarVisibility.auto:
                var newValue = void 0;
                if (page && types.isDefined(page.actionBarHidden)) {
                    newValue = !page.actionBarHidden;
                }
                else {
                    newValue = this.ios.controller.viewControllers.count > 1 || (page && page.actionBar && !page.actionBar._isEmpty());
                }
                newValue = !!newValue;
                return newValue;
        }
    };
    Object.defineProperty(Frame.prototype, "ios", {
        get: function () {
            return this._ios;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Frame.prototype, "_nativeView", {
        get: function () {
            return this._ios.controller.view;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Frame, "defaultAnimatedNavigation", {
        get: function () {
            return frameCommon.Frame.defaultAnimatedNavigation;
        },
        set: function (value) {
            frameCommon.Frame.defaultAnimatedNavigation = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Frame, "defaultTransition", {
        get: function () {
            return frameCommon.Frame.defaultTransition;
        },
        set: function (value) {
            frameCommon.Frame.defaultTransition = value;
        },
        enumerable: true,
        configurable: true
    });
    Frame.prototype.requestLayout = function () {
        _super.prototype.requestLayout.call(this);
        var window = this._nativeView.window;
        if (window) {
            window.setNeedsLayout();
        }
    };
    Frame.prototype.onMeasure = function (widthMeasureSpec, heightMeasureSpec) {
        var width = utils.layout.getMeasureSpecSize(widthMeasureSpec);
        var widthMode = utils.layout.getMeasureSpecMode(widthMeasureSpec);
        var height = utils.layout.getMeasureSpecSize(heightMeasureSpec);
        var heightMode = utils.layout.getMeasureSpecMode(heightMeasureSpec);
        this._widthMeasureSpec = widthMeasureSpec;
        this._heightMeasureSpec = heightMeasureSpec;
        var result = this.measurePage(this.currentPage);
        if (this._navigateToEntry && this.currentPage) {
            var newPageSize = this.measurePage(this._navigateToEntry.resolvedPage);
            result.measuredWidth = Math.max(result.measuredWidth, newPageSize.measuredWidth);
            result.measuredHeight = Math.max(result.measuredHeight, newPageSize.measuredHeight);
        }
        var widthAndState = view.View.resolveSizeAndState(result.measuredWidth, width, widthMode, 0);
        var heightAndState = view.View.resolveSizeAndState(result.measuredHeight, height, heightMode, 0);
        this.setMeasuredDimension(widthAndState, heightAndState);
    };
    Frame.prototype.measurePage = function (page) {
        var heightSpec = this._heightMeasureSpec;
        if (page && !page.backgroundSpanUnderStatusBar && !this.parent) {
            var height = utils.layout.getMeasureSpecSize(this._heightMeasureSpec);
            var heightMode = utils.layout.getMeasureSpecMode(this._heightMeasureSpec);
            var statusBarHeight = uiUtils.ios.getStatusBarHeight();
            heightSpec = utils.layout.makeMeasureSpec(height - statusBarHeight, heightMode);
        }
        return view.View.measureChild(this, page, this._widthMeasureSpec, heightSpec);
    };
    Frame.prototype.onLayout = function (left, top, right, bottom) {
        this._right = right;
        this._bottom = bottom;
        this._handleHigherInCallStatusBarIfNeeded();
        this.layoutPage(this.currentPage);
        if (this._navigateToEntry && this.currentPage) {
            this.layoutPage(this._navigateToEntry.resolvedPage);
        }
    };
    Frame.prototype.layoutPage = function (page) {
        if (page && page._viewWillDisappear) {
            return;
        }
        var statusBarHeight = (page && !page.backgroundSpanUnderStatusBar && !this.parent) ? uiUtils.ios.getStatusBarHeight() : 0;
        view.View.layoutChild(this, page, 0, statusBarHeight, this._right, this._bottom);
    };
    Object.defineProperty(Frame.prototype, "navigationBarHeight", {
        get: function () {
            var navigationBar = this._ios.controller.navigationBar;
            return (navigationBar && !this._ios.controller.navigationBarHidden) ? navigationBar.frame.size.height : 0;
        },
        enumerable: true,
        configurable: true
    });
    Frame.prototype._setNativeViewFrame = function (nativeView, frame) {
        if (nativeView.frame.size.width === frame.size.width && nativeView.frame.size.height === frame.size.height) {
            return;
        }
        _super.prototype._setNativeViewFrame.call(this, nativeView, frame);
    };
    Frame.prototype.remeasureFrame = function () {
        this.requestLayout();
        var window = this._nativeView.window;
        if (window) {
            window.layoutIfNeeded();
        }
    };
    Frame.prototype._handleHigherInCallStatusBarIfNeeded = function () {
        var statusBarHeight = uiUtils.ios.getStatusBarHeight();
        if (!this._ios ||
            !this._ios.controller ||
            !this._ios.controller.navigationBar ||
            this._ios.controller.navigationBar.hidden ||
            this._ios.controller.navigationBar.frame.origin.y === statusBarHeight) {
            return;
        }
        trace.write("Forcing navigationBar.frame.origin.y to " + statusBarHeight + " due to a higher in-call status-bar", trace.categories.Layout);
        this._ios.controller.navigationBar.autoresizingMask = UIViewAutoresizing.UIViewAutoresizingNone;
        this._ios.controller.navigationBar.removeConstraints(this._ios.controller.navigationBar.constraints);
        this._ios.controller.navigationBar.frame = CGRectMake(this._ios.controller.navigationBar.frame.origin.x, statusBarHeight, this._ios.controller.navigationBar.frame.size.width, this._ios.controller.navigationBar.frame.size.height);
    };
    return Frame;
}(frameCommon.Frame));
exports.Frame = Frame;
var TransitionDelegate = (function (_super) {
    __extends(TransitionDelegate, _super);
    function TransitionDelegate() {
        _super.apply(this, arguments);
    }
    TransitionDelegate.new = function () {
        return _super.new.call(this);
    };
    TransitionDelegate.prototype.initWithOwnerId = function (owner, id) {
        this._owner = owner;
        this._owner.transitionDelegates.push(this);
        this._id = id;
        return this;
    };
    TransitionDelegate.prototype.animationWillStart = function (animationID, context) {
        trace.write("START " + this._id, trace.categories.Transition);
    };
    TransitionDelegate.prototype.animationDidStop = function (animationID, finished, context) {
        if (finished) {
            trace.write("END " + this._id, trace.categories.Transition);
        }
        else {
            trace.write("CANCEL " + this._id, trace.categories.Transition);
        }
        if (this._owner) {
            var index = this._owner.transitionDelegates.indexOf(this);
            if (index > -1) {
                this._owner.transitionDelegates.splice(index, 1);
            }
        }
    };
    TransitionDelegate.ObjCExposedMethods = {
        "animationWillStart": { returns: interop.types.void, params: [NSString, NSObject] },
        "animationDidStop": { returns: interop.types.void, params: [NSString, NSNumber, NSObject] }
    };
    return TransitionDelegate;
}(NSObject));
var _defaultTransitionDuration = 0.35;
var UINavigationControllerImpl = (function (_super) {
    __extends(UINavigationControllerImpl, _super);
    function UINavigationControllerImpl() {
        _super.apply(this, arguments);
    }
    UINavigationControllerImpl.initWithOwner = function (owner) {
        var controller = UINavigationControllerImpl.new();
        controller._owner = owner;
        controller._transitionDelegates = new Array();
        return controller;
    };
    Object.defineProperty(UINavigationControllerImpl.prototype, "owner", {
        get: function () {
            return this._owner.get();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(UINavigationControllerImpl.prototype, "transitionDelegates", {
        get: function () {
            return this._transitionDelegates;
        },
        enumerable: true,
        configurable: true
    });
    UINavigationControllerImpl.prototype.viewDidLoad = function () {
        var owner = this._owner.get();
        if (owner) {
            owner.onLoaded();
        }
    };
    UINavigationControllerImpl.prototype.viewDidLayoutSubviews = function () {
        var owner = this._owner.get();
        if (owner) {
            trace.write(this._owner + " viewDidLayoutSubviews, isLoaded = " + owner.isLoaded, trace.categories.ViewHierarchy);
            owner._updateLayout();
        }
    };
    UINavigationControllerImpl.prototype.navigationControllerWillShowViewControllerAnimated = function (navigationController, viewController, animated) {
        trace.write("UINavigationControllerImpl.navigationControllerWillShowViewControllerAnimated(" + navigationController + ", " + viewController + ", " + animated + ")", trace.categories.NativeLifecycle);
        var frame = this._owner.get();
        if (!frame) {
            return;
        }
        var newEntry = viewController[ENTRY];
        var newPage = newEntry.resolvedPage;
        if (!newPage.parent) {
            if (!frame._currentEntry) {
                frame._currentEntry = newEntry;
            }
            else {
                frame._navigateToEntry = newEntry;
            }
            frame._addView(newPage);
            frame.remeasureFrame();
        }
        else if (newPage.parent !== frame) {
            throw new Error("Page is already shown on another frame.");
        }
        newPage.actionBar.update();
        viewController["willShowCalled"] = true;
    };
    UINavigationControllerImpl.prototype.navigationControllerDidShowViewControllerAnimated = function (navigationController, viewController, animated) {
        trace.write("UINavigationControllerImpl.navigationControllerDidShowViewControllerAnimated(" + navigationController + ", " + viewController + ", " + animated + ")", trace.categories.NativeLifecycle);
        if (viewController["willShowCalled"] === undefined) {
            return;
        }
        else {
            viewController["willShowCalled"] = undefined;
        }
        var frame = this._owner.get();
        if (!frame) {
            return;
        }
        var newEntry = viewController[ENTRY];
        var newPage = newEntry.resolvedPage;
        var backStack = frame.backStack;
        var currentEntry = backStack.length > 0 ? backStack[backStack.length - 1] : null;
        var isBack = currentEntry && newEntry === currentEntry;
        var currentNavigationContext;
        var navigationQueue = frame._navigationQueue;
        for (var i = 0; i < navigationQueue.length; i++) {
            if (navigationQueue[i].entry === newEntry) {
                currentNavigationContext = navigationQueue[i];
                break;
            }
        }
        var isBackNavigation = currentNavigationContext ? currentNavigationContext.isBackNavigation : false;
        if (isBack) {
            try {
                frame._shouldSkipNativePop = true;
                frame.goBack();
            }
            finally {
                frame._shouldSkipNativePop = false;
            }
        }
        var page = frame.currentPage;
        if (page && !navigationController.viewControllers.containsObject(page.ios)) {
            frame._removeView(page);
        }
        frame._navigateToEntry = null;
        frame._currentEntry = newEntry;
        frame.remeasureFrame();
        frame._updateActionBar(newPage);
        newPage.onNavigatedTo(isBack || isBackNavigation);
        frame._processNavigationQueue(newPage);
    };
    UINavigationControllerImpl.prototype.supportedInterfaceOrientation = function () {
        return UIInterfaceOrientationMask.UIInterfaceOrientationMaskAll;
    };
    UINavigationControllerImpl.prototype.pushViewControllerAnimated = function (viewController, animated) {
        var _this = this;
        var navigationTransition = viewController[TRANSITION];
        trace.write("UINavigationControllerImpl.pushViewControllerAnimated(" + viewController + ", " + animated + "); transition: " + JSON.stringify(navigationTransition), trace.categories.NativeLifecycle);
        if (!animated || !navigationTransition) {
            _super.prototype.pushViewControllerAnimated.call(this, viewController, animated);
            return;
        }
        var nativeTransition = _getNativeTransition(navigationTransition, true);
        if (!nativeTransition) {
            _super.prototype.pushViewControllerAnimated.call(this, viewController, animated);
            return;
        }
        var duration = navigationTransition.duration ? navigationTransition.duration / 1000 : _defaultTransitionDuration;
        var curve = _getNativeCurve(navigationTransition);
        var id = _getTransitionId(nativeTransition, "push");
        var transitionDelegate = TransitionDelegate.new().initWithOwnerId(this, id);
        UIView.animateWithDurationAnimations(duration, function () {
            UIView.setAnimationDelegate(transitionDelegate);
            UIView.setAnimationWillStartSelector("animationWillStart");
            UIView.setAnimationDidStopSelector("animationDidStop");
            UIView.setAnimationCurve(curve);
            _super.prototype.pushViewControllerAnimated.call(_this, viewController, false);
            UIView.setAnimationTransitionForViewCache(nativeTransition, _this.view, true);
        });
    };
    UINavigationControllerImpl.prototype.setViewControllersAnimated = function (viewControllers, animated) {
        var _this = this;
        var viewController = viewControllers.lastObject;
        var navigationTransition = viewController[TRANSITION];
        trace.write("UINavigationControllerImpl.setViewControllersAnimated(" + viewControllers + ", " + animated + "); transition: " + JSON.stringify(navigationTransition), trace.categories.NativeLifecycle);
        if (!animated || !navigationTransition) {
            _super.prototype.setViewControllersAnimated.call(this, viewControllers, animated);
            return;
        }
        var nativeTransition = _getNativeTransition(navigationTransition, true);
        if (!nativeTransition) {
            _super.prototype.setViewControllersAnimated.call(this, viewControllers, animated);
            return;
        }
        var duration = navigationTransition.duration ? navigationTransition.duration / 1000 : _defaultTransitionDuration;
        var curve = _getNativeCurve(navigationTransition);
        var id = _getTransitionId(nativeTransition, "set");
        var transitionDelegate = TransitionDelegate.new().initWithOwnerId(this, id);
        UIView.animateWithDurationAnimations(duration, function () {
            UIView.setAnimationDelegate(transitionDelegate);
            UIView.setAnimationWillStartSelector("animationWillStart");
            UIView.setAnimationDidStopSelector("animationDidStop");
            UIView.setAnimationCurve(curve);
            _super.prototype.setViewControllersAnimated.call(_this, viewControllers, false);
            UIView.setAnimationTransitionForViewCache(nativeTransition, _this.view, true);
        });
    };
    UINavigationControllerImpl.prototype.popViewControllerAnimated = function (animated) {
        var _this = this;
        var lastViewController = this.viewControllers.lastObject;
        var navigationTransition = lastViewController[TRANSITION];
        trace.write("UINavigationControllerImpl.popViewControllerAnimated(" + animated + "); transition: " + JSON.stringify(navigationTransition), trace.categories.NativeLifecycle);
        if (!animated || !navigationTransition) {
            return _super.prototype.popViewControllerAnimated.call(this, animated);
        }
        var nativeTransition = _getNativeTransition(navigationTransition, false);
        if (!nativeTransition) {
            return _super.prototype.popViewControllerAnimated.call(this, animated);
        }
        var duration = navigationTransition.duration ? navigationTransition.duration / 1000 : _defaultTransitionDuration;
        var curve = _getNativeCurve(navigationTransition);
        var id = _getTransitionId(nativeTransition, "pop");
        var transitionDelegate = TransitionDelegate.new().initWithOwnerId(this, id);
        UIView.animateWithDurationAnimations(duration, function () {
            UIView.setAnimationDelegate(transitionDelegate);
            UIView.setAnimationWillStartSelector("animationWillStart");
            UIView.setAnimationDidStopSelector("animationDidStop");
            UIView.setAnimationCurve(curve);
            _super.prototype.popViewControllerAnimated.call(_this, false);
            UIView.setAnimationTransitionForViewCache(nativeTransition, _this.view, true);
        });
        return null;
    };
    UINavigationControllerImpl.prototype.popToViewControllerAnimated = function (viewController, animated) {
        var _this = this;
        var lastViewController = this.viewControllers.lastObject;
        var navigationTransition = lastViewController[TRANSITION];
        trace.write("UINavigationControllerImpl.popToViewControllerAnimated(" + viewController + ", " + animated + "); transition: " + JSON.stringify(navigationTransition), trace.categories.NativeLifecycle);
        if (!animated || !navigationTransition) {
            return _super.prototype.popToViewControllerAnimated.call(this, viewController, animated);
        }
        var nativeTransition = _getNativeTransition(navigationTransition, false);
        if (!nativeTransition) {
            return _super.prototype.popToViewControllerAnimated.call(this, viewController, animated);
        }
        var duration = navigationTransition.duration ? navigationTransition.duration / 1000 : _defaultTransitionDuration;
        var curve = _getNativeCurve(navigationTransition);
        var id = _getTransitionId(nativeTransition, "popTo");
        var transitionDelegate = TransitionDelegate.new().initWithOwnerId(this, id);
        UIView.animateWithDurationAnimations(duration, function () {
            UIView.setAnimationDelegate(transitionDelegate);
            UIView.setAnimationWillStartSelector("animationWillStart");
            UIView.setAnimationDidStopSelector("animationDidStop");
            UIView.setAnimationCurve(curve);
            _super.prototype.popToViewControllerAnimated.call(_this, viewController, false);
            UIView.setAnimationTransitionForViewCache(nativeTransition, _this.view, true);
        });
        return null;
    };
    UINavigationControllerImpl.prototype.navigationControllerAnimationControllerForOperationFromViewControllerToViewController = function (navigationController, operation, fromVC, toVC) {
        var viewController;
        switch (operation) {
            case UINavigationControllerOperation.UINavigationControllerOperationPush:
                viewController = toVC;
                break;
            case UINavigationControllerOperation.UINavigationControllerOperationPop:
                viewController = fromVC;
                break;
        }
        if (!viewController) {
            return null;
        }
        var navigationTransition = viewController[TRANSITION];
        if (!navigationTransition) {
            return null;
        }
        trace.write("UINavigationControllerImpl.navigationControllerAnimationControllerForOperationFromViewControllerToViewController(" + operation + ", " + fromVC + ", " + toVC + "), transition: " + JSON.stringify(navigationTransition), trace.categories.NativeLifecycle);
        var _transitionModule = require("ui/transition");
        return _transitionModule._createIOSAnimatedTransitioning(navigationTransition, operation, fromVC, toVC);
    };
    UINavigationControllerImpl.ObjCProtocols = [UINavigationControllerDelegate];
    return UINavigationControllerImpl;
}(UINavigationController));
function _getTransitionId(nativeTransition, transitionType) {
    var name;
    switch (nativeTransition) {
        case UIViewAnimationTransition.UIViewAnimationTransitionCurlDown:
            name = "CurlDown";
            break;
        case UIViewAnimationTransition.UIViewAnimationTransitionCurlUp:
            name = "CurlUp";
            break;
        case UIViewAnimationTransition.UIViewAnimationTransitionFlipFromLeft:
            name = "FlipFromLeft";
            break;
        case UIViewAnimationTransition.UIViewAnimationTransitionFlipFromRight:
            name = "FlipFromRight";
            break;
        case UIViewAnimationTransition.UIViewAnimationTransitionNone:
            name = "None";
            break;
    }
    return name + " " + transitionType;
}
function _getNativeTransition(navigationTransition, push) {
    if (navigationTransition.name) {
        switch (navigationTransition.name.toLowerCase()) {
            case "flip":
            case "flipright":
                return push ? UIViewAnimationTransition.UIViewAnimationTransitionFlipFromRight : UIViewAnimationTransition.UIViewAnimationTransitionFlipFromLeft;
            case "flipleft":
                return push ? UIViewAnimationTransition.UIViewAnimationTransitionFlipFromLeft : UIViewAnimationTransition.UIViewAnimationTransitionFlipFromRight;
            case "curl":
            case "curlup":
                return push ? UIViewAnimationTransition.UIViewAnimationTransitionCurlUp : UIViewAnimationTransition.UIViewAnimationTransitionCurlDown;
            case "curldown":
                return push ? UIViewAnimationTransition.UIViewAnimationTransitionCurlDown : UIViewAnimationTransition.UIViewAnimationTransitionCurlUp;
        }
    }
    return null;
}
function _getNativeCurve(transition) {
    if (transition.curve) {
        switch (transition.curve) {
            case enums.AnimationCurve.easeIn:
                trace.write("Transition curve resolved to UIViewAnimationCurve.UIViewAnimationCurveEaseIn.", trace.categories.Transition);
                return UIViewAnimationCurve.UIViewAnimationCurveEaseIn;
            case enums.AnimationCurve.easeOut:
                trace.write("Transition curve resolved to UIViewAnimationCurve.UIViewAnimationCurveEaseOut.", trace.categories.Transition);
                return UIViewAnimationCurve.UIViewAnimationCurveEaseOut;
            case enums.AnimationCurve.easeInOut:
                trace.write("Transition curve resolved to UIViewAnimationCurve.UIViewAnimationCurveEaseInOut.", trace.categories.Transition);
                return UIViewAnimationCurve.UIViewAnimationCurveEaseInOut;
            case enums.AnimationCurve.linear:
                trace.write("Transition curve resolved to UIViewAnimationCurve.UIViewAnimationCurveLinear.", trace.categories.Transition);
                return UIViewAnimationCurve.UIViewAnimationCurveLinear;
            default:
                trace.write("Transition curve resolved to original: " + transition.curve, trace.categories.Transition);
                return transition.curve;
        }
    }
    return UIViewAnimationCurve.UIViewAnimationCurveEaseInOut;
}
exports._getNativeCurve = _getNativeCurve;
var iOSFrame = (function () {
    function iOSFrame(owner) {
        this._controller = UINavigationControllerImpl.initWithOwner(new WeakRef(owner));
        this._controller.delegate = this._controller;
        this._controller.automaticallyAdjustsScrollViewInsets = false;
        this._navBarVisibility = enums.NavigationBarVisibility.auto;
    }
    Object.defineProperty(iOSFrame.prototype, "controller", {
        get: function () {
            return this._controller;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(iOSFrame.prototype, "showNavigationBar", {
        get: function () {
            return this._showNavigationBar;
        },
        set: function (value) {
            var change = this._showNavigationBar !== value;
            this._showNavigationBar = value;
            this._controller.setNavigationBarHiddenAnimated(!value, true);
            var currentPage = this._controller.owner.currentPage;
            if (currentPage && change) {
                currentPage.requestLayout();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(iOSFrame.prototype, "navBarVisibility", {
        get: function () {
            return this._navBarVisibility;
        },
        set: function (value) {
            this._navBarVisibility = value;
        },
        enumerable: true,
        configurable: true
    });
    return iOSFrame;
}());


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json;
using OpenWeen.Core.Helper;
using OpenWeen.Core.Model.Status;
using OpenWeen.Core.Model.Types;

namespace OpenWeen.Core.Api.Statuses
{
    /// <summary>
    /// 发布/转发微博
    /// </summary>
    public static class PostWeibo
    {
        /// <summary>
        /// 发布一条新微博
        /// </summary>
        /// <param name="status">要发布的微博文本内容,内容不超过140个汉字。</param>
        /// <param name="visible">微博的可见性,0:所有人能看,1:仅自己可见,2:密友可见,3:指定分组可见,默认为0。</param>
        /// <param name="list_id">微博的保护投递指定分组ID,只有当visible参数为3时生效且必选。</param>
        /// <param name="plat">纬度,有效范围:-90.0到+90.0,+表示北纬,默认为0.0。</param>
        /// <param name="plong">经度,有效范围:-180.0到+180.0,+表示东经,默认为0.0。</param>
        /// <returns></returns>
        public static async Task<MessageModel> Post(string status, WeiboVisibility visible = WeiboVisibility.All, string list_id = "", float plat = 0f, float plong = 0f)
        {
            Dictionary<string, HttpContent> param = new Dictionary<string, HttpContent>()
            {
                { nameof(status), new StringContent(status) },
                { nameof(visible), new StringContent(visible.ToString("D")) },
                { "lat", new StringContent(plat.ToString()) },
                { "long", new StringContent(plong.ToString()) },
            };
            CheckForVisibility(visible, list_id, ref param);
            return JsonConvert.DeserializeObject<MessageModel>(await HttpHelper.PostAsync(Constants.UPDATE, param));
        }

        /// <summary>
        /// 上传图片并发布一条新微博
        /// </summary>
        /// <param name="status">要发布的微博文本内容,内容不超过140个汉字。</param>
        /// <param name="pic">要上传的图片,仅支持JPEG、GIF、PNG格式,图片大小小于5M。</param>
        /// <param name="visible">微博的可见性,0:所有人能看,1:仅自己可见,2:密友可见,3:指定分组可见,默认为0。</param>
        /// <param name="list_id">微博的保护投递指定分组ID,只有当visible参数为3时生效且必选。</param>
        /// <param name="plat">纬度,有效范围:-90.0到+90.0,+表示北纬,默认为0.0。</param>
        /// <param name="plong">经度,有效范围:-180.0到+180.0,+表示东经,默认为0.0。</param>
        /// <returns></returns>
        public static async Task<MessageModel> PostWithPic(string status, byte[] pic, WeiboVisibility visible = WeiboVisibility.All, string list_id = "", float plat = 0f, float plong = 0f)
        {
            Dictionary<string, HttpContent> param = new Dictionary<string, HttpContent>()
            {
                { nameof(status), new StringContent(status) },
                { nameof(pic), new StreamContent(new MemoryStream(pic)) },
                { nameof(visible), new StringContent(visible.ToString("D")) },
                { "lat", new StringContent(plat.ToString()) },
                { "long", new StringContent(plong.ToString()) },
            };
            CheckForVisibility(visible, list_id, ref param);
            return JsonConvert.DeserializeObject<MessageModel>(await HttpHelper.PostAsync(Constants.UPLOAD, param));
        }

        /// <summary>
        /// 检查参数是否正确
        /// </summary>
        /// <param name="visible"></param>
        /// <param name="list_id"></param>
        /// <param name="param"></param>
        private static void CheckForVisibility(WeiboVisibility visible, string list_id, ref Dictionary<string, HttpContent> param)
        {
            if (visible == WeiboVisibility.SpecifiedGroup)
                if (string.IsNullOrEmpty(list_id))
                    throw new ArgumentException($"list_id can not be empty or null when visible == WeiboVisibility.SpecifiedGroup");
                else
                    param.Add(nameof(list_id), new StringContent(list_id));
        }

        /// <summary>
        /// 转发一条微博
        /// </summary>
        /// <param name="id">要转发的微博ID。</param>
        /// <param name="status">添加的转发文本,内容不超过140个汉字,不填则默认为"转发微博"。</param>
        /// <param name="is_comment">是否在转发的同时发表评论,0:否、1:评论给当前微博、2:评论给原微博、3:都评论,默认为0 。</param>
        /// <returns></returns>
        public static async Task<MessageModel> Repost(long id, string status, RepostType is_comment = RepostType.None)
        {
            Dictionary<string, HttpContent> param = new Dictionary<string, HttpContent>()
            {
                { nameof(status), new StringContent(string.IsNullOrEmpty(status) ? "转发微博" : status) },
                { nameof(id), new StringContent(id.ToString()) },
                { nameof(is_comment), new StringContent(is_comment.ToString("D")) },
            };
            return JsonConvert.DeserializeObject<MessageModel>(await HttpHelper.PostAsync(Constants.REPOST, param));
        }

        public static async Task<MessageModel> RepostWithPic(long id, string status, MediaModel media, RepostType is_comment = RepostType.None)
        {
            Dictionary<string, HttpContent> param = new Dictionary<string, HttpContent>()
            {
                { nameof(status), new StringContent(string.IsNullOrEmpty(status) ? "转发微博" : status) },
                { nameof(id), new StringContent(id.ToString()) },
                { nameof(is_comment), new StringContent(is_comment.ToString("D")) },
                { nameof(media), new StringContent(media.ToString()) },
                { "source", new StringContent("211160679") },
                { "from", new StringContent("1055095010") }
            };
            return JsonConvert.DeserializeObject<MessageModel>(await HttpHelper.PostAsync("https://api.weibo.cn/2/statuses/repost", param));
        }

        /// <summary>
        /// 根据微博ID删除指定微博
        /// </summary>
        /// <param name="id">需要删除的微博ID。</param>
        /// <returns></returns>
        public static async Task<MessageModel> DeletePost(long id)
        {
            Dictionary<string, HttpContent> param = new Dictionary<string, HttpContent>()
            {
                { nameof(id), new StringContent(id.ToString()) },
            };
            return JsonConvert.DeserializeObject<MessageModel>(await HttpHelper.PostAsync(Constants.DESTROY, param));
        }

        /// <summary>
        /// 上传图片,返回图片picid,urls(3个url)
        /// </summary>
        /// <param name="pic">需要上传的图片。</param>
        /// <returns></returns>
        public static async Task<PictureModel> UploadPicture(byte[] pic)
        {
            Dictionary<string, HttpContent> param = new Dictionary<string, HttpContent>()
            {
                { nameof(pic), new StreamContent(new MemoryStream(pic)) },
            };
            return JsonConvert.DeserializeObject<PictureModel>(await HttpHelper.PostAsync(Constants.UPLOAD_PIC, param));
        }

        /// <summary>
        /// 指定一个图片URL地址抓取后上传并同时发布一条新微博
        /// </summary>
        /// <param name="status">要发布的微博文本内容内容不超过140个汉字。</param>
        /// <param name="pics">已经上传的图片pid,多个时使用英文半角逗号符分隔,最多不超过9个。图片可以通过<see cref="UploadPicture(byte[])"/>上传</param>
        /// <param name="visible">微博的可见性,0:所有人能看,1:仅自己可见,2:密友可见,3:指定分组可见,默认为0。</param>
        /// <param name="list_id">微博的保护投递指定分组ID,只有当visible参数为3时生效且必选。</param>
        /// <param name="plat">纬度,有效范围:-90.0到+90.0,+表示北纬,默认为0.0。</param>
        /// <param name="plong">经度,有效范围:-180.0到+180.0,+表示东经,默认为0.0。</param>
        /// <returns></returns>
        public static async Task<MessageModel> PostWithMultiPics(string status, string pics, WeiboVisibility visible = WeiboVisibility.All, string list_id = "", float plat = 0f, float plong = 0f)
        {
            Dictionary<string, HttpContent> param = new Dictionary<string, HttpContent>()
            {
                { nameof(status), new StringContent(status) },
                { "pic_id", new StringContent(pics) },
                { nameof(visible), new StringContent(visible.ToString("D")) },
                { "lat", new StringContent(plat.ToString()) },
                { "long", new StringContent(plong.ToString()) },
            };
            CheckForVisibility(visible, list_id, ref param);
            return JsonConvert.DeserializeObject<MessageModel>(await HttpHelper.PostAsync(Constants.UPLOAD_URL_TEXT, param));
        }
    }
}


text:
A rectangle is represented as a list `[x1, y1, x2, y2]`, where `(x1, y1)` are the coordinates of its bottom-left corner, and `(x2, y2)` are the coordinates of its top-right corner.

Two rectangles overlap if the area of their intersection is positive.  To be clear, two rectangles that only touch at the corner or edges do not overlap.

Given two (axis-aligned) rectangles, return whether they overlap.

**Example 1:**

Input: rec1 = [0,0,2,2], rec2 = [1,1,3,3]
Output: true

**Example 2:**

Input: rec1 = [0,0,1,1], rec2 = [1,0,2,1]
Output: false

**Notes:**

1. Both rectangles `rec1` and `rec2` are lists of 4 integers.
2. All coordinates in rectangles will be between `-10^9 `and` 10^9`.

### [Editorial](https://leetcode.com/articles/rectangle-overlap/)


text:
<!doctype html>

    <meta charset='utf8'>
    <title>Odin Test Suite</title>
    <link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen">

Test


text:
package org.foxlabs.validation.constraint;

import java.lang.annotation.Target;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

import org.foxlabs.validation.ValidationTarget;

/**
 * Checks whether value size of the annotated element is not less than allowed
 * minimum size.
 *
 * @author Fox Mulder
 * @see SizeConstraint
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD})
@ConstrainedBy({
    SizeConstraint.StringType.class,
    SizeConstraint.CollectionType.class,
    SizeConstraint.MapType.class,
    SizeConstraint.ArrayType.class
})
public @interface MinSize {

    /**
     * @return Allowed minimum size.
     */
    int value();

    /**
     * @return Overriding error message template. Empty string means that default
     *         message template should be used.
     */
    String message() default "";

    /**
     * @return Array of groups the constraint is applied on. Empty array means
     *         default group.
     */
    String[] groups() default {};

    /**
     * @return An object part to which constraint should be applied.
     *         {@link ValidationTarget#VALUE} will be used by default.
     */
    ValidationTarget[] targets() default {};

    /**
     * Defines several @MinSize annotations on the same element.
     *
     * @author Fox Mulder
     */
    @Retention(RetentionPolicy.RUNTIME)
    @Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD})
    public static @interface List {

        /**
         * @return @MinSize annotations.
         */
        MinSize[] value();

    }

}


text:
package net.teerapap.whatnext.view;

import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentManager;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import net.teerapap.whatnext.R;

public class MainActivity extends Activity {

    private String[] mMenuItems;
    private DrawerLayout mDrawerLayout;
    private ListView mDrawerList;
    private ActionBarDrawerToggle mDrawerToggle;

    private WhatNextFragment mWhatNextFragment;
    private DoneFragment mDoneFragment;

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

        mMenuItems = getResources().getStringArray(R.array.menu_items);
        mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
        mDrawerList = (ListView) findViewById(R.id.left_drawer);

        // set a custom shadow that overlays the main content when the drawer opens
        mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
        // set up the drawer's list view with items and click listener
        mDrawerList.setAdapter(new ArrayAdapter<String>(this,
                R.layout.drawer_list_item, mMenuItems));
        mDrawerList.setOnItemClickListener(new ListView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                openMenu(position);
                mDrawerLayout.closeDrawer(mDrawerList);
            }
        });

        // enable ActionBar app icon to behave as action to toggle nav drawer
        getActionBar().setDisplayHomeAsUpEnabled(true);
        getActionBar().setHomeButtonEnabled(true);

        // ActionBarDrawerToggle ties together the the proper interactions
        // between the sliding drawer and the action bar app icon
        mDrawerToggle = new ActionBarDrawerToggle(
                this,                  /* host Activity */
                mDrawerLayout,         /* DrawerLayout object */
                R.drawable.ic_drawer,  /* nav drawer image to replace 'Up' caret */
                R.string.drawer_open,  /* description for accessibility */
                R.string.drawer_close  /* description for accessibility */
        );
        mDrawerLayout.setDrawerListener(mDrawerToggle);

        // Create static fragment
        mWhatNextFragment = WhatNextFragment.newInstance();
        mDoneFragment = DoneFragment.newInstance();

        if (savedInstanceState == null) {
            mDrawerList.setItemChecked(0, true);
            openMenu(0);
        }
    }

    /**
     * When using the ActionBarDrawerToggle, you must call it during
     * onPostCreate() and onConfigurationChanged()...
     */
    @Override
    protected void onPostCreate(Bundle savedInstanceState) {
        super.onPostCreate(savedInstanceState);
        // Sync the toggle state after onRestoreInstanceState has occurred.
        mDrawerToggle.syncState();
    }

    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        // Pass any configuration change to the drawer toggles
        mDrawerToggle.onConfigurationChanged(newConfig);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.main, menu);
        return super.onCreateOptionsMenu(menu);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // The action bar home/up action should open or close the drawer.
        // ActionBarDrawerToggle will take care of this.
        if (mDrawerToggle.onOptionsItemSelected(item)) {
            return true;
        }
        // Handle action buttons
        switch (item.getItemId()) {
            case R.id.action_new_task:
                // Start new tasks activity
                Intent intent = new Intent(this, NewTaskActivity.class);
                startActivity(intent);
                overridePendingTransition(R.anim.abc_fade_in, R.anim.abc_fade_out);
                return true;
            default:
                return super.onOptionsItemSelected(item);
        }
    }

    /**
     * Open menu at position.
     *
     * @param position
     */
    public void openMenu(int position) {
        // update the main content by replacing fragments
        Fragment fragment;

        switch (position) {
            case 0:
                fragment = this.mWhatNextFragment;
                break;
            case 1:
                fragment = this.mDoneFragment;
                break;
            default:
                return;
        }

        // Replace current fragment
        FragmentManager fragmentManager = getFragmentManager();
        fragmentManager.beginTransaction().replace(R.id.content_frame, fragment).commit();
    }

}


text:
package protobuf

import proto "code.google.com/p/gogoprotobuf/proto"
import json "encoding/json"
import math "math"

// discarding unused import gogoproto "code.google.com/p/gogoprotobuf/gogoproto/gogo.pb"

import io3 "io"
import code_google_com_p_gogoprotobuf_proto6 "code.google.com/p/gogoprotobuf/proto"

import fmt9 "fmt"
import strings6 "strings"
import reflect6 "reflect"

import fmt10 "fmt"
import strings7 "strings"
import code_google_com_p_gogoprotobuf_proto7 "code.google.com/p/gogoprotobuf/proto"
import sort3 "sort"
import strconv3 "strconv"
import reflect7 "reflect"

import fmt11 "fmt"
import bytes3 "bytes"

// Reference proto, json, and math imports to suppress error if they are not otherwise used.
var _ = proto.Marshal
var _ = &json.SyntaxError{}
var _ = math.Inf

type RequestVoteRequest struct {
	Term             *uint64 `protobuf:"varint,1,req" json:"Term,omitempty"`
	LastLogIndex     *uint64 `protobuf:"varint,2,req" json:"LastLogIndex,omitempty"`
	LastLogTerm      *uint64 `protobuf:"varint,3,req" json:"LastLogTerm,omitempty"`
	CandidateName    *string `protobuf:"bytes,4,req" json:"CandidateName,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (m *RequestVoteRequest) Reset()      { *m = RequestVoteRequest{} }
func (*RequestVoteRequest) ProtoMessage() {}

func (m *RequestVoteRequest) GetTerm() uint64 {
	if m != nil && m.Term != nil {
		return *m.Term
	}
	return 0
}

func (m *RequestVoteRequest) GetLastLogIndex() uint64 {
	if m != nil && m.LastLogIndex != nil {
		return *m.LastLogIndex
	}
	return 0
}

func (m *RequestVoteRequest) GetLastLogTerm() uint64 {
	if m != nil && m.LastLogTerm != nil {
		return *m.LastLogTerm
	}
	return 0
}

func (m *RequestVoteRequest) GetCandidateName() string {
	if m != nil && m.CandidateName != nil {
		return *m.CandidateName
	}
	return ""
}

func init() {
}
func (m *RequestVoteRequest) Unmarshal(data []byte) error {
	l := len(data)
	index := 0
	for index < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if index >= l {
				return io3.ErrUnexpectedEOF
			}
			b := data[index]
			index++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return proto.ErrWrongType
			}
			var v uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io3.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Term = &v
		case 2:
			if wireType != 0 {
				return proto.ErrWrongType
			}
			var v uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io3.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.LastLogIndex = &v
		case 3:
			if wireType != 0 {
				return proto.ErrWrongType
			}
			var v uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io3.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.LastLogTerm = &v
		case 4:
			if wireType != 2 {
				return proto.ErrWrongType
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io3.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				stringLen |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + int(stringLen)
			if postIndex > l {
				return io3.ErrUnexpectedEOF
			}
			s := string(data[index:postIndex])
			m.CandidateName = &s
			index = postIndex
		default:
			var sizeOfWire int
			for {
				sizeOfWire++
				wire >>= 7
				if wire == 0 {
					break
				}
			}
			index -= sizeOfWire
			skippy, err := code_google_com_p_gogoprotobuf_proto6.Skip(data[index:])
			if err != nil {
				return err
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
			index += skippy
		}
	}
	return nil
}
func (this *RequestVoteRequest) String() string {
	if this == nil {
		return "nil"
	}
	s := strings6.Join([]string{`&RequestVoteRequest{`,
		`Term:` + valueToStringRequestVoteRequest(this.Term) + `,`,
		`LastLogIndex:` + valueToStringRequestVoteRequest(this.LastLogIndex) + `,`,
		`LastLogTerm:` + valueToStringRequestVoteRequest(this.LastLogTerm) + `,`,
		`CandidateName:` + valueToStringRequestVoteRequest(this.CandidateName) + `,`,
		`XXX_unrecognized:` + fmt9.Sprintf("%v", this.XXX_unrecognized) + `,`,
		`}`,
	}, "")
	return s
}
func valueToStringRequestVoteRequest(v interface{}) string {
	rv := reflect6.ValueOf(v)
	if rv.IsNil() {
		return "nil"
	}
	pv := reflect6.Indirect(rv).Interface()
	return fmt9.Sprintf("*%v", pv)
}
func (m *RequestVoteRequest) Size() (n int) {
	var l int
	_ = l
	if m.Term != nil {
		n += 1 + sovRequestVoteRequest(uint64(*m.Term))
	}
	if m.LastLogIndex != nil {
		n += 1 + sovRequestVoteRequest(uint64(*m.LastLogIndex))
	}
	if m.LastLogTerm != nil {
		n += 1 + sovRequestVoteRequest(uint64(*m.LastLogTerm))
	}
	if m.CandidateName != nil {
		l = len(*m.CandidateName)
		n += 1 + l + sovRequestVoteRequest(uint64(l))
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func sovRequestVoteRequest(x uint64) (n int) {
	for {
		n++
		x >>= 7
		if x == 0 {
			break
		}
	}
	return n
}
func sozRequestVoteRequest(x uint64) (n int) {
	return sovRequestVoteRequest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
	return sovRequestVoteRequest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func NewPopulatedRequestVoteRequest(r randyRequestVoteRequest, easy bool) *RequestVoteRequest {
	this := &RequestVoteRequest{}
	v1 := uint64(r.Uint32())
	this.Term = &v1
	v2 := uint64(r.Uint32())
	this.LastLogIndex = &v2
	v3 := uint64(r.Uint32())
	this.LastLogTerm = &v3
	v4 := randStringRequestVoteRequest(r)
	this.CandidateName = &v4
	if !easy && r.Intn(10) != 0 {
		this.XXX_unrecognized = randUnrecognizedRequestVoteRequest(r, 5)
	}
	return this
}

type randyRequestVoteRequest interface {
	Float32() float32
	Float64() float64
	Int63() int64
	Int31() int32
	Uint32() uint32
	Intn(n int) int
}

func randUTF8RuneRequestVoteRequest(r randyRequestVoteRequest) rune {
	res := rune(r.Uint32() % 1112064)
	if 55296 <= res {
		res += 2047
	}
	return res
}
func randStringRequestVoteRequest(r randyRequestVoteRequest) string {
	v5 := r.Intn(100)
	tmps := make([]rune, v5)
	for i := 0; i < v5; i++ {
		tmps[i] = randUTF8RuneRequestVoteRequest(r)
	}
	return string(tmps)
}
func randUnrecognizedRequestVoteRequest(r randyRequestVoteRequest, maxFieldNumber int) (data []byte) {
	l := r.Intn(5)
	for i := 0; i < l; i++ {
		wire := r.Intn(4)
		if wire == 3 {
			wire = 5
		}
		fieldNumber := maxFieldNumber + r.Intn(100)
		data = randFieldRequestVoteRequest(data, r, fieldNumber, wire)
	}
	return data
}
func randFieldRequestVoteRequest(data []byte, r randyRequestVoteRequest, fieldNumber int, wire int) []byte {
	key := uint32(fieldNumber)<<3 | uint32(wire)
	switch wire {
	case 0:
		data = encodeVarintPopulateRequestVoteRequest(data, uint64(key))
		data = encodeVarintPopulateRequestVoteRequest(data, uint64(r.Int63()))
	case 1:
		data = encodeVarintPopulateRequestVoteRequest(data, uint64(key))
		data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
	case 2:
		data = encodeVarintPopulateRequestVoteRequest(data, uint64(key))
		ll := r.Intn(100)
		data = encodeVarintPopulateRequestVoteRequest(data, uint64(ll))
		for j := 0; j < ll; j++ {
			data = append(data, byte(r.Intn(256)))
		}
	default:
		data = encodeVarintPopulateRequestVoteRequest(data, uint64(key))
		data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
	}
	return data
}
func encodeVarintPopulateRequestVoteRequest(data []byte, v uint64) []byte {
	for v >= 1<<7 {
		data = append(data, uint8(uint64(v)&0x7f|0x80))
		v >>= 7
	}
	data = append(data, uint8(v))
	return data
}
func (m *RequestVoteRequest) Marshal() (data []byte, err error) {
	size := m.Size()
	data = make([]byte, size)
	n, err := m.MarshalTo(data)
	if err != nil {
		return nil, err
	}
	return data[:n], nil
}

func (m *RequestVoteRequest) MarshalTo(data []byte) (n int, err error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Term != nil {
		data[i] = 0x8
		i++
		i = encodeVarintRequestVoteRequest(data, i, uint64(*m.Term))
	}
	if m.LastLogIndex != nil {
		data[i] = 0x10
		i++
		i = encodeVarintRequestVoteRequest(data, i, uint64(*m.LastLogIndex))
	}
	if m.LastLogTerm != nil {
		data[i] = 0x18
		i++
		i = encodeVarintRequestVoteRequest(data, i, uint64(*m.LastLogTerm))
	}
	if m.CandidateName != nil {
		data[i] = 0x22
		i++
		i = encodeVarintRequestVoteRequest(data, i, uint64(len(*m.CandidateName)))
		i += copy(data[i:], *m.CandidateName)
	}
	if m.XXX_unrecognized != nil {
		i += copy(data[i:], m.XXX_unrecognized)
	}
	return i, nil
}
func encodeFixed64RequestVoteRequest(data []byte, offset int, v uint64) int {
	data[offset] = uint8(v)
	data[offset+1] = uint8(v >> 8)
	data[offset+2] = uint8(v >> 16)
	data[offset+3] = uint8(v >> 24)
	data[offset+4] = uint8(v >> 32)
	data[offset+5] = uint8(v >> 40)
	data[offset+6] = uint8(v >> 48)
	data[offset+7] = uint8(v >> 56)
	return offset + 8
}
func encodeFixed32RequestVoteRequest(data []byte, offset int, v uint32) int {
	data[offset] = uint8(v)
	data[offset+1] = uint8(v >> 8)
	data[offset+2] = uint8(v >> 16)
	data[offset+3] = uint8(v >> 24)
	return offset + 4
}
func encodeVarintRequestVoteRequest(data []byte, offset int, v uint64) int {
	for v >= 1<<7 {
		data[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	data[offset] = uint8(v)
	return offset + 1
}
func (this *RequestVoteRequest) GoString() string {
	if this == nil {
		return "nil"
	}
	s := strings7.Join([]string{`&protobuf.RequestVoteRequest{` + `Term:` + valueToGoStringRequestVoteRequest(this.Term, "uint64"), `LastLogIndex:` + valueToGoStringRequestVoteRequest(this.LastLogIndex, "uint64"), `LastLogTerm:` + valueToGoStringRequestVoteRequest(this.LastLogTerm, "uint64"), `CandidateName:` + valueToGoStringRequestVoteRequest(this.CandidateName, "string"), `XXX_unrecognized:` + fmt10.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ")
	return s
}
func valueToGoStringRequestVoteRequest(v interface{}, typ string) string {
	rv := reflect7.ValueOf(v)
	if rv.IsNil() {
		return "nil"
	}
	pv := reflect7.Indirect(rv).Interface()
	return fmt10.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func extensionToGoStringRequestVoteRequest(e map[int32]code_google_com_p_gogoprotobuf_proto7.Extension) string {
	if e == nil {
		return "nil"
	}
	s := "map[int32]proto.Extension{"
	keys := make([]int, 0, len(e))
	for k := range e {
		keys = append(keys, int(k))
	}
	sort3.Ints(keys)
	ss := []string{}
	for _, k := range keys {
		ss = append(ss, strconv3.Itoa(k)+": "+e[int32(k)].GoString())
	}
	s += strings7.Join(ss, ",") + "}"
	return s
}
func (this *RequestVoteRequest) VerboseEqual(that interface{}) error {
	if that == nil {
		if this == nil {
			return nil
		}
		return fmt11.Errorf("that == nil && this != nil")
	}

	that1, ok := that.(*RequestVoteRequest)
	if !ok {
		return fmt11.Errorf("that is not of type *RequestVoteRequest")
	}
	if that1 == nil {
		if this == nil {
			return nil
		}
		return fmt11.Errorf("that is type *RequestVoteRequest but is nil && this != nil")
	} else if this == nil {
		return fmt11.Errorf("that is type *RequestVoteRequestbut is not nil && this == nil")
	}
	if this.Term != nil && that1.Term != nil {
		if *this.Term != *that1.Term {
			return fmt11.Errorf("Term this(%v) Not Equal that(%v)", *this.Term, *that1.Term)
		}
	} else if this.Term != nil {
		return fmt11.Errorf("this.Term == nil && that.Term != nil")
	} else if that1.Term != nil {
		return fmt11.Errorf("Term this(%v) Not Equal that(%v)", this.Term, that1.Term)
	}
	if this.LastLogIndex != nil && that1.LastLogIndex != nil {
		if *this.LastLogIndex != *that1.LastLogIndex {
			return fmt11.Errorf("LastLogIndex this(%v) Not Equal that(%v)", *this.LastLogIndex, *that1.LastLogIndex)
		}
	} else if this.LastLogIndex != nil {
		return fmt11.Errorf("this.LastLogIndex == nil && that.LastLogIndex != nil")
	} else if that1.LastLogIndex != nil {
		return fmt11.Errorf("LastLogIndex this(%v) Not Equal that(%v)", this.LastLogIndex, that1.LastLogIndex)
	}
	if this.LastLogTerm != nil && that1.LastLogTerm != nil {
		if *this.LastLogTerm != *that1.LastLogTerm {
			return fmt11.Errorf("LastLogTerm this(%v) Not Equal that(%v)", *this.LastLogTerm, *that1.LastLogTerm)
		}
	} else if this.LastLogTerm != nil {
		return fmt11.Errorf("this.LastLogTerm == nil && that.LastLogTerm != nil")
	} else if that1.LastLogTerm != nil {
		return fmt11.Errorf("LastLogTerm this(%v) Not Equal that(%v)", this.LastLogTerm, that1.LastLogTerm)
	}
	if this.CandidateName != nil && that1.CandidateName != nil {
		if *this.CandidateName != *that1.CandidateName {
			return fmt11.Errorf("CandidateName this(%v) Not Equal that(%v)", *this.CandidateName, *that1.CandidateName)
		}
	} else if this.CandidateName != nil {
		return fmt11.Errorf("this.CandidateName == nil && that.CandidateName != nil")
	} else if that1.CandidateName != nil {
		return fmt11.Errorf("CandidateName this(%v) Not Equal that(%v)", this.CandidateName, that1.CandidateName)
	}
	if !bytes3.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
		return fmt11.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
	}
	return nil
}
func (this *RequestVoteRequest) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*RequestVoteRequest)
	if !ok {
		return false
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if this.Term != nil && that1.Term != nil {
		if *this.Term != *that1.Term {
			return false
		}
	} else if this.Term != nil {
		return false
	} else if that1.Term != nil {
		return false
	}
	if this.LastLogIndex != nil && that1.LastLogIndex != nil {
		if *this.LastLogIndex != *that1.LastLogIndex {
			return false
		}
	} else if this.LastLogIndex != nil {
		return false
	} else if that1.LastLogIndex != nil {
		return false
	}
	if this.LastLogTerm != nil && that1.LastLogTerm != nil {
		if *this.LastLogTerm != *that1.LastLogTerm {
			return false
		}
	} else if this.LastLogTerm != nil {
		return false
	} else if that1.LastLogTerm != nil {
		return false
	}
	if this.CandidateName != nil && that1.CandidateName != nil {
		if *this.CandidateName != *that1.CandidateName {
			return false
		}
	} else if this.CandidateName != nil {
		return false
	} else if that1.CandidateName != nil {
		return false
	}
	if !bytes3.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
		return false
	}
	return true
}


text:
<!--
id: 32295224
link: http://tumblr.atmos.org/post/32295224/giles-bowkett-three-ways-to-say-the-same-thing
slug: giles-bowkett-three-ways-to-say-the-same-thing
date: Sat Apr 19 2008 22:52:45 GMT-0700 (PDT)
publish: 2008-04-019
tags:
title: Giles Bowkett: Three Ways To Say The Same Thing
-->

Giles Bowkett: Three Ways To Say The Same Thing
===============================================

[http://gilesbowkett.blogspot.com/2008/04/three-ways-to-say-same-thing.html](http://gilesbowkett.blogspot.com/2008/04/three-ways-to-say-same-thing.html)

=\> true


text:
using System.Web.Mvc;

namespace Kheper.Web.Controllers
{
	public class HomeController : Controller
	{
		// GET: Home
		public ActionResult Index()
		{
			return View();
		}
	}
}


text:
<?php

// no direct access
defined('_JEXEC') or die;

echo JHtml::_('sliders.start', 'panel-sliders', array('useCookie' => '1'));

foreach ($this->modules as $module)
{
	$output = JModuleHelper::renderModule($module);
	$params = new JRegistry;
	$params->loadString($module->params);
	if ($params->get('automatic_title', '0') == '0')
	{
		echo JHtml::_('sliders.panel', $module->title, 'cpanel-panel-' . $module->name);
	}
	elseif (method_exists('mod'.$module->name.'Helper', 'getTitle'))
	{
		echo JHtml::_('sliders.panel', call_user_func_array(array('mod' . $module->name . 'Helper', 'getTitle'), array($params)), 'cpanel-panel-' . $module->name);
	}
	else
	{
		echo JHtml::_('sliders.panel', JText::_('MOD_' . $module->name . '_TITLE'), 'cpanel-panel-' . $module->name);
	}
	echo $output;
}

echo JHtml::_('sliders.end');


text:
// tslint:disable-next-line:no-implicit-dependencies
import intellectIcon from 'app/images/intellect.png';
// tslint:disable-next-line:no-implicit-dependencies
import disciplineIcon from 'app/images/discipline.png';
// tslint:disable-next-line:no-implicit-dependencies
import strengthIcon from 'app/images/strength.png';
import { D1CharacterStat } from '../store-types';

// Cooldowns
const cooldownsSuperA = ['5:00', '4:46', '4:31', '4:15', '3:58', '3:40'];
const cooldownsSuperB = ['5:30', '5:14', '4:57', '4:39', '4:20', '4:00'];
const cooldownsGrenade = ['1:00', '0:55', '0:49', '0:42', '0:34', '0:25'];
const cooldownsMelee = ['1:10', '1:04', '0:57', '0:49', '0:40', '0:29'];

// thanks to /u/iihavetoes for the bonuses at each level
// thanks to /u/tehdaw for the spreadsheet with bonuses
// https://docs.google.com/spreadsheets/d/1YyFDoHtaiOOeFoqc5Wc_WC2_qyQhBlZckQx5Jd4bJXI/edit?pref=2&pli=1#gid=0
export function getBonus(light: number, type: string): number {
  switch (type.toLowerCase()) {
    case 'helmet':
    case 'helmets':
      return light < 292 ? 15 : light < 307 ? 16 : light < 319 ? 17 : light < 332 ? 18 : 19;
    case 'gauntlets':
      return light < 287 ? 13 : light < 305 ? 14 : light < 319 ? 15 : light < 333 ? 16 : 17;
    case 'chest':
    case 'chest armor':
      return light < 287
        ? 20
        : light < 300
          ? 21
          : light < 310
            ? 22
            : light < 319
              ? 23
              : light < 328
                ? 24
                : 25;
    case 'leg':
    case 'leg armor':
      return light < 284
        ? 18
        : light < 298
          ? 19
          : light < 309
            ? 20
            : light < 319
              ? 21
              : light < 329
                ? 22
                : 23;
    case 'classitem':
    case 'class items':
    case 'ghost':
    case 'ghosts':
      return light < 295 ? 8 : light < 319 ? 9 : 10;
    case 'artifact':
    case 'artifacts':
      return light < 287
        ? 34
        : light < 295
          ? 35
          : light < 302
            ? 36
            : light < 308
              ? 37
              : light < 314
                ? 38
                : light < 319
                  ? 39
                  : light < 325
                    ? 40
                    : light < 330
                      ? 41
                      : light < 336
                        ? 42
                        : 43;
  }
  console.warn('item bonus not found', type);
  return 0;
}

const statsWithTiers = new Set(['STAT_INTELLECT', 'STAT_DISCIPLINE', 'STAT_STRENGTH']);
const stats = [
  'STAT_INTELLECT',
  'STAT_DISCIPLINE',
  'STAT_STRENGTH',
  'STAT_ARMOR',
  'STAT_RECOVERY',
  'STAT_AGILITY'
];

/**
 * Compute character-level stats (int, dis, str).
 */
export function getCharacterStatsData(statDefs, data) {
  const ret: { [statHash: string]: D1CharacterStat } = {};
  stats.forEach((statId) => {
    const stat = data.stats[statId];
    if (!stat) {
      return;
    }

    const statHash: D1CharacterStat = {
      id: statId,
      value: stat.value
    };

    statHash.id = statId;
    switch (statId) {
      case 'STAT_INTELLECT':
        statHash.name = 'Intellect';
        statHash.effect = 'Super';
        statHash.icon = intellectIcon;
        break;
      case 'STAT_DISCIPLINE':
        statHash.name = 'Discipline';
        statHash.effect = 'Grenade';
        statHash.icon = disciplineIcon;
        break;
      case 'STAT_STRENGTH':
        statHash.name = 'Strength';
        statHash.effect = 'Melee';
        statHash.icon = strengthIcon;
        break;
    }

    const statDef = statDefs.get(stat.statHash);
    if (statDef) {
      statHash.name = statDef.statName; // localized name
    }

    if (statsWithTiers.has(statId)) {
      statHash.normalized = statHash.value > 300 ? 300 : statHash.value;
      statHash.tier = Math.floor(statHash.normalized / 60);
      statHash.tierMax = 60;
      statHash.tiers = [];
      statHash.remaining = statHash.value;
      for (let t = 0; t < 5; t++) {
        statHash.remaining -= statHash.tiers[t] = statHash.remaining > 60 ? 60 : statHash.remaining;
      }
      if (data.peerView) {
        statHash.cooldown = getAbilityCooldown(
          data.peerView.equipment[0].itemHash,
          statId,
          statHash.tier
        );
      }
      statHash.percentage = Number((100 * statHash.normalized) / 300).toFixed();
    } else {
      statHash.percentage = Number((100 * statHash.value) / 10).toFixed();
    }

    ret[statId] = statHash;
  });
  return ret;
}

// following code is from https://github.com/DestinyTrialsReport
export function getAbilityCooldown(subclass, ability, tier) {
  switch (ability) {
    case 'STAT_INTELLECT':
      switch (subclass) {
        case 2007186000: // Defender
        case 4143670656: // Nightstalker
        case 2455559914: // Striker
        case 3658182170: // Sunsinger
          return cooldownsSuperA[tier];
        default:
          return cooldownsSuperB[tier];
      }
    case 'STAT_DISCIPLINE':
      return cooldownsGrenade[tier];
    case 'STAT_STRENGTH':
      switch (subclass) {
        case 4143670656: // Nightstalker
        case 1716862031: // Gunslinger
          return cooldownsMelee[tier];
        default:
          return cooldownsGrenade[tier];
      }
    default:
      return '-:--';
  }
}

export function getClass(type: number) {
  switch (type) {
    case 0:
      return 'titan';
    case 1:
      return 'hunter';
    case 2:
      return 'warlock';
  }
  return 'unknown';
}


text:
class CreateLabelsTable < ActiveRecord::Migration
  def change
    create_table :labels do |t|
      t.string :name
      t.timestamps null: false
      t.integer :product_id
    end
  end
end


text:
package com.netflix.dyno.connectionpool;

/**
 * Base for any operation that can be performed using a connection from the
 * connection pool
 *
 * @author poberai
 *
 * @param <CL>
 *            client
 * @param <R>
 *            result
 */
public interface BaseOperation<CL, R> {

    /**
     * Op name. Used for tracking metrics etc.
     *
     * @return String
     */
    public String getName();

    /**
     * The key for the operation. Useful for implementing token aware routing.
     *
     * @return String
     */
    public String getKey();

}


text:
package ru.expomap.test.model;

import java.util.List;

@Entity
@Table(name = "PROJECT")
public class Project {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "PROJECT_ID", nullable = false)
    private Integer projectId;

    @Column(name = "NAME", nullable = false)
    private String name;

    @OneToMany(cascade = CascadeType.ALL, mappedBy = "project", fetch = FetchType.LAZY)
    private List<Task> tasks;

    public Integer getProjectId() {
        return projectId;
    }

    public void setProjectId(Integer projectId) {
        this.projectId = projectId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Task> getTasks() {
        return tasks;
    }

    public void setTasks(List<Task> tasks) {
        this.tasks = tasks;
    }
}


text:
package util.events;

import com.google.common.eventbus.Subscribe;

@FunctionalInterface
public interface ShowLabelPickerEventHandler extends EventHandler {
    @Subscribe
    void handle(ShowLabelPickerEvent e);
}


text:
layout: post
title: Meh.
quote: We should do something about this.
image: /media/2014-04-21-meh/meh.jpg
video: false
---

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


text:
#include <arm_gic.h>
#include <assert.h>
#include <bl_common.h>
#include <console.h>
#include <debug.h>
#include <mcucfg.h>
#include <mmio.h>
#include <mtcmos.h>
#include <plat_private.h>
#include <platform.h>
#include <spm.h>

/*******************************************************************************
 * Declarations of linker defined symbols which will help us find the layout
 * of trusted SRAM
 ******************************************************************************/
unsigned long __RO_START__;
unsigned long __RO_END__;

unsigned long __COHERENT_RAM_START__;
unsigned long __COHERENT_RAM_END__;

/*
 * The next 2 constants identify the extents of the code & RO data region.
 * These addresses are used by the MMU setup code and therefore they must be
 * page-aligned.  It is the responsibility of the linker script to ensure that
 * __RO_START__ and __RO_END__ linker symbols refer to page-aligned addresses.
 */
#define BL31_RO_BASE (unsigned long)(&__RO_START__)
#define BL31_RO_LIMIT (unsigned long)(&__RO_END__)

/*
 * The next 2 constants identify the extents of the coherent memory region.
 * These addresses are used by the MMU setup code and therefore they must be
 * page-aligned.  It is the responsibility of the linker script to ensure that
 * __COHERENT_RAM_START__ and __COHERENT_RAM_END__ linker symbols
 * refer to page-aligned addresses.
 */
#define BL31_COHERENT_RAM_BASE (unsigned long)(&__COHERENT_RAM_START__)
#define BL31_COHERENT_RAM_LIMIT (unsigned long)(&__COHERENT_RAM_END__)

static entry_point_info_t bl32_ep_info;
static entry_point_info_t bl33_ep_info;

static void platform_setup_cpu(void)
{
	/* turn off all the little core's power except cpu 0 */
	mtcmos_little_cpu_off();

	/* setup big cores */
	mmio_write_32((uintptr_t)&mt8173_mcucfg->mp1_config_res,
		MP1_DIS_RGU0_WAIT_PD_CPUS_L1_ACK |
		MP1_DIS_RGU1_WAIT_PD_CPUS_L1_ACK |
		MP1_DIS_RGU2_WAIT_PD_CPUS_L1_ACK |
		MP1_DIS_RGU3_WAIT_PD_CPUS_L1_ACK |
		MP1_DIS_RGU_NOCPU_WAIT_PD_CPUS_L1_ACK);
	mmio_setbits_32((uintptr_t)&mt8173_mcucfg->mp1_miscdbg, MP1_AINACTS);
	mmio_setbits_32((uintptr_t)&mt8173_mcucfg->mp1_clkenm_div,
		MP1_SW_CG_GEN);
	mmio_clrbits_32((uintptr_t)&mt8173_mcucfg->mp1_rst_ctl,
		MP1_L2RSTDISABLE);

	/* set big cores arm64 boot mode */
	mmio_setbits_32((uintptr_t)&mt8173_mcucfg->mp1_cpucfg,
		MP1_CPUCFG_64BIT);

	/* set LITTLE cores arm64 boot mode */
	mmio_setbits_32((uintptr_t)&mt8173_mcucfg->mp0_rv_addr[0].rv_addr_hw,
		MP0_CPUCFG_64BIT);
}

/*******************************************************************************
 * Return a pointer to the 'entry_point_info' structure of the next image for
 * the security state specified. BL33 corresponds to the non-secure image type
 * while BL32 corresponds to the secure image type. A NULL pointer is returned
 * if the image does not exist.
 ******************************************************************************/
entry_point_info_t *bl31_plat_get_next_image_ep_info(uint32_t type)
{
	entry_point_info_t *next_image_info;

	next_image_info = (type == NON_SECURE) ? &bl33_ep_info : &bl32_ep_info;

	/* None of the images on this platform can have 0x0 as the entrypoint */
	if (next_image_info->pc)
		return next_image_info;
	else
		return NULL;
}

/*******************************************************************************
 * Perform any BL3-1 early platform setup. Here is an opportunity to copy
 * parameters passed by the calling EL (S-EL1 in BL2 & S-EL3 in BL1) before they
 * are lost (potentially). This needs to be done before the MMU is initialized
 * so that the memory layout can be used while creating page tables.
 * BL2 has flushed this information to memory, so we are guaranteed to pick up
 * good data.
 ******************************************************************************/
void bl31_early_platform_setup(bl31_params_t *from_bl2,
			       void *plat_params_from_bl2)
{
	console_init(MT8173_UART0_BASE, MT8173_UART_CLOCK, MT8173_BAUDRATE);

	VERBOSE("bl31_setup\n");

	assert(from_bl2 != NULL);
	assert(from_bl2->h.type == PARAM_BL31);
	assert(from_bl2->h.version >= VERSION_1);

	assert(((unsigned long)plat_params_from_bl2) == MT_BL31_PLAT_PARAM_VAL);

	bl32_ep_info = *from_bl2->bl32_ep_info;
	bl33_ep_info = *from_bl2->bl33_ep_info;
}

/*******************************************************************************
 * Perform any BL3-1 platform setup code
 ******************************************************************************/
void bl31_platform_setup(void)
{
	platform_setup_cpu();

	plat_delay_timer_init();

	/* Initialize the gic cpu and distributor interfaces */
	plat_mt_gic_init();
	arm_gic_setup();

	/* Topologies are best known to the platform. */
	mt_setup_topology();

	/* Initialize spm at boot time */
	spm_boot_init();
}

/*******************************************************************************
 * Perform the very early platform specific architectural setup here. At the
 * moment this is only intializes the mmu in a quick and dirty way.
 ******************************************************************************/
void bl31_plat_arch_setup(void)
{
	plat_cci_init();
	plat_cci_enable();

	plat_configure_mmu_el3(BL31_RO_BASE,
			       (BL31_COHERENT_RAM_LIMIT - BL31_RO_BASE),
			       BL31_RO_BASE,
			       BL31_RO_LIMIT,
			       BL31_COHERENT_RAM_BASE,
			       BL31_COHERENT_RAM_LIMIT);
}


text:
Initial release of failing_cookbook

* Enhancements
  * an enhancement

* Bug Fixes
  * a bug fix