text:
import re
import math

from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QLineEdit, QLabel, QGridLayout, QVBoxLayout, QCheckBox

from electrum.i18n import _
from electrum.plugin import run_hook

from .util import icon_path, WindowModalDialog, OkButton, CancelButton, Buttons

def check_password_strength(password):

    '''
    Check the strength of the password entered by the user and return back the same
    :param password: password entered by user in New Password
    :return: password strength Weak or Medium or Strong
    '''
    password = password
    n = math.log(len(set(password)))
    num = re.search("[0-9]", password) is not None and re.match("^[0-9]*$", password) is None
    caps = password != password.upper() and password != password.lower()
    extra = re.match("^[a-zA-Z0-9]*$", password) is None
    score = len(password)*( n + caps + num + extra)/20
    password_strength = {0:"Weak",1:"Medium",2:"Strong",3:"Very Strong"}
    return password_strength[min(3, int(score))]

PW_NEW, PW_CHANGE, PW_PASSPHRASE = range(0, 3)

class PasswordLayout(object):

    titles = [_("Enter Password"), _("Change Password"), _("Enter Passphrase")]

    def __init__(self, msg, kind, OK_button, wallet=None, force_disable_encrypt_cb=False):
        self.wallet = wallet

        self.pw = QLineEdit()
        self.pw.setEchoMode(2)
        self.new_pw = QLineEdit()
        self.new_pw.setEchoMode(2)
        self.conf_pw = QLineEdit()
        self.conf_pw.setEchoMode(2)
        self.kind = kind
        self.OK_button = OK_button

        vbox = QVBoxLayout()
        label = QLabel(msg + "\n")
        label.setWordWrap(True)

        grid = QGridLayout()
        grid.setSpacing(8)
        grid.setColumnMinimumWidth(0, 150)
        grid.setColumnMinimumWidth(1, 100)
        grid.setColumnStretch(1,1)

        if kind == PW_PASSPHRASE:
            vbox.addWidget(label)
            msgs = [_('Passphrase:'), _('Confirm Passphrase:')]
        else:
            logo_grid = QGridLayout()
            logo_grid.setSpacing(8)
            logo_grid.setColumnMinimumWidth(0, 70)
            logo_grid.setColumnStretch(1,1)

            logo = QLabel()
            logo.setAlignment(Qt.AlignCenter)

            logo_grid.addWidget(logo,  0, 0)
            logo_grid.addWidget(label, 0, 1, 1, 2)
            vbox.addLayout(logo_grid)

            m1 = _('New Password:') if kind == PW_CHANGE else _('Password:')
            msgs = [m1, _('Confirm Password:')]
            if wallet and wallet.has_password():
                grid.addWidget(QLabel(_('Current Password:')), 0, 0)
                grid.addWidget(self.pw, 0, 1)
                lockfile = "lock.png"
            else:
                lockfile = "unlock.png"
            logo.setPixmap(QPixmap(icon_path(lockfile))
                           .scaledToWidth(36, mode=Qt.SmoothTransformation))

        grid.addWidget(QLabel(msgs[0]), 1, 0)
        grid.addWidget(self.new_pw, 1, 1)

        grid.addWidget(QLabel(msgs[1]), 2, 0)
        grid.addWidget(self.conf_pw, 2, 1)
        vbox.addLayout(grid)

        # Password Strength Label
        if kind != PW_PASSPHRASE:
            self.pw_strength = QLabel()
            grid.addWidget(self.pw_strength, 3, 0, 1, 2)
            self.new_pw.textChanged.connect(self.pw_changed)

        self.encrypt_cb = QCheckBox(_('Encrypt wallet file'))
        self.encrypt_cb.setEnabled(False)
        grid.addWidget(self.encrypt_cb, 4, 0, 1, 2)
        self.encrypt_cb.setVisible(kind != PW_PASSPHRASE)

        def enable_OK():
            ok = self.new_pw.text() == self.conf_pw.text()
            OK_button.setEnabled(ok)
            self.encrypt_cb.setEnabled(ok and bool(self.new_pw.text())
                                       and not force_disable_encrypt_cb)
        self.new_pw.textChanged.connect(enable_OK)
        self.conf_pw.textChanged.connect(enable_OK)

        self.vbox = vbox

    def title(self):
        return self.titles[self.kind]

    def layout(self):
        return self.vbox

    def pw_changed(self):
        password = self.new_pw.text()
        if password:
            colors = {"Weak":"Red", "Medium":"Blue", "Strong":"Green",
                      "Very Strong":"Green"}
            strength = check_password_strength(password)
            label = (_("Password Strength") + ": " + "" + strength + "")
        else:
            label = ""
        self.pw_strength.setText(label)

    def old_password(self):
        if self.kind == PW_CHANGE:
            return self.pw.text() or None
        return None

    def new_password(self):
        pw = self.new_pw.text()
        # Empty passphrases are fine and returned empty.
        if pw == "" and self.kind != PW_PASSPHRASE:
            pw = None
        return pw

