This file contains hidden or 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 React, {Component} from 'react'; | |
| import {InputGroup, InputGroupAddon, Input} from 'reactstrap'; | |
| import {Button} from 'reactstrap'; | |
| import "./enregistrement.css" | |
| import {Jumbotron} from 'reactstrap'; | |
| import base from "./base"; | |
| import Navigation from "./navigation/Navigation"; | |
| class EnregistrementPro extends Component { |
This file contains hidden or 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
| var express = require('express'); | |
| var router = express.Router(); | |
| const nodemailer = require("nodemailer"); | |
| // Création de la méthode de transport de l'email | |
| var smtpTransport = nodemailer.createTransport({ | |
| host:"smtp.gmail.com", | |
| port:465, | |
| auth: { | |
| user: "email", |
This file contains hidden or 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 React, {Component} from 'react'; | |
| import { Button } from 'reactstrap'; | |
| import {Link} from "react-router-dom" | |
| import "./Home.css" | |
| class Home extends Component { | |
| state = { | |
| todos:[], | |
| on:false | |
| }; | |
| changeColor = () => { |
This file contains hidden or 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
| addNote(newNote) { | |
| this.setState({ toDoNotes: [...this.state.toDoNotes, newNote]}) | |
| } |
This file contains hidden or 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
| <div className="App"> | |
| <Table> | |
| <thead> | |
| <tr> | |
| <th>id</th> | |
| <th>title</th> | |
| <th>body</th> | |
| </tr> | |
| </thead> | |
| { |
This file contains hidden or 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
| const http = require('http'); | |
| const port = 3000; | |
| const requestHandler = (request,response) => { | |
| let name = request.url.split('/')[2] | |
| if (request.url === "/") { | |
| response.end('Bienvenue sur notre serveur') | |
| }else if(request.url ==="/contact"){ | |
| response.end('Nous ne sommes pas joignables pour le moment') | |
| }else if(request.url ===`/display/${name}`) { |
This file contains hidden or 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
| const express = require('express'); | |
| const router = express.Router(); | |
| const multer = require("multer"); | |
| const storage = multer.diskStorage({ | |
| destination: function (req, file, cb) { | |
| cb(null, './public/images/') | |
| }, | |
| filename: function (req, file, cb) { |
This file contains hidden or 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 React, { Component } from 'react' | |
| import { connect } from 'react-redux' | |
| import axios from "axios" | |
| import dataFetch from "../store/actions/dataFetch" | |
| export class test extends Component { | |
| retrieveData = async () => { | |
| // config url |
This file contains hidden or 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
| function supprimer(arr,id) { | |
| const index = arr.indexOf(id) | |
| arr.splice(index,1) | |
| return del | |
| } |
This file contains hidden or 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
| function validParentheses(parens){ | |
| const open= "("; | |
| const closed= ")"; | |
| let totalOpen = 0; | |
| let totalClose = 0; | |
| for (let i = 0; i < parens.length; i++) { | |
| if (parens[i] === open) { | |
| totalOpen +=1 | |
| }else if (parens[i] === closed) { | |
| totalClose +=1 |