Author: ravik

MongoDB for PHP Developers – A Beginner’s Guide

Introduction If you want to create a website using MongoDB and PHP, this article will help you to: Connect to a MongoDB database Save documents in a collection Query documents in a collection Perform range queries Sort documents, update a document, delete one or more documents from a collection What…

Read More

March 15th, 2017 Amazon Linux, Articles, CentOS, Codeigniter, Databases, Linux, MongoDB, MySQL, PHP, Tutorials, Ubuntu

How to pass data from PHP to JavaScript ?

There are actually several approaches to do this. They are as following : Use AJAX to get the data you need from the PHP server. Echo out the data inside the page , and use JavaScript to get the data from DOM. Echo out the data directly to JavaScript inside…

Read More

February 16th, 2017 Javascript, jQuery, PHP

Things you must know before MySQL Interview

What are the HEAP tables in MySQL ? HEAP tables also known as  Memory tables are tables taht present in the memory. When creating a HEAP table in MySql, we needs to specify the TYPE of table as HEAP. These memory tables  have values without data type like “BLOB” or…

Read More

February 16th, 2017 Interview, MySQL, PHP, Tutorials

How to make a Good website with a video background ?

Last year came up with some interesting website design ideas which were focused to attract audiences with videos and moving animations. The inspiration might be the popularity and the entrainment factor of the online videos or movies. This is the reason why video backgrounds were welcomed with both arms wide…

Read More

February 16th, 2017 Tutorials

Installing a LAMP Web Server on Amazon Linux Web Server

To install and start the LAMP web server on Amazon Linux Connect to your instance. To ensure that all of your software packages are up to date, perform a quick software update on your instance. This process may take a few minutes, but it is important to make sure you…

Read More

January 25th, 2017 Amazon EC2, Amazon Linux, Articles, CentOS, Databases, Linux, MySQL, PHP, Tutorials, Ubuntu

Install and Configure mod_rewrite for Apache on CentOS or Amazon EC2 Linux

Introduction Apache’s mod_rewrite can be used to manipulate URLs. It is compiled into the base Apache Web Server. This module provides the ability to manipulate URLs prior to determining the appropriate file or handing off to a script. It can help you, if you want to offer different URLs for…

Read More

January 25th, 2017 Amazon EC2, Amazon Linux, CentOS, mod_rewrite, PHP, Tutorials

Solved – Getting this SQL Error: GROUP BY incompatible with sql_mode=only_full_group_by

MySQL 5.7.5+ changed the way GROUP BY behaved in order to be SQL99 compliant (where in previous versions it was not). There is a good overview of the changes here. Unfortunately, this affects some core queries that Craft uses when fetching elements. The good news is that this has been…

Read More

January 19th, 2017 Amazon EC2, Databases, Linux, MySQL, PHP, SolveIt, Tutorials, Ubuntu

Solved – How can I downgrade from PHP 7 to PHP 5.6 on Ubuntu ?

