When you are running an algorithm, it takes some time to run. If your computer is super fast, then your running time would be so tiny fractions of a second, but that time can not be absolute zero. We can call that time as cost , since it's something like units. More running time, is more cost. You can't guarantee that, Your Computer with some tasks running in background, will take the same time as mine; with the same tasks running in background. It's dependant on both of our computers' CPU, Memory and so on. But I can tell that, my computer almost* works in a similar manner, every time*. So I calculate that cost and multiply it with some value for my computer, where as you can get that same cost and multiply it by some other value for your computer. Calculating that cost, is what we are about to do now. So if we are going to calculate the cost, the following things matter in a code. Statements Blocks Statements If you are using a language
Play Framework makes building web applications easier with Java & Scala. It is lightweight and in a web-friendly architecture. Play is a RESTful service by default, and built targeting modern web & mobile. REST stands for REpresentational State Transfer. For a great admiration, Linkedin uses Play framework in their infrastructure. We are going to create a simple Registration & login mechanism using Play Framework to understand about it. Note that we are not going to create a database or any permanent storages, so that your registration details can be used in login only until the current run is not stopped. 1. Setting up the environment I've used the following, in developing this login form Java Development Kit 1.8.0_121 ( http://www.oracle.com/technet work/java/javase/downloads/ index-jsp-138363.html ) IntelliJ IDEA 2016.3.3 ( https://www.jetbrains.com/ide a/#chooseYourEdition ) Scala plugin 2.12.1 installed ( https://www.scala-lang.org/download/ )