text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.xiaomi.infra</groupId>
  <artifactId>themis-index</artifactId>
  <packaging>jar</packaging>
  <version>${themis.version}</version>
  <description>Themis Secondary Index Implementation for HBase</description>
  <name>themis-index</name>

  <parent>
    <groupId>com.xiaomi.infra</groupId>
    <artifactId>themis</artifactId>
    <version>1.0-SNAPSHOT</version>
    <relativePath>../</relativePath>
  </parent>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>themis-client</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>themis-client</artifactId>
      <version>${project.version}</version>
      <classifier>tests</classifier>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>themis-coprocessor</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>themis-coprocessor</artifactId>
      <version>${project.version}</version>
      <classifier>tests</classifier>
    </dependency>
    <dependency>
      <groupId>org.apache.hbase</groupId>
      <artifactId>hbase</artifactId>
      <version>${hbase.version}</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-minicluster</artifactId>
      <version>${hadoop.version}</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
  <build>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.1</version>
          <configuration>
            <source>1.6</source>
            <target>1.6</target>
            <fork>true</fork>
            <verbose>true</verbose>
            <encoding>UTF-8</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.8</version>
          <executions>
            <execution>
              <phase>package</phase>
              <goals><goal>jar</goal></goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1</version>
          <executions>
            <execution>
              <phase>package</phase>
              <goals><goal>jar</goal></goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
  </build>
</project>


text:
<!DOCTYPE html>

  <title>login-view.coffee</title>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
  <link rel="stylesheet" media="all" href="docco.css" />

          Jump To …
          +

                spark-dev.coffee

                dialog.coffee

                password-editor.coffee

                menu-manager.coffee

                serial-helper.coffee

                settings-helper.coffee

                claim-core-view.coffee

                cloud-variables-and-functions-view.coffee

                compile-errors-view.coffee

                identify-core-view.coffee

                listening-mode-view.coffee

                login-view.coffee

                rename-core-view.coffee

                select-core-view.coffee

                select-firmware-view.coffee

                select-port-view.coffee

                select-wifi-view.coffee

                serial-monitor-view.coffee

                status-bar-view.coffee

                wifi-credentials-view.coffee

login-view.coffee

                ¶

{View, TextEditorView} = require 'atom'

$ = null
_s = null
Subscriber = null
spark = null
SettingsHelper = null
validator = null

module.exports =
class LoginView extends View
  @content: ->
    @div id: 'spark-dev-login-view', class: 'overlay from-top', =>
      @div class: 'block', =>
        @span 'Log in to Spark Cloud '
        @span class: 'text-subtle', =>
          @text 'Close this dialog with the '
          @span class: 'highlight', 'esc'
          @span ' key'
      @subview 'emailEditor', new TextEditorView(mini: true, placeholderText: 'Could I please have an email address?')
      @subview 'passwordEditor', new TextEditorView(mini: true, placeholderText: 'and a password?')
      @div class: 'text-error block', outlet: 'errorLabel'
      @div class: 'block', =>
        @button click: 'login', id: 'loginButton', class: 'btn btn-primary', outlet: 'loginButton', 'Log in'
        @button click: 'cancel', id: 'cancelButton', class: 'btn', outlet: 'cancelButton', 'Cancel'
        @span class: 'three-quarters inline-block hidden', outlet: 'spinner'
        @a href: 'https://www.spark.io/forgot-password', class: 'pull-right', 'Forgot password?'

  initialize: (serializeState) ->
    {Subscriber} = require 'emissary'
    $ ?= require('atom').$

    _s ?= require 'underscore.string'
    SettingsHelper = require '../utils/settings-helper'

    @subscriber = new Subscriber()
    @subscriber.subscribeToCommand atom.workspaceView, 'core:cancel core:close', ({target}) =>
      atom.workspaceView.trigger 'spark-dev:cancel-login'

    @loginPromise = null

                ¶

As Atom doesn't provide password input, we have to hack TextEditorView to act as one

Known issues:

doesn't support pasting (it will show plain text)

doesn't work with multiple selections

    @passwordEditor.originalText = ''
    @passwordEditor.hiddenInput.on 'keypress', (e) =>
      editor = @passwordEditor.getEditor()
      selection = editor.getSelectedBufferRange()
      cursor = editor.getCursorBufferPosition()
      if !selection.isEmpty()
        @passwordEditor.originalText = _s.splice(@passwordEditor.originalText, selection.start.column, selection.end.column - selection.start.column, String.fromCharCode(e.which))
      else
        @passwordEditor.originalText = _s.splice(@passwordEditor.originalText, cursor.column, 0, String.fromCharCode(e.which))
      @passwordEditor.insertText '*'
      false

    @passwordEditor.hiddenInput.on 'keydown', (e) =>
      if e.which == 8
        editor = @passwordEditor.getEditor()
        selection = editor.getSelectedBufferRange()
        cursor = editor.getCursorBufferPosition()
        if !selection.isEmpty()
          @passwordEditor.originalText = _s.splice(@passwordEditor.originalText, selection.start.column, selection.end.column - selection.start.column)
        else
          @passwordEditor.originalText = _s.splice(@passwordEditor.originalText, cursor.column - 1, 1)
        @passwordEditor.backspace
      else if e.which == 13
        @login()
      true

                ¶

