Django order_by query set
Django | order_by query set, ascending and descending order_by() The order_by function is used to sort the result-set in ascending or descending order. Ascending Order The order_by function sorts the records in ascending order by …
Delete records in Django models?
Django | Delete records in Django models Delete query performs an SQL delete query on all rows in the queryset and returns the number of objects deleted and a dictionary with the number of deletions …
Add gradient text using CSS
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 …
How to get html attribute's value in jquery?
Jquery | attr | Get HTML attribute's value You can get the value of an attribute for the first element in the set of matched elements using the .attr() function. Return the value of …
Differentiate between new and override modifiers.
Python | New and Override Modifiers The new modifier is used to instruct the compiler to use the new implementation and not the base class function. The Override modifier is useful for overriding a base class …
What will be the output of $a and $b once code bellow is executed?
PHP | output of $a and $b once this code $a = '1'; $b = &$a; $b = "2$b" executed; Both $a and $b will output a string "21". Because the statement $b = &$a; sets …
What is :: operator and in what case we use it in php?
PHP | :: operator | scope resolution operator This operator is known as the scope resolution operator. And this operator is used to access the static members of the class. To access static members of a …
What is the difference between primary key and unique constraints?
SQL | Difference between primary key and unique constraints There is only one primary key in a table. It creates the clustered index automatically and it cannot have NULL value whereas there can be multiple …
Program to check prime number in python
Python | Check whether the given number is a prime number or not This is an example of how to check whether the given number is a prime number or not. It takes an input …
Git checkout to Switch branch
Git | git checkout to Switch branch Git checkout is mostly used for switching from one branch to another. It is also used to check out files and commits. Switch to a branch This command …
Git status to check the status
Git | git status to check the status of the current branch The git status command displays all the necessary information about the working directory and the staging area. git status It displays information like: …
Factorial program in python
Python | Program to find factorial of a number This is an example of how to find the factorial of a number in python. The factorial of a number is a product of all the positive …