We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

53
1.932.451,75

Cart

Tag: custom

C++11 Smart Pointer – Part 2: shared_ptr and Custom Deletor

In this article we will discuss how to use custom deleter with std::shared_ptr. When a shared_ptr object goes out of scope, its destructor is called. Inside its destructor it decrements the reference count by 1 and if new value of reference count is 0 then it deletes the associated raw pointer. Advertisements To delete the …

C++11 Smart Pointer – Part 2: shared_ptr and Custom DeletorRead More

Creating Custom Modules in node.js using exports and module.exports

Modules are like reusable components that can be used across applications. It’s like encapsulating a functionality in a separate module. Benefits of modules in node.js: Advertisements 1.) Code re-usability 2.) By delegating separate functionality to individual modules, code becomes modular. In node.js modules, we can expose functions and variables to outside world. Frequently Asked: Creating …

Creating Custom Modules in node.js using exports and module.exportsRead More

Using unordered_set with custom hasher and comparision function

In this article we will discuss how to use std::unordered_set custom hasher and comparision function. Unordered_set uses the Hash table implementation to provide the set functionality. To know more about Hash Table visit the following article, Advertisements What is Hashing and Hash Table? Whenever we insert an element in unordered_set two things happen i.e. Frequently Asked: std::unordered_set …

Using unordered_set with custom hasher and comparision functionRead More

C++ : How to Sort a List of objects with custom Comparator or lambda function

In this example we will discuss different ways to sort a std::list of user defined data types with custom comparators or lambda functions. Suppose we have a type Player that contains Id and name. Advertisements struct Player { int id; std::string name; Player(int playerId, std::string playerName) : id(playerId), name(playerName) { } bool operator <(const Player …

C++ : How to Sort a List of objects with custom Comparator or lambda functionRead More

Pandas : Read csv file to Dataframe with custom delimiter in Python

In this article we will discuss how to read a CSV file with different type of delimiters to a Dataframe. Python’s Pandas library provides a function to load a csv file to a Dataframe i.e. Advertisements pandas.read_csv(filepath_or_buffer, sep=’, ‘, delimiter=None, header=’infer’, names=None, index_col=None, ….) It reads the content of a csv file at given path, …

Pandas : Read csv file to Dataframe with custom delimiter in PythonRead More

How to create custom exceptions in Python?

Handling errors/exceptions are a most important skill which every developer must have. In programming, we often come across unexpected errors. So, In this python tutorial, we will discuss declaring custom exceptions in modern Python. Table Of Contents What are exceptions in Python? Declaring custom exceptions in modern Python Code Example 1 Code Example 2 Summary …

How to create custom exceptions in Python?Read More

53
1.932.451,75

Cart