R.reduce(
(acc, x) => R.compose(
R.flip(R.prepend)(acc),
R.sum,
R.map(R.add(1))
)([x,...acc]),
[0]
)([13, 28])
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
<input type="text" id="numero1" placeholder="digite o primeiro numero"> | |
<input type="text" id="numero2" placeholder="digite o segundo numero"> | |
<button id="oi">calcular</button> |
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
function removeSpecialChars(str) { | |
return str.replace(/ /gi,"").replace(/[_\W]/gi,"").toLowerCase(); | |
} | |
function reverseString(str) { | |
return str.split('').reverse().join(''); | |
} | |
function palindrome(str) { | |
var cleanedString = removeSpecialChars(str); |
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
------------------ | |
-3.7305983199606447, -38.52608653898308 | |
07c74854a41 | |
Tue Sep 20 2016 20:41:24 GMT-0300 (BRT) | |
------------------ | |
------------------ | |
-3.7305983199606447, -38.52608653898308 | |
07c74854a41 | |
Tue Sep 20 2016 20:41:24 GMT-0300 (BRT) | |
------------------ |
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
------------------ | |
-3.7305983199606447, -38.52608653898308 | |
07c74854a41 | |
Tue Sep 20 2016 20:41:24 GMT-0300 (BRT) | |
------------------ | |
------------------ | |
-3.7305983199606447, -38.52608653898308 | |
07c74854a41 | |
Tue Sep 20 2016 20:41:24 GMT-0300 (BRT) | |
------------------ |
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
SEAKING | |
1 | |
---------- | |
---------- | |
POLIWHIRL | |
1 | |
---------- | |
---------- | |
WEEPINBELL | |
1 |
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
angular.module('test', []) | |
.controller('TesteCtrl', function($scope){ | |
$scope.modelo = { | |
nome: 'jouderian', | |
sexo: "masculino", | |
idade: 24 | |
} | |
$scope.modeloToUpdate = {} |
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
console.log('yannper'); | |
var request = require('request'), | |
cheerio = require('cheerio'), | |
baseUrl = 'http://www.teses.usp.br/teses/disponiveis/'; | |
request(baseUrl, function (error, reponse, body) { | |
$ = cheerio.load(body); |
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
// Ionic Starter App | |
// angular.module is a global place for creating, registering and retrieving Angular modules | |
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) | |
// the 2nd parameter is an array of 'requires' | |
var app = angular.module('starter', ['ionic', 'starter.services']); | |
app.controller('teste', function($scope, $ionicLoading, Occurrence){ | |
console.log('vixi doido'); |
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
angular.module('services.message', ['ionic']) | |
.service('Message', function($rootScope, $log, $window) { | |
service = {}; | |
if( $window.localStorage['messages'] != null || $window.localStorage['messages'] != undefined){ | |
var messages = JSON.parse($window.localStorage['messages']); | |
}else{ | |
var messages = []; | |
} |