Django | Overriding the save method The save method is inherited from models.Model class. It is used to override the save method before storing the data in the database. This is used when there is …

Last updated 3 years, 3 months ago | 1585 views

Tags:- Django

Python | Insert and Get data from an index in Elasticsearch To do so we need to import the Elasticsearch package and create an instance of that by providing the host and port. >>> from elasticsearch …

Last updated 3 years, 3 months ago | 6325 views

Tags:- Python Elasticsearch

Python | Program to count the number of words in a string split() and len() method is used to get the number of words in a string. The split() method split a string into a list …

Last updated 3 years, 3 months ago | 968 views

Tags:- Python

CSS | Gradient Text There are three different CSS properties required to add a gradient overlay to a text. background-image: <gradient> background-clip: text text-fill-color: transparent background-image: <gradient> <gradient> will replace with any gradient style which …

Last updated 3 years, 3 months ago | 1090 views

Tags:- CSS

Python | Ternary Operator python uses an if-else conditional statement in a single line to represent the Ternary Operator. [true] if [expression] else [false]   Let's see an example of Ternary Operator a, b = …

Last updated 3 years, 3 months ago | 1113 views

Tags:- Python

Python | Create and delete an index in Elasticsearch To use the elastic search we need to import the Elasticsearch package >>> from elasticsearch import Elasticsearch now create an object of Elasticsearch search class by providing …

Last updated 3 years, 3 months ago | 1917 views

Tags:- Python Elasticsearch

SQL | Compare timestamp with date only Timestamp holds Date and Time both with 19 characters. To filter table record with the only date parameter can be achieved by SQL DATE() function. Consider the Employee table …

Last updated 3 years, 11 months ago | 1237 views

Tags:- SQL MySQL

SQL | Timestamp in where clause to select the date range Select date range from the timestamp column with where clause can be done by using the BETWEEN operator. BETWEEN Operator : The BETWEEN operator selects …

Last updated 3 years, 11 months ago | 1128 views

Tags:- SQL MySQL

Django | The view account.views.register didn't return an HttpResponse object. It returned None instead. This error usually occurs when missed writing a return before render. The render is used to render the view to the browser. It …

Last updated 3 years, 11 months ago | 16593 views

Tags:- Python Django

PHP | Start array index from 1 To change the array index start from 1 instead of 0 can be done using array_unshift() and unset() function. array_unshift() Function The array_unshift() function inserts new elements to …

Last updated 3 years, 11 months ago | 11086 views

Tags:- PHP

HTML | Make an anchor tag to do nothing | href="javascript:void(0);" To prevent reloading a page when a link clicked is something like preventing the default behavior of an element. It can be achieved by providing …

Last updated 4 years ago | 5261 views

Tags:- HTML JQuery JavaScript

HTML | Input type number maxlength not working The "maxlength" attribute of an input field is used to limit the length entered in the input field. but it works only if the type of input field …

Last updated 4 years ago | 15485 views

Tags:- HTML JQuery JavaScript

Jquery | Remove id attribute from an element The removeAttr() function from jquery is used to removes one or more attributes from the selected elements. $("div").removeAttr("id");     Here seen an example with complete code …

Last updated 4 years ago | 3189 views

Tags:- HTML JQuery JavaScript

Jquery | Auto Focus On Next Input Field The jquery code for autofocus on the next text input field. $(".input-key").keyup(function() { if ($(this).val().length == $(this).attr("maxlength")) { $(this).next('.input-key').focus(); } }); Let's go through the above jquery …

Last updated 4 years ago | 5441 views

Tags:- HTML JQuery JavaScript

PHP | Web Scraping Web scraping is used to get specific data from another website when there is no API available for it. There are many techniques for web scraping. You can read more about this …

Last updated 4 years, 1 month ago | 1434 views

Tags:- PHP