Returns an object that can be retrieved when package is activated

  serialize: ->

                ¶

Tear down any state and detach

  destroy: ->
    @remove()

  show: =>
    if !@hasParent()
      atom.workspaceView.append(this)
      @emailEditor.getEditor().setText ''
      @passwordEditor.getEditor().setText ''
      @passwordEditor.originalText = ''
      @errorLabel.hide()
      @emailEditor.focus()

  hide: ->
    if @hasParent()
      @detach()

  cancel: (event, element) =>
    if !!@loginPromise
      @loginPromise = null
    @unlockUi()
    @clearErrors()
    @hide()

  cancelCommand: ->
    @cancel()

                ¶

Remove errors from inputs

  clearErrors: ->
    @emailEditor.removeClass 'editor-error'
    @passwordEditor.removeClass 'editor-error'

                ¶

Test input's values

  validateInputs: ->
    validator ?= require 'validator'

    @clearErrors()

    @email = _s.trim(@emailEditor.getText())
    @password = _s.trim(@passwordEditor.originalText)

    isOk = true

    if (@email == '') || (!validator.isEmail(@email))
      @emailEditor.addClass 'editor-error'
      isOk = false

    if @password == ''
      @passwordEditor.addClass 'editor-error'
      isOk = false

    isOk

                ¶

Unlock inputs and buttons

  unlockUi: ->
    @emailEditor.hiddenInput.removeAttr 'disabled'
    @passwordEditor.hiddenInput.removeAttr 'disabled'
    @loginButton.removeAttr 'disabled'

                ¶

Login via the cloud

  login: (event, element) =>
    if !@validateInputs()
      return false

    @emailEditor.hiddenInput.attr 'disabled', 'disabled'
    @passwordEditor.hiddenInput.attr 'disabled', 'disabled'
    @loginButton.attr 'disabled', 'disabled'
    @spinner.removeClass 'hidden'
    @errorLabel.hide()

    spark = require 'spark'
    @loginPromise = spark.login { username:@email, password:@password }
    @loginPromise.done (e) =>
      @spinner.addClass 'hidden'
      if !@loginPromise
        return
      SettingsHelper.setCredentials @email, e.access_token
      atom.workspaceView.trigger 'spark-dev:update-login-status'
      @loginPromise = null

      @cancel()

    , (e) =>
      @spinner.addClass 'hidden'
      if !@loginPromise
        return
      @unlockUi()
      if e.code == 'ENOTFOUND'
        @errorLabel.text 'Error while connecting to ' + e.hostname
      else
        @errorLabel.text e

      @errorLabel.show()
      @loginPromise = null

                ¶

Logout

  logout: =>
    SettingsHelper.clearCredentials()
    atom.workspaceView.trigger 'spark-dev:update-login-status'

redpajama_set_name: RedPajamaGithub


text:
package com.aspose.cells.cloud.examples.worksheet;

import com.aspose.cells.api.CellsApi;
import com.aspose.cells.cloud.examples.Configuration;
import com.aspose.cells.cloud.examples.Utils;
import com.aspose.storage.api.StorageApi;
import java.io.IOException;
import java.io.File;
import com.aspose.cells.cloud.examples.R;
import android.content.Context;

public class UpdateWorksheetProperties {

	public static void execute(Context context) throws IOException {
		//ExStart: update-worksheet-properties
		try {
			// Instantiate Aspose Storage API SDK
			StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);

			// Instantiate Aspose Words API SDK
			CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
			String input = "Sample1.xlsx";
			String output = "Sample2.xlsx";

			File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
			File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));

			String sheet = "Sheet1";

			com.aspose.cells.model.Worksheet properties = new com.aspose.cells.model.Worksheet();
			properties.setType("Worksheet");
			properties.setName("Sheet1");
			properties.setIsGridlinesVisible(true);
			properties.setIsPageBreakPreview(true);
			properties.setIsRulerVisible(true);

			storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
			cellsApi.PostUpdateWorksheetProperty(input, sheet, null, Utils.STORAGE, properties);
			com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
			Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
		}

		catch (Exception e) {
			e.printStackTrace();
		}
		//ExEnd: update-worksheet-properties

	}
}


text:
package fr.castorflex.android.smoothprogressbar;

import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
import android.view.animation.LinearInterpolator;
import android.widget.ProgressBar;

import org.appcelerator.titanium.util.TiRHelper;
import org.appcelerator.titanium.util.TiRHelper.ResourceNotFoundException;

/**
 * Created by castorflex on 11/10/13.
 */
public class SmoothProgressBar extends ProgressBar {

