This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SQL: | |
===== | |
They are relational database managment systems. | |
SQL data base uses structured query language for defining and managing data. | |
These have fixed, static or predefined schema. | |
Best suited for complex queries. | |
Vertically scalable (You can increase the load on a server by increasing the RAM, CPU, SSD). | |
Follow ACID property. | |
SQL data bases are tabale structure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Arrow Function | |
=============== | |
In arrow function we don't need to use the key word: function | |
if the function contain only contain one single line, then there is no need for using the opening body bracket({}) and return key word. | |
if the function has only one argument, there is no need of argument paranthesis. | |
eg: | |
const sum = (a, b)=> { | |
return a+b; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Node.js is javacsript based environment, whcih can use to create webserver and networked applivcation. | |
You can also use it to perform helpful tasks on your computer such as concatenating and minifying JavaScript files and | |
compiling Sass files into CSS. | |
NPM is a “package manager” that makes installing Node “packages” fast and easy. A package, also called a module, is just a code library that extends Node by adding useful features. For example, the “request” module simplifies the process of making HTTP requests so you can easily get web resources from other sites. | |
NPM is installed when you install Node.js®. | |
https://treehouse.github.io/installation-guides/mac/node-mac.html | |
https://treehouse.github.io/installation-guides/mac/homebrew |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To enqueue admin scripts. | |
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles_and_scripts' ); | |
To add admin menu | |
$this->loader->add_action( 'admin_menu', $plugin_admin, 'admin_menu' ); | |
public function admin_menu() { | |
$capability = 'manage_options'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for node module install. | |
npm install | |
package.json: | |
{ | |
"name": "test-plugin", | |
"description": "TODO", | |
"version": "2.2.0", | |
"main": "Gruntfile.js", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To check a javascript object is empty, then you can use below code. | |
In Newer browser empty checking: | |
================================ | |
const empty = {}; | |
Object.keys(empty).length === 0 && empty.constructor === Object; | |
First method: | |
function badEmptyCheck(value) { | |
return Object.keys(value).length === 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These are three type of javascript variabe declaration. | |
var | |
==== | |
Function scoped or globally Scoped. | |
Reassignable and Redeclarable | |
Not subject to temporal dead zone. | |
var language = "JavaScript"; | |
function foo() { | |
var language = "Python"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
While creating large applications, then there may be chances of collision between class names, function names. | |
So to avoid these problems PHP "Namespaces" provide a way in which to group related classes, interfaces, functions and constants. | |
In the PHP world, namespaces are intended to take care of two issues | |
that creators of libraries and applications experience when making re-usable code components, Those are: | |
1.Name impact between code you create, and internal PHP classes/functions/constants or third-party classes/functions/constants. | |
2.Ability to abbreviate Extra_Long_Names for improving the readability of source code. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WP-Cron Jobs | |
============= | |
Wp-Cron handles scheduling time-based tasks in WordPress. Several WordPress core features, such as checking for updates and publishing scheduled post, utilize WP-Cron. | |
WP-Cron works by checking, on every page load, a list of scheduled tasks to see what needs to be run. Any tasks due to run will be called during that page load. | |
Scheduling errors could occur if you schedule a task for 2:00PM and no page loads occur until 5:00PM. | |
With WP-Cron, all scheduled tasks are put into a queue and will run at the next opportunity (meaning the next page load). So while you can’t be 100% sure when your task will run, you can be 100% sure that it will run eventually. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chrome Advanced Development tools | |
================================== | |
Chrome Command Menu | |
------------------- | |
The command menu in chrome help many powerfull feature in the chrome page. | |
Command + shift + P provide the command menu. where we can use many command operations. | |
1) Powerfull screenshots | |
Screenshot Capture full size screenshot : Full size screenshot of the complete page | |
Screenshot Capture node screenshot : Current node screenshot. You can select the node from the Elements tab |