text:
//
//  nextStage1.h
//  Ninjaboy
//
//  Created by Objectsol on 16/06/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "cocos2d.h"
//#import "gameEnd.h"
#import "labelSelection.h"
#import "menuPage.h"
#import "HelloWorldScene.h"
#import "HUDsound.h"
#import "HelloWorldScene.h"
//#import "instrPage.h"
/*#import "HelloWorldScene.h"
#import "menuPage.h"
#import "HelloWorldScene.h"
#import "label2.h"
#import "gameLoading.h"
#import "gameLoading1.h"
#import "gameLoading2.h"
#import "SimpleAudioEngine.h"*/

@interface labelSelection : CCLayer
{
	CCMenuItem *_plusItem;
	CCMenuItem *_minusItem;

}
-(id) startOfGame;
-(void)needToStart;
+(id) scene;

@end

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.IO;

namespace Printful.NET
{
    [DataContract]
    public class PrintfulRequestResult
    {
        [IgnoreDataMember]
        public bool Success { get; set; }
        [IgnoreDataMember]
        public string RawBody { get; set; }

        [DataMember(Name = "status")]
        public bool Status { get; set; }

        [DataMember(Name = "code")]
        public int Code { get; set; }

        [DataMember(Name = "result")]
        public PrintfulApiResult Result { get; set; }

        public PrintfulRequestResult()
        {
            Success = false;
            RawBody = null;
        }

        public void DeserializeRawBody()
        {
            if (!String.IsNullOrEmpty(RawBody))
            {
                DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(PrintfulRequestResult));
                using (MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(RawBody)))
                {
                    PrintfulRequestResult result = (PrintfulRequestResult)ser.ReadObject(ms);
                    this.Success = result.Status;
                    this.Status = result.Status;
                    this.Code = result.Code;
                    this.Result = result.Result;
                }
            }
        }
    }
}


text:
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

using System;
using System.Collections.Generic;

namespace Microsoft.Azure.Common.Extensions.Models
{
    public partial class AzureSubscription
    {
        public Guid Id { get; set; }

        public string Name { get; set; }

        public string Environment { get; set; }

        public string Account { get; set; }

        public Dictionary<Property, string> Properties { get; set; }

        public enum Property
        {
            /// <summary>
            /// Comma separated registered resource providers, i.e.: websites,compute,hdinsight
            /// </summary>
            RegisteredResourceProviders,

            /// <summary>
            /// Comma separated mode names that this subscription supports, i.e.: AzureResourceManager,AzureServiceManagement
            /// </summary>
            SupportedModes,

            /// <summary>
            /// Associated tenants
            /// </summary>
            Tenants,

            /// <summary>
            /// If this property existed on the subscription indicates that it's default one.
            /// </summary>
            Default,

            StorageAccount
        }
    }
}


text:
package jcavern.ui;

import jcavern.*;
import jcavern.thing.*;

import java.awt.*;
import java.awt.event.*;
import java.applet.*;

/**
 * This AppletCard allows the user to specify the name of a new Player.
 */
public class CreatePlayerCard extends AppletCard implements ActionListener
{
	/** * A field into which the user types the Player's name. */
    TextField		mField;

    /** * The Button pressed by the user after typing in a Player name. */
    Button			mOKButton;

	/**
	 * Creates a CreatePlayerCard for the given Applet.
	 *
	 * @param	anApplet	a non-null Applet.
	 */
	public CreatePlayerCard(JCavernApplet anApplet)
	{
		super(anApplet);

		mField = new TextField(30);
		mField.addActionListener(this);

		mOKButton = new JCavernButton("OK");
		mOKButton.setForeground(Color.black);
		mOKButton.addActionListener(this);
	}

	/**
	 * Shows this AppletCard in its Applet.
	 */
    public void show()
    {
    	super.show();

		try
		{
	    	mApplet.setLayout(new GridLayout(8, 1));

			// add blank panels, so that the dialog will appear where
			// in the same place as the "create a player" button
			// in the IndexCard.
			mApplet.add(createLabelledButtonPanel(new ImageCanvas(mApplet.getBoardImage("player")), "Create a new player"));
			mApplet.add(createLabelledButtonPanel(new JCavernButton("Load Player"), "Load player from database", false));
			mApplet.add(createLabelledButtonPanel(new JCavernButton("Save Player"), "Save player to database", false));
			mApplet.add(createLabelledButtonPanel(new JCavernButton("New Mission"), "Undertake a new mission", false));

			//Create middle section.
			Panel dialogPanel = new Panel();
			dialogPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
			dialogPanel.add(new Label("Enter the name of the new player"));
			dialogPanel.add(mField);
			dialogPanel.add(mOKButton);
			mApplet.add(dialogPanel);

			//Initialize this dialog to its preferred size.
			mApplet.validate();
		}
		catch (JCavernInternalError jcie)
		{
			System.out.println("can't show create player card " + jcie);
		}
    }

	/**
	 * Responds to ActionEvents from the OK Button by creating a Player and returning to the IndexCard.
	 *
	 * @param	event	a non-null ActionEvent
	 */
    public void actionPerformed(ActionEvent event)
    {
    	if (mField.getText().length() > 0)
    	{
    		try
    		{
				mApplet.displayHomeCard(new Player(mField.getText()));
			}
			catch(JCavernInternalError jcie)
			{
				System.out.println("Can't create new player " + jcie);
			}
		}
    }
}


text:
DROP DATABASE IF EXISTS crazycat;
CREATE DATABASE crazycat CHARACTER SET utf8;
USE crazycat;
DROP TABLE IF EXISTS user;
CREATE TABLE user(
    id BIGINT NOT NULL auto_increment,
    username VARCHAR(20) NOT NULL,
    iphone VARCHAR(15),
    email VARCHAR(40),
    password VARCHAR(20) NOT NULL,
    CONSTRAINT pk_user PRIMARY KEY(id),
    UNIQUE KEY ix_username_unique(username),
    UNIQUE KEY ix_iphone_unique(iphone),
    UNIQUE KEY ix_email_unique(email)
)Engine=InnoDB DEFAULT Charset=utf8;
DROP TABLE IF EXISTS client;
CREATE TABLE client(
    id VARCHAR(200) NOT NULL,
    secret VARCHAR(80) NOT NULL,
    redirect_uri VARCHAR(400),
    scope VARCHAR(200),
    CONSTRAINT pk_client PRIMARY KEY (id)
)Engine=InnoDB DEFAULT Charset=utf8;
DROP TABLE IF EXISTS auto_code;
CREATE TABLE auto_code(
    authorization_code VARCHAR(80) NOT NULL,
    user_id BIGINT NOT NULL,
    redirect_uri VARCHAR(400),
    created_at INT NOT NULL,
    scope VARCHAR(200) NOT NULL ,
    client_id VARCHAR(200) NOT NULL,
    expires_in INT NOT NULL,
    CONSTRAINT pk_auth_code PRIMARY KEY (authorization_code),
    CONSTRAINT fk_auth_code_client_id FOREIGN KEY (client_id) REFERENCES client(id) ON UPDATE NO ACTION ON DELETE NO ACTION,
    CONSTRAINT fk_auth_code_user_id FOREIGN KEY (user_id) REFERENCES user(id) ON UPDATE NO ACTION ON DELETE NO ACTION
)Engine=InnoDB DEFAULT Charset=utf8;
DROP TABLE IF EXISTS access_token;
create table access_token(
    access_token VARCHAR(100) not null,
    refresh_token VARCHAR(100) not null,
    user_id BIGINT not null,
    client_id VARCHAR(200) not null,
    created_at INTEGER not null,
    expires_in INTEGER not null,
    CONSTRAINT pk_access_token PRIMARY KEY (access_token),
    CONSTRAINT fk_access_token_client_id FOREIGN KEY (client_id) REFERENCES client(id) ON UPDATE NO ACTION ON DELETE NO ACTION,
    CONSTRAINT fk_access_token_user_id FOREIGN key (user_id) REFERENCES user(id) ON UPDATE NO ACTION ON DELETE NO ACTION
)Engine=InnoDB DEFAULT Charset=utf8;


text:
id: hydra
title: hydra
description: hydra Run and manage ORY Hydra
---

<!--
This file is auto-generated.

To improve this file please make your change against the appropriate "./cmd/*.go" file.
-->