	private static final int INTERPOLATOR_ACCELERATE = 0;
	private static final int INTERPOLATOR_LINEAR = 1;
	private static final int INTERPOLATOR_ACCELERATEDECELERATE = 2;
	private static final int INTERPOLATOR_DECELERATE = 3;

	public SmoothProgressBar(Context context) throws ResourceNotFoundException {
		this(context, null);
	}

	public SmoothProgressBar(Context context, AttributeSet attrs)
			throws ResourceNotFoundException {

		this(context, attrs, android.R.attr.progressBarStyleHorizontal);
	}

	public SmoothProgressBar(Context context, AttributeSet attrs, int defStyle)
			throws ResourceNotFoundException {
		super(context, attrs, defStyle);

		Resources res = context.getResources();

		int s[] = { TiRHelper
				.getApplicationResource("styleable.SmoothProgressBar") };

		TypedArray a = context.obtainStyledAttributes(attrs, s, defStyle, 0);

		final int color = a
				.getColor(
						TiRHelper
								.getApplicationResource("styleable.SmoothProgressBar_spb_color"),
						res.getColor(

						TiRHelper
								.getApplicationResource("color.spb_default_color")

						));
		final int sectionsCount = a
				.getInteger(

						TiRHelper
								.getApplicationResource("styleable.SmoothProgressBar_spb_sections_count"),
						res.getInteger(

						TiRHelper
								.getApplicationResource("integer.spb_default_sections_count")));
		final int separatorLength = a
				.getDimensionPixelSize(

						TiRHelper
								.getApplicationResource("styleable.SmoothProgressBar_spb_stroke_separator_length")

						,
						res.getDimensionPixelSize(

						TiRHelper
								.getApplicationResource("dimen.spb_default_stroke_separator_length")

						));
		final float strokeWidth = a
				.getDimension(

						TiRHelper
								.getApplicationResource("styleable.SmoothProgressBar_spb_stroke_width"),
						res.getDimension(

						TiRHelper
								.getApplicationResource("dimen.spb_default_stroke_width")

						));
		final float speed = a
				.getFloat(

						TiRHelper
								.getApplicationResource("styleable.SmoothProgressBar_spb_speed"),
						Float.parseFloat(res.getString(

						TiRHelper
								.getApplicationResource("string.spb_default_speed")

						)));
		final int iInterpolator = a
				.getInteger(

						TiRHelper
								.getApplicationResource("styleable.SmoothProgressBar_spb_interpolator"),
						res.getInteger(

						TiRHelper
								.getApplicationResource("integer.spb_default_interpolator")

						));
		final boolean reversed = a
				.getBoolean(

						TiRHelper
								.getApplicationResource("styleable.SmoothProgressBar_spb_reversed"),
						res.getBoolean(

						TiRHelper
								.getApplicationResource("bool.spb_default_reversed")));
		final boolean mirrorMode = a
				.getBoolean(

						TiRHelper
								.getApplicationResource("styleable.SmoothProgressBar_spb_mirror_mode"),
						res.getBoolean(TiRHelper
								.getApplicationResource("bool.spb_default_mirror_mode")

						));
		final int colorsId = a
				.getResourceId(

						TiRHelper
								.getApplicationResource("styleable.SmoothProgressBar_spb_colors")

						, 0);
		a.recycle();

		// interpolator
		Interpolator interpolator;
		switch (iInterpolator) {
		case INTERPOLATOR_ACCELERATEDECELERATE:
			interpolator = new AccelerateDecelerateInterpolator();
			break;
		case INTERPOLATOR_DECELERATE:
			interpolator = new DecelerateInterpolator();
			break;
		case INTERPOLATOR_LINEAR:
			interpolator = new LinearInterpolator();
			break;
		case INTERPOLATOR_ACCELERATE:
		default:
			interpolator = new AccelerateInterpolator();
		}

		int[] colors = null;
		// colors
		if (colorsId != 0) {
			colors = res.getIntArray(colorsId);
		}

		SmoothProgressDrawable.Builder builder = new SmoothProgressDrawable.Builder(
				context).speed(speed).interpolator(interpolator)
				.sectionsCount(sectionsCount).separatorLength(separatorLength)
				.strokeWidth(strokeWidth).reversed(reversed)
				.mirrorMode(mirrorMode);

		if (colors != null && colors.length > 0)
			builder.colors(colors);
		else
			builder.color(color);

		setIndeterminateDrawable(builder.build());
	}

