Unitrai

Unitrai Blog · Page 4

Insights & Guides

Development tutorials, case studies, and technology insights from the Unitrai engineering team.

U
5 June 2020

Removes duplicate values from an array in PHP

array_unique function is helpful for this operation. USAGE: $arr = array("o" => "one", "two", "c" => "one", "one", "three"); print_r($arr); // array with duplicate values; $arr_unique = array_unique($arr); // do the magic print_r($result); // array with unique values;

U
5 June 2020

Error Establishing a Database Connection in WordPress

"To Fix ""Error Establishing a Database Connection in WordPress"": Open wp-config.php file and double check the value of below constants. define('DB_NAME', 'your_database_name'); define('DB_USER', 'your_database_username'); define('DB_PASSWORD', 'your_database_password'); define('DB_HOST', 'loca

U
5 June 2020

How to detect Key Press combinations like ALT+1 in jquery

Try "keypress" evenHandler in jQuery: Notice Below Code, Although this code is correct but will not work. The reason behind is when we press CTRL or ALT key on a web page, it executes browser's shortcut first. For example ( CTRL + 1 ) will switch to first tab. jQuery(document).bind('keypress', func

U
5 June 2020

How to check Laravel version?

How to check laravel version: Step1: Find Application.php file in your app and open it. \vendor\laravel\framework\src\Illuminate\Foundation\Application.php Step2: Scroll down to line which tells laravel version. const VERSION = '5.4.36';

U
5 June 2020

How to set up multiple virtual hosts on XAMPP windows

It requires two main steps: Add Virtual Host Entries to vhosts Configuration file. Assign IP to your "Virtual Host", editing windows hosts file. STEP 1: Open Config file: drive:\\(xampp-installation-path)\apache\conf\extra\httpd-vhosts.conf in my case it is located here: C:\Server\xampp56\apac

U
5 June 2020

Gig Home Page Load Errors - Codeigniter

ERROR - 2017-02-18 14:17:00 --> Could not find the specified $config['composer_autoload'] path: C:\Server\xampp56\htdocs\mistersuraj\gig\application\/vendor/autoload.php ERROR - 2017-02-18 14:17:00 --> Severity: Warning --> Division by zero C:\Server\xampp56\htdocs\mistersuraj\gig\applicati

U
5 June 2020

Bootstrap Added to Gig Project

<!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <!-- Optional theme --> <li