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 2 weeks, 5 days ago | 39 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 weeks, 3 days ago | 71 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 weeks, 4 days ago | 44 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 weeks, 4 days ago | 39 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 = 10, …

Last updated 3 weeks, 5 days ago | 62 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 weeks, 6 days ago | 112 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 8 months ago | 173 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 8 months, 1 week ago | 142 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 8 months, 1 week ago | 219 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 8 months, 1 week ago | 162 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 9 months, 1 week ago | 258 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 9 months, 2 weeks ago | 339 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 9 months, 2 weeks ago | 130 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 9 months, 2 weeks ago | 160 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 10 months, 1 week ago | 253 views

Tags:- PHP