## hydra

Run and manage ORY Hydra

### Options

```
  -h, --help   help for hydra
```

### SEE ALSO

- [hydra clients](hydra-clients) - Manage OAuth 2.0 Clients
- [hydra keys](hydra-keys) - Manage JSON Web Keys
- [hydra migrate](hydra-migrate) - Various migration helpers
- [hydra serve](hydra-serve) - Parent command for starting public and
  administrative HTTP/2 APIs
- [hydra token](hydra-token) - Issue and Manage OAuth2 tokens
- [hydra version](hydra-version) - Display this binary's version, build time and
  git hash of this build


text:
@interface PresentationController ()

@property NSMutableSet *windowControllers;
@property Timer *timer;

@property (readonly) NSInteger numberOfSlides;
@property NSInteger currentSlideIndex;

- (void)reloadCurrentSlide;
- (void)gotoPreviousSlide;
- (void)gotoNextSlide;

@end

@implementation PresentationController

- (instancetype)init
{
    self = [super init];

    if(self)
    {
        self.currentSlideIndex = 0;
        self.timer = [[Timer alloc] initWithTime:0 andMode:SplitShowTimerModeForward];
        self.windowControllers = [NSMutableSet set];
        self.screens = [NSMutableSet set];
    }

    return self;
}

- (void)addScreen:(SplitShowScreen *)screen
{
    [self.screens addObject:screen];
}

- (void)removeScreen:(SplitShowScreen *)screen
{
    [self.screens removeObject:screen];
}

- (NSInteger)numberOfSlides
{
    NSInteger max = 0;

    for(SplitShowScreen *screen in self.screens)
    {
        max = MAX(max, screen.document.pageCount);
    }

    return max;
}

#pragma mark - Presentation controls

- (BOOL)isPresenting
{
    return self.windowControllers.count > 0;
}

- (BOOL)startPresentation
{
    // If the presentation is already started return NO
    if(self.presenting)
    {
        return NO;
    }

    [self willChangeValueForKey:@"presenting"];

    [[CustomLayoutController sharedCustomLayoutController] close];

    for(SplitShowScreen *screen in self.screens)
    {
        if(screen.mode == SplitShowScreenModePreview)
        {
            continue;
        }

        PresentationWindowController *presentationWindowController = [[PresentationWindowController alloc] initWithWindowNibName:@"PresentationWindow"];

        presentationWindowController.presentationController = self;

        if([screen isPseudoScreen])
        {
            [presentationWindowController.window setFrame:[NSApplication sharedApplication].mainWindow.frame display:YES];
        }
        else
        {
            [presentationWindowController.window setFrame:screen.screen.frame display:YES];
        }

        presentationWindowController.timerController.timer = self.timer;
        [presentationWindowController.timerController updateView:[NSNotification notificationWithName:kSplitShowTimerPulse object:@(self.timer.timerValue)]];
        presentationWindowController.displayController.document = screen.document;
        presentationWindowController.window.title = screen.name;
        [presentationWindowController.displayController bindToPresentationController:self];

        [presentationWindowController showTimer:screen.showTimer];

        [self.windowControllers addObject:presentationWindowController];

        [presentationWindowController showWindow:nil];

        if(screen.mode == SplitShowScreenModeFullscreen)
        {
            [presentationWindowController.window toggleFullScreen:nil];
        }
    }

    [self didChangeValueForKey:@"presenting"];

    [self reloadCurrentSlide];

    return YES;
}

- (BOOL)stopPresentation
{
    // If the presentation is already stopped return NO
    if(!self.presenting)
    {
        return NO;
    }

    [self.timer stop];

    for(NSWindowController *presentationWindowController in self.windowControllers)
    {
        [((DisplayController*)presentationWindowController.contentViewController) unbind];
        [presentationWindowController close];
    }

    [self willChangeValueForKey:@"presenting"];

    [self.windowControllers removeAllObjects];

    [self didChangeValueForKey:@"presenting"];

    return YES;
}

- (void)toggleTimer:(id)sender
{
    NSLog(@"Start timer");
}

#pragma mark - Key events

- (void)scrollPageUp:(id)sender
{
    [self gotoPreviousSlide];
}

- (void)pageUp:(id)sender
{
    [self gotoPreviousSlide];
}

-(void)moveUp:(id)sender
{
    [self gotoPreviousSlide];
}

- (void)moveLeft:(id)sender
{
    [self gotoPreviousSlide];
}

- (void)pageDown:(id)sender
{
    [self gotoNextSlide];
}

- (void)scrollPageDown:(id)sender
{
    [self gotoNextSlide];
}

- (void)moveDown:(id)sender
{
    [self gotoNextSlide];
}

-(void)moveRight:(id)sender
{
    [self gotoNextSlide];
}

#pragma mark - Navigation actions

- (void)reloadPresentation
{
    self.currentSlideIndex = MAX(0, MIN(self.currentSlideIndex, self.numberOfSlides - 1));

    [[NSNotificationCenter defaultCenter] postNotificationName:kSplitShowNotificationChangeSlide
                                                        object:self
                                                      userInfo:@{kSplitShowNotificationChangeSlideAction : @(SplitShowChangeSlideActionGoTo),
                                                                 kSplitShowChangeSlideActionGoToIndex : @(self.currentSlideIndex)}];
}

- (void)reloadCurrentSlide
{
    [[NSNotificationCenter defaultCenter] postNotificationName:kSplitShowNotificationChangeSlide
                                                        object:self
                                                      userInfo:@{kSplitShowNotificationChangeSlideAction : @(SplitShowChangeSlideActionGoTo),
                                                                 kSplitShowChangeSlideActionGoToIndex : @(self.currentSlideIndex)}];
}

- (void)gotoPreviousSlide
{
    self.currentSlideIndex = MAX(1, self.currentSlideIndex) - 1;

        [[NSNotificationCenter defaultCenter] postNotificationName:kSplitShowNotificationChangeSlide
                                                            object:self
                                                          userInfo:@{kSplitShowNotificationChangeSlideAction : @(SplitShowChangeSlideActionGoTo),
                                                                     kSplitShowChangeSlideActionGoToIndex : @(self.currentSlideIndex)}];
}

- (void)gotoNextSlide
{
    self.currentSlideIndex = MAX(0, MIN(self.currentSlideIndex + 1, self.numberOfSlides - 1));

    [[NSNotificationCenter defaultCenter] postNotificationName:kSplitShowNotificationChangeSlide
                                                            object:self
                                                          userInfo:@{kSplitShowNotificationChangeSlideAction : @(SplitShowChangeSlideActionGoTo),
                                                                     kSplitShowChangeSlideActionGoToIndex : @(self.currentSlideIndex)}];
}

#pragma mark - State restoration

- (void)encodeRestorableStateWithCoder:(NSCoder *)coder
{
    [super encodeRestorableStateWithCoder:coder];

    [coder encodeInteger:self.currentSlideIndex forKey:@"currentSlide"];
    [coder encodeObject:self.timer forKey:@"timer"];
}

- (void)restoreStateWithCoder:(NSCoder *)coder
{
    [super restoreStateWithCoder:coder];

    self.currentSlideIndex = [coder decodeIntegerForKey:@"currentSlide"];
    self.timer = [coder decodeObjectForKey:@"timer"];

    [self reloadCurrentSlide];
}

@end


text:
/*
---

name: "Size"

description: ""

license:
	- "[GNU Lesser General Public License](http://opensource.org/licenses/lgpl-license.php)"
	- "[MIT License](http://opensource.org/licenses/mit-license.php)"

authors:
	- "Shock <shocksilien@gmail.com>"

requires:
	- LibCanvas
	- Point

provides: Size

...
*/

/** @class Size */
var Size = LibCanvas.declare( 'LibCanvas.Size', 'Size', Point, {
	set: function method (size) {
		if (typeof size == 'object' && size.width != null) {
			this.x = Number(size.width);
			this.y = Number(size.height);

			return this;
		}
		return method.previous.apply( this, arguments );
	},

	get width  ( ) { return this.x },
	get height ( ) { return this.y },
	set width  (w) { this.x = w },
	set height (h) { this.y = h },

	/** @returns {object} */
	toObject: function () {
		return { width: this.x, height: this.y };
	}
});

