Author: Arpit Mandliya
- 24 September
Increment for Loop by 2 in Java
In this post, we will see how to increment for loop by 2 in Java. There are several looping statements available in Java and one of them is for loop in java. There are three parts of for loop. Initialization Condition Increment or decrement [crayon-678d3d764f31f353226049/] Initialization: Initialization statement executes at start of loop only one […]
- 24 September
Get List of Month Names in Java
In this post, we will see how to get list of months name in Java. Using DateFormatSymbols’s getMonth() method We can use DateFormatSymbols's getMonth() to get list of months in Java. It will provide complete month names like January, February etc. [crayon-678d3d764ff35460902149/] Output [crayon-678d3d764ff3d615533678/] Using DateFormatSymbols’s getShortMonths() method [ For short names] If you need […]
- 24 September
Escape Percent Sign in printf Method in C++
In this post, we will see how to escape percent sign in printf Method in C++. Escape percent sign in Printf Method in C++ printf() method uses percent sign(%) as prefix of format specifier. For example: To use number in prinf() method, we use %d, but what if you actually want to use percent sign […]
- 23 September
Convert 0 to 1 and 1 to 0 in Python
In this post, we will see how to convert 0 to 1 and 1 to 0 in Python. Ways to convert 0 to 1 and 1 to 0 in Python There are times when you need to convert 0 to 1 and 1 to 0. For example: Flipping a bit in binary number. There are […]
- 23 September
TypeError: Object of Type Datetime Is Not Json Serializable in Python
In Python, the datetime library allows us to create objects of the datetime class that can store and process date and time values efficiently. We can manipulate these objects according to our needs using the wide range of functionalities provided by this library. JSON is a type of encoding for data that is used frequently […]
- 23 September
Add Tuple to List in Python
Add tuple to list in Python Tuples and Lists are two of the most commonly used collection objects in Python. They both can store multiple elements and provide access to these elements using their indexes. There are a few differences associated with them as well. Tuples are immutable, which means that once created they cannot […]
- 23 September
Convert Datetime to Unix Timestamp in Python
Dates and Unix Timestamp Dates can be a tricky value-type to handle in programming. In Python, we have the datetime library that provides objects of datetime class that can store and processes the date values efficiently. Let us now discuss the Unix timestamp. When computer systems were introduced it became a necessity to follow a […]
- 23 September
Find All Substrings of String in Python
Dealing with and manipulating strings is a fundamental part of understanding the basics of Python, and the use of substrings and strings can be seen in essentially every Python program. This tutorial focuses on one such part of substrings. The article demonstrates the different approaches available to find all substrings of string in Python. what […]
- 21 September
Convert 0 and 1 to boolean in Java
In this post, we will see how to convert 0 and 1 to Boolean in Java. Given “0” and “1” in String datatype, convert it to boolean datatype where “0” represents false “1” represents true Convert 0 and 1 to Boolean in Java Here is program to convert 0 and 1 to boolean in Java […]