diff --git a/.gitignore b/.gitignore index c13d2f1..d75b877 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ __pycache__/ *.tar +*.class diff --git a/project/bonnes-pratiques.pdf b/project/bonnes-pratiques.pdf new file mode 100644 index 0000000..927eadd Binary files /dev/null and b/project/bonnes-pratiques.pdf differ diff --git a/q2/cours3/test.java b/q2/cours3/test.java new file mode 100644 index 0000000..d29c309 --- /dev/null +++ b/q2/cours3/test.java @@ -0,0 +1,8 @@ +public class test { + public String testM(){ + return "yay"; + } + public static void main(String[] args) { + System.out.println(testM()); + } +} diff --git a/q2/cours6/Question.java b/q2/cours6/Question.java new file mode 100644 index 0000000..24270a1 --- /dev/null +++ b/q2/cours6/Question.java @@ -0,0 +1,21 @@ +public class Question { + private String text; + private String response; + + private String user_input; + + public Question(text, response){ + this.text = text; + this.response = response; + } + + public void Poser(){ + Scanner resp = new Scanner(System.in); + System.out.println(text + ": ") + user_input = resp.nextLine(); + } + + public boolean Verifier(){ + return user_input == response; + } +} diff --git a/q2/cours6/Questionnaire.java b/q2/cours6/Questionnaire.java new file mode 100644 index 0000000..52fc7c4 --- /dev/null +++ b/q2/cours6/Questionnaire.java @@ -0,0 +1,18 @@ +public class Questionnaire { + private Question[] questions; + + public void add_question; + + public void poser_tout(){ + for(Question q: questions){ + q.Poser(); + if(q.Verifier()) + System.out.println("Bravo"); + else + System.out.println("Pas ouf"); + + } + } + + +} diff --git a/q2/cours6/TestsQuestionnaire.java b/q2/cours6/TestsQuestionnaire.java new file mode 100644 index 0000000..49ca609 --- /dev/null +++ b/q2/cours6/TestsQuestionnaire.java @@ -0,0 +1,4 @@ +public class TestsQuestionnaire { + public static void main(String[] args) { + } +} diff --git a/q2/project/enonce.pdf b/q2/project/enonce.pdf new file mode 100644 index 0000000..05ff7be Binary files /dev/null and b/q2/project/enonce.pdf differ diff --git a/q2/tp1/Cercle.java b/q2/tp1/Cercle.java new file mode 100644 index 0000000..06eef51 --- /dev/null +++ b/q2/tp1/Cercle.java @@ -0,0 +1,18 @@ +public class Cercle { + public static final double PI = 3.14159265; + + public static void main(String[] args) { + for (int i = 1; i <= 50; i++) { + System.out.println("pour un cercle de rayon : " + i + " Perimetre:" + perimetre(i)+ " aire:" + aire(i)); + } + + } + + public static double perimetre(double rayon){ + return 2*PI*rayon; + } + + public static double aire(double rayon){ + return PI*rayon*rayon; + } +} diff --git a/q2/tp1/Droites.java b/q2/tp1/Droites.java new file mode 100644 index 0000000..315481a --- /dev/null +++ b/q2/tp1/Droites.java @@ -0,0 +1,20 @@ +public class Droites { + public static void main(String[] args) { + droite(1, 1, 2, 2); + if(appartient(-1,1, 0, 2, 2)){ + System.out.println("yay"); + } + + } + public static void droite(double x1, double y1, double x2, double y2){ + double dir_x = x2 - x1, dir_y = y2 - y1; + double a = -dir_y, b = dir_x; + double c = a*x1 + b*y1; + System.out.println("equation de la droite: " + a + "x + " + b + "y = " + c); + } + + public static boolean appartient(double a, double b, double c, double x, double y){ + return a * x + b * y == c ; + + } +} diff --git a/q2/tp1/HelloWorld.java b/q2/tp1/HelloWorld.java new file mode 100644 index 0000000..7a18f47 --- /dev/null +++ b/q2/tp1/HelloWorld.java @@ -0,0 +1,18 @@ +public class HelloWorld { + public static void main(String[] args) { + String prenom = "Anthony"; + int age = 21; + double taille = 1.85; + printHello(prenom, age, taille); + + } + + public static void printHello(String prenom, int age, double taille) + { + System.out.println("Hello World"); + System.out.println("Mon nom est " + prenom); + System.out.println("J'ai " + age + "ans et je mesure " + taille + "m :)"); + } + + +} diff --git a/q2/tp1/Suite.java b/q2/tp1/Suite.java new file mode 100644 index 0000000..b54654f --- /dev/null +++ b/q2/tp1/Suite.java @@ -0,0 +1,32 @@ +public class Suite { + public static void main(String[] args) { + // suiteArithmetique(5, 5, 3); + // suiteGeometrique(5, 5, 3); + suiteFibonacci(15); + + } + + public static void suiteArithmetique(int depart, int raison, int k){ + for (int i = 0; i < k; i++) { + System.out.println(depart + raison * i); + } + } + + public static void suiteGeometrique(int depart, int raison, int k){ + for (int i = 0; i < k; i++) { + System.out.println(depart + (int)Math.pow(raison, i)); + } + } + + public static void suiteFibonacci(int k){ + int el1 = 1; + int el2 = 1; + int temp; + for (int i = 0; i < k-2; i++) { + temp = el1; + el1 = el2; + el2 = temp + el2 ; + } + System.out.println(el2); + } +} diff --git a/q2/tp2/Droite.java b/q2/tp2/Droite.java new file mode 100644 index 0000000..199fee9 --- /dev/null +++ b/q2/tp2/Droite.java @@ -0,0 +1,60 @@ +public class Droite { + public double a, b, c; + + public String toString(){ + return a + "x + " + b + "y = " + c; + } + + /* + * Represent a line in the space with the equation ax + by = c + * @param a ax + * @param b by + * @param c c + */ + Droite(double a, double b, double c){ + this.a = a; + this.b = b; + this.c = c; + } + + /* + * Check if the line is horizontal + * @return true if the line is horizontal + * @return false if the line is not horizontal + */ + public boolean isHorizontal(){ + if(a == 0) + return true; + return false; + } + + /* + * Find the intersection by 2 lines + * @param other the other line you should find the intersection with + * @return Point The Point of the intersection + * @return Null if the lines are not intersecting + * @return Null if the lines are the sames + */ + public Point intersection(Droite other){ + if(a * other.b - b * other.a == 0) + return null; + return new Point((other.b*c - b*other.c)/(a*other.b + b * other.a), (other.c - other.a*((other.b*c - b*other.c)/(a*other.b + b * other.a)))/other.b ); + + + } + + /* + * Create a new line with the two points given + * @param p1 the first point + * @param p2 the second point + * @return Droite the line that is between the given points + */ + public static Droite create(Point p1, Point p2){ + System.out.println(p1 + "; " + p2); + Point directeur = new Point(p2.getX() - p1.getX(), p2.getY() - p2.getY()); + System.out.println(directeur); + double a = -directeur.getY(); + double b = directeur.getX(); + return new Droite(a, b, a*p1.getX() + b*p1.getY()); + } +} diff --git a/q2/tp2/DroiteTest.java b/q2/tp2/DroiteTest.java new file mode 100644 index 0000000..101f417 --- /dev/null +++ b/q2/tp2/DroiteTest.java @@ -0,0 +1,33 @@ +public class DroiteTest { + public static void main(String[] args) { + Point p1 = new Point(1, 1); + Point p2 = new Point(5, 3); + Point p3 = new Point(0, 4); + Point p4 = new Point(4, 6); + + Droite d1 = new Droite(0, 1, 2); + System.out.println(d1); + + Droite d2 = Droite.create(p1, p2); + Droite d3 = Droite.create(p3, p4); + System.out.println(d2); + System.out.println(d3); + + if(d2.isHorizontal()) + System.out.println("d2 is horizontal"); + if(d3.isHorizontal()) + System.out.println("d3 is horizontal"); + + Point int1 = d1.intersection(d2); + if(int1 == null) + System.out.println("d1 et d2 sont paralleles ou confondues"); + + Point int2 = d1.intersection(d3); + if(int2 == null) + System.out.println("d1 et d3 sont paralleles ou confondues"); + + Point int3 = d2.intersection(d3); + if(int3 == null) + System.out.println("d2 et d3 sont paralleles ou confondues"); + } +} diff --git a/q2/tp2/Point.java b/q2/tp2/Point.java new file mode 100644 index 0000000..1af11f7 --- /dev/null +++ b/q2/tp2/Point.java @@ -0,0 +1,26 @@ +public class Point { + private double x, y; + + public String toString(){ + return "("+ x+ ":" + y + ")"; + } + + Point(){ + x = 0; + y = 0; + } + + Point(double x, double y){ + this.x = x; + this.y = y; + } + + public double getX() { + return x; + } + + public double getY() { + return y; + } + +} diff --git a/q2/tp2/TP2.pdf b/q2/tp2/TP2.pdf new file mode 100644 index 0000000..d4af965 Binary files /dev/null and b/q2/tp2/TP2.pdf differ diff --git a/q2/tp2/hanoi.zip b/q2/tp2/hanoi.zip new file mode 100644 index 0000000..d2418ba Binary files /dev/null and b/q2/tp2/hanoi.zip differ diff --git a/q2/tp2/hanoi/src/tours_hanoi/HanoiFrame.java b/q2/tp2/hanoi/src/tours_hanoi/HanoiFrame.java new file mode 100644 index 0000000..b0cf187 --- /dev/null +++ b/q2/tp2/hanoi/src/tours_hanoi/HanoiFrame.java @@ -0,0 +1,112 @@ +package tours_hanoi; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Graphics; +import java.awt.Toolkit; + +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JPanel; + +public class HanoiFrame extends JFrame implements HanoiState.Listener { + + private final HanoiState state; + private final int delay; + + public static final int MARGIN_X = 10; + public static final int MARGIN_Y = 10; + public static final int TOWER_W = 10; // Largeur d'une tour + public static final int DISK_H = 30; // Hauteur d'un disque + + public static final Color DISK_COLOR = Color.BLUE; + + private class HanoiPanel extends JPanel { + + /** Dessine la tour d'index i + * + * @param g contexte graphique + * @param i index de la tour (0 <= i < NUM_TOWERS) + */ + private void drawTower(Graphics g, int i) { + int w = getWidth(); + int h = getHeight(); + int tw = (w - (2 + HanoiState.NUM_TOWERS - 1) * MARGIN_X) / HanoiState.NUM_TOWERS; // largeur espace tour + g.fillRect(MARGIN_X + tw / 2 + i * tw - TOWER_W / 2, MARGIN_Y, TOWER_W, h - 2 * MARGIN_Y); + } + + /** Dessine un disque de taille size sur la tour i en hauteur j + * + * @param g contexte graphique + * @param i index de la tour (0 <= i < NUM_TOWERS) + * @param j hauteur du disque (0 <= j) + * @param size taille du disque (0 <= size < MAX_DISKS) + */ + private void drawDisk(Graphics g, int i, int j, int size) { + int w = getWidth(); + int h = getHeight(); + int tw = (w - (2 + HanoiState.NUM_TOWERS - 1) * MARGIN_X) / HanoiState.NUM_TOWERS; // largeur espace tour + int x = MARGIN_X + tw / 2 + i * tw; + int y = h - MARGIN_Y - (j + 1) * DISK_H; + int pw = TOWER_W + (int) (1.0 * (tw - TOWER_W) * (size + 1) / HanoiState.MAX_DISKS); + + g.setColor(DISK_COLOR); + g.fillRect(x - pw / 2, y, pw, DISK_H); + g.setColor(Color.BLACK); + g.drawRect(x - pw / 2, y, pw, DISK_H); + } + + /** Dessine les tours et disques sur base de l'état du jeu */ + @Override + public void paintComponent(Graphics g) { + for (int i = 0; i < HanoiState.NUM_TOWERS; i++) { + drawTower(g, i); + for (int j = 0; j < state.getNumDisks(i); j++) + drawDisk(g, i, j, state.getDiskSize(i, j)); + } + } + } + + private JLabel labelCountMoves; + + /** Crée une instance de fenêtre représentant l'état du jeu + * + * @param state état du jeu + * @param delay délai en millisecondes attendu après chaque mise à jour + */ + public HanoiFrame(HanoiState state, int delay) { + super("Tours de Hanoï"); + this.state = state; + this.delay = delay; + + state.addListener(this); + + JPanel outerPanel = new JPanel(new BorderLayout()); + add(outerPanel); + JPanel topPanel = new JPanel(new FlowLayout()); + labelCountMoves = new JLabel("0 déplacements"); + topPanel.add(labelCountMoves); + outerPanel.add(new HanoiPanel(), BorderLayout.CENTER); + outerPanel.add(topPanel, BorderLayout.NORTH); + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + setSize(screenSize); + setVisible(true); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + } + + /** Met à jour la représentation graphique du jeu */ + @Override + public void stateChanged() { + int mc = state.getMovesCount(); + labelCountMoves.setText(mc + " déplacement" + (mc > 1 ? "s" : "")); + repaint(); + try { + Thread.sleep(delay); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } +} diff --git a/q2/tp2/hanoi/src/tours_hanoi/HanoiState.html b/q2/tp2/hanoi/src/tours_hanoi/HanoiState.html new file mode 100644 index 0000000..f6fb6ab --- /dev/null +++ b/q2/tp2/hanoi/src/tours_hanoi/HanoiState.html @@ -0,0 +1,453 @@ + + + + + + HanoiState + + + + + + + + +
+ + +
Skip navigation links
+ + + + +
+ + + +
+
tours_hanoi
+

Class HanoiState

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + +
Skip navigation links
+ + + + +
+ + + + diff --git a/q2/tp2/hanoi/src/tours_hanoi/HanoiState.java b/q2/tp2/hanoi/src/tours_hanoi/HanoiState.java new file mode 100644 index 0000000..95592d6 --- /dev/null +++ b/q2/tp2/hanoi/src/tours_hanoi/HanoiState.java @@ -0,0 +1,127 @@ +package tours_hanoi; + +import java.util.ArrayList; +import java.util.List; +import java.util.Stack; + +public class HanoiState { + + /** Nombre de tours */ + public static final int NUM_TOWERS = 3; + + /** Nombre max. de pièces */ + public static final int MAX_DISKS = 20; + + /** Modèle d'une pièce (actuellement seulement sa taille (diamètre) */ + private static class Disk { + + /** Taille de la pièce */ + public final int size; + + /** Constructeur privé (factory) */ + private Disk(int size) { + this.size = size; + } + + /** Pièces créées */ + private static final Disk[] DISKS = new Disk[MAX_DISKS]; + + /** Crée/retourne une pièce particulière */ + public static Disk getBySize(int size) { + if (DISKS[size] == null) + DISKS[size] = new Disk(size); + return DISKS[size]; + } + } + + /** Une tour est une pile (empêche d'emblée les accès ailleurs qu'au sommet) */ + private Stack towers[]; + + private int countMoves = 0; + + /** Construit un jeu des Tours de Hanoï */ + @SuppressWarnings("unchecked") + private HanoiState() { + towers = (Stack[]) java.lang.reflect.Array.newInstance(Stack.class, NUM_TOWERS); + for (int i = 0; i < NUM_TOWERS; i++) + towers[i] = new Stack(); + } + + /** Construit un jeu des Tours de Hanoï à n disques + * @param n Le nombre de disques */ + public HanoiState(int n) { + this(); + for (int i = 0; i < n; i++) + add(0, Disk.getBySize(n - 1 - i)); + } + + /** Ajoute une pièce au sommet d'une tour */ + private void add(int tower, Disk p) { + towers[tower].push(p); + } + + /** Déplace une pièce du sommet d'une tour au sommet d'une autre tour. + * Vérifie que les contraintes du jeu sont respectées. + * @param from Indice de la tours de départ + * @param to Indice de la tour d'arrivée*/ + public void move(int from, int to) { + if (towers[from].empty()) + throw new RuntimeException("Pile source vide"); + + if (!towers[to].empty() && + (towers[to].peek().size < towers[from].peek().size)) + throw new RuntimeException("Déplacement sur une pièce plus grande"); + + towers[to].push(towers[from].pop()); + + countMoves++; + + notifyListeners(); + } + + /** Retourne le nombre de pièces sur la tour i + * @param tower L'indice de la tour + * @return Le nombre de pièces sur la tour*/ + public int getNumDisks(int tower) { + return towers[tower].size(); + } + + /** Retourne la taille de la pièce en position j de la tour i + * @param tower L'indice de la tour + * @param j La position de la pièce + * @return La taille de la pièce en position j dans la tour*/ + public int getDiskSize(int tower, int j) { + return towers[tower].get(j).size; + } + + /** Retourne le nombre total de déplacements + * @return Le nombre total de déplacements*/ + public int getMovesCount() { + return countMoves; + } + + //////////////////////////////////////////////////////////////// + + /** Permet d'être notifié des changements d'états + * (utilisé p.ex. par la fenêtre d'affichage) */ + public static interface Listener { + + public void stateChanged(); + + } + + /** Liste des listeners */ + private List listeners = new ArrayList(); + + /** Notifie l'ensemble des listeners du changement d'état */ + private void notifyListeners() { + for (Listener l : listeners) + l.stateChanged(); + } + + /** Enregistre un listener supplémentaire */ + public void addListener(Listener l) { + listeners.add(l); + } + +} diff --git a/q2/tp2/hanoi/src/tours_hanoi/Tester.java b/q2/tp2/hanoi/src/tours_hanoi/Tester.java new file mode 100644 index 0000000..6c03a31 --- /dev/null +++ b/q2/tp2/hanoi/src/tours_hanoi/Tester.java @@ -0,0 +1,43 @@ +package tours_hanoi; + +import javax.swing.JFrame; + +public class Tester { + + /** Nombre de pièces à mettre en jeu + * (attention, le nombre de déplacements est de l'ordre de 2^N) */ + public static final int NUM_DISKS = 6; + + /** Délai entre l'affichage de deux mouvements (en millisecondes) */ + public static final int DELAY = 1000; + + /** Si cette constante vaut true, les mouvements des pièces sont affichés */ + public static final boolean SHOW_MOVES = true; + + /** Reference vers fenêtre d'affichage optionnelle */ + private static HanoiFrame f; + + /** Programme principal */ + public static void main(String [] args) { + HanoiState state = new HanoiState(NUM_DISKS); + + if (SHOW_MOVES) { + f = new HanoiFrame(state, DELAY); + } + solve(state, NUM_DISKS, 0, 2, 1); + } + + /** + * Déplace n pièces de la tour d'index tSrc vers la tour d'index tDst. + * + * @param state référence vers l'état des tours/pièces + * @param n nombre de pièces à déplacer + * @param tSrc index tour source + * @param tDst index tour destination + * @param tInt index tour intermédiaire + */ + private static void solve(HanoiState state, int n, int tSrc, int tDst, int tInt) { + state.move(tSrc, tDst); + } + +} diff --git a/q2/tp2/hanoi/src/tours_hanoi/stylesheet.css b/q2/tp2/hanoi/src/tours_hanoi/stylesheet.css new file mode 100644 index 0000000..98055b2 --- /dev/null +++ b/q2/tp2/hanoi/src/tours_hanoi/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} diff --git a/q2/tp2/recursif/.idea/.gitignore b/q2/tp2/recursif/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/q2/tp2/recursif/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/q2/tp2/recursif/.idea/misc.xml b/q2/tp2/recursif/.idea/misc.xml new file mode 100644 index 0000000..639900d --- /dev/null +++ b/q2/tp2/recursif/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/q2/tp2/recursif/.idea/modules.xml b/q2/tp2/recursif/.idea/modules.xml new file mode 100644 index 0000000..28636b6 --- /dev/null +++ b/q2/tp2/recursif/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/q2/tp2/recursif/.idea/vcs.xml b/q2/tp2/recursif/.idea/vcs.xml new file mode 100644 index 0000000..c2365ab --- /dev/null +++ b/q2/tp2/recursif/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/q2/tp2/recursif/recursif.iml b/q2/tp2/recursif/recursif.iml new file mode 100644 index 0000000..9a5cfce --- /dev/null +++ b/q2/tp2/recursif/recursif.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file