Karthikeya Boyini has Published 2193 Articles

Play a video in reverse mode using Python OpenCv

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 09:29:05

707 Views

The full form of OpenCv is Open Source Computer Vision, using this library we can perform different operations on images, videos.Application areas of OpenCVFacial recognition systemMotion trackingArtificial neural networkDeep neural networkVideo streaming etc.For installing on Windows we can use this command linepip install opencv-pythonFor Linux −sudo apt-get install python-opencvTo complete ... Read More

Java Program to convert integer to hexadecimal

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 09:24:33

6K+ Views

Use the + Integer.toHexString() method in Java to convert integer to hexadecimal.Let’s say the following is our integer.int val = 768;Let us convert it to a hexadecimal value.Integer.toHexString(val)The following is the final example with the output.Example Live Demopublic class Demo {     public static void main(String[] args) {        int val = 768;        // integer   ... Read More

Where are static variables stored in C/C++?

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 09:23:06

10K+ Views

Static variables are variables that remain in memory while the program is running i.e. their lifetime is the entire program run. This is different than automatic variables as they remain in memory only when their function is running and are destroyed when the function is over.The static variables are stored ... Read More

Precision on a number format in Java

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 09:16:27

2K+ Views

You can include a precision specifier to the following format specifiers −%f %e %g %sOn floating point, the number of decimal places is known.Let’s say we declared a Formatter object −Formatter f1 = new Formatter();Now, we want 3 decimal places. For that, use 1.3f −f1.format("%1.3f", 29292929.98765432);The above will return the ... Read More

Java NumberFormat.getCurrencyInstance() method

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 09:10:36

4K+ Views

The getCurrencyInstance() method of the NumberFormat class returns the instance of the NumberFormat class. The java.text.NumberFormat class is used for formatting numbers and currencies as per a specific Locale. Number formats varies from country to countryHere, we have considered a locale.NumberFormat n = NumberFormat.getCurrencyInstance(Locale.FRANCE);Then, we have formatted a double value ... Read More

Trigonometric methods in Java

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 09:04:16

453 Views

The java.lang.Math class contains methods for performing basic numeric operations such as the trigonometry, logarithm, etc.The following are some of the methods.Sr.NoMethods & Description1static double abs(double a)This method returns the absolute value of a double value.2static float abs(float a)This method returns the absolute value of a float value.3static int abs(int ... Read More

The static keyword and its various uses in C++

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 09:03:47

397 Views

When static keyword is used, variable or data members or functions can not be modified again. It is allocated for the lifetime of program. Static functions can be called directly by using class name.Static variables are initialized only once. Compiler persist the variable till the end of the program. Static ... Read More

Convert a String to a double type number in Java

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 09:00:45

296 Views

To convert a String to a double type number in Java, use the Double.parseDouble() method.Here is our string.String str = "699.7e130";Let us now convert the above string to double.double val = Double.parseDouble(str);Example Live Demopublic class Demo {     public static void main(String args[]) {        String str = "699.7e130";        double val = Double.parseDouble(str);        System.out.println(val);     ... Read More

How to print a variable name in C?

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 09:00:16

1K+ Views

The following is an example to print variable name.Example Live Demo#include #define VariableName(name) #name int main() {    int name;    char ch;    printf("The variable name : %s", VariableName(name));    printf("The variable name : %s", VariableName(ch));    return 0; }OutputThe variable name : name The variable name : chIn ... Read More

Compare Two Java double arrays

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 08:59:39

245 Views

To compare two Java double arrays, use the Arrays.equals() method. The following are our double arrays.double[] arr1 = new double[] { 1.3, 7.2, 4.2 }; double[] arr2 = new double[] { 1.3, 7.2, 4.2 }; double[] arr3 = new double[] { 2.8, 5.3, 9.8 }; double[] arr4 = new double[] ... Read More

Advertisements