Import MySQL Table Using Command Line
Following command will help you to import MySQL table into the database.
mysql -u root -p'mysql' -D security_insights_report_scheduler < defense_customer.sql
How to use multiple versions of jQuery in an Application
Below scripts example to use multiple versions of jquery on same page.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>var jq142 = jQuery.noConflict();</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script>var jq144 = jQuery.noConflict();</script>
<script src="https://code.jquery.com/jquery-git.js?asdf"></script>
<script>var jq15 = jQuery.noConflict();</script>
<script>
var $jq142 = jq142("body");
var $jq144 = jq144("body");
var $jq15 = jq15("body");
</script>
Merge Videos On Mac Using QuickTime Player In 1 Minute
Check this below video, where I explained how to merge/combine two or more videos into single video using QuickTime Player on Mac.
How To Add/Embed Youtube Video to Linkedin Post/Article
Let's see how to add or embed youtube video's in your Linkedin post, article, profile or page.
Step 1: Get Youtube video Link
Go to your Youtube page and get the video link by clicking on the share button. It will open popup and now copy the video link.Step 2: Embed Youtube video In Linkedin Post, Article, Page or Profile:
Next go to your Linkedin profile, and click on Write An article. Next click on link and paste video link and press enter key.
How To Create and send HTML Email Template Using GMAIL
In this tutorial we are going to see how to create and send HTML Email template using Gmail.
Step 1: Open Email Template
Please open your HTML Email template in your favorite browser.
Step 2: Copy and Paste the HTML Template Opened in Gmail
Now use Command + A & Command + C key ( or Ctrl +A & Ctrl+C in windows) shortcut to select and copy opened Email template in Browser. Next login into Gmail and click on Compose, then paste the copied email template into composed email body.
Please open your HTML Email template in your favorite browser.
Step 2: Copy and Paste the HTML Template Opened in Gmail
Now use Command + A & Command + C key ( or Ctrl +A & Ctrl+C in windows) shortcut to select and copy opened Email template in Browser. Next login into Gmail and click on Compose, then paste the copied email template into composed email body.
Ajax Drag and Drop Image/File Upload Using DropzoneJS, PHP
In this tutorial we are going to see how to Ajax Drag and Drop Image/File Upload Using DropzoneJS, PHP & jQuery.
Step 1:
Create new project called "dropzone-tutorial" in your server root either htdocs/www folder. Next create index.html file in it. Now copy paste the following html snippet in your index.html file.
Step 2: File/Upload Using PHP
Now write logic to handle the file upload by DropzoneJS via ajax. Next Create ajax.php file, then copy and paste below PHP scripts in it to handle the file/image upload logic.
Also refer this tutorial on
Ajax Image Upload Using Dropzone.js with Normal Form Fields On Button Click Using PHP
Ajax Image Upload Using Dropzone.js with Normal Form Fields On Button Click Using PHP
Step 1:
Create new project called "dropzone-tutorial" in your server root either htdocs/www folder. Next create index.html file in it. Now copy paste the following html snippet in your index.html file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Ajax Image Upload Using Dropzone.js with Normal Form Fields On Button Click Using PHP</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.5.1/min/dropzone.min.css">
</head>
<body>
<div class="container mt-2">
<div class="row">
<div class="col-md-6 offset-md-3">
<h1 class="text-center">Image Upload</h1>
<form action="ajax.php" class="dropzone" id="my-awesome-dropzone"></form>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.5.1/min/dropzone.min.js"></script>
</body>
</html>
Step 2: File/Upload Using PHP
Now write logic to handle the file upload by DropzoneJS via ajax. Next Create ajax.php file, then copy and paste below PHP scripts in it to handle the file/image upload logic.
<?php
/**
* PHP Image uploader Script
*/
try {
$uploaddir = './uploader/';
//create directory if not exists
if (!file_exists($uploaddir)) {
mkdir($uploaddir, 0777, true);
}
//Check real file exists
if (!empty($_FILES['file']['name'])) {
$image = $_FILES['file'];
$data = [];
$name = $image['name'];
$uploadfile = $uploaddir . basename($name);
if (move_uploaded_file($image['tmp_name'], $uploadfile)) {
$data[$key]['success'] = true;
$data[$key]['src'] = $name;
} else {
$data[$key]['success'] = false;
$data[$key]['src'] = $name;
}
echo json_encode($data);exit;
}
} catch(Exception $e) {
throw new Exception($e->message);
}