Posts

Showing posts from February, 2015

Exponentiation algorithm

Image
In programming there are not just 1 method to solve the problems for the exponential algorithm.What is exponential algorithm? Well is also can be mention as power. For example 2 to the power of 3 is 8 (2^3=8). Exponential algorithm is to find the value through computational way. You can computed an exponential by iterative. For example (in python): def iterPower(base, exp):     result=base     if exp==0:         return 1     else:         while exp>1:             result*=base             exp-=1         return result The code is like keep multiple the base number while minus the exponential value until the exp is 0.Is like 5^5=5*5*5*5*5 Above is an exponential by iteratively executing successive multiplications. Exponential can be computed in a recursive function. def recurPower(base, exp):     if exp==0: ...

Centralised version control systems

Centralised Version Control System (CVCS) CVS and SVN is a centralised version control system(CVCS). It mean that only one master repository where people can share the code. Another way to explain is if everyone need to check their own code or branch from that repository, and checks what have been changes by others people or itself. Than the code will need to sent out 1 by 1 and person by person.Sometimes , it possible to create a patch that diff from your own code and it was against the given Master repository version. There are 2 main problems with the cvcs, even it was no so obvious: You need to perform an action like diff or patch. Any patch for the particular branch can be outdated quickly However , SVN keeps the last-known checkout, so it can do a limited set of operation while disconnected from SVN, like diff from the last-know checkout but it you are not allow to doing many operation that are possible while connected. The first problem is rarely apparent for thos...