Whether in the office or working from home, organization in your work life can get tricky. With busy days, long to-do lists, and endless distractions, it can become overwhelming to manage tasks and prioritize your day. Even if you follow tips on how to stay productive, using additional tools can be beneficial, too. Although sticky […]
How To Parse Json String in Javascript
It’s very often you encounter this question, that how to parse Json string in Javascript. Your best bet for this task is the a built in JSON parse for strings in Javascript.
Introduction to Magic Gradients in Xamarin.Forms
Xamarin.Forms is a fully-featured mobile app development platform that has support for astonishing features. For instance, you could possibly create an animation by using a trigger, applying a material design rule, implementing unique effects, etc. Here, in this blog, we will learn about a NuGet package called Magic Gradient which helps in adding unique effects […]
Top 20 Alternatives to Notepad++
Notepad++ becomes a very simple and powerful tool for IT professionals. If you are interested to know, the top 20 alternatives for Notepad++, this article is for you.
How To Clone a Specific Git Branch?
Today’s quick tutorial provides the command to clone a specific Git branch. Try to use the below command from the development environment. git clone –single-branch –branch <branch-name> <remote-repo-name> This option will download only the files that are in the selected branch.
How to add Index to table column using Magento 2?
It will be advisable to add an index to a database field for better performance and quick selection of records from the database table. Use the below snippet to add an index to database field in Magento 2.
How to Force Download File from Remote Server in PHP
Usually we download the files hosted in same server using php, but in this tutorial we are showing how to download a file hosted in remote server.
How To Redirect To Previous Page in Magento 2?
Today’s tutorial we are showing how to redirect to previous page from a custom action in magento 2. This will be useful when you have an error message to show after a form submission. namespace Vendor\Module\Controller\Adminhtml\Index; class Fetch extends \Magento\Backend\App\Action { public function execute() { // TODO: Implement execute() method. $this->_redirect($this->_redirect->getRefererUrl()); } }
How to Apply the Magento 2 patch?
Change your Magento store to Developer mode php bin/magento deploy:mode:set developer Download the security patch git apply MAGENTO-9090-2020-010-1-10-04-03.patch After the above run below command to apply the patch php bin/magento setup:upgrade
How To Programatically Cancel The Order Using Order Id in Magento 2 ?
It’s very common that we need a feature to cancel an order Programatically in Magento 2. Instead of factory method, we use Magento/Sales/Api/OrderManagementInterface as it’s advisable to use service contracts in Magento 2. Below snippet will help you cancel an order programatically in Magento 2. protected $orderManagement; public function __construct( … \Magento\Sales\Api\OrderManagementInterface $orderManagement, …. ) […]
Top 11 Docker Commands You Should Know
Today’s world, Docker plays a major role in developing an application, but it can do much more. Today’s article I will discuss some of the most used Docker commands out there. To start an app or build use the following docker-compose up Showing current working containers docker ps -a Access the running container docker exec […]
Docker Error : Bind for 0.0.0.0:80 failed: port is already allocated
While installing Docker we were getting the below error ERROR: for <container_name> Cannot start service web: driver failed programming external connectivity on endpoint <container_name> (1776d4f52f64164e1f7a5b12dd6fe2a1e7570d342a3ce46b6349d029c815621b): Bind for 0.0.0.0:80 failed: port is already allocated ERROR: for web Cannot start service web: driver failed programming external connectivity on endpoint <container_name> (1776d4f52f64164e1f7a5b12dd6fe2a1e7570d342a3ce46b6349d029c815621b): Bind for 0.0.0.0:80 failed: port is […]
Stop or remove all Docker containers
The below code can be used to stop/remove all the running docker containers in your system. docker stop $(docker ps -a -q) docker rm $(docker ps -a -q)
How To Load Stock Item Using product_id In Magento 2?
In some cases you have to load stock item using product_id in Magento2. Today’s snippet we are showing how to do that. For illustration purpose we use a model example. namespace Vendor\Module\Model; use Magento\CatalogInventory\Model\Stock\StockItemRepository; class HelloWorld extends extends \Magento\Framework\Model\AbstractModel { protected $stockItemRepository; public function __construct( StockItemRepository $stockItemRepository ) { $this->stockItemRepository = $stockItemRepository; } public function […]
How to get GMT date time in Magento 2?
Magento 2 usually saves the time in GMT in database, but display on admin or frontend will be based on the selected timezone. Use the below code to get the time with GMT timezone from Magento 2 code. Magento comes with DateTime php class, Magento\Framework\Stdlib\DateTime\DateTime is used for Forms GMT date. <?php public function __construct( […]
How to create a Controller in Magento 2?
Controller is one of the most important thing in MVC Frameworks in general, so the same in Magento 2 as well. It’s very duty is to receive the request, process and render to user. In Magento 1 there was one controller and it accommodates all the CRUD routes or other relevant routes. But in Magento […]
How To Get The Collection Of Records From A Custom Module In Magento 2?
If you are working on a custom Magento 2 module, and wondering how to get the collection of records from your custom database table, this article is for you. This is very common that your Magento 2 website needs more database tables than what Magento shipped with. So in a listing page such as blog […]
Removing whitespace characters in PHP
Today’s guide we are talking about the white spaces in strings and how to remove white spaces in PHP. The normal way to remove white space is using str_replace. Remove whitespaces using str_replace str_replace is very simple and powerful for removing whitespaces. Use the below script to see this in action. <?php $str = “he […]
Multiple Files Upload using AJAX(jQuery) in Codeigniter
Today’s tutorial we are showing how to upload multiple files using ajax in Codeigniter.
7+ Inventory & Stock Management script in PHP
Inventory management is an important task for every business out there. This includes adding stock, creating invoices, create purchase orders, managing customers, managing vendors, point of sale and reports etc. So today we lists out several Inventory management systems built in PHP and MySQL, and they are ready to use. You can manage and control […]
Export HTML to MS Word Document using JavaScript
Today’s tutorial we are showing how to convert html to word format using simple Javascript. This is the answer for the question, if someone is asking how to convert the html to doc format using Javascript. There is no need of server side code to convert html to word. HTML source to convert The below […]
Cannot login with SSH USERNAME@IPADDRESS, receive “Permission denied (publickey)” but root user working
I was getting this error when logging in with a user created from root. But root user is logged in perfectly, but the user cerated not. Solution Tried this in DigitalOcean droplet($5) successfully. adduser user (adds a new user) usermod -a -G sudo user (Adds user to sudo group) mkdir /home/user/.ssh (create .ssh directory in […]
International Telephone Input JavaScript Plugin
International Telephone Input is a JavaScript plugin for entering and validating international telephone numbers.
Disable versions in Magento 2
By default Magento 2 static urls have a version string attached to it. For example, if you take the view source of the page, you will see urls contains the following string -version1490119662.
Fastify – Fast and Low Overhead Web Framework for Node.js
Fast and low overhead web framework, for Node.js, which provides better developer experience with less overheard and powerful plugin architecture. Main features. Highly performant: Fastify is one of the fastest web frameworks in town, depending on the code complexity we can serve up to 30K requests per second. Extendible: It’s hooks, plugins and decorators makes […]
How to disable or allow guest checkout in Magento 2?
Default Magento 2 setup allows users to checkout as guest in your storefront. But one must say gathering max customer information will be advantageous for both customer and shop owner. Today’s tutorial we are showing how to disable or allow guest checkout in Magento 2. Step 1. Log in to Magento 2 admin panel. Step […]
Top Most Android App Development Frameworks
The Google Play Store has almost three million apps for download this year. In the past couple of years, the mobile apps development trend has accelerated as more and more people have realized that apps are great for connecting with customers.
How To Get Selected Radio Button Value using Jquery?
We use forms almost everywhere in computer applications, so is radio buttons. Today’s tutorial we are talking about a simple solution for getting the selected value from a radio button in jQuery. There are different ways you can get selected radio button’s value in jQuery.
How To Check If An Array Is Empty or Null or Undefined in JavaScript?
If you are a web developer( now almost everywhere), you might have encountered this question already , how to check if array is empty or null or undefined in JavaScript?. Like other programming languages, JavaScript also have methods to check this.
Trix – An Open Source WYSIWYG Editor for Websites
A rich text editor or WYSIWYG editor is very useful when writing descriptive content that includes HTML elements, images and strong formatting. The normal text area in HTML has no capability to format HTML tags, so we need to use tools such as CK Editor, TINYMCE, and there are more.