/** @private */
Size.from = function (object) {
	if (object == null) return null;

	return object instanceof Size ? object : new Size(object);
};


text:
var ts = require('gulp-typescript');
var gulp = require('gulp');
var clean = require('gulp-clean');

var destPath = './wwwroot/node_modules';

// Delete the dist directory
gulp.task('clean', function () {
    return gulp.src(destPath)
    .pipe(clean());
});

gulp.task("scriptsNStyles", function () {
    return gulp.src([
    'core-js/client/**',
    'systemjs/dist/system.src.js',
    'reflect-metadata/**',
    'rxjs/**',
    'zone.js/dist/**',
    '@angular/**',
    'jquery/dist/jquery.*js',
    'bootstrap/dist/js/bootstrap.*js',
    ], {
        cwd: "node_modules/**"
    })
    .pipe(gulp.dest(destPath));
});

var tsProject = ts.createProject('tsconfig.json');
gulp.task('ts', function (done) {
    //var tsResult = tsProject.src()
    var tsResult = gulp.src([
    "app/*.ts"
    ])
    .pipe(ts(tsProject), undefined, ts.reporter.fullReporter());
    return tsResult.js.pipe(gulp.dest('./wwwroot/app'));
});

gulp.task('watch', ['watch.ts']);

gulp.task('watch.ts', ['ts'], function () {
    return gulp.watch('app/*.ts', ['ts']);
});

gulp.task('default', ['scriptsNStyles', 'watch']);


text:
import { Component, Input } from "@angular/core"
import { CustomConfigHelper } from "../../../../util/customConfigHelper"
import { CustomConfigItemGroup } from "../../customConfigs.component"

@Component({
	selector: "cc-custom-config-item-group",
	template: require("./customConfigItemGroup.component.html")
})
export class CustomConfigItemGroupComponent {
	@Input() customConfigItemGroups: Map<string, CustomConfigItemGroup>
	isExpanded = false

	removeCustomConfig(configId: string) {
		CustomConfigHelper.deleteCustomConfig(configId)
	}
}


text:
@interface ViewController ()<UITableViewDataSource,UITableViewDelegate,SGMAlbumViewControllerDelegate>

@end

@implementation ViewController{

    UITableView* mainTable;
    NSMutableArray* selectedPhotoArray;

    ALAssetsLibrary* assetLibrary;//照片的生命周期跟它有关,所以弄成全局变量在这里初始化

}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor = [UIColor whiteColor];

    selectedPhotoArray = [[NSMutableArray alloc]init];

    //全局变量
    assetLibrary = [[ALAssetsLibrary alloc]init];

    mainTable = [[UITableView alloc]initWithFrame:self.view.bounds style:UITableViewStylePlain];
    mainTable.dataSource = self;
    mainTable.delegate = self;
    mainTable.tableFooterView = [[UIView alloc] init];
    [self.view addSubview:mainTable];

}

-(void)btTap{
    SGMAlbumViewController* viewVC = [[SGMAlbumViewController alloc] init];
    viewVC.assetsLibrary =assetLibrary;
    viewVC.limitNum = 3;//不设置即不限制
    [viewVC setDelegate:self];
    UINavigationController* nav = [[UINavigationController alloc]initWithRootViewController:viewVC];
    [self presentViewController:nav animated:YES completion:nil];

}

-(UIView*)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{

    UIButton* bt = [[UIButton alloc]initWithFrame:tableView.tableFooterView.bounds];
    [bt setTitle:@"选择照片" forState:UIControlStateNormal];
    [bt setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [bt addTarget:self action:@selector(btTap) forControlEvents:UIControlEventTouchUpInside];
    return bt;
}

-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{

    return 80;

}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{

    return selectedPhotoArray.count;
}

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{

    return 50;
}

-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

    static NSString* identify = @"cell";

    UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:identify];
    if (cell == nil) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identify];
    }
    if ([[selectedPhotoArray objectAtIndex:indexPath.row] isKindOfClass:[NSDictionary class]])
    {
        ALAsset *asset = [[selectedPhotoArray objectAtIndex:indexPath.row] objectForKey:@"asset"];
        cell.imageView.image = [UIImage imageWithCGImage:[[asset defaultRepresentation] fullScreenImage]];
    }
    if ([[selectedPhotoArray objectAtIndex:indexPath.row] isKindOfClass:[UIImage class]])
    {
        cell.imageView.image = [selectedPhotoArray objectAtIndex:indexPath.row];
    }
    else
    {
        NSLog(@"类型错误");
    }

    return cell;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - SGMAlbumViewControllerDelegate
- (BOOL)sendImageWithAssetsArray:(NSArray *)array
{
    if (array.count>0) {
        [selectedPhotoArray addObjectsFromArray:array];
        [mainTable reloadData];
        return YES;
    }
    return NO;
}
@end


text:
require("@fatso83/mini-mocha").install();

const sinon = require("sinon");
const referee = require("@sinonjs/referee");
const assert = referee.assert;

describe("withArgs", function () {
    it("should call method once with each argument", function () {
        const object = { method() {} };
        const spy = sinon.spy(object, "method");

        object.method(42);
        object.method(1);

        assert(spy.withArgs(42).calledOnce);
        assert(spy.withArgs(1).calledOnce);
    });
});


text:
$(function () {
    notifyProgress.init();
});
var notifyProgress = {
    _url: "/notify-info",
    init: function () {
        this.initNotifyInfo();
    },
    initNotifyInfo: function () {
        var self = this;
        AjaxRequest._call(this._url, '', "POST", function (responseJSON) {
            self.initJSON(responseJSON);
        });
    },
    initNotifyInfoProgress: function () {
        var self = this;
        setTimeout(function () {
            AjaxRequest._call(this._url, '', "POST", function (responseJSON) {
                self.initJSON(responseJSON);
            });
        }.bind(this), 30000);
    },
    initJSON: function (responseJSON) {

        if (responseJSON.code == 401) {
            location.reload();
            return;
        }
//        try {
//            JSON.parse(responseJSON);
//
//        } catch (e) {
//            if ($(responseJSON).filter('#loginpage').length>0) {
//                location.reload();
//            }
//        }

        if (responseJSON.code == 1) {
            this.initReAuthorize(responseJSON);
        } else {
            var response = responseJSON.result;
            if (typeof response === "undefined") {
                return;
            }
            if (typeof response !== "undefined") {
                var limitPercent = response.instagramRateLimit.rateLimitPercent;
                var remainingCount = response.instagramRateLimit.rateLimit;
                $("#notity-progress").css('width', limitPercent + '%');
                $("#progressCountRemaining").html(remainingCount);
                this.setProgressColor(limitPercent);
                this.initNotifyInfoProgress();
            }
        }
    },
    setProgressColor: function (limitPercent) {
        if (limitPercent < 40) {
            $("#notity-progress").addClass("progress-bar-danger");
        } else if (limitPercent >= 40 && limitPercent <= 75) {
            $("#notity-progress").removeClass("progress-bar-danger");
            $("#notity-progress").addClass("progress-bar-success");
        } else if ((limitPercent > 75)) {
            $("#notity-progress").removeClass("progress-bar-success");
            $("#notity-progress").addClass("progress-bar-info");
        }
    },
    initReAuthorize: function (responseJSON) {
        var authorizeUrl = responseJSON.result.instagramLoginUrl;
        $("#reAuthorize").removeClass("is_hidden");
        $("#reAuthorizeBtn").attr('href', authorizeUrl);
        var previousUrl = window.location.href;
        CookieManager._setCookie("previous_url", previousUrl, null, '.');
        return;
    }
};


text:
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef AREA120_SIDEWALKER_TRAJECTORY_MATH_POINT_ALGORITHMS_H_
#define AREA120_SIDEWALKER_TRAJECTORY_MATH_POINT_ALGORITHMS_H_
#include <Eigen/Core>

namespace bookbot {

/**
 * @brief Computes area of the triangle formed by three successive points.
 *
 *                 * start_point
 *                /
 *  corner_point *-----* end_point
 */
double TriangleArea(Eigen::Vector2d start_point, Eigen::Vector2d corner_point,
                    Eigen::Vector2d end_point);

/**
 * @brief Computes an approximation of the curvature magnitude at the center
 * point of three sequential points. This approximation is based on computing
 * the radius of the circle that circumscribes the three points.
 */
double ApproximateCurvatureMagnitude(Eigen::Vector2d start_point,
                                     Eigen::Vector2d corner_point,
                                     Eigen::Vector2d end_point);

}  // namespace bookbot

