Vá até o seu repositório e execute
git config core.filemode false
Vá até o seu repositório e execute
git config core.filemode false
$ git checkout web-123-my-branch # make sure you're on the right branch
$ git fetch # update remote refs
$ git rebase origin/master # perform the rebase onto the current state of master
# for each conflict, edit file, resolve conflicts, git add -u <file>, git rebase --continue
$ git push -f origin web-123-my-branch # overwrite remote branch with newly rebase branch
------------------------------------------------------------- | |
// The process object is a global that provides information about, | |
// and control over, the current Node.js process. | |
// As a global, it is always available to Node.js applications without using require(). | |
// Instead of depending on process.argv property | |
// we can use a third party node module called `yargv` as process.argv | |
// can be a bit messy. | |
------------------------------------------------------------- |
// Well, time to expand the family a little more: think of a Quadribonacci starting with a signature of 4 elements and each following element is the sum of the 4 previous, a Pentabonacci (well Cinquebonacci would probably sound a bit more italian, but it would also sound really awful) with a signature of 5 elements and each following element is the sum of the 5 previous, and so on. | |
// Well, guess what? You have to build a Xbonacci function that takes a signature of X elements - and remember each next element is the sum of the last X elements - and returns the first n elements of the so seeded sequence. | |
// xbonacci {1,1,1,1} 10 = {1,1,1,1,4,7,13,25,49,94} | |
// xbonacci {0,0,0,0,1} 10 = {0,0,0,0,1,1,2,4,8,16} | |
// xbonacci {1,0,0,0,0,0,1} 10 = {1,0,0,0,0,0,1,2,3,6} | |
// xbonacci {1,1} produces the Fibonacci sequence | |
function Xbonacci(signature, n){ |
// At the end of the first year there will be: | |
// 1000 + 1000 * 0.02 + 50 => 1070 inhabitants | |
// At the end of the 2nd year there will be: | |
// 1070 + 1070 * 0.02 + 50 => 1141 inhabitants (number of inhabitants is an integer) | |
// At the end of the 3rd year there will be: | |
// 1141 + 1141 * 0.02 + 50 => 1213 | |
// It will need 3 entire years. |
// For example, take 153 (3 digits): | |
// 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153 | |
// and 1634 (4 digits): | |
// 1^4 + 6^4 + 3^4 + 4^4 = 1 + 1296 + 81 + 256 = 1634 | |
// The Challenge: | |
// Your code must return true or false depending upon whether the given number is a Narcissistic number. |
// Your task is to write a function maskify, which changes all but the last four characters into '#'. | |
// Examples | |
// maskify("4556364607935616") == "############5616" | |
// maskify( "64607935616") == "#######5616" | |
// maskify( "1") == "1" | |
// maskify( "") == "" | |
// "What was the name of your first pet?" | |
// maskify("Skippy") == "##ippy" |
function disemvowel(str) { | |
return str.replace(/[aeiou]/gi, ''); | |
} |
var gimme = function (inputArray) { | |
// Clone the input array. | |
var clonedArray = inputArray.slice(0); | |
// Sort it in ascending order. | |
clonedArray.sort(function(a, b){ | |
return a-b | |
}); | |
return inputArray.indexOf(clonedArray[1]); | |
}; |
// This solves the problem with last and previous digit addition. | |
function Xbonacci(signature, n){ | |
var totalCallsToMake = n - signature.length; | |
var tempArr = signature.slice(0); | |
const reducer = (accumulator, currentValue) => accumulator + currentValue; | |
// Looping through. | |
for (var i=1; i<=totalCallsToMake; i++) { | |
var lastTwoEl = tempArr.slice(-2); | |
tempArr.push(lastTwoEl.reduce(reducer)); | |
} |