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 fs = require('fs'); | |
const fastCsv = require('fast-csv'); | |
var fileStream = fs.createReadStream("machineData_clean_Cafe.csv"), | |
parser = fastCsv(); | |
fileStream | |
.on("readable", function () { | |
var data; | |
while ((data = fileStream.read()) !== null) { |
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
render(){ | |
return ( | |
<div> | |
<h1>Hey I am an element</h1> | |
<i>And I am other element</i> | |
</div> | |
); | |
} |
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
render(){ | |
return [ //you need change ( to [ | |
<h1 key="element-1">Hey I am an element</h1>, //each element must have a key and a comma in the end | |
<i key="element-2">And I am other element</i> | |
]; | |
} |
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
render(){ | |
return ( | |
<> | |
<h1>Hey I am an element</h1> | |
<i>And I am other element</i> | |
</> | |
); | |
} |
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
array.reduce( | |
(accumulator, field) => { your logic }, | |
accumulatorInitialValue | |
) |
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 initialArray = [10, 20, 10, 20]; | |
const result = initialArray.reduce( | |
(amount, value) => amount + value | |
); |
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
let amount = 0; | |
for (v of [3, 4, 60, 7, 9, 10]) { | |
amount+=v; | |
} |
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 initialArray = [ | |
{ | |
name: 'Ricardo', | |
surname: 'Luz', | |
age: 32 | |
}, | |
{ | |
name: 'John', | |
surname: 'Doe', | |
age: 40 |
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
{ | |
"ACTION_ACTIVE":"Aktiv", | |
"ACTION_CANCEL":"Cancel", | |
"ACTION_ADD":"Hinzufügen", | |
"ACTION_ADD_CUSTOMER":"Neuen Kunden hinzufügen", | |
"ACTION_BACK_TO_MENU":"Zurück zum Menü", | |
"ACTION_BACK_TO_LIST":"Zurück zur Liste", | |
"ACTION_CHECK":"Klick zum prüfen", | |
"ACTION_CHECK_NO_CV":"Keine CVV für diese Karte generieren", | |
"ACTION_CHECKOUT":"Check-out", |
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 {i18nState} from "redux-i18n" | |
// with Immutable.js: | |
import {i18nState} from "redux-i18n/immutable" | |
const appReducer = combineReducers({ | |
otherreducers, | |
i18nState | |
}) |
OlderNewer