Posts

Showing posts from August, 2016

PhpStrom INSTALLATION ON UBUNTU

->Install Oracle Java 8 on Ubuntu 15.10/16.04 sudo apt-get remove openjdk* sudo add-apt-repository ppa:webupd8team/java  sudo apt-get update sudo apt-get install java-common oracle-java8-installer sudo apt-get install oracle-java8-set-default source /etc/profile ->Install phpstorm on Ubuntu 15.10/16.04 wget https://download-cf.jetbrains.com/webide/PhpStorm-2016.1.2.tar.gz tar xvf PhpStorm-2016.1.2.tar.gz sudo mv PhpStorm-145.1616.3/ /opt/phpstorm/ sudo ln -s /opt/phpstorm/bin/phpstorm.sh /usr/local/bin/phpstorm phpstorm https://www.linuxbabe.com/desktop-linux/install-phpstorm-ubuntu-15-10

SOME IMPORTANT UBUNTU INSTALLATION

TRASH COMMAND INSTALLATION ->sudo apt install trash-cli ANY LINUX SUPPORTED SOFTWARE INSTALLATION ->sudo dpkg -i software-name-details CAT -> cat>text {Enter} -> echo "Hasib Kamal Chowdhury" {Enter} -> ctrl+d {Enter} -> chmod +x text -> sh text

LARAVEL DOWNLOAD BY COMPOSER

DOWNLOAD THE CURRENT PROJECT -> composer create-project laravel/laravel project-name DOWNLOAD THE PROJECT VERSION WISE -> composer create-project --prefer-dist laravel/laravel project-name 5.1

SNIPPING TOOL FOR UBUNTU

> sudo apt-get install shutter

INSTALL COMPOSER ON UBUNTU

Procedures are Given Below : sudo updates-alternatives --install "/usr/bin/php" "php" "/opt/lampp/bin/php" 1 php -v su sudo apt-get install curl curl -V sudo apt-get install git git curl -sS https://getcomposer.org/installer | php php composer.phar sudo mv composer.phar /usr/local/bin/composer sudo apt-get install composer

TO SEE PHP VERSION ON UBUNTU

1st step : sudo update-alternatives --install "/usr/bin/php" "php" "/opt/lampp/bin/php" 1 2nd step : Enter User Password 3rd step : php -v

LAMPP SERVER (START && STOP) ON UBUNTU

Start Procedure sudo /opt/lampp/lampp start Stop Procedure sudo /opt/lampp/lampp stop

apt-get command on ubuntu

APT is stands for ' Advanced Packaging Tool '. The apt-get command is a powerful command-line tool, which works with Ubuntu's Advanced Packaging Tool (APT) performing such functions as installation of new software packages, upgrade of existing software packages, updating of the package list index, and even upgrading the entire Ubuntu system. Some examples of popular uses for the apt-get utility: Install a Package : sudo apt-get install nmap Remove a Package : sudo apt-get remove nmap Update the Package Index : sudo apt-get update Upgrade Packages : sudo apt-get upgrade  Further Information : apt-get help

INSTALL SUBLIME TEXT-3 ON UBUNTU

Sublime Text-3 Installation Procedural step by step on ubuntu Run terminal as root user sudo add-apt-repository ppa:webupd8team/sublime-text-3 Enter sudo apt-get update sudo apt-get install sublime-text-installer 

HOW TO CHECK LINUX SYSTEM EITHER 32-BIT OR 64-BIT

THROUGH TERMINAL uname -a uname -m arch file/sbin/init THROUGH GUI UBUNTU ON TOP RIGHT -> SETTINGS -> SYSTEM SETTINGS -> Details -> Overview

CREATE ROOT USER IN UBUNTU

1st step : Open Terminal 2nd step : sudo passwd root 3rd step : give current password 4th step : set new password for root user 5th step : confirm new password for root user 6th step : su 7th step : give root user password Done :) You are now using terminal as root user

LARAVEL SETUP

1st Step : Download Composer From : https://getcomposer.org/ 2ns Step : Install Composer and locate this given below path at the installation time ->xampp/php/php.exe 3rd Step : Git Bash in the htdocs directory 4th Step : composer create-project laravel/laravel project_folder 5th Step : After completing download laravel files cd project_folder 6th Step : Now Run the project with this given bellow command php artisan serve

DATA VIEW FROM MYSQL DATABASE THROUGH PDO PROCESS

//LOGICAL TEMPLATE (CLASS || student.php) class Student{ protected $db_connect; public function __construct(){ $host_name = 'localhost'; $user_name = 'root'; $password = ''; $db_name = 'db_test'; try{ $this->db_connect = new PDO("mysql:host={$host_name}; dbname={$db_name}",$user_name,$password); }catch(PDOException $e){ echo $e->getMessage(); } } public function select_all_student_info(){ try{ $student_info = $this->db_connect->prepare("SELECT * FROM tbl_student"); $student_info->execute(); return $student_info; }catch(PDOException $e){ echo $e->getMessage(); } } } //VIEW PAGE <?php require_once('student.php'); $obj_student = new Student(); $student_info = $obj_student->select_all_student_info(); ?>   <fieldset>   <legend>View Student Form</legend>   <table border="1" cellpad

DATA INSERT INTO MYSQL DATABASE THROUGH PDO PROCESS

<?php class Student{ protected $db_connect; public function __construct(){ $host_name = 'localhost'; $user_name = 'root'; $password = ''; $db_name = 'db_test'; try{ $this->db_connect = new PDO("mysql:host={$host_name}; dbname={$db_name}",$user_name,$password); }catch(PDOException $e){ echo $e->getMessage(); } } public function save_student_info($data){ $student_info = $this->db_connect->prepare("INSERT INTO tbl_student(student_name,phone_number,email_address) VALUES(:a,:b,:c)"); $student_info->bindParam(':a',$data['student_name']); $student_info->bindParam(':b',$data['phone_number']); $student_info->bindParam(':c',$data['email_address']); $student_info->execute(); } }

Basic AJAX Codes

<script type="text/javascript">           if (window.XMLHttpRequest) {                 // code for IE7+, Firefox, Chrome, Opera, Safari                 xmlhttp = new XMLHttpRequest();             } else {                 // code for IE6, IE5                 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");                          }                       function makerequest(given_text,objID){ //alert(given_text);         //var obj = document.getElementById(objID);         serverPage='text.php?text='+given_text; xmlhttp.open("GET", serverPage); xmlhttp.onreadystatechange = function(){ //alert(xmlhttp.readyState); //alert(xmlhttp.status); if (xmlhttp.readyState == 4 && xmlhttp.status == 200){ //alert(xmlhttp.responseText);                         document.getElementById(objID).innerHTML = xmlhttp.responseText; //document.getElementById(objcw).innerHTML = xmlhttp.responseText; } } xmlhttp.send(n

Best Example of Inheritance

<?php class DB_Connection{ private $host = 'localhost'; private $user = 'root'; private $pass = ''; private $db_name = 'test'; protected $db_connect; public function __construct(){ $this->db_connect = mysqli_connect($this->host,$this->user,$this->pass,$this->db_name); if(!$this->db_connect){ die('Connection Problem : '.mysqli_error($this->db_connect)); } } } class Student extends DB_Connection{ public function __construct(){ parent::__construct(); } } ?>