#endif  // AREA120_SIDEWALKER_TRAJECTORY_MATH_POINT_ALGORITHMS_H_


text:
#if !defined(FUSION_AT_IMPL_05042005_0741)
#define FUSION_AT_IMPL_05042005_0741

#include <boost/fusion/support/detail/access.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/mpl/at.hpp>
#include <boost/mpl/int.hpp>

namespace boost { namespace fusion
{
    struct vector_tag;

    namespace extension
    {
        template <typename Tag>
        struct at_impl;

        template <>
        struct at_impl<vector_tag>
        {
            template <typename Sequence, typename N>
            struct apply
            {
                typedef typename mpl::at<typename Sequence::types, N>::type element;
                typedef typename detail::ref_result<element>::type type;

                static type
                call(Sequence& v)
                {
                    return v.at_impl(N());
                }
            };

            template <typename Sequence, typename N>
            struct apply <Sequence const, N>
            {
                typedef typename mpl::at<typename Sequence::types, N>::type element;
                typedef typename detail::cref_result<element>::type type;

                static type
                call(Sequence const& v)
                {
                    return v.at_impl(N());
                }
            };
        };
    }
}}

#endif


text:
@interface EpiInfoTextField : UITextField <EpiInfoControlProtocol>
@property CheckCode *checkcode;
@property NSString *columnName;
@property BOOL isReadOnly;
@property UITextField *mirroringMe;
-(void)setFormFieldValue:(NSString *)formFieldValue;
-(void)reset;
@end


text:
package com.elastisys.scale.commons.net.ssl;

import static com.elastisys.scale.commons.util.precond.Preconditions.checkArgument;

import java.util.Objects;

import com.elastisys.scale.commons.net.http.client.AuthenticatedHttpClient;

/**
 * Represents client credentials for
 * Basic
 * autentication.
 *
 * @see AuthenticatedHttpClient
 */
public class BasicCredentials {
    /** The user name. */
    private final String username;
    /** The password. */
    private final String password;

    /**
     * Constructs new {@link BasicCredentials}.
     *
     * @param username
     *            The user name.
     * @param password
     *            The password.
     */
    public BasicCredentials(String username, String password) {
        checkArgument(username != null, "basic credentials missing username");
        checkArgument(password != null, "basic credentials missing password");

        this.username = username;
        this.password = password;
    }

    public String getUsername() {
        return this.username;
    }

    public String getPassword() {
        return this.password;
    }

    @Override
    public int hashCode() {
        return Objects.hash(this.username, this.password);
    }

    /**
     * Performs a basic sanity check to verify that the combination of
     * parameters is valid. If validation fails an
     * {@link IllegalArgumentException} is thrown.
     *
     * @throws IllegalArgumentException
     *             If any configuration field is missing.
     */
    public void validate() throws IllegalArgumentException {
        checkArgument(this.username != null, "basicCredentials: missing username");
        checkArgument(this.password != null, "basicCredentials: missing password");
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof BasicCredentials) {
            BasicCredentials that = (BasicCredentials) obj;
            return Objects.equals(this.username, that.username) //
                    && Objects.equals(this.password, that.password);
        }
        return false;
    }
}


text:
#include "gfal_dropbox.h"
#include "gfal_dropbox_oauth.h"
#include "gfal_dropbox_url.h"
#include <curl/curl.h>
#include <openssl/bio.h>
#include <openssl/buffer.h>
#include <openssl/hmac.h>
#include <string.h>

struct KeyValue {
    const char *key, *value;
};
typedef struct KeyValue KeyValue;

int oauth_setup(gfal2_context_t context, OAuth* oauth, GError** error)
{
    g_assert(context != NULL && oauth != NULL && error != NULL);

    oauth->version = gfal2_get_opt_integer_with_default(context, "DROPBOX", "OAUTH", 1);
    oauth->app_key = gfal2_get_opt_string(context, "DROPBOX", "APP_KEY", NULL);
    oauth->access_token = gfal2_get_opt_string(context, "DROPBOX", "ACCESS_TOKEN", NULL);
    oauth->app_secret = gfal2_get_opt_string(context, "DROPBOX", "APP_SECRET", NULL);
    oauth->access_token_secret = gfal2_get_opt_string(context, "DROPBOX", "ACCESS_TOKEN_SECRET", NULL);

    switch (oauth->version) {
        case 1:
            if (!oauth->app_key || !oauth->access_token || !oauth->app_secret || !oauth->access_token_secret) {
                gfal2_set_error(error, dropbox_domain(), EINVAL, __func__,
                                "Missing OAuth values. Make sure you pass APP_KEY, APP_SECRET, ACCESS_TOKEN and ACCESS_TOKEN_SECRET inside the group DROPBOX");
                oauth_release(oauth);
                return -1;
            }
            break;
        case 2:
            if (!oauth->app_key || !oauth->access_token || !oauth->app_secret) {
                gfal2_set_error(error, dropbox_domain(), EINVAL, __func__,
                                "Missing OAuth values. Make sure you pass APP_KEY, APP_SECRET and ACCESS_TOKEN inside "
                                "the group DROPBOX");
                oauth_release(oauth);
                return -1;
            }
            break;
        default:
            gfal2_set_error(error, dropbox_domain(), EINVAL, __func__,
                "Invalid OAuth version (%d)", oauth->version);
            oauth_release(oauth);
            return -1;
    }

    char aux_buffer[512];
    snprintf(aux_buffer, sizeof(aux_buffer), "%ld", time(NULL));
    oauth->timestamp = g_strdup(aux_buffer);
    snprintf(aux_buffer, sizeof(aux_buffer), "%s*%ld", oauth->timestamp, random());
    oauth->nonce = g_strdup(aux_buffer);

    return 0;
}

void oauth_release(OAuth* oauth)
{
    g_assert(oauth != NULL);

    g_free(oauth->app_key);
    g_free(oauth->access_token);
    g_free(oauth->app_secret);
    g_free(oauth->access_token_secret);
    g_free(oauth->timestamp);
    g_free(oauth->nonce);

    memset(oauth, 0, sizeof(OAuth));
}

static size_t oauth_populate_keyvalue_from_args(KeyValue* pairs, size_t start,
        size_t n_args, va_list args)
{
    g_assert(pairs != NULL);

    size_t n, i;
    for (n = 0, i = start; n < n_args; ++n, ++i) {
        pairs[i].key = va_arg(args, const char*);
        pairs[i].value = va_arg(args, const char*);
    }
    return i;
}

static size_t oauth_populate_keyvalue_from_oauth(KeyValue* pairs,
        const OAuth* oauth, size_t start)
{
    g_assert(pairs != NULL && oauth != NULL);

    size_t i = start;
    pairs[i].key = "oauth_version";
    pairs[i].value = "1.0";
    ++i;
    pairs[i].key = "oauth_token";
    pairs[i].value = oauth->access_token;
    ++i;
    pairs[i].key = "oauth_signature_method";
    pairs[i].value = "HMAC-SHA1";
    ++i;
    pairs[i].key = "oauth_consumer_key";
    pairs[i].value = oauth->app_key;
    ++i;
    pairs[i].key = "oauth_nonce";
    pairs[i].value = oauth->nonce;
    ++i;
    pairs[i].key = "oauth_timestamp";
    pairs[i].value = oauth->timestamp;
    return i + 1;
}

static int oauth_compare_key(const void* a_ptr, const void* b_ptr)
{
    g_assert(a_ptr != NULL && b_ptr != NULL);

    KeyValue *a, *b;
    a = (KeyValue*)a_ptr;
    b = (KeyValue*)b_ptr;
    return strcmp(a->key, b->key);
}