class PasswordLayoutForHW(object):

    def __init__(self, msg, wallet=None):
        self.wallet = wallet

        vbox = QVBoxLayout()
        label = QLabel(msg + "\n")
        label.setWordWrap(True)

        grid = QGridLayout()
        grid.setSpacing(8)
        grid.setColumnMinimumWidth(0, 150)
        grid.setColumnMinimumWidth(1, 100)
        grid.setColumnStretch(1,1)

        logo_grid = QGridLayout()
        logo_grid.setSpacing(8)
        logo_grid.setColumnMinimumWidth(0, 70)
        logo_grid.setColumnStretch(1,1)

        logo = QLabel()
        logo.setAlignment(Qt.AlignCenter)

        logo_grid.addWidget(logo,  0, 0)
        logo_grid.addWidget(label, 0, 1, 1, 2)
        vbox.addLayout(logo_grid)

        if wallet and wallet.has_storage_encryption():
            lockfile = "lock.png"
        else:
            lockfile = "unlock.png"
        logo.setPixmap(QPixmap(icon_path(lockfile))
                       .scaledToWidth(36, mode=Qt.SmoothTransformation))

        vbox.addLayout(grid)

        self.encrypt_cb = QCheckBox(_('Encrypt wallet file'))
        grid.addWidget(self.encrypt_cb, 1, 0, 1, 2)

        self.vbox = vbox

    def title(self):
        return _("Toggle Encryption")

    def layout(self):
        return self.vbox

class ChangePasswordDialogBase(WindowModalDialog):

    def __init__(self, parent, wallet):
        WindowModalDialog.__init__(self, parent)
        is_encrypted = wallet.has_storage_encryption()
        OK_button = OkButton(self)

        self.create_password_layout(wallet, is_encrypted, OK_button)

        self.setWindowTitle(self.playout.title())
        vbox = QVBoxLayout(self)
        vbox.addLayout(self.playout.layout())
        vbox.addStretch(1)
        vbox.addLayout(Buttons(CancelButton(self), OK_button))
        self.playout.encrypt_cb.setChecked(is_encrypted)

    def create_password_layout(self, wallet, is_encrypted, OK_button):
        raise NotImplementedError()

class ChangePasswordDialogForSW(ChangePasswordDialogBase):

    def __init__(self, parent, wallet):
        ChangePasswordDialogBase.__init__(self, parent, wallet)
        if not wallet.has_password():
            self.playout.encrypt_cb.setChecked(True)

    def create_password_layout(self, wallet, is_encrypted, OK_button):
        if not wallet.has_password():
            msg = _('Your wallet is not protected.')
            msg += ' ' + _('Use this dialog to add a password to your wallet.')
        else:
            if not is_encrypted:
                msg = _('Your fujicoins are password protected. However, your wallet file is not encrypted.')
            else:
                msg = _('Your wallet is password protected and encrypted.')
            msg += ' ' + _('Use this dialog to change your password.')
        self.playout = PasswordLayout(msg=msg,
                                      kind=PW_CHANGE,
                                      OK_button=OK_button,
                                      wallet=wallet,
                                      force_disable_encrypt_cb=not wallet.can_have_keystore_encryption())

    def run(self):
        if not self.exec_():
            return False, None, None, None
        return True, self.playout.old_password(), self.playout.new_password(), self.playout.encrypt_cb.isChecked()

class ChangePasswordDialogForHW(ChangePasswordDialogBase):

    def __init__(self, parent, wallet):
        ChangePasswordDialogBase.__init__(self, parent, wallet)

    def create_password_layout(self, wallet, is_encrypted, OK_button):
        if not is_encrypted:
            msg = _('Your wallet file is NOT encrypted.')
        else:
            msg = _('Your wallet file is encrypted.')
        msg += '\n' + _('Note: If you enable this setting, you will need your hardware device to open your wallet.')
        msg += '\n' + _('Use this dialog to toggle encryption.')
        self.playout = PasswordLayoutForHW(msg)

    def run(self):
        if not self.exec_():
            return False, None
        return True, self.playout.encrypt_cb.isChecked()

