In this article we will be discussing the working, syntax and examples of std::is_signed template in C++ STL.is_ signed is a template which comes under header file. This template is used to check whether the given type T is a signed type or not.What is a signed type?These are the basic arithmetic types, which contains sign value with them. All arithmetic data types are either signed and unsigned.Like we want to show the values in negative we use signed type.Like: -1 is signed int and -1.009 is signed float.By default all the types are signed to make them unsigned ... Read More
In this article we will be discussing the working, syntax and examples of std::is_pointer template in C++ STL.is_ pointer is a template which comes under the header file. This template is used to check whether the given type T is a pointer type or not.What is a Pointer?Pointers are non-static types which hold an address of another type or in other words which points to some memory location in the memory pool. With help of an asterisk (*) we define a pointer and when we want to refer the specific memory which the pointer is holding then also we ... Read More
In this article we will be discussing the working, syntax and examples of std::is_pod template in C++ STL.is_ pod is a template which comes under header file. This template is used to check whether the given type T is a POD(plain-old-data) type or not.What is POD(Plain old data)?Plain old data(POD) types are those types which are also in old C language. POD types also include scalar types. POD class type is that class type which is both, trivial (which can be initialised statically) and standard layout (which is a simple data structure like struct and union).Syntaxtemplate is_pod;ParametersThe template ... Read More
In this article we will be discussing the working, syntax and examples of std::is_fundamental template in C++ STL.is_ fundamental is a template which comes under the header file. This template is used to check whether the given type T is a fundamental data type or not.What is Fundamental type?Fundamental types are the built-in types which are already declared in the compiler itself. Like int, float, char, double, etc. These are also known as built-in data types.All the data types which are user-defined like: class, enum, struct, references or pointers, are not part of the fundamental type.Syntaxtemplate is_fundamental;ParametersThe template ... Read More
In this article we will be discussing the working, syntax and examples of std::is_final template in C++ STL.is_final is a template which comes under the header file. This template is used to check whether the given type T is a final class or not.What is a final class in C++?When we declare a class with the final specifier then it is called as Final Class. Final class is a special kind of class which can’t be extended to create another class. In C++ to make a class as a final we make a class as a friend and then ... Read More
JShell is an interactive tool that enables us to execute java code and displays the output instantly. JShell is the REPL(Read-Evaluate-Print-Loop) tool that runs from the command-line prompt. If we need to avoid the compilation-errors in JShell, then we must declare those variables before using it. The error message in JShell can use the notation "^--^" to highlight an error.In the below code snippet, the declaration of an int variable "div" attempts to use variables: num1, and num2 that has not been declared, so JShell reports a compilation error, indicating that the compiler was unable to find those variables.C:\Users\User>jshell | Welcome to JShell ... Read More
JShell is a java shell tool that has introduced in Java 9. It is an interactive tool that reads input, executes it, and prints it in the command-line prompt. We don't need to write a main() method to execute it like Java class.We can implement different collections includes set, list, and map in the JShell tool. The important collection is the Map interface, and it is a key-value pair. A Map doesn't contain duplicate keys and each key maps to at most one value.In the below example, we can able to implement the non-empty map.C:\Users\User>jshell | Welcome to JShell -- ... Read More
To add/remove date from the date string you need to use AddDay() method. For example,We need to add 6 days to the current date.(Get-Date).AddDays(6) 25 March 2020 22:40:36To go back to the specific number of days, the same AddDays() method will be used but the numbers are negative. For example,(Get-Date).AddDays(-6) 13 March 2020 22:45:34
A module is an independent unit of application that represents a single functionality. A module contains three important componentsName: To uniquely identify itDependencies: Other modules in which it depends onExported packages: Packages which are open for external applicationIn order to declare a module, we need to add the "module-info.java" file to the root source code. The components of the "module-info.java" file includes "name", "requires", "exports", and "exports to".Below is the template of "module-info.java" filemodule { requires ; requires ; ... exports ; exports ; ... exports to ; }Name: It is ... Read More
By default the when you run the (Get-Date) cmdlet, its output is in the below format.PS C:\WINDOWS\system32> Get-Date 18 March 2020 22:56:18You can format the above output in the various format supported by PowerShell.Examplesd – Short date pattern.PS C:\WINDOWS\system32> Get-Date -Format d 18-03-2020D – Long date patternPS C:\WINDOWS\system32> Get-Date -Format D 18 March 2020f – Full date pattern with a short time pattern.PS C:\WINDOWS\system32> Get-Date -Format f 18 March 2020 23:01F – Full date pattern with a long time pattern.PS C:\WINDOWS\system32> Get-Date -Format F 18 March 2020 23:02:22g – General date pattern with a short time pattern.PS C:\WINDOWS\system32> Get-Date -Format g 18-03-2020 ... Read More