static int oauth_normalized_parameters_v(char* output, size_t outsize,
        const OAuth* oauth, size_t n_args, va_list args)
{
    g_assert(output != NULL && oauth != NULL);

    // Account for oauth* headers
    size_t n_parameters = n_args + 6;
    KeyValue *pairs = g_malloc0(n_parameters * sizeof(KeyValue));

    size_t next = oauth_populate_keyvalue_from_args(pairs, 0, n_args, args);
    next = oauth_populate_keyvalue_from_oauth(pairs, oauth, next);

    // Sort
    qsort(pairs, n_parameters, sizeof(KeyValue), oauth_compare_key);

    // Concatenate using & and escaping
    size_t i;
    char *p = output;
    size_t remaining = outsize;
    for (i = 0; i < n_parameters; ++i) {
        char* escaped_key = curl_easy_escape(NULL, pairs[i].key, 0);
        char* escaped_value = curl_easy_escape(NULL, pairs[i].value, 0);

        size_t printed = snprintf(p, remaining, "%s=%s&", escaped_key, escaped_value);
        remaining -= printed;
        p += printed;

        curl_free(escaped_key);
        curl_free(escaped_value);
    }

    // Truncate last &
    --p;
    if (*p == '&')
        *p = '\0';

    g_free(pairs);
    return 0;
}

int oauth_normalized_parameters(char* output, size_t outsize,
        const OAuth* oauth, size_t n_args, ...)
{
    va_list args;
    va_start(args, n_args);
    int r = oauth_normalized_parameters_v(output, outsize, oauth, n_args, args);
    va_end(args);
    return r;
}

static unsigned base64_encode(const char* input, unsigned length, char* output, size_t outsize)
{
    g_assert(input != NULL && output != NULL);

    BIO *bmem, *b64;
    BUF_MEM *bptr;
    unsigned written;

    b64  = BIO_new(BIO_f_base64());
    bmem = BIO_new(BIO_s_mem());
    b64  = BIO_push(b64, bmem);
    BIO_write(b64, input, length);
    BIO_ctrl(b64, BIO_CTRL_FLUSH, 0, NULL);
    BIO_get_mem_ptr(b64, &bptr);

    written = bptr->length - 1;
    memcpy(output, bptr->data, written>outsize?outsize:written);
    output[written] = 0;

    BIO_free_all(b64);

    return written;
}

int oauth_get_basestring(const char* method, const char* url, const char* norm_params, char* output, size_t outsize)
{
    g_assert(method != NULL && url != NULL && norm_params != NULL && output != NULL);

    char normalized_url[GFAL_URL_MAX_LEN];
    if (gfal2_dropbox_normalize_url(url, normalized_url, sizeof(normalized_url)) < 0)
        return -1;

    gfal2_log(G_LOG_LEVEL_INFO, "%s", normalized_url);

    char* escaped_url = curl_easy_escape(NULL, normalized_url, 0);
    char* escaped_params = curl_easy_escape(NULL, norm_params, 0);

    int basestring_len = snprintf(output, outsize, "%s&%s&%s", method, escaped_url, escaped_params);

    curl_free(escaped_url);
    curl_free(escaped_params);
    return basestring_len;
}

int oauth_get_signature(const char* method, const char* url, const char* norm_params,
        const OAuth* oauth,
        char* output, size_t outsize)
{
    g_assert(method != NULL && url != NULL && norm_params != NULL && oauth != NULL && output != NULL);

    char payload[2048];
    char key_buffer[512];

    char *escaped_app_secret = curl_easy_escape(NULL, oauth->app_secret, 0);
    char *escaped_token_secret = curl_easy_escape(NULL, oauth->access_token_secret, 0);
    unsigned key_size = snprintf(key_buffer, sizeof(key_buffer), "%s&%s", escaped_app_secret, escaped_token_secret);

    int basestring_len = oauth_get_basestring(method, url, norm_params, payload, sizeof(payload));
    if (basestring_len < 0)
        return -1;

    curl_free(escaped_app_secret);
    curl_free(escaped_token_secret);

    gfal2_log(G_LOG_LEVEL_DEBUG, "Signing %s", payload);

    char buffer[2048];
    unsigned outl = 0;
    HMAC(EVP_sha1(), key_buffer, key_size,
            (const unsigned char*)payload, basestring_len,
            (unsigned char*)buffer, &outl);

    base64_encode(buffer, outl, output, outsize);

    return 0;
}

static int oauth2_get_header(char* buffer, size_t buffer_size, const OAuth* oauth,
    const char* method, const char* url)
{
    g_assert(buffer != NULL && oauth != NULL && method != NULL && url != NULL);

    return snprintf(buffer, buffer_size, "Authorization: Bearer %s", oauth->access_token);
}

int oauth_get_header(char* buffer, size_t buffer_size, const OAuth* oauth,
        const char* method, const char* url)
{
    g_assert(oauth != NULL);
    g_assert(oauth->version == 2);

    return oauth2_get_header(buffer, buffer_size, oauth, method, url);
}


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

    <EditText
        android:id="@+id/User_Input"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="16dp"
        android:layout_marginStart="16dp"
        android:layout_marginTop="44dp"
        android:ems="10"
        android:inputType="textPersonName"
        android:text="User"
        app:layout_constraintLeft_toLeftOf="parent"
        tools:layout_constraintLeft_creator="1"
        tools:layout_constraintTop_creator="1"
        app:layout_constraintTop_toBottomOf="@+id/Admin_Spinner" />

    <EditText
        android:id="@+id/Name_Input"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="16dp"
        android:layout_marginStart="16dp"
        android:layout_marginTop="16dp"
        android:ems="10"
        android:inputType="textPersonName"
        android:text="Name"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:layout_constraintLeft_creator="1"
        tools:layout_constraintTop_creator="1" />

    <TextView
        android:id="@+id/Notification"
        android:layout_width="131dp"
        android:layout_height="43dp"
        android:gravity="center"
        android:textAppearance="@style/TextAppearance.AppCompat"
        android:textSize="18sp"
        app:layout_constraintTop_toTopOf="parent"
        android:layout_marginTop="192dp"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintLeft_toRightOf="@+id/User_Input" />

    <EditText
        android:id="@+id/Password_Input"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="16dp"
        android:layout_marginStart="16dp"
        android:layout_marginTop="44dp"
        android:ems="10"
        android:inputType="textPersonName"
        android:text="Password"
        app:layout_constraintLeft_toLeftOf="parent"
        tools:layout_constraintLeft_creator="1"
        tools:layout_constraintTop_creator="1"
        app:layout_constraintTop_toBottomOf="@+id/User_Input" />

    <Button
        android:id="@+id/Register_Button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="60dp"
        android:text="Register"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent" />

    <Spinner
        android:id="@+id/Admin_Spinner"
        android:layout_width="215dp"
        android:layout_height="45dp"
        android:layout_marginLeft="16dp"
        android:layout_marginTop="44dp"
        android:entries="@array/Entries"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/Name_Input"
        android:layout_marginStart="16dp" />

</android.support.constraint.ConstraintLayout>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI;

using DotNetNuke.Common.Utilities;
using DotNetNuke.Entities.Content.Taxonomy;
using DotNetNuke.Web.UI.WebControls;

#endregion

namespace DotNetNuke.Modules.Taxonomy.Views.Controls
{

    public partial class EditTermControl : UserControl
    {

        #region Public Properties

        public string LocalResourceFile { get; set; }

        #endregion

        #region Public Methods

        public void BindTerm(Term term, IEnumerable<Term> terms, bool isHeirarchical, bool loadFromControl, bool editEnabled)
        {
            //nameValidator.Text = Services.Localization.Localization.GetString("TermName.Required", SharedResourceFile);

            if (loadFromControl)
            {
                term.Name = nameTextBox.Text;
                term.Description = descriptionTextBox.Text;
                if (isHeirarchical && !string.IsNullOrEmpty(parentTermCombo.SelectedValue))
                {
                    term.ParentTermId = Int32.Parse(parentTermCombo.SelectedValue);
                }
            }
            else
            {
                nameTextBox.Text = term.Name;
				nameTextBox.Attributes.Add("data-termid", term.TermId.ToString());
				nameTextBox.Attributes.Add("data-vocabularyid", term.VocabularyId.ToString());
                descriptionTextBox.Text = term.Description;

                //Remove this term (and its descendants) from the collection, so we don't get wierd heirarchies
                var termsList = (from t in terms where !(t.Left >= term.Left && t.Right <= term.Right) select t).ToList();
				parentTermCombo.Items.Clear();
	            foreach (var t in termsList)
	            {
		            var item = new DnnComboBoxItem(t.Name, t.TermId.ToString());
					if (term.ParentTermId.HasValue && term.ParentTermId == t.TermId)
					{
						item.Selected = true;
					}
					parentTermCombo.Items.Add(item);
	            }

                divParentTerm.Visible = isHeirarchical && termsList.Count > 0;
                nameTextBox.Enabled = editEnabled;
                descriptionTextBox.Enabled = editEnabled;
                parentTermCombo.Enabled = editEnabled;
            }
        }