	public void applyStyle(int styleResId) throws ResourceNotFoundException {
		int s[] = { TiRHelper
				.getApplicationResource("styleable.SmoothProgressBar") };

		TypedArray a = getContext().obtainStyledAttributes(null, s, 0,
				styleResId);

		if (a.hasValue(TiRHelper
				.getApplicationResource("styleable.SmoothProgressBar_spb_color"))) {
			setSmoothProgressDrawableColor(a
					.getColor(
							TiRHelper
									.getApplicationResource("styleable.SmoothProgressBar_spb_color"),
							0));
		}
		if (a.hasValue(TiRHelper
				.getApplicationResource("styleable.SmoothProgressBar_spb_colors"))) {
			int colorsId = a
					.getResourceId(
							TiRHelper
									.getApplicationResource("styleable.SmoothProgressBar_spb_colors"),
							0);
			if (colorsId != 0) {
				int[] colors = getResources().getIntArray(colorsId);
				if (colors != null && colors.length > 0)
					setSmoothProgressDrawableColors(colors);
			}
		}
		if (a.hasValue(TiRHelper
				.getApplicationResource("styleable.SmoothProgressBar_spb_sections_count"))) {
			setSmoothProgressDrawableSectionsCount(a
					.getInteger(
							TiRHelper
									.getApplicationResource("styleable.SmoothProgressBar_spb_sections_count"),
							0));
		}
		if (a.hasValue(TiRHelper
				.getApplicationResource("styleable.SmoothProgressBar_spb_stroke_separator_length"))) {
			setSmoothProgressDrawableSeparatorLength(a
					.getDimensionPixelSize(
							TiRHelper
									.getApplicationResource("styleable.SmoothProgressBar_spb_stroke_separator_length"),
							0));
		}
		if (a.hasValue(TiRHelper
				.getApplicationResource("styleable.SmoothProgressBar_spb_stroke_width"))) {
			setSmoothProgressDrawableStrokeWidth(a
					.getDimension(
							TiRHelper
									.getApplicationResource("styleable.SmoothProgressBar_spb_stroke_width"),
							0));
		}
		if (a.hasValue(TiRHelper
				.getApplicationResource("styleable.SmoothProgressBar_spb_speed"))) {
			setSmoothProgressDrawableSpeed(a
					.getFloat(
							TiRHelper
									.getApplicationResource("styleable.SmoothProgressBar_spb_speed"),
							0));
		}
		if (a.hasValue(TiRHelper
				.getApplicationResource("styleable.SmoothProgressBar_spb_reversed"))) {
			setSmoothProgressDrawableReversed(a
					.getBoolean(
							TiRHelper
									.getApplicationResource("styleable.SmoothProgressBar_spb_reversed"),
							false));
		}
		if (a.hasValue(TiRHelper
				.getApplicationResource("styleable.SmoothProgressBar_spb_mirror_mode"))) {
			setSmoothProgressDrawableMirrorMode(a
					.getBoolean(
							TiRHelper
									.getApplicationResource("styleable.SmoothProgressBar_spb_mirror_mode"),
							false));
		}
		if (a.hasValue(TiRHelper
				.getApplicationResource("styleable.SmoothProgressBar_spb_interpolator"))) {
			int iInterpolator = a
					.getInteger(
							TiRHelper
									.getApplicationResource("styleable.SmoothProgressBar_spb_interpolator"),
							-1);
			Interpolator interpolator;
			switch (iInterpolator) {
			case INTERPOLATOR_ACCELERATEDECELERATE:
				interpolator = new AccelerateDecelerateInterpolator();
				break;
			case INTERPOLATOR_DECELERATE:
				interpolator = new DecelerateInterpolator();
				break;
			case INTERPOLATOR_LINEAR:
				interpolator = new LinearInterpolator();
				break;
			case INTERPOLATOR_ACCELERATE:
				interpolator = new AccelerateInterpolator();
				break;
			default:
				interpolator = null;
			}
			if (interpolator != null) {
				setInterpolator(interpolator);
			}
		}
		a.recycle();
	}

	private SmoothProgressDrawable checkIndeterminateDrawable() {
		Drawable ret = getIndeterminateDrawable();
		if (ret == null || !(ret instanceof SmoothProgressDrawable))
			throw new RuntimeException(
					"The drawable is not a SmoothProgressDrawable");
		return (SmoothProgressDrawable) ret;
	}

	@Override
	public void setInterpolator(Interpolator interpolator) {
		super.setInterpolator(interpolator);
		Drawable ret = getIndeterminateDrawable();
		if (ret != null && (ret instanceof SmoothProgressDrawable))
			((SmoothProgressDrawable) ret).setInterpolator(interpolator);
	}

	public void setSmoothProgressDrawableInterpolator(Interpolator interpolator) {
		checkIndeterminateDrawable().setInterpolator(interpolator);
	}

	public void setSmoothProgressDrawableColors(int[] colors) {
		checkIndeterminateDrawable().setColors(colors);
	}

	public void setSmoothProgressDrawableColor(int color) {
		checkIndeterminateDrawable().setColor(color);
	}

	public void setSmoothProgressDrawableSpeed(float speed) {
		checkIndeterminateDrawable().setSpeed(speed);
	}

	public void setSmoothProgressDrawableSectionsCount(int sectionsCount) {
		checkIndeterminateDrawable().setSectionsCount(sectionsCount);
	}

