We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Tag: Create

C++11 Smart Pointer – Part 4: Create shared_ptr objects carefully

We should create shared_ptr objects carefully. Checkout below two cases, [showads ad=inside_post] Advertisements 1.) Try not to use same raw pointer for creating more than one shared_ptr object because in that case different shared_ptr objects will not get to know that they are sharing the pointer with any other shared_ptr objects. How this can create …

C++11 Smart Pointer – Part 4: Create shared_ptr objects carefullyRead More

C++11 Multithreading – Part 1 : Three Different ways to Create Threads

In this article we will discuss how to create threads in C++11 using std::thread. Introduction to C++11 Thread Library Original C++ Standard supported only single thread programming. The new C++ Standard (referred to as C++11 or C++0x) was published in 2011. In C++11 a new thread library is introduced. Advertisements Compilers Required:  Linux: gcc 4.8.1 …

C++11 Multithreading – Part 1 : Three Different ways to Create ThreadsRead More

How to Create a Thread in Java using Runnable Interface

In this article we will discuss how to create a thread in Java using Runnable Interface. Why do we need Runnable Interface We create threads to execute certain tasks in parallel. Every task is different from another Task. Tasks are usually encapsulated in its own class. Therefore, extending our Task class from Thread is not only an incorrect …

How to Create a Thread in Java using Runnable InterfaceRead More

POSIX : How to create a thread | pthread_create() example & Tutorial

In this article we will discuss how to create a thread in C or C++ using POSIX Thread Library on Linux. Creating a thread will create a separate execution unit with in the same process. Each thread will have its own, Advertisements Stack Thread ID Program counter Thread Local Storage Each of thread shares the …

POSIX : How to create a thread | pthread_create() example & TutorialRead More

C++11: How to create Vector of Thread Objects ?

In this article we will create a vector thread and discuss things which we need to take care while using it. Creating & Using vector of std::thread Let’s Create a vector of std::thread objects i.e. Advertisements // Create a vector of threads std::vector<std::thread> vecOfThreads; Now let’s create a std::function<> object that we will pass to …

C++11: How to create Vector of Thread Objects ?Read More

Python : How to create a list and initialize with same values

In this article we will discuss how to create a list and initialise with same values. Creating a list of same values by [] and multiply Suppose we want to create a list of strings, which contains 20 same strings i.e. ‘Hi’ Advertisements [‘Hi’, ‘Hi’, ‘Hi’, ‘Hi’, ‘Hi’, ‘Hi’, ‘Hi’, ‘Hi’, ‘Hi’, ‘Hi’, ‘Hi’, ‘Hi’, …

Python : How to create a list and initialize with same valuesRead More

Python : 6 Different ways to create Dictionaries

In this article, we will discuss different ways to create dictionary objects in python. What is a dictionary? dictionary is an associative container that contains the items in key/value pairs.  For example, we if want to track the words and their frequency count in an article like, Advertisements “Hello” occurs 7 times “hi” occurs 10 times …

Python : 6 Different ways to create DictionariesRead More

Cart

Your Cart is Empty

Back To Shop