Easy way to Fix the CORS Policy Error

When you are working with API’s most of the time you are facing the Cros Policy issue due to different reason. Right? Every time you find the solution on google and stack overflow. But now you don’t need to go anywhere in this article you will find the proper solution. So without wasting much time in the introduction lets start the solution.

continue reading.

Setup cron job on wordpress

Do you want to set a cron job in your WordPress? if yes then is this is the right blog, I will show you the complete process of how you can create the cron job without any plugin or server details in just 10 minutes.  Schedules a hook which will be triggered by WordPress at the specified time interval. The action will trigger when someone visits your WordPress site if the scheduled time has passed.

continue reading.

Gatsby With WordPress

Gatsby Introduction Gatsby is an open-source, modern website framework that builds a static site generator built with ReactJS and powered by GraphQL. Gatsby allows anyone to create fast-growing engaging websites and applications. You can get data from the REST API and show the pages or posts on the websites, API calls,

continue reading.

Gatsby Introduction

Gatsby is an open-source, modern website framework that builds a static site generator built with ReactJS and powered by GraphQL. Gatsby allows anyone to create fast-growing engaging websites and applications. You can get data from the REST API and show the pages or posts on the websites, API calls, and flat files through GraphQL.Gatsby Introduction

In WordPress, we create dynamic websites, which need a server to run its PHP and Mysql. With the gatsbyJs, it is possible to create a static version of WordPress by generating a list of HTML pages for all the content on your site. It fetches all your Wordpress content with GraphQL.

continue reading.

Ionic Tutorial

Full Ionic installation and Introduction with Node and NPM, This tutorial will guide you, how you can run ionic without any NPM and Node errors. All the steps and commands are given in the well structure.
Ionic is a hybrid HTML5 mobile app framework. It’s used for both mobile and web apps. In this article, we will cover how to install ionic on your system either its window system or Linux system.

continue reading.

Disable Saturday and Sundays in Datepicker

If you want to disable the weekend day from date picker you have following ways 1) For jQueryUI DatePicker, it has an option to disable weekends day which you can use to explicitly not allow Weekends to be selected : $(“.datepicker”).datepicker({ beforeShowDay: $.datepicker.noWeekends }); 2) Hide Saturday Sunday /* Hide saturday/sunday in the jQueryUI DatePicker */ th.ui-datepicker-week-end, td.ui-datepicker-week-end { display: none; }

continue reading.

Ionic with wordpress

Full Ionic installation and Introduction with Node and NPM, This tutorial will guide you, how you can create a WordPress project in ionic without any NPM and Node errors. All the steps and commands are given in a good structure with images.
With this tutorial, you can create your WordPress project in ionic along with deploy on the free hosting.

continue reading.

Get time duration between 2 dates in php

We will show you how to get the time difference between to date in PHP.
For this, you need 2 dates From date and To dates. We will create a common function,  you just need to add the from date and to date in it then it will show you the result in an array. You can use this function anywhere in your code.

continue reading.

Show Google sheet data to JSON

This topic is related to show the google sheet data on your website. This is only an Excel spreadsheet. You can use this sheet as a database of your website. So you don’t need any database if you are using the google sheet. As many none technical person is used the Excel sheet for the store and save their business

continue reading.

Object Oriented Concepts (Oops)

Object Oriented Programming Oops is an important part of any programming language. Its play a big role in the programming language like c, c++, java, PHP so on. Object-Oriented Programming Oops is a programming langauge which is based on objects not only procedures and functions Object Oriented Concepts Class : Class is consist of methods and properties. A class is defined by using the class keyword, with the name of the class and a pair of curly braces {}. All its methods and properties goes inside the braces: Below is a class. In this simple class. $model is a property and hornBell() is a method. They are all prefixed with a visibility keyword (public).     <?php Class Car { public $model = “123456”; public function hornBell() { echo “Ding Dang Dong”; } } ?> Objects : Objects are also known as instance. You need to define a class one time and then create maltiple objects that belong to it. Objects of a class is created using the new keyword. To instantiate an object of a class, use the keyword new as below: <?php $car = new Car(); ?> Objects : Objects are also known as instance. You need to define a class onecontinue reading.