	public void setSmoothProgressDrawableSeparatorLength(int separatorLength) {
		checkIndeterminateDrawable().setSeparatorLength(separatorLength);
	}

	public void setSmoothProgressDrawableStrokeWidth(float strokeWidth) {
		checkIndeterminateDrawable().setStrokeWidth(strokeWidth);
	}

	public void setSmoothProgressDrawableReversed(boolean reversed) {
		checkIndeterminateDrawable().setReversed(reversed);
	}

	public void setSmoothProgressDrawableMirrorMode(boolean mirrorMode) {
		checkIndeterminateDrawable().setMirrorMode(mirrorMode);
	}
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Bull. Torrey bot. Club 76: 36 (1949)

#### Original name
Puccinia coronospora Cummins

### Remarks
null


text:
module PopUploader
  VERSION = "0.2.6"
end


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using Charlotte.Tools;
using System.Security.Permissions;

namespace Charlotte.Chocomint.Dialogs
{
	public partial class BusyDlg : Form
	{
		#region ALT_F4 抑止

		[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
		protected override void WndProc(ref Message m)
		{
			const int WM_SYSCOMMAND = 0x112;
			const long SC_CLOSE = 0xF060L;

			if (m.Msg == WM_SYSCOMMAND && (m.WParam.ToInt64() & 0xFFF0L) == SC_CLOSE)
				return;

			base.WndProc(ref m);
		}

		#endregion

		public ThreadEx Th = null;
		public Action PostShown = () => { };

		// <---- prm

		public BusyDlg()
		{
			InitializeComponent();

			this.MinimumSize = this.Size;
		}

		private void BusyDlg_Load(object sender, EventArgs e)
		{
			// noop
		}

		private void BusyDlg_Shown(object sender, EventArgs e)
		{
			this.EndedCount = 0;

			this.PostShown();
			ChocomintDialogsCommon.DlgCommonPostShown(this);
		}

		private void BusyDlg_FormClosing(object sender, FormClosingEventArgs e)
		{
			// noop
		}

		private void BusyDlg_FormClosed(object sender, FormClosedEventArgs e)
		{
			this.EndedCount = -1; // 2bs
		}

		private int EndedCount = -1;
		private double ProgressRate = 0.0;
		private int PRCount = 0;
		private int PRCC = 0;

		private void MainTimer_Tick(object sender, EventArgs e)
		{
			if (this.EndedCount == -1)
				return;

			if (this.EndedCount == 0)
			{
				if (this.Th == null || this.Th.IsEnded())
				{
					this.EndedCount = 1;
					this.ProgressRate = 1.0;
					this.ProgressRateChanged();
					return;
				}
				if (this.PRCount == 0)
				{
					this.ProgressRate -= 0.9;
					this.ProgressRate *= 0.9;
					this.ProgressRate += 0.9;
					this.ProgressRateChanged();
					this.PRCount = 10 + (this.PRCC % 3) * 10;
					this.PRCC++;
				}
				else
					this.PRCount--;

				return;
			}
			if (10 < ++this.EndedCount)
			{
				this.EndedCount = -1;
				this.Close();
			}
		}

		private void ProgressRateChanged()
		{
			int value = DoubleTools.ToInt(this.ProgressRate * 1000.0);

			if (this.ProgressBar.Value != value)
				this.ProgressBar.Value = value;
		}
	}
}


text:
import jwt
from jwt import DecodeError, ExpiredSignature
from config import SECRET_KEY, PASSWORD_RESET_EMAIL
from datetime import datetime, timedelta
from functools import wraps
from flask import g, Blueprint, jsonify, make_response, request
from flask_restful import Resource, Api
import flask_restful
from app.users.models import Users, UsersSchema
from werkzeug.security import check_password_hash, generate_password_hash
from sqlalchemy.exc import SQLAlchemyError
from marshmallow import ValidationError
from app.basemodels import db
from flask_mail import Mail, Message

login1 = Blueprint('login', __name__)
api = Api(login1)
schema = UsersSchema(strict=True)
mail = Mail()

# JWT AUTh process start

def create_token(user):
    payload = {
        'sub': user.id,
        'iat': datetime.utcnow(),
        'exp': datetime.utcnow() + timedelta(days=30),
    }
    token = jwt.encode(payload, SECRET_KEY)
    return token.decode('unicode_escape')

def parse_token(req):
    token = req.headers.get('Authorization')
    return jwt.decode(token, SECRET_KEY, algorithms='HS256')

# Login decorator function

def login_required(f):
    @wraps(f)
    def decorated_function(*args, **kwargs):
        if not request.headers.get('Authorization'):
            response = jsonify({"error":'Missing authorization header'})
            response.status_code = 401
            return response

        try:
            payload = parse_token(request)
        except DecodeError:
            response = jsonify({"error":'Token is invalid'})
            response.status_code = 401
            return response
        except ExpiredSignature:
            response = jsonify({"error":'Token has expired'})
            response.status_code = 401
            return response

        g.user_id = payload['sub']

        return f(*args, **kwargs)

