Programming

URL Shortener with Django (Part 2) - Creating a new django project

Sudeep Acharya
Creating a Django project django-admin startproject urlshortener Now you will see new directory “urlshortener”. Now our folder structure looks something like: tutorial/ - py3env - urlshortener - urlshortener = __init__.py = settings.py = urls.py = wsgi.py = manage.py (Folder is denoted as - and file is denoted by =) The folder “urlshortener” just inside “tutorial” is our root directory. And we will work inside this root directory from now on wards.

URL Shortener with Django (Part 1) - Creating virtual environment and installing Django

Sudeep Acharya
I finally got the time to write a Django tutorial. In this tutorial we are building URL Shortener. If you are confused with what we are building then we are building something similar to (bit.ly) or (goo.gl). We are building the app that will make a shorter URL of a longer URL. (Example) Normally the shorter URL will be localhost:8000/4hh5kr for www.facebook.com I am using Django 1.7.1 with Python 3.3.2+. Don’t worry if you have different version of Django because we will set up our virtual environment and install latest version of Django.

How to remove /public/ from URL in Laravel

Sudeep Acharya
By default in Laravel the URL to access your site is http://example.com/public/. It is not good to keep public in URL as it makes URL ugly and longer. So, let’s talk about the solution to remove /public/ from the URL. Method I : Using .htaccess Create a .htaccess file your Laravel root directory if it does not exists already. (Normally it is under your public_html folder) And add the following code to it:

JavaScript code to display Multiplication table

Sudeep Acharya
Through JavaScript you can easily write the html code in html document using document.write(). Using document.write() and for loop it is easy to print the table of user input number. First of all “prompt” box will appear and then this value will be parse to integer and the multiplication table is displayed. The source code for JavaScript is as follows: <script type='text/javascript'> var num = prompt("Enter Number", "0") //prompt user to enter the number var num = parseInt(num); //parse the num to number var i = 0; document.

C++ project – Encryption and Decryption

Sudeep Acharya
As a project in C++ during my College, i choose Encryption and Decryption as my project. I am implemented very simple technique for Encryption and Decryption. The encryption and decryption is done on the basis of letter shifting method. For example if the encryption key is 5 then for the word A the value of A after will be F. If you are unclear about what i am talking then seeing my source code will make you understand what i am talking about.