How to refresh a page with jquery?
Jquery | Location reload() Method | Refresh a page The Location.reload() method reloads the current URL. Syntax location.reload(forceGet) The Location.reload() method reloads the current URL. By default, the value of forceGet is false which …
How can we find or count number of elements in an array?
PHP | Count number of elements in an array There are two ways to find the number of elements in an array: 1. sizeof($arr), This function is an alias of count() echo sizeof($arr); 2. count($arr) echo …
Git branch command to create, list and delete
Git | Git branch command to create, list, and delete git branch command is used to create a new branch, list all branches, and delete a branch. Branches allow developers to work on the same project …
What is difference between echo and print?
PHP |What is the difference between echo and print? PHP echo and print both are used to display the output in PHP. Both can be used with or without parenthesis. The differences are small echo …
Git add to add files to git
Git add | add files to git This command adds the working directory changes to the staging area. It allows to include the updates to a particular file in the next commit. Git add doesn't affect …
How can we increase the speed of a MySQL select query?
MySQL | Increase the speed of a MySQL select query For increasing the speed of a query we have to do a couple of things First of all instead of using select * from table1, use …
How to clone git repository
Git clone | clone git repository Git clone command creates a local copy of the existing source code from a remote repository. git clone ssh://[email protected]/<username>/<repository-name>.git To clone a project from Github: Click on the green button …
Select date range from timestamp column
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 …
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 …
How many types of messages can you log in Codeigniter?
Codeigniter | Types of error logging There are three message types in Codeigniter: Error Messages These are actual errors, such as PHP errors or user errors. Debug Messages These are messages that assist in debugging. …
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 …
Program to check palindrome in python
Python | Check whether the given value is palindrome or not This is an example of how to check whether the given value is palindrome or not. It takes input from the user to check …
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 …
Adding element in an array in php
PHP | array_push() function We can add elements to an array in an easy way. There is an inbuilt function array_push() in PHP which is used to add elements to the PHP array. With the …