    return decorated_function

def admin_login_required(f):
    @wraps(f)
    def decorated_function(*args, **kwargs):
        if not request.headers.get('Authorization'):
            response = jsonify(message='Missing authorization header')
            response.status_code = 401
            return response

        try:
            # print(request.headers.get('Authorization'))
            payload = parse_token(request)
            if payload['scope'] != "admin":
                response = jsonify(error='Admin Access Required')
                response.status_code = 401
                return response
        except DecodeError:
            response = jsonify(message='Token is invalid')
            response.status_code = 401
            return response
        except ExpiredSignature:
            response = jsonify(message='Token has expired')
            response.status_code = 401
            return response

        g.user_id = payload['sub']

        return f(*args, **kwargs)

    return decorated_function

# JWT AUTh process end

# Login Authentication Class

class Auth(Resource):

    def post(self):
        raw_dict = request.get_json(force=True)
        data = raw_dict['data']['attributes']
        email = data['email']
        password = data['password']
        user = Users.query.filter_by(email=email).first()
        if user == None:
            response = make_response(
                jsonify({"error": "invalid username/password"}))
            response.status_code = 401
            return response
        if check_password_hash(user.password, password):

            token = create_token(user)
            return {'token': token}
        else:
            response = make_response(
                jsonify({"error": "invalid username/password"}))
            response.status_code = 401
            return response

api.add_resource(Auth, 'login.json')

class SignUp(Resource):

    def post(self):
        raw_dict = request.get_json(force=True)

        try:
            schema.validate(raw_dict)
            request_dict = raw_dict['data']['attributes']
            createdby = "Self Signup"
            updatedby = "Self Signup"

            password = generate_password_hash (request_dict['password'] )

            user = Users(
                         request_dict['email'],
                         password,
                         request_dict['name'],
                         createdby,
                         updatedby ,

                         )
            user.add(user)
            # Should not return password hash
            query = Users.query.get(user.id)
            results = schema.dump(query).data
            return results, 201

        except ValidationError as err:
            print(err.messages)
            resp = jsonify({"error": err.messages})
            resp.status_code = 403
            return resp

        except SQLAlchemyError as e:

            db.session.rollback()
            resp = jsonify({"error": str(e.orig.args)})
            print(str(e))

            resp.status_code = 403
            return resp

api.add_resource(SignUp, 'signup.json')

class ForgotPassword(Resource):

    def patch(self):
        if not request.headers.get('Authorization'):
            response = jsonify(message='Missing authorization header')
            response.status_code = 401
            return response

        try:
            print(request.headers.get('Authorization'))
            payload = parse_token(request)
            user_id = payload['sub']
            user = Users.query.get_or_404(user_id)

            raw_dict = request.get_json(force=True)
            request_dict = raw_dict['data']['attributes']

            user.password = generate_password_hash(request_dict['password'])
            try:
                user.update()
                return 201

            except SQLAlchemyError as e:
                db.session.rollback()
                resp = jsonify({"error": str(e)})
                resp.status_code = 401
                return resp
        except DecodeError:
            response = jsonify({"error":'Token is invalid'})
            response.status_code = 401
            return response
        except ExpiredSignature:
            response = jsonify(message='Token has expired')
            response.status_code = 401
            return response

    def post(self):
        request_dict = request.get_json(force=True)['data']['attributes']
        email = request_dict['email']
        user = Users.query.filter_by(email=email).first()
        if user is not None:
            token = create_token(user)
            msg = Message("Here's your Password Reset Link :)",
                          recipients=[email])
            msg.html = PASSWORD_RESET_EMAIL.format(token=token)
            mail.send(msg)
            return {"error": "Password reset mail sent successfully"}, 201
        else:
            return {"error": "We could not find this email address :("}, 404

api.add_resource(ForgotPassword, 'forgotpassword')

# Adding the login decorator to the Resource class

class Resource(flask_restful.Resource):
    method_decorators = [login_required]
    pass


text:
package org.apache.dubbo.common.compiler;

import org.apache.dubbo.common.compiler.support.JavassistCompiler;
import org.apache.dubbo.common.extension.SPI;

/**
 * Compiler. (SPI, Singleton, ThreadSafe)
 */
@SPI(JavassistCompiler.NAME)
public interface Compiler {