class PasswordDialog(WindowModalDialog):

    def __init__(self, parent=None, msg=None):
        msg = msg or _('Please enter your password')
        WindowModalDialog.__init__(self, parent, _("Enter Password"))
        self.pw = pw = QLineEdit()
        pw.setEchoMode(2)
        vbox = QVBoxLayout()
        vbox.addWidget(QLabel(msg))
        grid = QGridLayout()
        grid.setSpacing(8)
        grid.addWidget(QLabel(_('Password')), 1, 0)
        grid.addWidget(pw, 1, 1)
        vbox.addLayout(grid)
        vbox.addLayout(Buttons(CancelButton(self), OkButton(self)))
        self.setLayout(vbox)
        run_hook('password_dialog', pw, grid, 1)

    def run(self):
        if not self.exec_():
            return
        return self.pw.text()


text:
404, you still haven't found what you're looking for: Check here:

Please Look at Our Items For Sale

Please Look at Our Items ForAuctions

Please Look At Our Home Page Here

redpajama_set_name: RedPajamaGithub


text:
package attributes

import (
	"context"
	"testing"

	cloudevents "github.com/cloudevents/sdk-go/v2"

	broker "knative.dev/eventing/pkg/broker"
	"knative.dev/eventing/pkg/eventfilter"
)

const (
	eventType      = `com.example.someevent`
	eventSource    = `/mycontext`
	extensionName  = `myextension`
	extensionValue = `my-extension-value`
	subjectValue   = `mysubject`
)

func TestAttributesFilter_Filter(t *testing.T) {
	tests := map[string]struct {
		filter map[string]string
		event  *cloudevents.Event
		want   eventfilter.FilterResult
	}{
		"Wrong type": {
			filter: attributes("some-other-type", ""),
			want:   eventfilter.FailFilter,
		},
		"Wrong type with attribs": {
			filter: attributes("some-other-type", ""),
			want:   eventfilter.FailFilter,
		},
		"Wrong source": {
			filter: attributes("", "some-other-source"),
			want:   eventfilter.FailFilter,
		},
		"Wrong source with attribs": {
			filter: attributes("", "some-other-source"),
			want:   eventfilter.FailFilter,
		},
		"Wrong extension": {
			filter: attributes("", "some-other-source"),
			want:   eventfilter.FailFilter,
		},
		"Any": {
			filter: attributes("", ""),
			want:   eventfilter.PassFilter,
		},
		"Specific": {
			filter: attributes(eventType, eventSource),
			want:   eventfilter.PassFilter,
		},
		"Extension with attribs": {
			filter: attributesWithExtension(eventType, eventSource, extensionValue),
			event:  makeEventWithExtension(extensionName, extensionValue),
			want:   eventfilter.PassFilter,
		},
		"Any Extension with attribs - without Extension in Event": {
			filter: attributesWithExtension(eventType, eventSource, ""),
			want:   eventfilter.FailFilter,
		},
		"Any Extension with attribs - with Extension in Event": {
			filter: attributesWithExtension(eventType, eventSource, ""),
			event:  makeEventWithExtension(extensionName, extensionValue),
			want:   eventfilter.PassFilter,
		},
		"Subject with attribs": {
			filter: attributesWithSubject(eventType, eventSource, subjectValue),
			event:  makeEventWithSubject(subjectValue),
			want:   eventfilter.PassFilter,
		},
		"Any Subject with attribs - without Subject in Event": {
			filter: attributesWithSubject(eventType, eventSource, ""),
			want:   eventfilter.FailFilter,
		},
		"Any Subject with attribs - with Subject in Event": {
			filter: attributesWithSubject(eventType, eventSource, ""),
			event:  makeEventWithSubject(subjectValue),
			want:   eventfilter.PassFilter,
		},
		"Any with attribs - Arrival extension": {
			filter: attributes("", ""),
			event:  makeEventWithExtension(broker.EventArrivalTime, "2019-08-26T23:38:17.834384404Z"),
			want:   eventfilter.PassFilter,
		},
		"Wrong Extension with attribs": {
			filter: attributesWithExtension(eventType, eventSource, "some-other-extension-value"),
			event:  makeEventWithExtension(extensionName, extensionValue),
			want:   eventfilter.FailFilter,
		},
	}
	for name, tt := range tests {
		t.Run(name, func(t *testing.T) {
			e := tt.event
			if e == nil {
				e = makeEvent()
			}

			if got := NewAttributesFilter(tt.filter).Filter(context.TODO(), *e); got != tt.want {
				t.Errorf("Filter() = %v, want %v", got, tt.want)
			}
		})
	}
}

