Skip to content

Instantly share code, notes, and snippets.

View Nicolas_p04_javascript_update_nested_array
let todos= [
{id: 1, title: "Eat breakfast", completed: false},
{id: 2, title: "Make bed 1", completed: false},
{id: 3, title: "Make bed 2", completed: false},
{id: 4, title: "Make bed 3", completed: false}
];
let todos2= [
{id: 1, title: "Element numéro 1", completed: false},
{id: 2, title: "Element numéro 2", completed: false},
View CAUDIN #P02
package com.hemebiotech.analytics;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class HemebiotechApp {
public static void main(String[] args) {
// Symptoms reading phase//
View cart.js
const cart = document.getElementById("cart-list"); //section ou l'ensemble des information lié a page panier sont affiché.
const emptyCart = document.getElementById("empty-cart"); //balise qui s'affiche tant que le panier est vide.
let cartPrice = document.getElementById("cart-price");
cartPrice.style.display = "none";
const finalPrice = document.createElement("div"); //balise qui affichera le prix total de la commande.
finalPrice.classList.add("text-end"); //style bootstraps qui affichera le prix total sur la droite du panier.
finalPrice.classList.add("fs-4");
finalPrice.classList.add("pb-2");
View CustomResponseEntity.java
package com.medkhelifi.api;
import com.medkhelifi.exceptions.enums.ApiErrNumber;
import com.medkhelifi.api.error.ApiError;
import com.medkhelifi.api.error.ApiValidationError;
import com.medkhelifi.api.error.sub.ApiSubError;
import com.medkhelifi.exceptions.ApiException;
import com.medkhelifi.api.success.ApiSuccess;
import com.medkhelifi.api.success.ApiSuccessType;
import com.medkhelifi.util.Util;
@medkhelifi
medkhelifi / StreamFromArrays.java
Last active Jun 26, 2019
Create a Java 8 Stream from Arrays
View StreamFromArrays.java
Stream<String> = Arrays.stream(new String[]{"Apple", "Orange", "Pineapple"});
@medkhelifi
medkhelifi / webpack.config.js
Created Nov 6, 2017
Gist for /react-webpack-todolist
View webpack.config.js
const webpack = require('webpack');
const {resolve} = require('path');
module.exports = {
context: resolve(__dirname, 'src'),
entry: [
'./main.jsx'
],
output: {
path:resolve(__dirname, "public"),
@medkhelifi
medkhelifi / package.json
Created Nov 6, 2017
Gist for /react-webpack-todolist
View package.json
"devDependencies": {
...
"babel-core": "6.24.1",
"babel-preset-es2015": "6.24.1",
"babel-preset-react": "^6.24.1",
"babel-loader": "7.0.0",
...
}
@medkhelifi
medkhelifi / main.js
Created Nov 4, 2017
Gist for /react-webpack-todolist
View main.js
export default class Main extends React.Component {
render() {
return React.createElement(
"div",
{ className: "row" },
"HELLO TODO "
);
}
}
ReactDOM.render(React.createElement(Main, null), document.getElementById('container'));
@medkhelifi
medkhelifi / main.jsx
Last active Nov 4, 2017
Gist for /react-webpack-todolist
View main.jsx
render(){
return(
<div className="row">
HELLO TODO {/* to be changed*/}
</div>);
}
@medkhelifi
medkhelifi / webpack.config.js
Last active Nov 6, 2017
Gist for /react-webpack-todolist
View webpack.config.js
const webpack = require('webpack');
const {resolve} = require('path');
module.exports = {
context: resolve(__dirname, 'src'),
entry: [
'./main.jsx'
],
output: {
path:resolve(__dirname, "public"),