Skip to content

Instantly share code, notes, and snippets.

isEven(N):-
0 is mod(N,2).
countEvenOdd([],[0,0]).
countEvenOdd([H|C],[Even,Odd]):-
countEvenOdd(C,[E,O]),
( isEven(H) ->
Even is E+1,Odd is O+0;
Even is E+0, Odd is O+1
*
{
box-sizing: border-box;
margin: 0;
padding: 0;
}
.chart
{
display: flex;
@Irene-24
Irene-24 / import.txt
Created November 20, 2020 15:16
Importing json to mongodb
Endure you have the mongodb tools, else mongoimport will fail woefully
mongoimport --uri "[url to mongo db server - use the srv one]" --db [db name] --collection [collection name] --type json --file "[path to json file]" --jsonArray