follow the below instructions you face this situation, you may need to disable the proxy_fcgi apache module: sudo a2dismod proxy_fcgi proxy; sudo service apache2 restart 1. Re-Install PHP 5.6 What worked for me was this guide: Actually is not required to remove php7.0, you can install php5.6 together (…

Read More

January 18th, 2017 Amazon EC2, Linux, PHP, SolveIt, Tutorials, Ubuntu

The Art of Node – A short introduction to node.js

This document is intended for readers who know at least a little bit of a couple of things: a scripting language like JavaScript, Ruby, Python, Perl, etc. If you aren’t a programmer yet then it is probably easier to start by reading Easy Javascript. git and github. These are the…

Read More

December 31st, 2016 Angular Js, Articles, Javascript, jQuery, Node.js, Tutorials

Easy JavaScript – An introduction for new programmers

JavaScript is a programming language or, in other words, a means by which a computer is instructed to do things. Just the same as one controls humans with hisses and meows, one controls computers with statements written in a programming language. All web browsers understand JavaScript and you can take…

Read More

December 31st, 2016 Angular Js, Articles, Javascript, jQuery, Node.js, Tutorials

Solved – Magento 2 Admin URL not found and Loaded Front-end is all messy

Sometimes after installing Magento 2 in Ubuntu, linux or wamp server. Admin url shows 404 error after installing  and frontend design is all messy and css is not linked to it. Error visuals are shown below : To solve this first of all, apply proper permissions, enable apache rewrite_module and…

Read More

December 19th, 2016 Magento 2, PHP

The most useful and bestseller courses on Udemy you should consider

The Complete Web Developer Course 2.0 Learn By Doing – build 25 websites and real mobile apps using HTML, CSS, Javascript, PHP, Python, MySQL and a lot more. It’s most current, in-depth and exciting coding course—to date. Designed for you—no matter where you are in your coding journey—this next-generation web…

Read More

November 29th, 2016 Articles, Interview, Javascript, jQuery, Linux, MySQL, Node.js, PHP, SEO, Wordpress

How to use Database Transactions in Codeigniter ?

In order to use transactions in your database queries. You need to use Codeigniter’s transaction methods provided by db library of Codeigniter. The basic snippet is as follows: $this->db->trans_start(); # Starting Transaction //Do your Stuff Here i.e. Queries you wants to run on database $this->db->trans_complete(); # Completing transaction if($this->db->trans_status() ===…

Read More

August 4th, 2016 Codeigniter, Databases, Interview, PHP

Website PageSpeed: Leverage browser caching

What is browser caching? Every time a browser loads a webpage it has to download all the web files to properly display the page. This includes all the HTML, CSS, javascript and images. Some pages might only consist of a few files and be small in size – maybe a…

Read More

June 28th, 2016 PHP, SEO

Tips To Prevent WordPress Hack – A Guide to Secure WordPress Blog

Recently, some of my wordpress blogs were hacked.  I was so involved in other projects that I didn’t pay much attention to security, which is actually the most important thing here. I have removed some shitty plugins, transferred to another website hosting, tweaked codes and more…Today, I have decided to…

Read More

June 28th, 2016 PHP, Wordpress

Reset the MySQL Root Password to fix Access denied for user ‘root’@’localhost’

Stop the current MySQL server instance: sudo service mysql stop. Use dpkg to re-run the configuration process that MySQL goes through on first installation. You will again be asked to set a root password. sudo dpkg-reconfigure mysql-server-5.5 or whatever your mysql-server version. Then start MySQL: sudo service mysql start.

June 23rd, 2016 MySQL

Install and configure FFmpeg on Ubuntu, Debian, and Linux Mint and dependencies

This process will provide a install of the latest FFmpeg tools and libraries including several external encoding and decoding libraries (codecs) for supported releases of Ubuntu, Debian, and Linux Mint . Installation of the Dependencies sudo apt-get update sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev \ libsdl1.2-dev libtheora-dev…

Read More

June 1st, 2016 FFmpeg, Linux, PHP

Ejabberd and Xmpp Chat Server on AMAZON EC2. Connection Timeout issue

We have been working on Ejabberd for our Mobile application for over 6 months and have installed and managed our servers (most of which run on the Amazon EC2 setup) for a while now, but my last installation left me stumped. The thing was my installation would go through perfectly…

Read More

May 25th, 2016 Amazon EC2, Ejabberd

End to End guide on getting a Job in Tech industry

Resume Writing Spending time on resumes is one of the most undervalued aspects of job hunts. The multiplier on gains you get on the time spent refining your resume down to the last word is huge. Writing a resume is one time effort and then it would be used in…

Read More

April 18th, 2016 Interview

World’s Countries, States and Cities database

There are many Database providers which are charging us for providing the Databases of various types. One of them is very important and useful database is for world’s all countries,State and Cities. Every time when we plan to create a website then we stuck on one point that is how…

Read More

March 26th, 2016 Codeigniter, Databases, MySQL, PHP, SEO

SolveIt – Detect the Domain Name

You will be provided with a fragment of HTML code. Your task is to identify unique potential domain names from the links or URLs which are present in that code fragment. For example, if the link is present in the markup, you should detect the domain: If second-level…

Read More

February 27th, 2016 Javascript, PHP, SolveIt

SolveIt – K-subsequences ( Given a large list of n positive integers, count the number of k-subsequences.)

A k-subsequence is defined as follows: It is a subsequence of consecutive elements. The sum of its elements, s, is evenly divisible by k (i.e.: s % k = 0). Complete a function called kSub with two parameters: an integer, k, and an array of integers, nums, of size n.…

Read More

February 27th, 2016 Javascript, PHP, SolveIt

SolveIt – Find out Maximum Difference in an Array

The maximum difference for a pair of elements in some array a is defined as the largest difference between any a[i] and a[j] where i < j and a[i] < a[j]. Create a Function maxDifference to find the maximum difference from array a. Output Format Your maxDifference function should return…

Read More

February 27th, 2016 Javascript, PHP, SolveIt

PHP Tips and Tricks to make your code simple and faster

There are plenty of tips and tricks that you can use to make your code better, and a few of them are covered below. These tips may help you to make your PHP programming better in various ways. PHP Shorthand If/Else Using Ternary Operators (?:) An important part of programming is…

Read More

February 20th, 2016 PHP

What is Node.js ? How it Works ? for Beginners

Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js’ package ecosystem, npm, is the largest ecosystem of open source libraries in the world. Its an open source, cross platform runtime environment for developing server-side…

Read More

January 16th, 2016 Node.js

Simple and better ways to optimize MySQL query

MySQL  is very popular choice for database management systems. Which uses the SQL querying language to input and query data. Although SQL queries are simple commands that are very easy to learn and use, but not all queries and MySQL database functions operate with the same efficiency. This becomes very…

Read More

January 13th, 2016 MySQL, PHP

Translates a given mRNA string to a peptide-chain in PHP

We can make a simple tool to translate the mRNA (5′-3′) string to a peptide chain by using PHP. Following class is meant to translate a given mRNA string (from 5′ to 3′) to a peptide-chain (Chain of amino acids). <?php class BioTranscription { function BioTranscription() { $this->amino_acids = array(‘Asp’…

Read More

January 5th, 2016 Interview, PHP, Tutorials

Array vs Object when returning data

Prefer Using Objects when returning large amount of data When returning large data, it can be obvious to use Arrays. But Arrays make poor object-to-object data transfer mechanisms in object-oriented programming. Objects are main focus of  Object-oriented programming and it should be. This means that each array should be converted…

Read More

January 4th, 2016 Codeigniter, Javascript, jQuery, MySQL, PHP

SEO and the relevance determination of keywords / terms in the search engines

Lately I am working intensively with the topic search engine optimization and the algorithms of search engines. Clear there are perceived 1 million SEO blogs and SEO service provider, which would tell me all this for a lot of money. But several magazines and refinements enable me as a Web…

Read More

January 2nd, 2016 PHP, SEO

PHP external URL read with CURL and Proxy

The retrieve and read an external URL is easy with PHP. For this purpose, you need only the extension CURL, which is almost always enabled by default. Even if the server is behind a proxy that is not a problem. You can Agent strings and so transmit certain data even…

Read More

January 2nd, 2016 PHP