func makeEvent() *cloudevents.Event {
	e := cloudevents.NewEvent()
	e.SetType(eventType)
	e.SetSource(eventSource)
	e.SetID("1234")
	return &e
}

func makeEventWithExtension(extName, extValue string) *cloudevents.Event {
	e := makeEvent()
	e.SetExtension(extName, extValue)
	return e
}

func makeEventWithSubject(sub string) *cloudevents.Event {
	e := makeEvent()
	e.SetSubject(sub)
	return e
}

func attributes(t, s string) map[string]string {
	return map[string]string{
		"type":   t,
		"source": s,
	}
}

func attributesWithExtension(t, s, e string) map[string]string {
	return map[string]string{
		"type":        t,
		"source":      s,
		extensionName: e,
	}
}

func attributesWithSubject(t, s, sub string) map[string]string {
	return map[string]string{
		"type":    t,
		"source":  s,
		"subject": sub,
	}
}

func TestAllSupportedAttributeFieldsV1(t *testing.T) {
	e := cloudevents.NewEvent(cloudevents.VersionV1)
	e.SetType(eventType)
	e.SetSource(eventSource)
	e.SetID("1234")
	e.SetDataSchema("wow")
	e.SetSubject("cool")
	e.SetDataContentType("cheers;mate")

	attributes := map[string]string{
		"specversion":     e.SpecVersion(),
		"type":            e.Type(),
		"source":          e.Source(),
		"subject":         e.Subject(),
		"id":              e.ID(),
		"time":            e.Time().String(),
		"dataschema":      e.DataSchema(),
		"schemaurl":       e.DataSchema(),
		"datacontenttype": e.DataContentType(),
		"datamediatype":   e.DataMediaType(),
	}
	if result := NewAttributesFilter(attributes).Filter(context.TODO(), e); result != eventfilter.PassFilter {
		t.Errorf("Expected pass, got %v", result)
	}
}

func TestV03Event(t *testing.T) {
	e := cloudevents.NewEvent(cloudevents.VersionV03)
	e.SetDataContentEncoding("perfect")

	attributes := map[string]string{
		"datacontentencoding": e.DeprecatedDataContentEncoding(),
	}
	if result := NewAttributesFilter(attributes).Filter(context.TODO(), e); result != eventfilter.PassFilter {
		t.Errorf("Expected pass, got %v", result)
	}
}


text:
class User < ActiveRecord::Base
  extend FriendlyId
  include PgSearch

  devise :invitable, :database_authenticatable, :registerable,
    :recoverable, :rememberable, :trackable, :validatable,
    :confirmable

  has_attached_file :avatar
  belongs_to :organisation
  has_many :employee_skills, dependent: :destroy
  has_many :skills, through: :employee_skills
  has_ancestry cache_depth: true

  accepts_nested_attributes_for :employee_skills, reject_if: :all_blank, allow_destroy: true

  acts_as_taggable_on :experiences, :interests, :projects

  friendly_id :slug_candidates, use: :slugged

  validates :name, :email, :avatar, presence: true
  validates :title, :date_joined, presence: { allow_blank: false }, if: :onboarded_at?
  validates_attachment_content_type :avatar, content_type: %r{\Aimage\/.*\Z}
  validates_associated :employee_skills

  after_save :add_empty_skill

  pg_search_scope(
    :query_search,
    against: %i(
      name
      title
    ),
    using: {
      tsearch: {
        prefix: true
      }
    }
  )

  scope :onboarded, -> { where.not(onboarded_at: nil) }
  scope :search, -> (q) { query_search(q) unless !q.nil? && q.empty? }
  scope :all_except, -> (id) { where.not(id: id) unless !id.nil? && id.empty? }
  scope :has_tags, -> (arr = '', scope = nil) { tagged_with(arr, (scope ? { on: scope } : {})) unless arr.empty? }
  scope :has_skills, -> (arr) { joins(:skills).where(skills: { name: arr }) unless arr.empty? }
  scope :order_by_rating, (lambda do |name, fallback|
    if name.nil?
      order(fallback)
    else
      all.to_a.uniq.sort_by { |e| e.rating_for_skill(name) }.reverse
    end
  end)

  def as_json(_options = {})
    {
      name: name,
      title: title,
      avatar_url: avatar.url,
      id: id
    }
  end

  def slug_candidates
    [
      :name,
      [:name, rand(10...999).to_s]
    ]
  end

  def send_reset_password_instructions
    super if invitation_token.nil?
  end

  def pending_invite?
    invited_to_sign_up? && !invitation_accepted?
  end

  def promote_to(role = 'admin')
    update_attributes role: role
  end

  def admin?
    %w(admin owner).include? role
  end

  def owner?
    role == 'owner'
  end

  def rating_for_skill(name)
    employee_skills.joins(:skill).find_by(skills: { name: name }).rating
  end

  private

  def add_empty_skill
    employee_skills << EmployeeSkill.new while employee_skills.count < 2
  end
