Skip to main content

Posts

How To Set Up Apache Virtual Hosts on Ubuntu

How to setup Virtual Host in Ubuntu 16 / Ubuntu 18 on localhost / local machine To run the website with host on localhost(With LAMP) becomes important in many cases. This blog post will demonstrate how to achieve this. Assuming you have LAMP already installed and reading the code from (/var/www/html) Follow the simple steps below Create the code base To Create the code, simply create a directory named localweb inside /var/www/html. Create a file index.php inside localweb directory Content of index.php file <?php  echo "Local Website"; ?> Now our code base is set, so we need to configure apache Go to apache directory cd  /etc/apache2/sites-available/ Create one file named localweb.conf with content <Directory /var/www/html/localweb/>     AllowOverride All </Directory> <VirtualHost *:80>     ServerAdmin admin@localweb.com     ServerName localweb.com     ServerAlias www.localweb.com     Documen
Recent posts

What is Natural Language Processing(NLP)

Introduction to Natural Language Processing(NLP) Natural Language Processing is a technique where in we need to process the normal human language and     makes sense out of it.   Basically this tutorial has two part one is theory and another is practical. We will post few posts on examples of Natural Language Processing on both Stanford CoreNLP / Apache OpenNLP. There are some steps that needs to be follow in processing the Natural Language. Actually there are many Natural Language Processing tools like Apache OpenNLP, Stanford CoreNLP etc. But major steps are same for everyone. a)     Sentence Detection :   In this part, the individual sentence are detected from the main sentence. As for example ,as seen in two different colours, Natural Processing Language is a good Technique. It has various parts ,   there are two different sentences. Using this step we detect this two individual sentence from the main sentence and do the processing for the next step.

Login with Google Account using PHP / Javascript using OAuth2.0

Login with Google Account using PHP with code This post have Complete Code for Login / Sign-in  with google Account  using PHP / Javascript with oAuth2.0 Basically today we have seen almost every website needs you to register yourself before you can post or take part in any discussions to the website. But it become a tedious task to register and login to many different sites. Solution is to provide the users the option to Login with existing Google / Facebook account as almost everyone have Facebook and Google account.. In this post, I am going to explain how to integrate the Google Login / Sign in  for your website. For this,  First you need to create your Client ID, Client Secret and your developer API key. For this go to https://developers.google.com/identity/sign-in/web/sign-in Click on the button Create Project. A new window will open up. Please select Create Project / or select already created Project. It will then ask for about type of Project. Please

Hack : A Look at Programming Language By Facebook

As every PHP developer should be aware of the Programming Language developed by Facebook : Hack. It is basically based on PHP, you can say PHP but a strongly / statically typed language like Java .(i.e. a language which have fixed datatype). Let me give you a simple example. In normal PHP ,we have functions like <?php function addOne($num1){      return ($num1+1) ; } ?> But in hack this code will be changed to <?hh  function addOne(int $num1) : int{      return ($num1+1); }  You must have notice the major difference. Inside function parameters, in HACK, we have mentioned int as datatype and int as return type. This is one of major difference between PHP and Hack. But this is not the only reason, Why Hack actually evolves?? Basically, We have an advantage in PHP that it need not to be compiled(unlike java), just make changes in file and reload the browser. Languages like Java are slow in sense that they first need to be compiled, then they can be run, but

JSON : Tutorial and Usage

Json Introduction What is JSON? JSON stands for J ava S cript O bject N otation JSON is lightweight text-data interchange format JSON is language independent * JSON is "self-describing" and easy to understand JSON uses JavaScript syntax for describing data objects, but JSON is still language and platform independent. JSON parsers and JSON libraries exists for many different programming languages. Json Format Example : {     "employees": [         {             "firstName": "John",             "lastName": "Doe"         },         {             "firstName": "Anna",             "lastName": "Smith"         }     ] } Why JSON? For AJAX applications, JSON is faster and easier than XML: Using XML Fetch an XML document Use the XML DOM to loop through the document Extract values and store in variables Using JSON