        #endregion

    }
}


text:
package i18n

import (
	"fmt"
	"net/http"
	"strings"

	"github.com/ThatsMrTalbot/scaffold"

	"golang.org/x/net/context"
	"golang.org/x/text/language"
)

var (
	languages = newRequestLanguageMap()
)

// Matcher get parses languages from http requests
type Matcher struct {
	i18n *I18n
}

// NewMatcher creates a new matcher
func NewMatcher(i18n *I18n) *Matcher {
	return &Matcher{
		i18n: i18n,
	}
}

func (matcher *Matcher) stripPrefix(prefix string, r *http.Request) {
	if p := strings.TrimPrefix(r.URL.Path, prefix); len(p) < len(r.URL.Path) {
		r.URL.Path = p
	}
}

// Middleware returns scaffold.Middleware that stores the language in the context
// redirecting if necessary
func (matcher *Matcher) Middleware() scaffold.Middleware {
	return scaffold.Middleware(func(next scaffold.Handler) scaffold.Handler {
		return scaffold.HandlerFunc(func(ctx context.Context, w http.ResponseWriter, r *http.Request) {
			if tag, redirect := matcher.handle(w, r); !redirect {
				ctx = NewLanguageContext(ctx, tag)
				prefix := fmt.Sprintf("/%s", matcher.tagString(tag))
				matcher.stripPrefix(prefix, r)
				next.CtxServeHTTP(ctx, w, r)
			}
		})
	})
}

// NewLanguageContext stores a language tag in the context
func NewLanguageContext(ctx context.Context, tag language.Tag) context.Context {
	return context.WithValue(ctx, "i18n_tag", tag)
}

// GetLanguageFromContext returns the language from the context
func GetLanguageFromContext(ctx context.Context) language.Tag {
	if tag, ok := ctx.Value("i18n_tag").(language.Tag); ok {
		return tag
	}
	return language.Und
}

// Wrapper returns a http.Handler that stores languages in a sharded map for
// retrieval using GetLanguageFromRequest
func (matcher *Matcher) Wrapper(handler http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		if tag, redirect := matcher.handle(w, r); !redirect {
			languages.Add(r, tag)
			defer languages.Delete(r)

			if handler != nil {
				prefix := fmt.Sprintf("/%s", matcher.tagString(tag))
				matcher.stripPrefix(prefix, r)
				handler.ServeHTTP(w, r)
			}
			http.NotFound(w, r)
		}
	})
}

// GetLanguageFromRequest gets the language from the internal map
func GetLanguageFromRequest(r *http.Request) language.Tag {
	if tag, ok := languages.Get(r); ok {
		return tag
	}
	return language.Und
}

func (matcher *Matcher) match(lang string) (matched language.Tag, match bool, valid bool, exact bool) {
	tag, err := language.Parse(lang)
	if err != nil || lang == "" {
		return language.Und, false, false, false
	}

	matched = language.Und
	exact = true
	match = false
	valid = true

	for {
		for _, supported := range matcher.i18n.GetSupportedLanguages() {
			if supported.String() == tag.String() {
				matched = supported
				match = true
				return
			}
		}

		exact = false

		if tag.IsRoot() {
			break
		}

		tag = tag.Parent()
	}

	return
}

func (matcher *Matcher) handle(w http.ResponseWriter, r *http.Request) (language.Tag, bool) {
	path := r.URL.Path
	segments := strings.Split(path, "/")

	if len(segments) <= 1 {
		segments = []string{"", ""}
	}

	tag, match, valid, exact := matcher.match(segments[1])

	if !match {
		tags, _, _ := language.ParseAcceptLanguage(r.Header.Get("Accept-Language"))
		tag = matcher.i18n.GetDefaultLanguage()

		for _, t := range tags {
			a, b, _, c := matcher.match(t.String())
			if b {
				tag, match, exact = a, b, c
				break
			}
		}
	}

	if !valid {
		str := matcher.tagString(tag)
		segments = append([]string{"", str}, segments[1:]...)
	}

	if !exact {
		str := matcher.tagString(tag)
		segments[1] = str
	}

	if !match || !valid || !exact {
		r.URL.Path = strings.Join(segments, "/")
		http.Redirect(w, r, r.URL.String(), 302)
		return tag, true
	}

	return tag, false
}

func (matcher *Matcher) tagString(tag language.Tag) string {
	str := tag.String()
	if str == "und" {
		return ""
	}
	return str
}


text:
package com.intellij.xdebugger.impl.ui.tree.nodes;

import com.intellij.xdebugger.frame.XStackFrame;
import com.intellij.xdebugger.impl.ui.tree.XDebuggerTree;
import org.jetbrains.annotations.NotNull;

public class XStackFrameNode extends XValueContainerNode<XStackFrame> {

  public XStackFrameNode(final @NotNull XDebuggerTree tree, final @NotNull XStackFrame xStackFrame) {
    super(tree, null, false, xStackFrame);
  }

}


text:
var merge = require('./core/merge');

module.exports = function render(vnode) {
  if (typeof vnode === 'string') {
    return document.createTextNode(vnode);
  }

  var node = document.createElement(vnode.tag);
  vnode.children.map(render).forEach(node.appendChild.bind(node));
  return merge(node, vnode.props);
};


text:
/**
 * Item info.
 * NOTE! This is EXPERIMENTAL feature. It might be removed at any time in the future.
 */
package com.esri.gpt.catalog.arcgis.agportal.itemInfo;


text:
package org.qipki.commons.crypto.values.x509;

import org.qi4j.api.common.UseDefaults;
import org.qi4j.api.property.Property;
import org.qi4j.api.value.ValueComposite;
import org.qi4j.library.constraints.annotation.GreaterThan;
import org.qipki.commons.crypto.values.HasCriticality;

public interface BasicConstraintsValue
    extends HasCriticality, ValueComposite
{

    @UseDefaults
    Property<Boolean> subjectIsCA();

    @UseDefaults
    @GreaterThan( value = -1L )
    Property<Long> pathLengthConstraint();

}


text:
package object_store

import (
	"errors"
	"fmt"

	"github.com/appcelerator/amp/api/rpc/object_store"
	"github.com/appcelerator/amp/cli"
	"github.com/spf13/cobra"
	"golang.org/x/net/context"
	grpcStatus "google.golang.org/grpc/status"
)

type RemoveObjectStoreOptions struct {
	force bool
}

var (
	removeOptions = RemoveObjectStoreOptions{}
)

// NewRemoveCommand returns a new instance of the forget command
func NewRemoveCommand(c cli.Interface) *cobra.Command {
	cmd := &cobra.Command{
		Use:     "remove [flags] NAME or ID",
		Aliases: []string{"rm", "delete", "del"},
		Short:   "delete object storage",
		PreRunE: cli.ExactArgs(1),
		RunE: func(cmd *cobra.Command, args []string) error {
			return remove(c, cmd, args[0])
		},
	}
	cmd.Flags().BoolVar(&removeOptions.force, "force", false, "Force remove non empty object stores")
	return cmd
}

func remove(c cli.Interface, cmd *cobra.Command, name string) error {
	client := object_store.NewObjectStoreClient(c.ClientConn())
	req := &object_store.RemoveRequest{Name: name, Force: removeOptions.force}
	reply, err := client.Remove(context.Background(), req)
	if err != nil {
		if s, ok := grpcStatus.FromError(err); ok {
			return errors.New(s.Message())
		}
	}
	fmt.Printf("Object store %s has been removed\n", reply.Name)
	return nil
}


text:
package org.camunda.bpm.extension.cloud.workload.query.service;

import com.rabbitmq.client.Channel;
import lombok.extern.slf4j.Slf4j;
import org.axonframework.amqp.eventhandling.spring.SpringAMQPMessageSource;
import org.axonframework.config.EventHandlingConfiguration;
import org.axonframework.serialization.Serializer;
import org.axonframework.serialization.json.JacksonSerializer;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@SpringBootApplication
@EnableEurekaClient
@EnableRabbit
@Slf4j
public class WorkloadQueryServiceApplication {

