JavaScript Splice: How to Use It
The JavaScript splice() method modifies an array. It is used to add new elements to an array or remove or change existing ones. splice() changes the array on which it is used. It does not create a new array. It’s…
A Step-By-Step Guide to Git Add
The git add command adds a file or folder to the staging area. Files in the staging area are those that you want to add to your next commit. Git add does not modify or otherwise affect your repository or…
Python Read File: A Step-By-Step Guide
The open() function opens a file. You must use the "r" mode to read a file. The read(), readline(), readlines() functions return the contents of a file you have opened. Python is a useful programming language to use if you…
JavaScript setTimeout and setInterval: A Guide
setTimeout() and setInterval() are JavaScript timing events. The JavaScript setTimeout() method executes a function after a period of milliseconds. JavaScript setInterval() executes a function continuously after a certain period of milliseconds have passed. JavaScript runs line-by-line. As soon as one…
JavaScript innerHTML and innerText: A Guide
You’ll need to know how to change the text or the HTML that appears on the page to make your sites more interactive. That’s where the innerText and innerHTML HTML attributes come in. These attributes make it easy to change…
Best Online Engineering Degrees 2020
Engineering is a profession in high demand. Today, people find lucrative incomes and long-lasting careers in engineering. The first step towards becoming an engineer is with a degree. Through an online engineering degree, you can find success in this growing…
Java Substring: A How-To Guide
The Java substring() method returns a portion of a particular string. This method accepts the start and end index values of the characters you would like to retrieve from a string. The original string on which substring() is applied is…
How to Use Substring in JavaScript
The JavaScript substring() method retrieves a range of characters between two index positions. You can use substring() to retrieve characters to the end of a string by omitting an end index position. A substring is a smaller portion of a…
How to Use Enum in Java
A Java enum is a data type that stores a list of constants. You can create an enum object using the enum keyword. Enum constants appear as a comma-separated list within a pair of curly brackets. An enum, which is…
Python Write to File: A Guide
he open() function writes contents to an existing file. You must use the "w", "a", "r+", "a+', or "x" file modes to write text to a file. The most common file modes are "w" and "a". These modes write data…
if else Python Statements: A Step-By-Step Guide
An if else Python statement evaluates whether an expression is true or false. If a condition is true, the "if" statement executes. Otherwise, the "else" statement executes. Python if else statements help coders control the flow of their programs. When…
JavaScript Filter: A Step-By-Step Guide
The JavaScript() filter method creates an array of elements from an existing array. The filter() method accepts a callback function as an argument. This function evaluates whether an element should be added to the new list from the existing one.…
What is Ethernet?
Ethernet connections send data between devices on a Wide Area Network (WAN) or a Local Area Network (LAN). These connections are made using a physical wire and the Ethernet protocol. The protocol defines how information is shared over Ethernet. Wi-Fi…
Python Input: A Step-By-Step Guide
The Python input() and raw_input() functions are used to collect user input. input() has replaced raw_input() in Python 3 and onward. Both functions return a user input as a string. Processing user input is a crucial part of programming. For…
Python Zip: A Step-By-Step Guide
The Python zip() function accepts iterable items and merges them into a single tuple. The resultant value is a zip object that stores pairs of iterables. You can pass lists, tuples, sets, or dictionaries through the zip() function. Python has…
Python Break and Continue: Step-By-Step Guide
The Python break statement stops the loop in which the statement is placed. A Python continue statement skips a single iteration in a loop. Both break and continue statements can be used in a for or a while loop. You…
Git Delete Branch
Deleting Git branches is common practice after you have merged a branch into your codebase. You can delete a Git branch on your local machine using the git branch -d flag. The git push origin --delete command removes a branch…
Python Append to List: A Step-By-Step Guide
The append() Python method adds an item to the end of an existing list. The append() method does not create a new list. Instead, original list is changed. append() also lets you add the contents of one list to another…
Git Push
The git push command uploads your local version of a repository to a remote repository. Pushing is the mechanism through which you upload changes to a remote repository. Once you have pushed your changes, all the collaborators on a project…
Java Stack Class
A Java stack is a last-in, first-out data structure. The first item removed from a stack is the item last added to the stack. A stack data structure adds new items to the end of the stack. Java stacks extend…
Python Sort(): A How-To Guide
The Python sort() method sorts a list in ascending order by its values. You can sort a list in descending order by using the reverse parameter. sort() optionally accepts a function that lets you specify a custom sort. All coders…
How to Use Python split()
The Python split() method divides a string into a list. Values in the resultant list are separated based on a separator character. The separator is a whitespace by default. Common separators include white space and commas. Dividng the contents of…
Git Stash
Stashing lets you save your code for later in a Git repository. When you’re working with a Git repository, you may make changes to a file that you want to apply to a Git commit later on. That’s where the…
Git Pull
The git pull command retrieves and downloads the contents of a repository to your local machine. Your local repository is updated so that it shows the content from the remote repository. You’ll probably encounter situations where you want to fetch…
Enumerate Python: Step-by-Step Guide
The Python enumerate() function adds a counter to an iterable object. The counter lets you keep track of how many iterations have occurred. This counter is stored as a separate variable. The Python programming language has several useful features that…
JavaScript For Loop: A Step-By-Step Guide
A JavaScript for loop executes a block of code as long as a specified condition is true. JavaScript for loops take three arguments: initialization, condition, and increment. The condition expression is evaluated on every loop. A loop continues to run…
Git Init: A Step-by-Step Guide
The Git init command creates a new Git repository. The init command sets up all the configuration files you need to work with git in a folder called .git/. You only need to run the git init command once. When…
Git Merge
Merging lets developers bring their changes onto an individual line of development. To merge two branches, you can use the git merge command. Once you run this command, the changes from one branch are merged into the branch you are…
Git Clone
The git clone command creates a copy of a remote repository on your local machine. By default, the clone command saves your code in a folder that shares the name of your repository. This can be overwritten by specifying a…
Git Fetch: A Step-By-Step Guide
The git fetch command downloads all branches, tags, and data from a project to the local machine. Existing local code is not overwritten. Fetch is commonly used with the git reset command to bring a local repository up to date…