If you're looking for a reliable and user-friendly Git repository, GitHub is my go-to choice. It’s free to use unless you need private repositories, which…
Continue reading → Setting Up Git for Windows: A Step-by-Step Guide
∞Recently, I found myself working with a cellular USB dongle on an embedded Linux system. I've previously documented my experience integrating an LTE device, the…
Continue reading → Setting Up Data Connection with SORACOM Onyx LTE USB Modem on Linux
In this chapter, we will learn various aspects of class template instantiation. Understanding the class template instantiation is pivotal to the overall understanding of the functioning of templates in general. The fundamental concept of template instantiation remains the same for both function templates and class templates. However, instantiation of class template instantiation is more complex than function template.
The content outlines seven chapters on C++ templates, covering introductory concepts, function templates, template parameters, return types, miscellaneous aspects, class templates, and class template instantiation. Each chapter provides a foundation for understanding and effectively using templates in C++. Additionally, it mentions the availability of source code.
C++ templates are a powerful tool for writing flexible and reusable code, enabling type-independent programming. This guide covers everything from basic template syntax to advanced concepts like class templates, function return types, and instantiation. Whether you're new to templates or looking to refine your skills, each chapter provides clear explanations and practical insights. Dive in and unlock the full potential of C++ templates to write more efficient and scalable programs.
In the first section of the book, we have learned about the basic syntax and usage of a function template. In this second part of the book, we will focus on the class templates. Class templates are an essential tool for the programmer to design classes that can work on the generic data type. While class templates are an excellent tool for the programmers, it is slightly complex than the function templates. The syntax and usage may look a bit daunting for new programmers. In this chapter, we will learn about how to declare and define classes with templated parameters step by step with simple examples at each step.
Recently I have started playing around a bit with Windows PCs. I needed to add a Microsoft KM-Loopback adapter on a Virtual Windows 10 Enterprise.…
Continue reading → How to add Microsoft KM Loopback adapter in Windows 10
In this chapter we will cover the following topics - Understanding difference between declaration and definition, Compiling and linking of template function, Organizing template function code, Abbreviated function templates, Overloading template function.
This chapter will discuss the various ways we can declare or deduce the return type of a template function. We can use either template or non-template parameters to declare the return type of a function template. We can also deduce the return type using keywords like auto and decltype. In some cases, we can declare a separate type parameter for the return type. Because of these intricacies, it is necessary to discuss the template function’s return type in detail with specific examples tailored for each case.
In Chapter 2 : Working with Function Templates in C++, we explored the mechanics of function templates and encountered the term template parameter. This chapter…
Continue reading → Chapter 3 : All about Template Parameters in C++
In Chapter 1 : Introduction to Templates in C++, we briefly encountered function templates in C++. In this chapter, we focus on how to implement…
Continue reading → Chapter 2 : Working with Function Templates in C++
C++ templates are intimidating for any beginner or intermediate level programmer as it is syntactically a bit cryptic and complex. Also, there are intricacies in how to use the powerful features of the language. A standard C++ book does not always go into the feature’s details instead of just touching upon the subject, which is not sufficiently explanatory for the first-time learners. Sometimes the examples are too complicated, or the explanations are too vague to understand. Often, there are not many different sample codes to practice enough to have a good grip on the subject. In other cases, the available books go so deep into the nitty-gritty of the language that the reader feels a bit lost in the sea of information. In either way, the subject seems daunting for the newbies or intermediate-level programmers. However, if we explain it systematically with simple examples and easy-to-understand explanations, the C++ template could be a powerful tool for programmers. Proper use of templates can lead to clean, elegant, and efficient code on many occasions. The reader should be a beginner or intermediate-level programmer who has a basic understanding of C++ programming. They do not need to have detailed, in-depth knowledge or vast experience on the subject but should be familiar with the C++ programming paradigm’s basic concepts and be looking to take it to the next level.
Easy way to install a python module in Anaconda
This blog is about how to launch a Linux shell command inside a C++ program.
Handling large file git git. Git LFS is for supporting large files which are bigger than Git's recommended 50MB file size. You cannot push these files to your repository unless you have installed Git-LFS. This post describes the steps involved how to install Git-LFS on a Windows 10 machine.
virtualenv creates a virtual python environment inside a project folder of your choice. This enables your to install python packages within the virtual python environment without even having any admin rights on that particular machine. This makes the environment extremely flexible for developers.
Unlock seamless connectivity with our comprehensive guide to setting up your FONA module on the SPRESENSE using the Arduino FONA library. This blog post dives into troubleshooting tips for when your serial prompt stalls at “#updater,” a common sign that your firmware needs an update. Whether you're a seasoned developer or a maker just starting out, follow our step-by-step instructions to flash, update, and optimise your setup for reliable performance and enhanced project success.
Once you have created an AWS account it has to be configured. The first thing you need to setup is the second level security called the MFA. This blog takes you through the step by step process of setting up MFA for your root user account.
A step by step guide for AWS beginners to setup their first AWS account to kick start with AWS cloud technology. It's free!
Operator overloading is one of the fundamental operation which come across often in a C++ program. It is bit cryptic in syntactical side as well as often a misunderstood topic amongst new programmer. I will try to explain this as a series of C++ related notes (as I like to call this) following this post.
In one of the previous posts I have described Bringing up Rasberry Pi 3 with NOOBS. But after I brought up the Raspberry Pi (ver…
Continue reading → How to replace the Kernel image in NOOBS with your custom Kernel
Bring up Raspberry Pi To bring up your Raspberry Pi (my Pi is version 3 B) please follow the below link: How to bring up…
Continue reading → Integrating LTE Device EM7565 into Raspberry Pi 3
For formatting the micro SD card I usually use the gparted utility in Ubuntu. Format the micro SD with FAT 32 filesystem format. You need…
Continue reading → Format a micro SD card using gparted utility
How to bring up a Raspberry Pi version 3 B hardware with NOOBS (Raspbian).
Encountering 'Unknown Symbol' errors while loading the GobiSerial module on Raspberry Pi? This in-depth guide walks you through debugging missing kernel symbols, manually loading required modules, and properly configuring dependencies using depmod and modprobe for a clean and persistent fix. Learn how to resolve LTE driver issues with Sierra Wireless EM7565 on RPi effortlessly!
Getting Rasberry Pi up and running To bring up your Raspberry Pi (ver 3 B) with NOOBS follow the instructions here. Find the kernel version…
I was recently working with something which required me to build a code base and flash it into the board (hw) and then once that…
Continue reading → How to pipe one bash command output to another within a python script
If you are working with nuttx kernel you might have issues trying to bring up the kernel menuconfig with the below command: I had to…
Continue reading → nuttx kernel make menuconfig error in Ubuntu
I had written a blog on how to integrate a custom driver into Linux kernel tree previously here. Integrating a custom driver in nuttx kernel is pretty similar. But writing this down would probably be a good idea for any future reference.
Git log Adding it to the bash script From now on you can type: and see the formatted git log, change the format as you…
Stop Ubuntu going into suspended mode Disable suspend $ sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target Created symlink /etc/systemd/system/sleep.target → /dev/null. Created symlink /etc/systemd/system/suspend.target →…
Continue reading → General Linux developer’s tips and tricks
Install the arduino IDE 1. https://www.arduino.cc/en/Main/Software/ 2. Select Linux 64 bit 3. Click Just Download Unzip the downloaded file as below: vbhadra@jupiter:~/Downloads$ tar -xf arduino-1.8.10-linux64.tar.xz…
Time to time we have to work on source code which are downloaded from a git repository, modify the code, implement the functionality, test it,…
Install the custom Toolchain Download and install the toolchain rpm sudo alien ~/Downloads/<toolchain-name>.rpm sudo dpkg -i ./<toolchain-name>.deb Locate the arm compiler sudo find / -iname…
How to install pre-build binaries with cmake without forced to be recompile it again.
I do not have administrative rights on a linux server (openSuse Linux) I am working on right now. So installing anything is not an option…
Recently my apt-get install didn't work in Ubuntu 10.04 and I couldn't spend time to fix the source list when it didn't work straight forward.…
If you're looking for a reliable and user-friendly Git repository, GitHub is my go-to choice. It’s free to use unless you need private repositories, which…
Continue reading → Setting Up Git for Windows: A Step-by-Step Guide
∞Sometimes you may want to take a snapshot of the current state of your virtual machine (in my case Ubuntu Linux) so that you can revert back to it if anything goes wrong in the virtual machine. The feature in VirtualBox which helps in this is called a snapshot. A snapshot is basically a backup of your virtual machine in its current state.
The post discusses the advantages of using threads over separate processes, specifically in data sharing and communication. It highlights a scenario where a song title in a word processor can easily be accessed by a music player when both run as threads within the same process. The introduction of the pthread library is significant for managing threads in C. It demonstrates the use of pthread_create() to create threads and emphasizes the importance of pthread_join() to ensure proper synchronization, thereby preventing premature termination of threads. The post concludes by mentioning upcoming discussions on synchronization challenges like race conditions.
Thread-safety of a function refers to the fact whether a function can be safely called from multiple threads simultaneously. Safety here means that even if multiple threads are executing the function simultaneously the data integrity is intact and is not intermingled.
Memory leak is a phenomenon where a running C/C++ program or a running process or thread dynamically allocates memory block from the heap but fails to free the memory block when it no more requires the memory. This happens due to programmatic error where the handle to the allocated memory block gets lost. Over a time if the same programmatic entity (a process, or a thread or a function) comes into action repeatedly and leaks memory, all the free memory of the systems goes away and eventually the systems throws the dreaded "Out Of Memory" and crumbles down.
valgrind is a popular tool which can detect memory in run-time. This blog post discusses how to install, and run valgrind at linux command line to detect memory leak in a sample C program.
This blog post discusses the polymorphism with the help of C++ language. The mechanism to implement polymorphism in C++ is known as Virtual Functions. With the help of a simple example I will try to explain the concept as clearly as I can.
Why virtual functions are required in C++.
Problem Description Suppose you have a local GIT repository where dev-stable-topic is the development branch and time to time the releases are made to…
Merge Conflict Often you will encounter merge conflicts while doing rebase operation as described above. Here, is a example merge conflict error: The above lines…
In your role as a Marketing Consultant, you have been asked by Wiggo*: a fictitious European supermarket (food retailer) chain (similar to Aldi and Lidl) to research and report on the feasibility of them launching in a new international market (this can be a country or economic zone of your choice and/or one you are familiar with).
As part of iot application development for IoT I had to play around with the SSL connection establishment with the remote mqtt servers. The below…
Continue reading → How to publish a topic with mqtt broker running on iot.eclipse.org server
I was facing an issue recently and it is like this. I run a Ubuntu Linux Virtual Machine on a Windows guest. Because of my…
I was trying to connect to a newly installed Ubuntu Linux version 12.04 using FileZilla but the application kept on timing out. This can happen…
Continue reading → Why cannot connect to linux machine using FileZilla (sftp mode)?