What is NuxtJS?

Nuxt is a javascript framework designed to give you a strong architecture following official Vue guidelines. Incrementally adaptable, it can be used to create from static landing pages to complex enterprise-ready web applications.
Nuxt js is a higher-level framework that builds based on Vue Js

continue reading.

Nuxt JS Tutorial

In this nuxt js tutorial we well guide you the nuxtjs following things. 1) Nuxt js installation app basic setup 2) API integration 3) Slick slider 4) Load More post functionality 5) Bootstrap menu integration 6) PWA with nuxt js 7) Deploy on netlify (On free hosting)

continue reading.

Infinite Scroll in Nuxt.js

For adding the Load More functionality in the nuxt js you need to install the Vue-infinite-loading here with npm npm install vue-infinite-loading -S Then you need to import this package in your post file like posts.vue file. Make sure you have installed the Axios import axios from ‘axios’ import Infinite

continue reading.

PHP Syntax

Basic PHP Syntax A PHP code starts with <?php and ends with ?>: <?php // PHP code write here ?> PHP files extension is ".php". A PHP file contains HTML tags, and some PHP code.  continue reading.

PHP Comments

Comments in PHP Comment code in PHP is a line that is not executed in the program. Its only purpose is to be read by someone who is looking at the code. Comments can be used to: Let others understand your code Remind yourself of what you did – Most programmers have experienced coming back to their own work a year or two later and having to re-figure out what they did. Comments can remind you of what you were thinking when you wrote the code PHP supports several ways of commenting: Live Demo <?php // This is a single-line comment # This is also a single-line comment /*This is a multiple-lines comment block*/ ?>continue reading.

PHP Variables

PHP Variables Variables are use to store the value Creating PHP Variables In PHP, a variable starts with the $ sign, followed by the name of the variable: Example Live Demo <?php $txt = "Hello world!"; $x = 5; $y = 10.5; ?> After the execution of the statements above, the variable $txt will hold the value Hello world!, the variable $x will hold the value 5, and the variable $y will hold the value 10.5. Note: When you assign a text value to a variable, put quotes around the value. Note: Unlike other programming languages, PHP has no command for declaring a variable. It is created the moment you first assign a value to it.continue reading.

PHP $ and $$ Variables

The $a is a variable with the $a  name that stores the value like string, int, float, etc. The $$aa is a reference variable that stores the value of the $variable inside it. Examples. <?php $a = “xyz”; $$b = 50; echo $a.” “; echo $$b.” “; echo $xyz; ?> In the above example, we have assigned a value to the variable a as xyz. The value of the reference variable $$b is assigned as 50. Now we have printed the values $a, $$b and $xyz.  

continue reading.

PHP echo and print