  public static void main(String... args) {
    SpringApplication.run(WorkloadQueryServiceApplication.class, args);
  }

  @Bean
  public WebMvcConfigurer corsConfigurer() {
    return new WebMvcConfigurerAdapter() {
      @Override
      public void addCorsMappings(final CorsRegistry registry) {
        registry.addMapping("/**");
      }
    };
  }

  @Bean
  Serializer serializer() {
    return new JacksonSerializer();
  }

  @Autowired
  public void configure(EventHandlingConfiguration ehConfig, SpringAMQPMessageSource myMessageSource) {
    ehConfig.registerSubscribingEventProcessor("org.camunda.bpm.extension.cloud.workload.query.service.handler", c -> myMessageSource);
  }

  @Bean
  public SpringAMQPMessageSource myMessageSource(Serializer serializer, EventHandlingConfiguration ehConfig) {
    return new SpringAMQPMessageSource(serializer) {
      @RabbitListener(queues = "${camunda.bpm.cloud.amqp.queue.event}")
      @Override
      public void onMessage(Message message, Channel channel) throws Exception {
        log.info("receiving event: {}#{}", message, channel);
        super.onMessage(message, channel);
      }
    };
  }
}


text:
package ru.fly.client.ui.field;

import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.dom.client.InputElement;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.regexp.shared.RegExp;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.ui.impl.TextBoxImpl;
import ru.fly.client.ui.validator.Validator;

import java.util.HashMap;
import java.util.Map;

/**
 * @author fil
 */
public class MaskedTextField extends TextField {

    private static TextBoxImpl impl = GWT.create(TextBoxImpl.class);
    private final Map<Character, RegExp> allows = new HashMap<Character, RegExp>() {{
        put('9', RegExp.compile("[0-9]"));
        put('a', RegExp.compile("[A-Za-zА-Яа-я]"));
        put('*', RegExp.compile("[A-Za-zА-Яа-я0-9]"));
    }};

    private String maskFormat = null;
    private String out;
    private boolean seekToEnd = false;
    private boolean mouseDown = false;
    private int selectionLength = 0;
    private boolean ctrlvFixed = false;

    public MaskedTextField() {
        addValidator(new Validator<String>() {
            @Override
            public String validate(String obj) {
                if (getInputValue() == null || isEmptyMask(getInputValue()) || !getInputValue().contains("_")) {
                    return null;
                } else {
                    return "Поле заполнено неверно, необходимый формат " + maskFormat;
                }
            }
        });
    }

    private String getEmptyMask() {
        return maskFormat.replace("9", "_").replace("a", "_").replace("*", "_");
    }

    public void setMaskFormat(String mask) {
        clear();
        maskFormat = mask;
        out = getEmptyMask();
        setValue(getValue());
    }

    @Override
    public void setValue(String value) {
        if (value == null && maskFormat != null) {
            out = getEmptyMask();
        } else {
            out = value;
        }
        super.setValue(value);
        ((InputElement) getInputElement().cast()).setValue(out);
    }

    @Override
    public String getValue() {
        String val = super.getValue();
        if (val != null && getEmptyMask().equals(val)) {
            return null;
        } else {
            return val;
        }
    }

    @Override
    protected void onAttach() {
        super.onAttach();
        sinkEvents(Event.ONKEYPRESS | Event.ONKEYDOWN | Event.ONMOUSEDOWN | Event.ONMOUSEUP);
        ((InputElement) getInputElement().cast()).setValue(out);
    }

    @Override
    protected void onFocus() {
        super.onFocus();
        Scheduler.get().scheduleFixedDelay(new Scheduler.RepeatingCommand() {
            @Override
            public boolean execute() {
                correctPosition(false);
                return false;
            }
        }, 50);
    }

    @Override
    public void onBrowserEvent(Event e) {
        switch (e.getTypeInt()) {
            case Event.ONMOUSEDOWN:
                try {
                    if (!isFocused()) {
                        seekToEnd = true;
                    }
                } finally {
                    mouseDown = true;
                }
                break;
            case Event.ONMOUSEUP:
                try {
                    boolean positionCorrected = false;
                    int pos = impl.getCursorPos(getInputElement());
                    if (seekToEnd) {
                        if (pos == out.length()) {
                            pos = seekToEnd();
                            if (pos != -1) {
                                impl.setSelectionRange(getInputElement(), pos, 0);
                                positionCorrected = true;
                            }
                        }
                        seekToEnd = false;
                    }
                    if (!positionCorrected) {
                        correctPosition(false);
                    }
                } finally {
                    mouseDown = false;
                }
                break;
            case Event.ONKEYPRESS:
                if (mouseDown) {
                    e.stopPropagation();
                    e.preventDefault();
                    return;
                }
                if (e.getKeyCode() != KeyCodes.KEY_LEFT && e.getKeyCode() != KeyCodes.KEY_RIGHT) {
                    char code = (char) e.getCharCode();
                    onInput(code, impl.getCursorPos(getInputElement()));
                    e.stopPropagation();
                    e.preventDefault();
                }
                break;
            case Event.ONKEYDOWN:
                if (mouseDown) {
                    e.stopPropagation();
                    e.preventDefault();
                    return;
                }
                selectionLength = impl.getSelectionLength(getInputElement());
                if (e.getKeyCode() == KeyCodes.KEY_BACKSPACE) {
                    if (selectionLength == out.length()) {
                        erasePrev(Integer.MAX_VALUE);
                    } else {
                        erasePrev(impl.getCursorPos(getInputElement()) - 1);
                    }
                    e.stopPropagation();
                    e.preventDefault();
                } else if (e.getKeyCode() == KeyCodes.KEY_DELETE) {
                    onInput('_', impl.getCursorPos(getInputElement()));
                    e.stopPropagation();
                    e.preventDefault();
                } else if (e.getCtrlKey() && e.getKeyCode() == 86) {//отменяем CTRL+v
                    //ловим только одно нажатие CTRL+v
                    if (ctrlvFixed) {
                        e.stopPropagation();
                        e.preventDefault();
                    } else {
                        ctrlvFixed = true;
                    }
                }
                break;
            case Event.ONKEYUP:
                if (mouseDown) {
                    e.stopPropagation();
                    e.preventDefault();
                    return;
                }
                if (e.getKeyCode() == KeyCodes.KEY_LEFT || e.getKeyCode() == KeyCodes.KEY_RIGHT) {
                    correctPosition(e.getKeyCode() == KeyCodes.KEY_LEFT);
                } else {
                    if (ctrlvFixed) {//CTRL+v
                        ctrlv(impl.getCursorPos(getInputElement()));
                        ctrlvFixed = false;
                    }
                }
                break;
        }
        super.onBrowserEvent(e);
    }

    // ---------- privates ------------

    private boolean isEmptyMask(String val) {
        for (int i = 0; i < val.length(); i++) {
            if (out.charAt(i) != '_' && maskFormat.charAt(i) == '9') {
                return false;
            }
        }
        return true;
    }

    private int onInput(char c, int pos) {
        int newPos = -1;
        if (pos > -1) {
            newPos = getValidPositionOrNext(c, pos);
            if (newPos != -1) {
                out = out.substring(0, pos) + c + out.substring(pos + 1);
                newPos = getValidPositionOrNext(pos + 1);
            }
        }
        ((InputElement) getInputElement().cast()).setValue(out);
        impl.setSelectionRange(getInputElement(), newPos > -1 ? newPos : pos, 0);
        return pos + 1;
    }

    private int getValidPositionOrNext(char c, int pos) {
        while (pos != -1) {
            if (pos < maskFormat.length()) {
                char posChar = maskFormat.charAt(pos);
                if (posChar == '9' || posChar == 'a' || posChar == '*') {
                    if (c == '_' || allows.get(posChar).test(String.valueOf(c))) {
                        return pos;
                    } else {
                        pos = -1;
                    }
                } else {
                    pos++;
                }
            } else {
                pos = -1;
            }
        }
        return pos;
    }

    private int getValidPositionOrNext(int pos) {
        while (pos != -1) {
            if (pos < maskFormat.length()) {
                char posChar = maskFormat.charAt(pos);
                if (posChar == '9' || posChar == 'a' || posChar == '*') {
                    return pos;
                } else {
                    pos++;
                }
            } else {
                pos = -1;
            }
        }
        return pos;
    }