end


text:
describe('acute.string', function () {

    'use strict';

    describe('acute.string.toCamelCase', function () {

        var scenarios = [
            { it: 'should be part of the utils package',       package: 'acute.utils' },
            { it: 'should be part of the string package',      package: 'acute.string' },
            { it: 'should be part of the toCamelCase package', package: 'acute.string.toCamelCase' }
        ];

        scenarios.forEach(function (scenario) {

            it(scenario.it, function () {

                module(scenario.package);

                expect(function () { inject(function (stringToCamelCase) { /* injected service */ }); }).not.toThrow();
            });
        });

        describe('stringToCamelCase', function () {

            beforeEach(function() {
                module('acute.string.toCamelCase');
            });

            var scenarios = [
                { it: 'should format "class" as "class"',          string: 'class',      expected: 'class' },
                { it: 'should format "Class" as "class"',          string: 'Class',      expected: 'class' },
                { it: 'should format "SomeClass" as "someClass"',  string: 'SomeClass',  expected: 'someClass' },
                { it: 'should format "someClass" as "someClass"',  string: 'someClass',  expected: 'someClass' },
                { it: 'should format "some class" as "someClass"', string: 'some class', expected: 'someClass' },
                { it: 'should format "Some Class" as "someClass"', string: 'Some Class', expected: 'someClass' },
                { it: 'should format "some Class" as "someClass"', string: 'some Class', expected: 'someClass' },
                { it: 'should format "Some class" as "someClass"', string: 'Some class', expected: 'someClass' },
                { it: 'should format "Some/Class" as "someClass"', string: 'Some/Class', expected: 'someClass' },

                { it: 'should format "SomeOtherClass" as "someOtherClass"',   string: 'SomeOtherClass',   expected: 'someOtherClass'},
                { it: 'should format "someOtherClass" as "someOtherClass"',   string: 'someOtherClass',   expected: 'someOtherClass'},
                { it: 'should format "some other class" as "someOtherClass"', string: 'some other class', expected: 'someOtherClass'},
                { it: 'should format "Some Other Class" as "someOtherClass"', string: 'Some Other Class', expected: 'someOtherClass'},
                { it: 'should format "some other Class" as "someOtherClass"', string: 'some other Class', expected: 'someOtherClass'},
                { it: 'should format "Some Other class" as "someOtherClass"', string: 'Some Other class', expected: 'someOtherClass'},
                { it: 'should format "Some/Other/Class" as "someOtherClass"', string: 'Some/Other/Class', expected: 'someOtherClass'}
            ];

            scenarios.forEach(function (scenario) {

                it(scenario.it, inject(function (stringToCamelCase) {
                    expect(stringToCamelCase(scenario.string)).toBe(scenario.expected);
                }));
            });
        });

    });

});


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Nova Hedwigia 42(1): 158 (1986)

#### Original name
Cantharellus persicinus R.H. Petersen, 1986

### Remarks
null


text:
<?php

namespace Zenstruck\Queue\EventHandler;

use Psr\Log\LoggerInterface;
use Zenstruck\Queue\Event\FailedJob;
use Zenstruck\Queue\Event\MaxAttemptsReached;

/**
 * @author Kevin Bond <kevinbond@gmail.com>
 */
class LoggerHandler
{
    private $logger;

    public function __construct(LoggerInterface $logger)
    {
        $this->logger = $logger;
    }

    public function handleFailedJob(FailedJob $event)
    {
        $this->logger->error(
            sprintf('Job failed with message "%s"', $event->exception()->getMessage()),
            ['job' => $event->job()]
        );
    }

