Let’s say your frontend is showing the same value that backend sends and if your python backend needs to send numbers with comma as the thousand separators, it is actually pretty simple. For example, if the input is 1000, it should convert it to 1,000 and if it is 100000, it should convert it to 100,000.
ReadIn this tutorial, we will learn how to create one love calculator program. This program will take two names as inputs, calculates the percentage and prints it out. How the program is calculating the percentage, I am explaining below.
Readtry-catch block is used to handle exceptions. The catch block can take two parameters - first one is the exception and the second one is a StackTrace object. StackTrace holds the call sequence that triggers one exception. StackTrace is created at runtime and it is an object of class StackTrace.
ReadC++ program to read the names and marks of a list of students and print them using structure. This post will show you how to use a structure in C++ with an example program.
ReadLength conversion is a common problem in many applications. You application is getting the value in one unit from the server and you need to convert it before showing it to the user. Or your application takes the input in one unit and convert it to another unit.
ReadLogical OR is used with two operands. The definition of logical OR is that it will return true if any of the operands is true. Else, it returns false. In C programming, we don't have any boolean, so it returns 1 for true and 0 for false.
ReadWe can throw an exception manually in Dart. Dart has a couple of predefined Exceptions and these are thrown automatically on any unexpected result. You can raise predefined exceptions, custom exceptions or arbitrary objects. In this post, I will quickly show you how to throw an exception in dart with examples.
ReadThis post will show you 4 different ways to create a list of objects in Python. We will learn how to use append, extend and insert methods to create a list of Python objects.
ReadFinding out if an object is in an array or not is little bit tricky. indexOf doesn't work for objects. Either you need to use one loop or you can use any other methods provided in ES6. Loop is not a good option. JavaScript provides a couple of different methods that makes it more easier.
ReadJavaScript comes with a couple of different array methods. You don't have to loop through each elements of an array to check if they are in a second array. In this post, I will show you different ways to check if all elements of an array is in another way or not. in a second array
Read