This is Akash Mittal, an overall computer scientist. He is in software development from more than 10 years and worked on technologies like ReactJS, React Native, Php, JS, Golang, Java, Android etc. Being a die hard animal lover is the only trait, he is proud of.
To create immutable copy of object in reactjs, you can use Object.assign() method. This method is also used to create a copy of state object. Since states should not be…
React components can have state by setting this.state in their constructors. this.state should be considered as private to a React component that it’s defined in. In this article we are going to…
Learn how you can pass data from one component to another through props in react js. Here we have declared two class components – Board and Square. We are passing…
In this article we are going to learn how to use unordered (UL) and ordered (OL) lists in JSX in React JS codes. Here is the example – Source: Reactjs…
A component can maintain internal state data with this.state. When a component’s state data changes, the rendered markup will be updated by re-invoking render(). Here we are using states in class component…
Python Tensorflow throws error “cannot import name ‘to_categorical’ from ‘keras.utils’” when you are using Tensorflow version 2 but implementing the older syntax. Solution Instead of using this syntax for importing…
Python throws error “pip is being invoked by an old script wrapper” either due to incompatible pip version or due to multiple versions of pip. Solution To resolve this error,…
Python poetry throws error “Poetry could not find a pyproject.toml file” when it is not able to find pyproject.toml file in project directory. It means Poetry is not initialized properly.…
Python subprocess library is used to run processes like bash script in the background. It can create new processes, connect with their input/output/error pipes and obtain their error codes. Code…
Functions in carbon language has the same role as in C, Php or any other functional language. It is used to separate a functionality for reuse. For example, a function…
We can use for and while loops in carbon language. Within a loop the break and continue statements can be used for flow control. while Loop while loop in carbon…
In Carbon language we don’t have switch statement. Else we have match. match is a control flow similar to switch of C and C++ and mirrors similar constructs in other languages, such as…
Ternary operators are generally used to return a value based on conditions in a single statement. This prevents unnecessary variable declarations and memory consumption. In Carbon we have if expressions…
Conditions or control flow in carbon language is similar to any other language. It has if, elseif and else keywords. Introduction if and else provide conditional execution of statements. An if statement consists of: An if introducer…
We have a number of operators in Carbon language like – Arithmetic, Bitwise, BitShift, Comparison, Conversion, Logical, Indexing, function call, pointer, move etc. Arithmetic These arithmetic operators are supported –…
Pointers in Carbon language are similar to C++. The type of pointers-to-values-of-type-P is written as P*. Carbon pointers do not support pointer arithmetic. What operations are supported by Pointers in…
Learn how to change Yoast SEO canonical url for your complete wordpress website. For that we will create a plugin which will add_filter for wpseo_canonical property and replace the existing…
Struct in carbon language is a composite type whose members are accessed through name and not by their positions. They are also known as structural data classes or struct types…
A tuple in carbon language is a fixed-size collection of values that can have different types, where each value is identified by its position in the tuple. Code Examples Declaring…