In PHP have two way to get the output:- echo print Echo: In ‘echo’ statement is a language construct and never behaves like a function, hence no parenthesis required. The end of the echo statement the semi-colon (‘;’) is needed. We can use ‘echo’ to output strings or variables. Below are some of the usage of echo statement in PHP: Display Text The following example shows how to output text with the echo command (notice that the text can contain HTML markup): Example Live Demo <?php echo "<h2>PHP is Fun!</h2>"; echo "Hello world!<br>"; echo "I'm about to learn PHP!<br>"; echo "This ", "string ", "was ", "made ", "with multiple parameters."; ?> Display Variables The following example shows how to output text and variables with the echo statement: Example Live Demo <?php $var1 = "Learn PHP"; $var2 = "W3Schools.com"; $x = 5; $y = 4; echo "<h2>" . $var1 . "</h2>"; echo "Study PHP at " . $var2 . "<br>"; echo $x + $y; ?> The PHP print Statement The print statement can be used with or without parentheses: print or print(). Display Text The following example shows how to output text with the print command (notice that the textcontinue reading.

PHP – Constants Types

PHP constants are name or identifier that can't be changed at the time of the execution of the script. we used PHP constants in 2 ways: Using define() function Using const keyword PHP constants follow the same PHP variable rules. For example, it can be started with a letter or underscore only. Conventionally, PHP constants should be defined in uppercase letters. PHP constant: define() Let's see the syntax of define() function in PHP. define(name, value, case-insensitive)  name: specifies the constant name value: specifies the constant value case-insensitive: Default value is false. <?php define("MESSAGE","Hello JavaTpoint PHP"); echo MESSAGE; ?> Output: Hello JavaTpoint PHP Const Keyword The const keyword defines constants at compile time. It is a language construct not a function. It is a bit faster than define(). It is always case sensitive. <?php const MESSAGE="Hello const by JavaTpoint PHP"; echo MESSAGE; ?> Output: Hello const by JavaTpoint PHPcontinue reading.

PHP Data Types

PHP data types are used to hold different types of data or values. PHP supports 8 primitive data types that can be categorized further in 3 types: Scalar Types Compound Types Special Types PHP Data Types: Scalar Types There are 4 scalar data types in PHP. boolean integer float string PHP Data Types: Compound Types There are 2 compound data types in PHP. array object PHP Data Types: Special Types There are 2 special data types in PHP. resource NULL

continue reading.

PHP Operators

PHP language has following types of operators. Arithmetic Operators Comparison Operators Logical/Relational Operators Assignment Operators Conditional/ternary Operators Arithmetic Operators Operator Description Example + Adds two operands A + B will give 30 – Subtracts second operand from the first A – B will give -10 * Multiply both operands A * B will give 200 / Divide numerator by de-numerator B / A will give 2 % Modulus Operator and the remainder of after an integer division B % A will give 0 ++ Increment operator, increases integer value by one A++ will give 11 — Decrement operator, decreases integer value by one A– will give 9 Comparison Operators Operator Description Example == Checks if the value of two operands are equal or not, if yes then condition becomes true. (A == B) is not true. != Checks if the value of two operands are equal or not, if values are not equal then the condition becomes true. (A != B) is true. > Checks if the value of the left operand is greater than the value of right operand, if yes then condition becomes true. (A > B) is not true. < Checks if the value of the left

continue reading.

PHP If Else

The if, elseif …else and switch statements are used to take decisions based on the different conditions. In PHP we have the following conditional statements: if() statement – executes some code if one condition is true if()…else statement – executes some code if a condition is true and another code if that condition is false if()…elseif()…else statement – executes different codes for more than two conditions switch statement – selects one of many blocks of code to be executed

continue reading.

PHP Switch Statement

The switch statement is used to make a decision from the number of choices is called a switch-case-default. The switch statement is the same as a series of IF statements on the same expression. Syntax <?php switch (n) { case condition1: code to be executed if n=condition1; break; case condition2: code to be executed if n=condition2; break; case condition3: code to be executed if n=condition3; break; … default: code to be executed if n is different from all labels; } ?> Example: In the following example, $color is equal to green, therefore the switch statement executes the third echo statement. <?php $color = “green”; switch ($color) { case “yellow”: echo “color is yellow!”; break; case “blue”: echo “color is blue!”; break; case “green”: echo “color is green!”; break; default: echo “color is neither yellow, blue, nor green!”; } ?>

continue reading.

PHP Loops

4 Types of Loops in PHP PHP for loop can be used to repeat the set of code for the specified number of times. while() — Loops through a block of code as long as the condition specified equal to true. do()…while() — The block of code executed once and then the condition is evaluated. If the condition is true the statement is repeated as long as the specified condition is true. for() — PHP for loop can be used through a set of codes for the specified number of times. foreach() — Loops through a block of code for each element in an area

continue reading.

PHP While Loop

Loops through a block of code as long as the condition specified equal to true. Syntax <?php while (when condition is true) { code to be executed; } //or while(condition): //code to be executed endwhile; ?> Examples The example below displays the numbers from 1 to 6: <?php $x=1; while($x

continue reading.

PHP Do While Loop

The block of code executed once and then the condition is evaluated. If the condition is true the statement is repeated as long as the specified condition is true. It executes the code at least one time always because the condition is checked after executing the code. Syntax <?php do { code to be executed; } while (condition is true); ?> Example This example sets the $x variable to 7, then it runs the loop, and then the condition is checked: <?php $x = 7; do { echo “The number is: $x”; $x++; } while ($x <= 5); ?>

continue reading.