So to do that, you need a text file full of quotes. HAHAHA Separated by new line. DEMO $('#btn_modal').click(function () { var num = 0; $.ajax({ url: "https://dl.dropboxusercontent.com/u/75734877/taglines.txt", type: "GET", dataType: "text", beforeSend: function () { $('#kowts').show().html('<img src="http://www.feelol.com/Content/images/Loading.gif" />'); }, success: function (t) { var lines = t; var lineArr = lines.split('\n'); num = Math.floor(Math.random() * lineArr.length); $('#kowts').show().text(lineArr[num]); }, error: function(){ alert('Error') } }); }); Split the quotes from text file by "\n" (new line), then get its length and generate a random number between 0 to maximum length. Then use the generated number a...
Heroku is a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud. If you have a simple Django app that doesn't require huge storage or database, Heroku is the best choice . Their free service will suffice your need. Your app will be available almost 24/7 (~23 days up time in a month). You are given 550 hours per month and if you have a credit card, an additional of 450 hours will be rewarded. Enough to make your app to be available always. The server also sleeps after 30 mins of inactivity. This enables you to save uptime hours. In deploying Django in Heroku you just need to have this ff. files: .gitignore runtime.txt requirements.txt Procfile Django App All file must reside in the project directory as shown below: .gitignore is a text file containing the type of files within the directories that wont be included in the deployment of app runtime.txt is a text file containing the version o...
It took me so long to graduate in college and all the blame is on me. I believed that no matter what adversities you've faced, it always depends on how you accept and handle it. When I was in my teen stage (16-20, maybe), I never thought about my future. I don't know, maybe I'm too lazy to think about it or I just don't care. Caraga State University (CarSU) is my third school, I am a dropout student in MSU, and again a dropout student in FSUU. I'm not proud of it, but I don't regret about my experiences on both school. Probably because, I gained a lot of friends. I received a lot of likes from them on Facebook, kidding aside. LOL Anyway, this is a personal post so, it's all my opinion and this is not based on facts. It came from my head after eating lots of peanuts and drinking 6 glasses of soft drink. In order to graduate from college you need this, shall I say it as "elements" or whatever maybe. WILL! Will, in philosophy, refers to a ...