    /**
     * Compile java source code.
     *
     * @param code        Java source code
     * @param classLoader classloader
     * @return Compiled class
     */
    Class<?> compile(String code, ClassLoader classLoader);

}


text:
'use strict';

var fs = require('fs-extra'),
    Q = require('q'),
    https = require('https'),
    os = require('os'),
    util = require('util'),
    thisPackage = require('../package.json'),
    version = process.env.MB_VERSION || thisPackage.version,
    versionMajorMinor = version.replace(/\.\d+(-beta\.\d+)?$/, ''),
    urlPrefix = 'https://s3.amazonaws.com/mountebank/v' + versionMajorMinor;

function download (file, destination) {
    var deferred = Q.defer(),
        stream = fs.createWriteStream(destination),
        url = urlPrefix + '/' + encodeURIComponent(file);

    console.log(url + ' => ' + destination);
    stream.on('open', function () {
        https.get(url, function (response) {
            response.pipe(stream);
            response.on('error', deferred.reject);
        });
    });
    stream.on('finish', function () {
        stream.close(deferred.resolve);
    });
    stream.on('error', deferred.reject);

    return deferred.promise;
}

function bitness () {
    if (os.arch() === 'x64') {
        return 'x64';
    }
    else {
        // avoid "ia32" result on windows
        return 'x86';
    }
}

module.exports = function (grunt) {

    grunt.registerTask('download:zip', 'Download this version of the Windows zip file', function (arch) {
        var zipFile = util.format('mountebank-v%s-win-%s.zip', version, arch || bitness());

        if (!fs.existsSync('dist')) {
            fs.mkdirSync('dist');
        }
        download(zipFile, 'dist/' + zipFile).done(this.async(), grunt.warn);
    });

    grunt.registerTask('download:rpm', 'Download this version of the rpm', function () {
        var rpmFile = util.format('mountebank-%s-1.x86_64.rpm', version.replace('-', '_'));

        if (!fs.existsSync('dist')) {
            fs.mkdirSync('dist');
        }
        download(rpmFile, 'dist/' + rpmFile).done(this.async(), grunt.warn);
    });
};


text:
package com.kovanikov.parser;// Generated from /home/dmitryk/programming/DiskretMathLabs/3/translation/03/Java.g4 by ANTLR 4.x
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;

/**
 * This class provides an empty implementation of {@link JavaVisitor},
 * which can be extended to create a visitor which only needs to handle a subset
 * of the available methods.
 *
 * @param <T> The return type of the visit operation. Use {@link Void} for
 * operations with no return type.
 */
public class JavaBaseVisitor<T> extends AbstractParseTreeVisitor<T> implements JavaVisitor<T> {
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitExpression(@NotNull JavaParser.ExpressionContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitFunArgs(@NotNull JavaParser.FunArgsContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitReturnCase(@NotNull JavaParser.ReturnCaseContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitFunArgsContinuation(@NotNull JavaParser.FunArgsContinuationContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitGlobalName(@NotNull JavaParser.GlobalNameContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitVarType(@NotNull JavaParser.VarTypeContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitVarDefinition(@NotNull JavaParser.VarDefinitionContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitRetOperator(@NotNull JavaParser.RetOperatorContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitElseOperator(@NotNull JavaParser.ElseOperatorContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitFunDefinition(@NotNull JavaParser.FunDefinitionContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitJavaLang(@NotNull JavaParser.JavaLangContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitValue(@NotNull JavaParser.ValueContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitWhileOperator(@NotNull JavaParser.WhileOperatorContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitClassBody(@NotNull JavaParser.ClassBodyContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitWhileExpression(@NotNull JavaParser.WhileExpressionContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitElseExpression(@NotNull JavaParser.ElseExpressionContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitDefinition(@NotNull JavaParser.DefinitionContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitIfExpression(@NotNull JavaParser.IfExpressionContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitBinOperation(@NotNull JavaParser.BinOperationContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitIfOperator(@NotNull JavaParser.IfOperatorContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitStatement(@NotNull JavaParser.StatementContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitModifier(@NotNull JavaParser.ModifierContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitPrimitiveType(@NotNull JavaParser.PrimitiveTypeContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitFunBody(@NotNull JavaParser.FunBodyContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitBool(@NotNull JavaParser.BoolContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitValueContinuation(@NotNull JavaParser.ValueContinuationContext ctx) { return visitChildren(ctx); }
	/**
	 * {@inheritDoc}
	 *
	 *
The default implementation returns the result of calling
	 * {@link #visitChildren} on {@code ctx}.

	 */
	@Override public T visitElseContinuation(@NotNull JavaParser.ElseContinuationContext ctx) { return visitChildren(ctx); }
}


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package bean;

import java.util.Objects;

/**
 *
 * @author kamal
 */
public class PostAplusEleme extends Post{

    public PostAplusEleme() {
    }

    public PostAplusEleme(int id, String titre, String description) {
        super(id, titre, description);
    }

    public PostAplusEleme(int id, String titre, String description, double prix) {
        super(id, titre, description, prix);
    }

}


text:
"""
Multi controlled single-qubit unitary up to diagonal.
"""

# ToDo: This code should be merged wth the implementation of MCGs
# ToDo: (introducing a decomposition mode "up_to_diagonal").

import numpy as np

from qiskit.circuit import Gate
from qiskit.circuit.quantumcircuit import QuantumRegister, QuantumCircuit
from qiskit.quantum_info.operators.predicates import is_isometry
from qiskit.exceptions import QiskitError
from qiskit.circuit.exceptions import CircuitError
from qiskit.extensions.quantum_initializer.uc import UCGate

_EPS = 1e-10  # global variable used to chop very small numbers to zero

class MCGupDiag(Gate):
    """
    Decomposes a multi-controlled gate u up to a diagonal d acting on the control and target qubit
    (but not on the  ancilla qubits), i.e., it implements a circuit corresponding to a unitary u'
    such that u=d.u'.
    """

    def __init__(self, gate, num_controls, num_ancillas_zero, num_ancillas_dirty):
        """Initialize a multi controlled gate.

        Args:
            gate (ndarray): 2*2 unitary (given as a (complex) ndarray)
            num_controls (int): number of control qubits
            num_ancillas_zero (int): number of ancilla qubits that start in the state zero
            num_ancillas_dirty (int): number of ancilla qubits that are allowed to start in an
                arbitrary state
        Raises:
            QiskitError: if the input format is wrong; if the array gate is not unitary
        """

        self.num_controls = num_controls
        self.num_ancillas_zero = num_ancillas_zero
        self.num_ancillas_dirty = num_ancillas_dirty
        # Check if the gate has the right dimension
        if not gate.shape == (2, 2):
            raise QiskitError("The dimension of the controlled gate is not equal to (2,2).")
        # Check if the single-qubit gate is unitary
        if not is_isometry(gate, _EPS):
            raise QiskitError("The controlled gate is not unitary.")
        # Create new gate.
        num_qubits = 1 + num_controls + num_ancillas_zero + num_ancillas_dirty
        super().__init__("MCGupDiag", num_qubits, [gate])

    def _define(self):
        mcg_up_diag_circuit, _ = self._dec_mcg_up_diag()
        gate = mcg_up_diag_circuit.to_instruction()
        q = QuantumRegister(self.num_qubits)
        mcg_up_diag_circuit = QuantumCircuit(q)
        mcg_up_diag_circuit.append(gate, q[:])
        self.definition = mcg_up_diag_circuit

    def inverse(self):
        """Return the inverse.

        Note that the resulting Gate object has an empty ``params`` property.
        """
        inverse_gate = Gate(
            name=self.name + "_dg", num_qubits=self.num_qubits, params=[]
        )  # removing the params because arrays are deprecated

        definition = QuantumCircuit(*self.definition.qregs)
        for inst in reversed(self._definition):
            definition._append(inst.replace(operation=inst.operation.inverse()))
        inverse_gate.definition = definition
        return inverse_gate

    # Returns the diagonal up to which the gate is implemented.
    def _get_diagonal(self):
        # Important: for a control list q_controls = [q[0],...,q_[k-1]] the diagonal gate is
        # provided in the computational basis of the qubits q[k-1],...,q[0],q_target, decreasingly
        # ordered with respect to the significance of the qubit in the computational basis
        _, diag = self._dec_mcg_up_diag()
        return diag

    def _dec_mcg_up_diag(self):
        """
        Call to create a circuit with gates that implement the MCG up to a diagonal gate.
        Remark: The qubits the gate acts on are ordered in the following way:
            q=[q_target,q_controls,q_ancilla_zero,q_ancilla_dirty]
        """
        diag = np.ones(2 ** (self.num_controls + 1)).tolist()
        q = QuantumRegister(self.num_qubits)
        circuit = QuantumCircuit(q)
        (q_target, q_controls, q_ancillas_zero, q_ancillas_dirty) = self._define_qubit_role(q)
        # ToDo: Keep this threshold updated such that the lowest gate count is achieved:
        # ToDo: we implement the MCG with a UCGate up to diagonal if the number of controls is
        # ToDo: smaller than the threshold.
        threshold = float("inf")
        if self.num_controls < threshold:
            # Implement the MCG as a UCGate (up to diagonal)
            gate_list = [np.eye(2, 2) for i in range(2**self.num_controls)]
            gate_list[-1] = self.params[0]
            ucg = UCGate(gate_list, up_to_diagonal=True)
            circuit.append(ucg, [q_target] + q_controls)
            diag = ucg._get_diagonal()
            # else:
            # ToDo: Use the best decomposition for MCGs up to diagonal gates here
            # ToDo: (with all available ancillas)
        return circuit, diag

    def _define_qubit_role(self, q):
        # Define the role of the qubits
        q_target = q[0]
        q_controls = q[1 : self.num_controls + 1]
        q_ancillas_zero = q[self.num_controls + 1 : self.num_controls + 1 + self.num_ancillas_zero]
        q_ancillas_dirty = q[self.num_controls + 1 + self.num_ancillas_zero :]
        return q_target, q_controls, q_ancillas_zero, q_ancillas_dirty

    def validate_parameter(self, parameter):
        """Multi controlled single-qubit unitary gate parameter has to be an ndarray."""
        if isinstance(parameter, np.ndarray):
            return parameter
        else:
            raise CircuitError(f"invalid param type {type(parameter)} in gate {self.name}")