Skip to content

Instantly share code, notes, and snippets.

Cher journal,
en ce jour du 04/09/2017, je trouve la Wild Code School géniale. Ma formatrice (ou mon formateur) est la personne la plus belle et intelligente que j'ai eu l'occasion de rencontrer ! La modestie de la personne qui a rédigé ce texte n’est plus à démontrer, de même que sa capacité à écrire un texte intéressant à lire. Je lui mettrai la note de 9/10, ce n'est pas cher payé !
@bastienapp
bastienapp / MCD.jpg
Last active September 25, 2017 13:11
MCD, MLD
MCD.jpg
@bastienapp
bastienapp / db_bastien1.sql
Last active September 27, 2017 05:41
SQL Part 1
-- MySQL dump 10.13 Distrib 5.7.19, for Linux (x86_64)
--
-- Host: localhost Database: bastien_k_wcs_toulouse
-- ------------------------------------------------------
-- Server version 5.7.19-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
@bastienapp
bastienapp / db_bastien2.sql
Last active September 10, 2024 13:29
SQL Part 2
-- MySQL dump 10.13 Distrib 5.7.19, for Linux (x86_64)
--
-- Host: localhost Database: bastien_k2_wcs_toulouse
-- ------------------------------------------------------
-- Server version 5.7.19-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
@bastienapp
bastienapp / creation.sql
Last active October 3, 2017 13:35
Modelisation
#------------------------------------------------------------
# Script MySQL.
#------------------------------------------------------------
#------------------------------------------------------------
# Table: user
#------------------------------------------------------------
CREATE TABLE user(
@bastienapp
bastienapp / FirebaseListAdapter.java
Last active October 17, 2017 14:26
FirebaseListAdapter
package fr.wcs.blablawild; // TODO : modifiez par votre package
import android.app.Activity;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import com.google.firebase.database.ChildEventListener;
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_date"
android:layout_width="wrap_content"
@bastienapp
bastienapp / SingletonClass.java
Created April 24, 2018 07:01
Exemple de Singleton en Java
public class SingletonClass {
private static volatile SingletonClass sSoleInstance;
//private constructor.
private SingletonClass(){
//Prevent form the reflection api.
if (sSoleInstance != null){
throw new RuntimeException("Use getInstance() method to get the single instance of this class.");
SI CONDITION1 ALORS
TRAITEMENT1
FIN SI
SI CONDITION1 ALORS
TRAITEMENT2
FIN SI
SI CONDITION1 ALORS
IF CONDITION2 ALORS
TRAITEMENT1
@bastienapp
bastienapp / cubes.java
Last active May 31, 2018 14:03
Build a pile of Cubes
public class ASum {
public static long findNb(long m) {
long total = 0;
long n = 0;
for (n = 1; total < m; n++) {
total += (long) Math.pow(n, 3);
}
return total == m ? n - 1 : -1;
}