    private void erasePrev(int pos) {
        if (pos == Integer.MAX_VALUE) {
            out = getEmptyMask();
            pos = 0;
        } else if (pos != -1) {
            pos = getValidPositionOrPrev(pos);
            if (pos != -1) {
                out = out.substring(0, pos) + "_" + out.substring(pos + 1);
            }
        }
        ((InputElement) getInputElement().cast()).setValue(out);
        if (pos == -1) {
            pos = getValidPositionOrNext(0);
        }
        impl.setSelectionRange(getInputElement(), pos, 0);
    }

    private int getValidPositionOrPrev(int pos) {
        while (pos != -1) {
            if (pos > -1) {
                char posChar = maskFormat.charAt(pos);
                if (posChar == '9' || posChar == 'a' || posChar == '*') {
                    return pos;
                } else {
                    pos--;
                }
            }
        }
        return pos;
    }

    private int seekToEnd() {
        int pos = 0;
        while (pos < out.length()) {
            char c = out.charAt(pos);
            if (c == '_') {
                return pos;
            } else {
                pos++;
            }
        }
        return -1;
    }

    private void ctrlv(int pos) {
        if (selectionLength < 0) {
            return;
        }
        String val = getInputValue();
        int pastLength = val.length() + selectionLength - maskFormat.length();
        if (pastLength < 0) {
            pastLength = 0;
        }
        pos -= pastLength;
        if (pos < 0) {
            pos = 0;
        }
        String pastVal = val.substring(pos, pos + pastLength);
        if (pastLength > 0) {
            for (char c : pastVal.toCharArray()) {
                pos = onInput(c, pos);
            }
        } else {
            ((InputElement) getInputElement().cast()).setValue(out);
        }
        if (pos == -1) {
            pos = maskFormat.length();
        }
        impl.setSelectionRange(getInputElement(), pos, 0);
    }

    private void correctPosition(boolean forceLeft) {
        int pos = impl.getCursorPos(getInputElement());
        pos = forceLeft ? getValidPositionOrPrev(pos) : getValidPositionOrNext(pos);
        if (pos > -1) {
            impl.setSelectionRange(getInputElement(), pos, 0);
        }
    }
}


text:
namespace hect
{

///
/// Logs a message.
///
/// \param level The level of the message.
/// \param message The message.
HECT_EXPORT void log(LogLevel level, const std::string& message);

///
/// Registers a listener of log message events.
///
/// \param listener The listener.
HECT_EXPORT void register_log_listener(EventListener<LogMessageEvent>& listener);

///
/// Sets whether messages at the specified level are logged.
///
/// \param level The level.
/// \param enabled Whether messages at the specified level are logged.
HECT_EXPORT void set_log_level_enabled(LogLevel level, bool enabled);

///
/// Returns whether messages at the specified level are logged.
///
/// \param level The level in question.
HECT_EXPORT bool is_log_level_enabled(LogLevel level);

// Info
#if defined(HECT_ENABLE_LOG_INFO)
#define HECT_INFO(message) \
    if (hect::is_log_level_enabled(hect::LogLevel::Info)) \
    { \
        hect::log(hect::LogLevel::Info, message); \
    }
#else
#define HECT_INFO(message)
#endif

// Debug
#if defined(HECT_ENABLE_LOG_DEBUG)
#define HECT_DEBUG(message) \
    if (hect::is_log_level_enabled(hect::LogLevel::Debug)) \
    { \
        hect::log(hect::LogLevel::Debug, message); \
    }
#else
#define HECT_DEBUG(message)
#endif

// Warning
#if defined(HECT_ENABLE_LOG_WARNING)
#define HECT_WARNING(message) \
    if (hect::is_log_level_enabled(hect::LogLevel::Warning)) \
    { \
        hect::log(hect::LogLevel::Warning, message); \
    }
#else
#define HECT_WARNING(message)
#endif

// Error
#if defined(HECT_ENABLE_LOG_ERROR)
#define HECT_ERROR(message) \
    if (hect::is_log_level_enabled(hect::LogLevel::Error)) \
    { \
        hect::log(hect::LogLevel::Error, message); \
    }
#else
#define HECT_ERROR(message)
#endif

// Trace
#if defined(HECT_ENABLE_LOG_TRACE)
#define HECT_TRACE(message) \
    if (hect::is_log_level_enabled(hect::LogLevel::Trace)) \
    { \
        hect::log(hect::LogLevel::Trace, message); \
    }
#else
#define HECT_TRACE(message)
#endif

}


text:
package weather.manish.com.weatherforecast;

import android.app.Activity;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;

import com.google.gson.Gson;
import com.hamweather.aeris.communication.AerisEngine;

import weather.manish.com.weatherforecast.model.ForecastResponse;

//public class MapActivity extends AppCompatActivity {
public class MapActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_map);
        Intent intent = getIntent();
        String data = intent.getStringExtra("data");

        double latitude=0;
        double longitude=0;

        ForecastResponse response = new Gson().fromJson(data,ForecastResponse.class);
        latitude = Double.parseDouble(response.getLatitude());
        longitude = Double.parseDouble(response.getLongitude());

        AerisEngine.initWithKeys(this.getString(R.string.aeris_client_id), this.getString(R.string.aeris_client_secret), this);
        FragmentManager fragmentManager = getFragmentManager();
        FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();

        Bundle bundle = new Bundle();
        bundle.putString("latitude", Double.toString(latitude));
        bundle.putString("longitude", Double.toString(longitude));

        MapFragment mapFragment = new MapFragment();

        mapFragment.setArguments(bundle);

        fragmentTransaction.add(R.id.ForecastMap,mapFragment);
        fragmentTransaction.commit();
    }

}


text:
@(form: Form[_], account: loom.models.admin.Admin)(implicit request: AdminRequest)
@import loom.models._
@import loom.models.admin._
@layout.admin(Messages("m.account.edit"), Model.M_Accounts) {
    <form action="@cadmin.routes.Admins.edit(account.id)" method="post" class="bs-docs-example form-horizontal" id="inputForm">
        <fieldset>
            <legend>@Messages("m.account.edit")</legend>
            @tags.errors(form)
            @tags.requestflash(request)
            <input type="hidden" name="id" value="@account.id">
            <input type="hidden" name="p" value="@request.getQueryString("p")">

                @Messages("m.account.loginName")

                @account.loginName

                @Messages("m.account.email")

                    <input type="text" name="email" id="email" value="@account.email">

                    <button type="submit" class="btn btn-primary">@Messages("common.save")</button>     <button class="btn" type="reset">@Messages("common.reset")</button>    <button type="button" class="btn" onclick="history.back()">@Messages("common.back")</button>

        </fieldset>
    </form>
}


text:
package org.apache.reef.runtime.common.evaluator.context.defaults;

import org.apache.reef.annotations.audience.EvaluatorSide;
import org.apache.reef.evaluator.context.ContextMessageHandler;
import org.apache.reef.evaluator.context.parameters.ContextIdentifier;
import org.apache.reef.tang.annotations.Parameter;

import javax.inject.Inject;

/**
 * Default handler for messages sent by the driver: Crash the context.
 */
@EvaluatorSide
public final class DefaultContextMessageHandler implements ContextMessageHandler {

  private final String contextID;

  @Inject
  DefaultContextMessageHandler(final @Parameter(ContextIdentifier.class) String contextID) {
    this.contextID = contextID;
  }

  @Override
  public void onNext(final byte[] message) {
    throw new IllegalStateException("No message handlers given for context " + this.contextID);
  }
}


text:
<?php

namespace Application\Controller\Plugin;

use \Zend\Mvc\Controller\Plugin\AbstractPlugin;

/*
 * Class Buzzer
 */
class Buzzer extends AbstractPlugin
{
    /*
     * Attribut Name
     */
    protected $name;

    public function __invoke() {
        return $this;
    }

    public function buzz() {
        return [
            'name' => $this->name,
        ];
    }

    /*
     * Methode getName
     */
    public function getName() {
        return $this->name;

    }

    /*
     * Methode setName
     */
    public function setName($name) {
        $this->name = $name;
        return $this;
    }

}