Programming

emplace_back vs push_back in C++

First of all, let’s start from the definition of each method: push_back: Adds a new element at the end of the container, after its current last element. The content of val is copied (or moved) to the new element. This effectively increases the container size by one, which causes an [...]

2024-04-20T19:00:22+05:30Categories: Programming|Tags: |

Bottom Up vs Top Down approach in Programming

Bottom–up and top–down are both strategies of information processing and ordering knowledge, used in a variety of fields including software. Top down and bottom up are two different ways of solving the same problems.  In the top-down approach, a algorithm is broken down into smaller sub problems. These sub problems are then further broken down into [...]

2024-03-04T10:36:27+05:30Categories: Programming|

Merge CSV Files Into a Single File

A CSV (comma-separated values) file is a text file that has a specific format which allows data to be saved in a table structured format. It uses a comma to separate values. Each line of the file is a data record. Each record consists of one or more fields, separated [...]

2022-04-21T19:26:05+05:30Categories: Programming|Tags: |

Explicit Constructor in C++

explicit keyword in C++ tell the compiler that a certain constructor may not be used to implicitly cast an expression to its class type. It is an optional decoration for constructors that take exactly one argument. It only applies to single-argument constructors since those are the only constructors that can [...]

2024-05-11T17:02:19+05:30Categories: Programming|Tags: |

Calling C/C++ function from JAVA

C/C++ and Java are popular programming languages. The Java Native Interface (JNI) is a standard to integrate in a portable way C++ and Java code. JNI works both way i.e. C++ implementation can be called from JAVA and vice versa. This post discussed about calling C/C++ implementation from JAVA. native [...]

2022-02-03T19:47:41+05:30Categories: Programming|Tags: , |

DataFrames Data Structure in Python

A DataFrame is a data structure used to store tabular data available in Python's pandas package. It is one of the most important data structures for algorithms and is used to process traditional structured data. It is similar to Excel spreadsheets. Pandas DataFrames are data structures that contain: Data organized [...]

2022-01-13T19:27:26+05:30Categories: Programming|Tags: |

Launch Script From Another Python Script

subprocess module in Python allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes. This module can used for launching a script and/or executable from another python script. Below script count for 10 and then exit with status success. We will use this script [...]

2021-11-25T18:37:14+05:30Categories: Programming|Tags: |

Using Wildcard in Bash Shell

Wildcard characters are used to define the pattern for searching or matching text on string data in the bash shell. It is also used to create regular expressions. They are the special characters used as part of glob patterns. To use such a wildcard successfully, it must be outside of [...]

2021-07-30T19:13:18+05:30Categories: Programming|Tags: |

Use of final Keyword in C++

final keyword specifies that a virtual function cannot be overridden in a derived class. It also specifies that a class cannot be inherited from. It ensures that the function is virtual, otherwise a compile-time error is generated. Similarly when used in a class definition, it ensures that class cannot be [...]

2021-07-30T18:05:32+05:30Categories: Programming|Tags: |

Case Statement in Bash Script

case statement in bash shell is similar to switch statement in C++. It can be used to test simple values like integers and characters. Bash shell checks the condition, and controls the flow of the program. The case construct also allows us to test strings against patterns that can contain [...]

2021-07-28T20:40:00+05:30Categories: Programming|Tags: |
Go to Top