Sources:
This file contains 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
{ | |
"root": true, | |
"env": { | |
"node": true, | |
"es6": true | |
}, | |
"parser": "vue-eslint-parser", | |
"parserOptions": { | |
"ecmaVersion": 6, | |
"sourceType": "module" |
This file contains 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
export default function GridScreen() { | |
const [isFetchingComplete, setFetchingComplete] = React.useState(false); | |
const [tweetsState, setTweetsState] = React.useState({ | |
// initialises an empty array for tweets results | |
results: [], | |
}) | |
// The API url should go here. E.g: http://localhost:8000 | |
const hostUrl = '...' | |
// descendant order, depends on the node backend implementation - @sgobotta | |
const sortParam = `sort=-created_at` |
This file contains 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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Node.js CI | |
on: | |
push: | |
branches: [ my-target-branch ] | |
jobs: |
This file contains 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
-module(first). | |
-export([ | |
double/1, | |
mult/2, | |
area/3, | |
square/1, | |
trbl/1, | |
sum/3 | |
]). |
This file contains 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
% @doc Pattern Mathing module for the 1.15 step of the FutureLearn Erlang Course. | |
-module(pattern_matching). | |
-export([ | |
xOr/2, | |
xOr1/2, | |
xOr2/2, | |
xOr3/2, | |
xOr4/2, | |
max_three/3, |
This file contains 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
-module(recursion). | |
-export([fib/1, fibs/1, pieces/1]). | |
%% @doc given an integer computes it's position in the fibonacci sequence | |
fib(0) -> 0; | |
fib(1) -> 1; | |
fib(X) -> fib(X-1) + fib(X-2). | |
%% @doc given a fibonacci sequence position returns the sum of fibonacci computations | |
fibs(X) -> 1 + 1 + fibs(X-1) + fibs(X-2). |
This file contains 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
-module(recursion). | |
-export([ | |
fib/1, | |
test_fib/0, | |
is_perfect_number/1, | |
test_is_perfect_number/0 | |
]). | |
fib(N) -> fib(N,0,1). |
This file contains 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
-module(list). | |
-export([ | |
product_dr/1, test_product_dr/0, | |
product_tr/1, test_product_tr/0, | |
maximum_dr/1, test_maximum_dr/0, | |
maximum_tr/1, test_maximum_tr/0 | |
]). | |
%% @doc Given a list of numbers returns the product of it's elements. | |
%% The case base should return 1 since it's the neutral element of the |
This file contains 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
-module(list). | |
-author("@sgobotta"). | |
-export([ | |
double_dr/1, test_double_dr/0, | |
double_tr/1, test_double_tr/0, | |
evens_dr/1, test_evens_dr/0, | |
evens_tr/1, test_evens_tr/0, | |
median/1, test_median/0, | |
maximum_dr/1, test_maximum_dr/0, | |
maximum_tr/1, test_maximum_tr/0, |
OlderNewer