No creo que etann sea muy inteligente, un año más no le vendría mal

This commit is contained in:
Vieira Enzo 2022-03-29 15:12:55 +02:00
parent efd75b1902
commit d2d178c4e9
10 changed files with 146 additions and 74 deletions

View File

@ -0,0 +1,7 @@
1- C'est le fichier /etc/resolv.conf
2- dig -x 172.16.1.158
II
1- tshark -i <interface-name> -f "host <notre_ip> and not arp and port domain
4- L'affichage de dif flags qr aa rd ra quand le flag qr est à 1, nous sommes dans un message dns qui est une réponse
5 - par le flag aa
6 - ici un ttl de 1h a été communiqué pour le RR de type 1. Si le resolver grade cette donnée dans un cache, elle disparaitre du cadre au bout d'une heure

Binary file not shown.

View File

@ -1,52 +1,47 @@
import javax.swing.*;
import java.awt.*;
import java.awt.*;
import javax.swing.*;
public class Accueil extends JComponent{
private Image logScreen;
public Accueil(){
super();
this.logScreen = Toolkit.getDefaultToolkit().getImage("logScreen.jpg");
}
@Override
protected void paintComponent(Graphics pinceau){
Graphics secondPinceau = pinceau.create();
if (this.isOpaque()){
secondPinceau.setColor(this.getBackground());
secondPinceau.fillRect(0, 0, this.getWidth(), this.getHeight());
public class Accueil extends JComponent
{
private Image login;
public Accueil()
{
super();
this.login = Toolkit.getDefaultToolkit().getImage("/export/home/an21/vieirae/APL/APL2.1/TP6/Acceuil/login.jpg");
}
@Override
protected void paintComponent(Graphics pinceau)
{
Graphics secondPinceau = pinceau.create();
if (this.isOpaque())
{
secondPinceau.setColor(this.getBackground());
secondPinceau.fillRect(0, 0, this.getWidth(), this.getHeight());
}
secondPinceau.drawImage(this.login, 0, 0, this.getWidth(), this.getHeight(), this);
}
public static void main(String[] args) {
JFrame fenetre = new JFrame();
fenetre.setSize(300, 300);
fenetre.setLocation(100, 100);
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Accueil acc = new Accueil();
JTextField log = new JTextField("");
log.setLocation(140, 140);
log.setSize(100, 25);
JTextField mdp = new JTextField("");
mdp.setLocation(140, 200);
mdp.setSize(100, 25);
fenetre.add(log);
fenetre.add(mdp);
fenetre.add(acc);
fenetre.setVisible(true);
}
secondPinceau.drawImage(this.logScreen,0,0, this);
}
public static void main(String[] args){
JFrame fenetre = new JFrame();
fenetre.setSize(295, 223);
fenetre.setMinimumSize(new Dimension(295, 223));
fenetre.setLocation(100, 100);
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
fenetre.setLayout(null);
Accueil login = new Accueil();
login.setLocation(0,0);
login.setSize(278,183);
fenetre.add(login);
JTextField loginArea = new JTextField();
loginArea.setLocation(110, 90);
loginArea.setSize(150, 25);
fenetre.add(loginArea);
JTextField passwordArea = new JTextField();
passwordArea.setLocation(110, 130);
passwordArea.setSize(150, 25);
fenetre.add(passwordArea);
fenetre.setVisible(true);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -0,0 +1,10 @@
public class Main {
public static void main(String[] args) {
double nb1 = 5.5;
int nb2 = 5;
Moyenne moy = new Moyenne();
moy.add(nb1);
moy.add(nb2);
System.out.println(moy.getAverage());
}
}

Binary file not shown.

View File

@ -1,25 +1,38 @@
import java.awt.Point;
public class Etoile implements ProducteurDePoints {
private static final int xCentre = 100;
private static final int yCentre = 100;
private static final double rayon = 90.0;
private static final double angleDepart = Math.PI/4.0;
private static final double angleIncrement = (4.0*Math.PI)/5.0;
private double numero;
public Etoile() {
this.numero = 0.0;
}
public Point suivant() {
Point p = null;
if (this.numero < 6.0) {
double angle = Etoile.angleDepart+this.numero*Etoile.angleIncrement;
p = new Point((int) (Etoile.rayon*Math.cos(angle)),
(int) (Etoile.rayon*Math.sin(angle)));
p.translate(Etoile.xCentre, Etoile.yCentre);
this.numero++;
} else {
this.numero = 0.0;
import java.awt.Point;
import java.util.Objects;
public class Etoile implements ProducteurDePoints {
private static final int xCentre = 100;
private static final int yCentre = 100;
private static final double rayon = 90.0;
private static final double angleDepart = Math.PI/4.0;
private static final double angleIncrement = (4.0*Math.PI)/5.0;
private double numero;
public Etoile() {
this.numero = 0.0;
}
public Point suivant() {
Point p = null;
if (this.numero < 6.0) {
double angle = Etoile.angleDepart+this.numero*Etoile.angleIncrement;
p = new Point((int) (Etoile.rayon*Math.cos(angle)),
(int) (Etoile.rayon*Math.sin(angle)));
p.translate(Etoile.xCentre, Etoile.yCentre);
this.numero++;
} else {
this.numero = 0.0;
}
return p;
}
static public void main(String[] args)
{
Etoile e = new Etoile();
Point p = e.suivant();
while (!Objects.isNull(p))
{
System.out.println("point: " + p);
p = e.suivant();
}
}
}
return p;
}
}

View File

@ -1 +0,0 @@
gzegazeg

BIN
APL2.1/TP8/Fond.class Normal file

Binary file not shown.

48
APL2.1/TP8/Fond.java Normal file
View File

@ -0,0 +1,48 @@
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Fond implements ActionListener
{
public static JButton bouton1, bouton2, bouton3;
private JPanel panneau;
public Fond() {
JFrame fenetre = new JFrame();
fenetre.setSize(300, 300);
fenetre.setLocation(100, 100);
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
panneau = new JPanel();
bouton1 = new JButton("Cyan");
bouton1.addActionListener(this);
bouton2 = new JButton("Magenta");
bouton2.addActionListener(this);
bouton3 = new JButton("Jaune");
bouton3.addActionListener(this);
panneau.add(bouton1);
panneau.add(bouton2);
panneau.add(bouton3);
fenetre.add(panneau);
fenetre.setVisible(true);
}
public void actionPerformed(ActionEvent e)
{
Object source = e.getSource();
if (source == bouton1)
{
panneau.setBackground(Color.CYAN);
}
else if (source == bouton2)
{
panneau.setBackground(Color.MAGENTA);
}
else if (source == bouton3)
{
panneau.setBackground(Color.YELLOW);
}
panneau.repaint();
}
public static void main(String[] args)
{
new Fond();
}
}