Skip to content

Instantly share code, notes, and snippets.

View sandeepjain2015's full-sized avatar

sandeep jain sandeepjain2015

View GitHub Profile
<?php
/**
* Previous attempts
*
* @package Tutor\Templates
* @subpackage Single\Quiz
* @author Themeum <support@themeum.com>
* @link https://themeum.com
* @since 1.6.4
*/
CREATE TABLE members (
member_id INT AUTO_INCREMENT,
name VARCHAR(100),
PRIMARY KEY (member_id)
);
CREATE TABLE committees (
committee_id INT AUTO_INCREMENT,
name VARCHAR(100),
PRIMARY KEY (committee_id)
@sandeepjain2015
sandeepjain2015 / App.js
Created September 19, 2023 09:00
useCallback in react
import React, { useState, useCallback } from "react";
import List from "./list";
function App() {
const [number, setNumber] = useState(0);
const [dark, setDark] = useState(0);
// const getItems = ()=>{
// return [number,number+1,number+2]
// }
@sandeepjain2015
sandeepjain2015 / class-ewpapi-all-products-by-sorting-rest-controller.php
Created December 14, 2021 12:50
WordPress rest api for get all products by sorting like latest, price, rating or popularity
<?php
/**
* All Products By Sorting.
*
* @package :ewpapi
*/
/**
*
* Add an endpoint to show all products by sorting.
@sandeepjain2015
sandeepjain2015 / wordpress-developer-code-review-php.php
Created May 10, 2020 12:34
We can solve loading issue by cache
<?php
/**
* This code retrieves course data from an external API and displays it in the user's
* My Account area. A merchant has noticed that there's a delay when loading the page.
*
* == By using cache ==
*/
public function add_my_courses_section() {
global $current_user;