Existem 3 entradas possiveis
truefalseundefined
as saídas serão:
undefinded=>true
| const matrix = [[2,4,6,8],[12,14,16,18],[20,24,28,32],[32,34,36,38],[42,44,46,48]]; | |
| const exp = matrix[0]; | |
| const arrNumbers = matrix.slice(1); | |
| const props = [ | |
| (number, _i) => (number * exp[_i]), | |
| (number, _i) => (number / exp[_i]), | |
| (number, _i) => (number - exp[_i]), | |
| (number, _i) => (number + exp[_i]) | |
| ]; | |
| const op = (arr, _i) => arr.map(_a => props[_i](_a, _i)); |
| const criaArrayPrimos = x => | |
| criaArray(x) | |
| .slice(2) | |
| .filter(checaFatores) | |
| const criaArray = tamanho => Array.from({ length: tamanho }, (el, index) => index) | |
| const checaFatores = n => | |
| criaArray(maiorDivisor(n)) | |
| .slice(2) |
| /** | |
| * Show Me the Evens - Show me the Odds | |
| * Diana is learning to count and she just learned the difference between odds and even numbers. | |
| * She wants to have some fun, so she picks a random number. | |
| * If that number is even, she decides to count all the even numbers up to it starting from 0 up to (but not including) the input. | |
| * If not, she decides to count all the odd numbers up to that number starting from 1 (but not including) the input. | |
| **/ | |
| const counting = (x) => { | |
| return arrayFrom(x) |
| const | |
| composeN = (...fs) => x => | |
| fs.reduceRight((x, f) => f(x), x) | |
| , map = f => xs => | |
| xs.map(f) | |
| , reduce = f => xs => | |
| xs.reduce(f) | |
| import {Injectable} from '@angular/core'; | |
| // Declare TabsService as a provider in app.module.ts | |
| // Inject TabsService in your class: constructor(public tabs: TabsService){} | |
| // Use the this.tabs.hide() or this.tabs.show() methods wherever you want | |
| @Injectable() | |
| export class TabsService { | |
| constructor() {} | |
| public hide() { |
| import {Directive, Attribute} from '@angular/core'; | |
| import {NgModel} from '@angular/common'; | |
| @Directive({ | |
| selector: '[mask]', | |
| host: { | |
| '(keyup)': 'onInputChange()' | |
| } | |
| }) | |
| export class Mask { | |
| maskPattern: string; |
| var fs = require('fs'); | |
| var httpProxy = require('http-proxy'); | |
| var http = require('http'); | |
| var https = require('https'); | |
| var express = require('express'); | |
| var app = express(); | |
| app.use(function (req, res, next) { | |
| console.log(req); | |
| if (req.url === '/') { |