start new:
tmux
start new with session name:
tmux new -s myname
{"lastUpload":"2020-06-25T21:31:00.119Z","extensionVersion":"v3.4.3"} |
const fruits = ['apple', 'peach', 'lime', 'watermelon']; // Array de frutas | |
function getFruit(fruit) { | |
return new Promise((resolve, reject) => { // Se crea la promesa con los 2 parámetros | |
// Se busca en el array si existe la fruta | |
if (fruits.find(item => item === fruit)) { | |
resolve(`${fruit} was found!`); // Se resuelve la promesa | |
} else { | |
reject(Error('no fruit was found!')); // Se rechaza la promesa |
let items = [ | |
{name:"A", value:2}, | |
{name:"B", value:3}, | |
{name:"A", value:4}, | |
]; | |
let result = []; | |
items.map((item, index) => { |
const _$ = $; | |
setInterval(function(){ | |
_$("#mm_cc > div > header > div.profile-header__vote.js-profile-header-buttons > div.profile-header__vote-item.profile-header__vote-item--yes.js-tutorial-first-yes > div > span").click() | |
}, 2000); | |
/////// | |
setInterval(function(){ |
// Initialize an empty array of length n. Use Array.prototype.reduce() to add values into the array, using the sum of the last two values, except for the first two. | |
const fibonacci = n => | |
[...Array(n)].reduce( | |
(acc, val, i) => acc.concat(i > 1 ? acc[i - 1] + acc[i - 2] : i), | |
[] | |
) |
import { FETCH_DATA } from './types'; | |
export const fetchRestaurants = () => async (dispatch, getState) => { | |
try { | |
const response = await axios.get("/service"); | |
const data = response.data.data; | |
dispatch({ | |
type: FETCH_DATA, |
/* | |
isAnagram | |
Checks if a string is an anagram of another string (case-insensitive, ignores spaces, punctuation and special characters). | |
*/ | |
const isAnagram = (str1, str2) => { | |
const normalize = str => | |
str | |
.toLowerCase() | |
.replace(/[^a-z0-9]/gi, '') |
<div id="header"></div> | |
<div class="section"> | |
<div class="article"> | |
<div class="figure"> | |
<img> | |
<div class="figcaption"></div> | |
</div> | |
</div> | |
</div> | |
<div id="footer"></div> |
<header></header> | |
<section> | |
<article> | |
<figure> | |
<img> | |
<figcaption></figcaption> | |
</figure> | |
</article> | |
</section> | |
<footer></footer> |