    public function handleMaxAttemptsReached(MaxAttemptsReached $event)
    {
        $this->logger->error(
            sprintf('Max attempts of %d reached trying to consume job', $event->maxAttempts()),
            ['job' => $event->job()]
        );
    }
}


text:
<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "contact".
 *
 * @property integer $id
 * @property string $name
 * @property string $email
 * @property string $text
 * @property string $date
 */
class Contact extends \yii\db\ActiveRecord
{
    public $verifyCode;
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'contact';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['email','text'], 'required'],
            [['text'], 'string'],
            [['date'], 'safe'],
            [['email'], 'email'],
            [['name', 'email'], 'string', 'max' => 255],
            ['verifyCode', 'captcha'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Name',
            'email' => 'Email',
            'text' => 'Message',
            'date' => 'Date',
            'verifyCode' => 'Verification Code',
        ];
    }

    public function contact($email)
    {
        Yii::$app->mailer->compose('contactEmail',['user'=>$this])
            ->setTo($email)
            ->setFrom([Yii::$app->params['supportEmail'] => 'CollegeStatistics.org'])
            ->setSubject('User sent a feedback on website')
            ->send();
    }
}


text:
Bug fixes
===

* Await ActorSystem termination
* Wrap google push send into blocking {}
* Major fixes in file storage including security one - path traversal


text:
package com.oath.cyclops.types.factory;

/**
 * Represents a type that can be instantiated in zero form.
 *
 * @author johnmcclean
 *
 * @param <T> Data type of element(s) storeable within this EmptyUnit
 */
public interface EmptyUnit<T> extends Unit<T> {
    /**
     * @return A new, zero instance of this EmptyUnit type
     */
    public <T> Unit<T> emptyUnit();
}


text:
package view;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.GridLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;

import controller.MyListener;

public class DeciphermentFrame extends JFrame {

	private static final long serialVersionUID = 1L;
	private static DeciphermentFrame instance;

	public JTextField tfExponent,tfModule;
	public JTextArea textAreaMessage, textAreaCypher;
	public JButton buttonOK;

	private DeciphermentFrame() {
		this.setTitle("Dechiffrement RSA");
		this.setSize(310, 350);
		this.setResizable(false);
		this.setLocationRelativeTo(null);
		this.setAlwaysOnTop(true);
		this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);

		JPanel panel = new JPanel();
		BorderLayout layout = new BorderLayout(30, 10);
		panel.setLayout(layout);

		this.setContentPane(panel);

		//NORTH PANEL
		JPanel panelNorth = new JPanel();
		panelNorth.setLayout(new GridLayout(2, 1));

		JPanel panelNorth1 = new JPanel();
		panelNorth1.setLayout(new FlowLayout(FlowLayout.TRAILING));
		panelNorth1.add(new JLabel("exposant de dechiffrement"));
		tfExponent = new JTextField(10);
		panelNorth1.add(tfExponent);

		JPanel panelNorth2 = new JPanel();
		panelNorth2.setLayout(new FlowLayout(FlowLayout.TRAILING));
		panelNorth2.add(new JLabel("saisir le module n"));
		tfModule = new JTextField(10);
		panelNorth2.add(tfModule);

		panelNorth.add(panelNorth1);
		panelNorth.add(panelNorth2);

		//CENTER PANEL
		JPanel panelCenter = new JPanel();
		panelCenter.add(new JLabel("Saisir le message chiffre"));
		textAreaCypher = new JTextArea(3, 24);
		JScrollPane scrollAreaCypher = new JScrollPane(textAreaCypher);
		panelCenter.add(scrollAreaCypher);
		panelCenter.add(new JLabel(""));
		panelCenter.add(new JLabel("Message en clair"));
		textAreaMessage = new JTextArea(3, 24);
		textAreaMessage.setEditable(false);
		JScrollPane scrollAreaMessage = new JScrollPane(textAreaMessage);
		panelCenter.add(scrollAreaMessage);

		//SOUTH PANEL
		JPanel panelSouth = new JPanel();
		buttonOK = new JButton("Dechiffrer");
		buttonOK.addActionListener(MyListener.getInstance());
		panelSouth.add(buttonOK);

		//Assembly
		panel.add(panelNorth, BorderLayout.NORTH);
		panel.add(panelCenter, BorderLayout.CENTER);
		panel.add(panelSouth, BorderLayout.SOUTH);
	}

	public static DeciphermentFrame getInstance() {
		instance = (instance==null)? new DeciphermentFrame():instance;
		return instance;
	}

}