This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UserManager: | |
def __init__(self): | |
# Simuler une base de données avec un dictionnaire | |
self.users = { | |
1: {"name": "Alice", "age": 30}, | |
2: {"name": "Bob", "age": 25}, | |
3: {"name": "Charlie", "age": 35} | |
} | |
def get_user_info(self, user_id): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def home(): | |
return "<h1>Bienvenue sur mon site web!</h1><p>Ceci est une page simple avec Flask.</p>" | |
if __name__ == '__main__': | |
app.run(debug=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Future<void> _showMyDialog() async { | |
return showDialog<void>( | |
context: context, | |
barrierDismissible: false, // user must tap button! | |
builder: (BuildContext context) { | |
return AlertDialog( | |
title: const Text('AlertDialog Title'), | |
content: const SingleChildScrollView( | |
child: ListBody( | |
children: <Widget>[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# on importe le module random pour faire des choses au hasard | |
import random | |
# on importe le module time pour gerer le temps sur le jeu | |
import time | |
# on importe le module tkinter | |
import tkinter as tk | |
# afficher de message de bienvenue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
# on importe le module discord.py | |
import discord | |
from discord.utils import get | |
# ajouter un composant de discord.py | |
from discord.ext import commands | |
# une commmande |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Random; | |
import java.util.Scanner; | |
public class Main { | |
// creer le scanner pour toutes les fonctions | |
private Scanner scanner = new Scanner(System.in); | |
// rendre accessible un element pour savoir si le joueur à choisi l'elixir | |
private boolean elixir = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Graven'air companie !</title> | |
<!-- lier la page html avec le css pour ajouter le design --> | |
<link rel="stylesheet" type="text/css" href="css/styles.css"> | |
<!-- ajouter une police d'ecriture --> | |
<link href="https://fonts.googleapis.com/css2?family=Acme&display=swap" rel="stylesheet"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from panier import Panier # on importe le composant panier | |
from oeuf import OeufChocolat # on import la classe oeuf chocolat | |
import pygame # utiliser le module pygame pour faire des jeux avec python | |
pygame.init() # charger les composants | |
# definir les dimentions | |
largeur = 800 | |
hauteur = 480 | |
# creer la fenetre avec pygame |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fr.gravendev.blindtestapp; | |
import androidx.appcompat.app.AppCompatActivity; | |
import androidx.constraintlayout.widget.ConstraintLayout; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.util.Log; | |
import android.view.View; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <random> | |
using namespace std; | |
// créer une classe qui va representer le concept d'arme | |
class Arme | |
{ | |
public: |
NewerOlder