The European Union, apparently, has a cookie law. This "requires websites to get consent from visitors to store or retrieve" cookies.
The first thing to do is to add a <div> to your template's <body>
We use third party "cookies" for ...
Next, we add a new rule to our .css file
Let's stop our cookies from travelling. Encapsulate the cookie code in a function:
One of my clients asked me to do a Linear Mortgage Calculation. Not a big deal were it not that I could not find the mathematical formula for it. There are a number of online calculators, so 'they' know what's going on but 'they' don't want you to know*!
So, what's the deal? With a linear mortgage, also called a straight line mortgage, you pay back the same amount of capital each period and therefore the same 'relative' amount of interest.
This Dutch graph explains it. 'Aflossing' is repayment. 'Rente' is interest.
So, how do you calculate this? It's relatively easy.
Loan (L) is 100.000€
Years (y) is 30
Interest (i) is 2%
Periods (p) is y*12 (months per year) is 360
Repayment (r) = L/p = 100.000/360 = 277,78€/month
The total amount of interest (t) = L*i*y = 100.000*0,02*30 = 60.000€
The first month, the interest you pay is t/p = 60.000/360 = 166.67€
The people at schema.org were very positive, and asked me if it would run on Google App Engine. I thought that would not be too problematic. Little did I know.
So, I jumped into the documentation and found the first surprise; Python2.7 instead of Python3.4. I had to downgrade my code. Not too traumatic. Change some libraries, change some lines of code. I had to redo the pickle file because that's incompatible.
I downloaded the SDK and set up everything. First error: no 'app'. Let's see...
app = webapp2.WSGIApplication([('/',MainPage),], debug=True)
Okay. I changed the MainPage into Controller.run_this, my tool's handler. Next error: run_this accepts three parameters, two given. Hmmm, I have to do something with the webapp2.RequestHandler. Not looking good.
Didn't I read somewhere that Google App Engine was using WSGI? My program is WSGI. It sh…