Skip to content

Instantly share code, notes, and snippets.

Java

Java 01 : Le JDK Java 02 : De l'algorithmique au Java Java 03 : Variables Java 04 : Tableaux et itération Java 05 : Méthodes Java Training 01 : Primitives Java Training 02 : String Java Training 03 : Array and Matrix

@bastienapp
bastienapp / node.md
Last active February 12, 2020 16:03
  • Découverte de NodeJS
  • Installation et utilisation d'un module
  • Le protocole HTTP
  • Le protocole HTTP - Mise en pratique
  • Node.js - Créer un serveur HTTP
  • Express 1 - Découverte d'Express
  • Express 2 - Express, MySQL, Postman
  • Express 3 - Méthode POST et insertion de données
  • Express 4 - Méthode PUT et modification de données
  • Express 5 - Méthode DELETE et suppression de données
@bastienapp
bastienapp / deploy.md
Last active October 23, 2020 22:07
Deploy on Tomcat

Déploiement d'un projet Spring sur un serveur Tomcat

1 - Identifiants

Serveur

  • IP : 51.68.18.120
  • User : root
  • Password : 7U6:5b8989GBS5R

00101101 00101110 00101101 00101101 00100000 00101110 00101110 00100000 00101101 00101110 00101110 00101110 00100000 00101110 00101101 00101101 00101110 00100000 00101110 00101101 00101101 00101110 00100000 00101101 00101110 00101110 00101110 00100000 00101101 00101110 00101101 00100000 00101101 00101101 00101110 00101101 00100000 00101110 00101101 00101101 00101101 00100000 00101110 00101101 00101110 00101110 00100000 00101101 00101110 00101101 00100000 00101101 00101101 00101110 00101110 00100000 00101110 00101101 00101110 00101110 00100000 00101101 00101110 00101110 00101110 00100000 00101110 00101101 00101110 00100000 00101101 00101101 00101101 00100000 00101110 00101101 00100000 00101110 00101101 00101110 00100000 00101101 00101110 00101101 00100000 00101101 00101110 00101110 00101110 00100000 00101110 00101110 00100000 00101101 00101110 00101110 00101101 00100000 00101101 00101110 00101101 00100000 00101101 00101110 00101110 00100000 00101110 00101101 00101110 00100000 00101101 00101110 00101110 0010111

class Live {
public boolean hasLegalAge(int age) {
/*if (age > 17) {
return true;
}
return false;*/
return age > 17;
}

Elemental Monsters

1. Les monstres

Créer une classe abstraite Monster avec les attributs :

  • name (String)
  • damage (int)
  • life (int)
  • type (String)
@bastienapp
bastienapp / Main.java
Last active September 27, 2019 14:01
Exercices sur les tableaux
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
String[] stackSample = {"a", "b", "c", "a", "tacos"};
String needleSample = "a";
System.out.println(countOccurrences(stackSample, needleSample));
System.out.println(firstOccurrence(stackSample, needleSample));
int [] newArray = {1, 3, 5, 7};
import java.util.Scanner;
public class FizzBuzz {
public static void main (String [] args) {
Scanner sc = new Scanner(System.in);
int i = sc.nextInt();
String result = fizzBuzz(i);
System.out.println("Le résultat est : " + result);

Atelier git : initialisation du projet 1

Pour cet atelier, le groupe doit tout d'abord définir trois rôles au sein de ses collaborateurs :

  • un seul pilote
  • un seul co-pilote
  • les stewards

Initialisation du dépôt distant