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
(() => { | |
'use strict'; | |
let city = 'Bordeaux'; | |
let age = '29 ans'; | |
const dateOfBirth = '10 décembre 1988'; | |
const string = `J'habite à ${city}, j'ai ${age} ans et je suis né le ${dateOfBirth}`; | |
console.log(string); | |
})(); |
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
(() => { | |
'use strict'; | |
const profile = { | |
name: 'Alexandre', | |
getName() { | |
return this.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
(() => { | |
'use strict'; | |
const address = { | |
city: "Lyon", | |
state: "FR", | |
zip: 69001 | |
}; | |
const listeSports = ['Football', 'BasketBall'] | |
const autreListeSports = ['Boxe', 'Judo'] |
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
(() => { | |
'use script'; | |
class Monster { | |
constructor(options = {}) { | |
this.health = 100; | |
this.name = options.name; | |
} | |
soigner() { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Javascripting</title> | |
</head> | |
<body> |
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
onChange(files){ | |
const f = files[0]; | |
var reader = new FileReader(); | |
reader.onload = (function(theFile) { | |
return function(e) { | |
const data = e.target.result; | |
const lines = data.split("\n"); | |
const headers = lines[0].split(","); | |
lines.shift(); | |
const result = []; |
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
CREATE TABLE `movie` ( | |
`id` int(11) NOT NULL, | |
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, | |
`poster` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', | |
`comment` varchar(1500) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; | |
ALTER TABLE `movie` ADD PRIMARY KEY (`id`); | |
ALTER TABLE `movie` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; |
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 Webcam from 'react-webcam'; | |
class Photo extends Component { | |
constructor(props) { | |
super(props); | |
this.webcam = React.createRef(); | |
this.state = { | |
takePicture: false, | |
images: [], |
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 { combineReducers } from 'redux'; | |
import { createStore } from 'redux'; | |
// create reducer 1 | |
const is1 = 0; | |
const red1 = (state = is1, action) => { | |
switch(action.type) { | |
default: return state; | |
} | |
}; |
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 from 'react'; | |
import { Redirect, Route } from 'react-router-dom'; | |
const PrivateRoute = ({ component: Component, token, ...propsRoute }) => ( | |
<Route | |
{...propsRoute} | |
render={props => ( | |
token !== '' | |
? <Component {...props} /> | |
: ( |
OlderNewer