Trending Stories For You
How to edit and update reactive form in Angular?

If you have a list of records and now you want a edit screen to edit and update the record then you can do it using following steps: 1- Import forms module in component import { FormGroup, FormBuilder, Validators, FormArray } from '@angular/forms'; 2- Then declare variables of form builder and form group public testform: FormGroup;   constructor(     public share: S... (more)

How to make a carousel vertical?

You can solve this problem by using a css technique and get the slides vertically rotate. I'm giving you an example and try to make you understand how you can get your problem resolved, below are some code snippets of thumbnails:                 /********* CSS ***********/ .owl-carousel{    transform: rotate(90deg);    width: 270px;     margi... (more)

How to get woocommerce orders by user id in wordpress?

You can get same solution by using woocommerce built in functions. But this is the way which is independent of the woocommerce versions. Just paste the below function and get all orders made by a particular user by just providing user id. If you check the sql query, you will realize how many tables are involved to fetch the orders and how the records are stored into database. So it is also usefu... (more)

How to install and uninstall skype on Linux Ubuntu 16.04?

First let us see how to install Skype on Linux Ubuntu 16.04. Please follow below steps to run command in terminal: 1- Go to Skype download https://www.skype.com/en/get-skype/  and download ".deb" file choosing from dropdown. 2- Run the command in home directory: ~$  sudo dpkg -i /home/atif/Downloads/skypeforlinux-64.deb   OR sudo dpkg -i ~/Downloads/skypeforlinux-64.deb  If you find an... (more)

How to integrate SOAP API using curl in PHP?

Yes. We can integrate a SOAP API using curl in php. I can make you understand by giving an example so that you can understand well. SOAP is its own protocol which uses XML to make requests and it is more secure that REST API. I will explain about SOAP in different section, let us see how we can make SOAP request using curl. Please check the below example to integrate any of the SOAP API and will... (more)

Npm ERR cb() never called?

Try

npm update chokidar

the older versions aint compatible with Node v14 and above

 

How to display HTML code on browser without executing it?

logo If you want to print PHP or HTML codes with script or any other tags to define/state your point, you can do using following way and it works properly and perfectly. Many colleagues get stuck while developing an application where such requirement comes they use this technique to get their work done. You need to wrap your code within <xmp> Your code lies here </xmp>. Refer to below e... (more)

Expected response code 250 but got code “535”, with message "535-5.7.8 Username and Password not accepted?

If you are getting the above issue while setting up google / gmail SMTP server. You need to follow below steps it will surely solve your problem. I had also faced this issue and following the below steps resolved my problem and mail getting started to come in my inbox. 1- You need to enable 2 step verification in your google account setting  URL: https://www.google.com/landing/2step/ 2... (more)

What is the difference between OS Disk and Data Disk in Azure?

Data disk: A data disk is a managed disk that's attached to a virtual machine to store application data, or other data you need to keep. Data disks are registered as SCSI drives and are labeled with a letter that you choose. Each data disk has a maximum capacity of 32,767 gibibytes (GiB). The size of the virtual machine determines how many data disks you can attach to it and the type of sto... (more)

How to integrate Textlocal API in javascript?

Textlocal is one of the very famous Indian SMS gateway provider which provides feature of bulk sms anybody can use in website to enhance feature of his business and customer interaction using sms. We can use these messages for transactional or promotional purposes like OTP and invitation of registration link of the website.  There are following features which Textlocal provides: - Easil... (more)

How to save Arabic in MySql database?

To save an Arabic text into your MySql database table, you first check the table column is set to "utf8" or not. If not, switch to table structure tab of phpmyadmin and click change under action column, here you will see a column "Collation" and choose "utf8_general_ci" from utf8 group and save. Now if you will save any Arabic string in this column it will save properly as it should be. Pleas... (more)

How to Copy file / folder from EC2 to S3 and vice-versa?

You can copy any file or folder from EC2 to S3 and from S3 to EC2. This can be done easily using AWS CLI command. To check whether you have installed AWS CLI or not use below command aws --version Output will be something like: aws-cli/2.1.29 Python/3.7.4 Linux/10 botocore/2.0.0 If not already installed use below command to install it. sudo apt-get install awscli  on Linux termi... (more)

How to activate API access in CS Cart?

Cs cart comes with some basic APIs already created like fetch products, get cart contents and some more. You can create your own APIs that can communicate with database get ready to be connected with your mobile application. To access/enable APIs you need to follow below steps: API access is activated/disabled on a per-user basis. To activate cs cart API access for a user: 1- Got to the... (more)

Can't load URL: The domain of this URL isn't included in app's domains?

If you are facing an error of domain URL is not included in App's domain as shown below image, you just need to put put "Valid OAuth redirect URIs" and try to put a secure URL which uses https protocol using SSL because Facebook has updated his policy and require an https URL for this purpose.   Make sure options are chosen as displayed in below image.   And now put the ... (more)

How to resize the droplet in digitalocean?

Now a days each and every company want their website hosted on cloud server. Digitalocean is one of the very famous cloud platef orm which provides facility to host websites on cloud virtual server.  Here, first let us know what is droplet in digitalocean?  Digitalocean droplet is an individual Linux based virtual machine/server. We can create as much virtual machines as we want. After cr... (more)

How to install Watchman in Ubuntu 16.04?

Follow below steps to install watchman in Ubuntu 16.04 1- Go to home directory: $ cd ~ 2- Clone using below command: $ git clone https://github.com/facebook/watchman.git 3- Get into watchman directory: $ cd watchman/ 4- Now use this command: $ git checkout v4.7.0 5- Run the commands: $ sudo apt-get install -y autoconf automake build-essential python-dev $ ./autogen.sh  $ ./c... (more)

Get MySql Query to show messages, username of a chat?

Suppose there are two tables `chat` and `users`. `chat` have four columns id, sender, receiver and message and `users` have two columns id and name. chat:   users:   SELECT u1.name as sender, u2.name as receiver, c.message FROM `chat` as c LEFT JOIN `users` as u1 ON c.sender = u1.id LEFT JOIN `users` as u2 ON c.receiver = u2.id   In the result you will get sende... (more)

How to disable previous dates in datepicker jquery calendar?

You can disable the previous dates in datepicker of jquery calendar following the below line of codes: $('#date').datepicker({             changeMonth: true,             duration: 'fast',             changeYear: true,             numberOfMonths: 1,             selectOtherMonths: true,             showOtherMonths: true... (more)

How to copy data from S3 to Azure blob using AzCopy?

AzCopy is a command-line utility that you can use to copy blobs or files to or from a storage account. This article helps you copy objects, directories, and buckets from Amazon Web Services (AWS) S3 to Azure Blob Storage by using AzCopy. You will need below authorizations to get this work done: 1- To authorize with the Azure Storage, use Azure Active Directory (AD) or a Shared Access Sig... (more)

How to start with Angular Js?

First of all I would like to introduce about Angularjs and Angular. First version of angularjs is called as Angularjs but later versions are called only Angular so this is the difference. To start with Angular, you must have node.js installed in your system that should be Node.js 10.9.0 or later version and you can get the latest version from nodejs.org You also need to have installed npm ... (more)

How to attach a Data Disk to a Linux VM in Azure?

1- Go to the Azure portal to find the VM. Search and select Virtual machines. Choose the VM from the list. In the Virtual machines page, under Settings, choose Disks. 2- On the Disks pane, under Data disks, select Create and attach a new disk. Enter a name for your managed disk. Review the default settings, and update the Storage type, Size (GiB), Encryption and Host ca... (more)

How much time does it take to be expert in Selenium?

Selenium is a popular open source web based test automation tool. This online course is a step by step guide to learn Selenium Concepts. You all must be wondering that why Selenium is in demand? Why Selenium professional enjoys the perks of a good salary? Moreover, it is important to know the reasons attached to learn Selenium. All these questions are genuine and can pop up in anybody’s mind.... (more)

Apache Invalid command 'ProxyPass'?

If you are using Linux Ubuntu operating system and have setup apache web server. In some case if you get the error mentioned in question description and want to solve it, for that you just need to install proxy module and restart apache and it will solve your problem. Below are the steps to solve this issue: sudo a2enmod proxy sudo a2enmod proxy_http sudo systemctl restart apache2 Hope... (more)

What is PHP?

PHP is one of the famous programming language, specially used for website development. Like other programming languages it also has all oops features and properties. Multiple inheritance is not possible in this language but there is alternative way introduced to achieve the same that is traits. Trait is a mechanism to get reusability of codes in php web application. Interfaces are traits which ca... (more)

How to create a simple addon in CS CART?

There are two main folders in cs cart app and design. All php files reside in app folder including xml which is used to create an addon in cs cart. Refer to below steps to create a simple addon in cs cart: First create a folder "first_addon" for your addon inside app folder and then create a file addon.xml file inside this folder and write some basic statements like addon name, version, priority ... (more)

Npx create-react-app not working on windows?

We have seen many people stuck in running the npx create-react-app on windows. We can resolve this issue by following below command step by step and start working on reactjs.    To fix this issue run below commands one by one: npm init npm install create-react-app npx create-react-app myapp   For global installation of react module use below commands: npm install -g crea... (more)

Javascript ES6 interview questions and answers?

A list of important questions and answers which are frequently asked in interviews.   1) What is ES6 or ECMAScript 2015? It was released in June 2015, which is also known as the sixth edition of the language. Earlier, it was named ES6 and later renamed to ECMAScript 2015. There are several new features are introduced like modules, iterators, class, arrow functions, for...of loop, promises, an... (more)

How to enable .htaccess on apache server?

.htaccess is a configuration file for the Apache web server. It’s an extremely powerful tool that can be used to modify the Apache configuration without editing the Apache configuration files directly. Let us see how to create this configuration and use it to restrict directory listings and IP addresses, and to handle redirects.   Enable .htaccess file:   sudo nano /etc/apache2/si... (more)

How to add a confirm password field in woocommerce checkout form?

Presumed, you have enabled the registration setting from admin panel and password field can be seen on checkout form. Now, you need an additional confirm password field in the form, you can use below hooks to add and it will work completely fine: add_filter( 'woocommerce_checkout_fields' , 'confirm_password_field', 10, 1 ); function confirm_password_field( $fields ) {     if ( g... (more)

How to start with Node Js?

Node.js is an open-source and cross-platform JavaScript runtime environment. It is a popular tool for almost any kind of project! A Node.js app runs in a single process, without creating a new thread for every request. Node.js provides a set of asynchronous I/O primitives in its standard library that prevent JavaScript code from blocking and generally, libraries in Node.js are written using non... (more)

How to install free SSL on Digital Ocean virtual server or Droplet?

  If you want to install free SSL on digital ocean droplet which already has been created and setup the Linux server by installing Apache. First go to terminal or putty and login into virtual server. Now, run below commands step by step: 1- Run update command to update all packages if any:  sudo apt-get update 2- sudo apt-get install apache2 3- sudo add-apt-repository ppa:ce... (more)

How to implement Google Login in Jenkins?

We have a very easy steps to implement Google Login in Jenkins. In Jenkins by default we have an admin user authentication enabled but we can establish the user authentication from the Global Security section. We have to create users for team members and it maintains all user in its own database. We can also configure Jenkins with Google login using OAuth. So, if you are leveraging G... (more)

Why people don't prefer to go in walkins?

In walkins companies welcome a bulk of candidates to attend and take interviews. In such cases interviewer don't give proper time to listen and understand answers given by candidate. Also, they don't give options more as they are in hurry to attend all candidates soon. So, they just fire questions one by one frequently and expect answers same way. Unfortunately, a candidate having knowled... (more)

How to automate taking snapshots in Azure?

Automate taking snapshot in azure manual and automated. Script that will require to put in runbook: $resourceGroupName = 'ABC'  $location = 'eastus'  $vmName = 'VM-Name' $datetime = Get-Date -Format "MM-dd-yyyy-HH-mm" $snapshotName = 'Snapshot-' + $datetime   # Ensures you do not inherit an AzContext in your run... (more)

What is selenium?

Selenium is an automation tool to automate the testing process to save time and expense. This tool can be learnt taking help of internet, studying the shared examples and watching videos from YouTube or any other resource. Now a days this is very demanded among companies and IT professionals. You can make your career in this domain and earn a handsome package after few years of experien... (more)

Why do I get "No root file system is defined" when I try to install Ubuntu in a partition?

If you are getting the above alert message while installing Ubuntu on a partition, you should follow bellow steps to proceed: 1- Choose the "Ext4 journaling file system" from dropdown. 2- Choose "/" mount point from dropdown. and click ok button. Now it will start installing Ubuntu on that partition. Please refer the below image for your better understanding.    ... (more)

Npm start and getting "Unable to connect" error in react?

If you have installed react, node npm and setup other required stuffs however getting error of "Unable to connect" in browser when you run the command "npm start".  Browser opens with the URL "http://localhost:3000/" and shows "Unable to connect" then you can resolve this problem by running below commands in terminal (I'm using Ubuntu 16.04): sudo sysctl -w fs.inotify.max_user_instances=102... (more)

What is computer?

As everybody know that computer is an electronic device. It is used used for multiple purposes like account management, graphical representation, programming websites or applications and many more. It is not limited anymore even these days very high performance computers have been introduced which are used in realtime like airoplane, health checkups to generate reports etc. It is comprised of so... (more)

How to transfer/migrate a repository to a user account or organization in Github?

Transferring a repository:     - You can transfer repositories to other users or organization accounts. When you transfer a repository to a new owner, they can immediately administer the repository's contents, issues, pull requests, releases, project boards, and settings. Prerequisites for repository transfers:          - When you transfer a repository that you own to anothe... (more)

How to create a rest api in wordpress?

Wordpress allow us to create a rest api that can be used in application like mobile android, iOS apps or any other javascript frameworks. There is action hook "rest_api_init" which is used to create such an API in wordpress. You can understand it more exactly by below example: // Get user details by id function get_user_details(WP_REST_Request $request ) {         $id... (more)

Pendrive paste option is not showing in mac?

There is a very easy to use pendrive in mac system. You would have faced this type of problem with a pendrive formated as NTFS. You just need to reformat your pendrive and choose the option as FAT32 and now it will be ready to use with mac as well as windows operating system.

 

How to do web scrapping using python?

Scrapping is a very interesting topic but serious as well. Because it is not a legal work until website owner allows you to scrap it so if you are doing it, will completely be your responsibility. I'm going to show you how you can scrap a website and store it in a csv file. You can save it into database as well its up to your choice. There are various ways to scrap but I have come with Bea... (more)

What is the difference between tree and graph data structure?

Tree and Graph both are data structure to store data different format. Due their structure one is called tree and the other one is called graph. We can understand their differences from below table: There are many other differences but these are some of them.... (more)

Hot, cool, and archive access tiers for blob storage data in azure?

Data stored in the cloud grows at an exponential pace. To manage costs for your expanding storage needs, it can be helpful to organize your data based on how frequently it will be accessed and how long it will be retained. Azure storage offers different access tiers so that you can store your blob data in the most cost-effective manner based on how it's being used. Azure Storage access tiers i... (more)

Why unitegallery images are zoomed bydefault?


Many people would have faced the zoom issue while using the unitgallery. Images get zoomed by default and image quality gets poor. You can solve this problem by setting up the below options and everything will be alright. 

slider_zoom_max_ratio: 2, 
slider_scale_mode: "fit", 
slider_zoom_step: 1.2 

How to add defer to Enqueued JavaScript Files in WordPress?

To apply defer on javascripts included by wordpress plugins, custom included javascripts using enqueue hook of wordpress. Suppose you have included below files as an example and how to apply defer on these files: function custom_load_these_here_scripts() {     wp_enqueue_script('cycle', get_template_directory_uri() . '/js/cycle.js');     wp_enqueue_script('magn... (more)

How to display PHP code in browser without executing it?

We as a developer while working on projects whether it is website or any application write  code to implement logic and execute it. But here I will you how to display complete PHP  code in browser without executing it. You can do this following below code with an example: Here main key is to pass php code into htmlspecialchars() function. $php_cod... (more)

How to load CSS files asynchronously in WordPress?

A website developed in wordpress has a problem of speed. To speed up the website speed we use some cache plugin, optimize the js, css and image files. Optimizing these stuffs gives a good result and we see some improvement in speed no doubt. Here what i'm going to share is about loading js and css files asynchronously with the help of some scripts. It will give you a huge improvements in websi... (more)

How to calculate number of days between two dates in Python?

You can use datetime module to get number of days between two dates, refer to below example to get the result:

from datetime import date

start = date(2019, 5, 1)  //Put start date
end   = date(2019, 5, 10) // Put end date

number_of_days = end - start
print(number_of_days.days)

How to access raw password and username before login in Wordpress?

We can get and access raw password and username using wordpress action hook "wp_authenticate". You can get a better understanding referring the below example: function access_credential($username, $password ) {   if (!empty($username) && !empty($password)) {     // You can code here as per requirement   } } add_action('wp_authenticate', 'access_credential', 30, 2);... (more)