user.js

 ‘use strict’; /** * Auth.js controller * * @description: A set of functions called “actions” for managing `Auth`. */ /* eslint-disable no-useless-escape */ const crypto = require(‘crypto’); const _ = require(‘lodash’); const utils = require(‘@strapi/utils’); const { getService } = require(‘../utils’); const { validateCallbackBody, validateRegisterBody, validateSendEmailConfirmationBody, } = require(‘./validation/auth’); const { sanitize } = utils; …

user.js Read More »

Permalink not found in Ubuntu wordpress

1. First open the apache config file sudo gedit /etc/apache2/apache2.conf 2. Change AllowOverride from value ‘none’ to ‘All’ as given below <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> 3. Activate mod_rewrite sudo a2enmod rewrite 4. Restart the apache server to put this changes to effect. sudo service apache2 restart

fontawesome in react

1. Install FontAwesome First npm i —save @fortawesome/fontawesome–svg–core npm install —save @fortawesome/free–solid–svg–icons npm install —save @fortawesome/react–fontawesome npm install —save @fortawesome/free–brands–svg–icons npm install —save @fortawesome/free–regular–svg–icons 2. Import to your component import { FontAwesomeIcon } from ‘@fortawesome/react-fontawesome’ import { faCoffee } from ‘@fortawesome/free-solid-svg-icons’ 3. Now you can use inside your html <FontAwesomeIcon icon={faCoffee} size=“5x”/> All other style …

fontawesome in react Read More »

react button click with argument

 <div className=“d-flex justify-content-between”> <div> <button type=“button” className=“btn btn-primary” onClick={() => handleBtnClick(‘-1’)}> &larr; Previous</button> </div> <div> <button type=“button” className=“btn btn-primary” onClick={() => handleBtnClick(‘+1’)}>Next &rarr;</button> </div> </div>

php directory listing

<?php // you can add to the array $ext_array = array(“.htm”, “.php”, “.asp”, “.js” ,“.css”); //list of extensions not required $dir1 = “.”; $filecount1 = 0; $d1 = dir($dir1); while ($f1 = $d1->read()) { $fext = substr($f1,strrpos($f1,“.”)); //gets the file extension if (in_array($fext, $ext_array)) { //check for file extension in list continue; }else{ if(($f1!= ‘.’) …

php directory listing Read More »