Single and Multiple Files Upload Example in Django REST API
Most of the applications require at least one file needs to be upload for a reason, such as, for uploading bulk data or processing file data for business requirement. This example will show you how to upload single or multiple files using Django REST framework. REST is an acronym that stands for Representation State Transfer which works on http/https protocol….
How to avoid jQuery namespace collisions using noConflict() function
Here I am going to tell you how you can avoid namespace collision on the DOM (Document Object Model) page. You can load jQuery either via CDN (Content Delivery Network) link or by downloading the jQuery from the website and put it into your application and include in your web page. So whatever method you follow to use the jQuery…
What are jQuery selectors and how to cache jQuery selectors to improve performance of your web page
Every time you use a selector the elements in Document Object Model (DOM) are searched to match your query or selector. Doing this kind of works too often or repeatedly will decrease the performance of your web page. If you refer to a specific selector too often or repeatedly you should consider to add it to a cache by assigning…
Single or Multiple Files Upload Example in Django Framework
In your application or project there is always a requirement for uploading a file data. This file data could be in a specific format depending on your requirement. Here I am going to explain you how you can upload single or multiple files in your python based Django framework. I am assuming you have a basic knowledge on Python and…
MongoDB Aggregation Operations
You are not going to always return records from MongoDB but sometimes you need to perform some computations such as sum, count, average, etc. Here you need the aggregation operations which are used to process data that return the computed results. Therefore aggregation actually groups data from multiple documents and performs a variety of operations on the grouped data to…
MongoDB find() method with Projection
You may not want to fetch a whole bunch of data from the document which is stored in a collection in your MongoDB database. You can restrict the number of records or data using different conditions with the help of WHERE, AND, OR and IN operators, but what if you want to restrict the data you want in your particular…
How to query documents – WHERE, AND, OR, IN conditions in MongoDB
MongoDB is one of the most popular NoSQL database where data are stored in the form of documents. You can also create tables in traditional way to put your structured data but the main purpose is to store unstructured data in the form of object which may vary based on a particular requirement. Now when you select data from collection,…
How to make output of MongoDB’s find() readable in shell
MongoDB is one of the most popular NoSQL database where your data are stored in a collection. To quickly access your data from MongoDB you can execute commands on MongoDB shell and your results appear based on the given criteria. One of the commands is find() function and using this command you can easily retrieve data from MongoDB collection. When…
How To Pretty Print JSON In Java
Table of Contents Introduction Why do you need to pretty print JSON data? Prerequisites pretty Print JSON Using Jackson Library Using Google GSON Library Using JSON Library Source Code Introduction Here I am going to show you how to pretty print JSON in Java. I am going to use here JSON, Jackson and Google Gson libraries to prettify the JSON…
How To Load Local JSON File In Angular Application
JSON File JSON, i.e., JavaScript Object Notation is a lightweight format for interchanging data. It is based on a subset of JavaScript language. For example, this JSON data format is used in the webservice response. In old days webservices used XML for the primary data format but nowadays JSON, being lightweight, is becoming the preferred data format for exchanging data…