Vrundesha Joshi has Published 343 Articles

Finding a particular value in internal table itab in ABAP

Vrundesha Joshi

Vrundesha Joshi

Updated on 09-Dec-2019 06:20:33

1K+ Views

you can use a READ statement in combination with TRANSPORTING NO FIELDS. This will skip the values to be transferred to the work area and avoid the loop. Here is an example:READ TABLE itab WITH KEY FIELD = 'ABC' TRANSPORTING NO FIELDS. IF SY-SUBRC = 0. "Field Match.” ENDIF.

How can I delete all cookies with JavaScript?

Vrundesha Joshi

Vrundesha Joshi

Updated on 03-Oct-2019 08:06:06

1K+ Views

To delete all cookies with JavaScript, you can try to run the following code. Here, we’re using an array and the split() method to get all the cookies and finally delete themExampleLive Demo                    var num = 1;     ... Read More

emplace vs insert in C++ STL

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

953 Views

emplace operation avoids unnecessary copy of object and does the insertion more efficiently than insert operation. Insert operation takes a reference to an object.AlgorithmBegin Declare set. Use emplace() to insert pair. Use insert() to insert pair by using emplace(). ... Read More

How to use singleton dialog using synchronized in android?

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

150 Views

Before getting into example, we should know what singleton design pattern is. A singleton is a design pattern that restricts the instantiation of a class to only one instance. Notable uses include controlling concurrency and creating a central point of access for an application to access its data store.Synchronized means only ... Read More

How to detect integer overflow in C/C++?

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

280 Views

The only safe way is to check for overflow before it occurs. There are some hacky ways of checking for integer overflow though. So if you're aiming for detecting overflow in unsigned int addition, you can check if the result is actually lesser than either values added. So for example, ... Read More

What is a segmentation fault in C/C++ program?

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

931 Views

A segmentation fault occurs when your program attempts to access an area of memory that it is not allowed to access. In other words, when your program tries to access memory that is beyond the limits that the operating system allocated for your program.Segmentation faults are mostly caused by pointers ... Read More

How to create and release a save point in JDBC?

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

706 Views

When you set a save point you define a logical rollback point within a transaction. If an error occurs past a save point, you can use the rollback method to undo either all the changes or only the changes made after the save point.Savepoint interface gives you the additional transactional ... Read More

Regular cast vs. static_cast vs. dynamic_cast in C++ program

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

490 Views

static_cast − This is used for the normal/ordinary type conversion. This is also the cast responsible for implicit type coersion and can also be called explicitly. You should use it in cases like converting float to int, char to int, etc.dynamic_cast − This cast is used for handling polymorphism. You ... Read More

iswalnum() function in C++ STL

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

122 Views

iswalnum() function in C++ STL checks if the given wide character is an alphanumeric character, i.e. either a number (0-9), an uppercase letter(A-Z), a lowercase letter (a-z) or any alphanumeric character or not.AlgorithmBegin Initializes the characters. Call function iswalnum(c1) to check whether it is ... Read More

Difference between private, public, and protected inheritance in C++

Vrundesha Joshi

Vrundesha Joshi

Updated on 30-Jul-2019 22:30:25

3K+ Views

Data hiding is one of the important features of Object Oriented Programming which allows preventing the functions of a program to access directly the internal representation of a class type. The access restriction to the class members is specified by the labeled access modifiers: public, private, and protected sections within ... Read More

Advertisements