This article describes how to create a simple static library using C++. A static library is a collection of object files that are linked with and copied into a target application at compile time. The resulting executable contains all the object code from the static library, so it can be executed independently of the library.
Static library Let’s start by creating a simple square class:
// src/square.h #ifndef SQUARE_H #define SQUARE_H class square { private: double length; public: square(double length); double area(); }; #endif and its corresponding implementation:
This article describes how to create a simple shared library using C++. A shared library is a collection of object files that are linked with and loaded into a target application at runtime. The resulting executable contains only the object code that is needed to load the shared library, for this reason, the library has to be distributed with the executable.
Shared library Let’s start by creating a simple sum.c program using C.
This article provides step-by-step instructions on how to create a bootable USB flash drive for either FreeBSD or Ubuntu operating systems. The post includes the necessary commands to download and transfer the installation files onto the USB drive using the terminal on a macOS system. The author also includes a reference link for creating a FreeBSD installation memstick on macOS.
Download the files Start by downloading the installation file for the operating system you want to install.
Imagine you’re a developer working on a project that’s stored in a remote Git repository. Your first step is to clone the repository using the command git clone git@github.com:some-account/some-project.git.
Once you’ve cloned the repository, you can start working on a new feature by creating a new branch using the git checkout command with the -b flag and a branch name, like this: git checkout -b my-feature. This creates a new branch called my-feature and switches to it.
Git is a popular version control system that allows developers to manage their code repositories efficiently. If you are a developer using FreeBSD, you will need to set up Git and an authentication method to start collaborating on projects with other developers. In this post, we will walk you through the process of installing Git, creating SSH keys, and cloning a project from GitHub on FreeBSD.
Does this work in Linux or Mac?
Generate a random string using the command line:
cat /dev/urandom | tr -cd [:graph:] | head -c 32 On OSX, the previous command might return a tr: Illegal byte sequence error, so try:
export LC_ALL=C; cat /dev/urandom | tr -cd [:graph:] | head -c 32
A command so important, it deserves its own page:
git reset --soft HEAD~1 The previous command undoes the last commit to git. I think this is one of those commands that I have typed many times during the last year. It’s very important to know which branch we currently are on, but sometimes excitement (or stress) may make us forget checking it.
If this is not enough, then we can reset our branch to master like this: (this will lose all our changes):
On this article we are going to install a rancher server on Ubuntu. Let’s start by getting the rancher image from docker hub:
sudo docker run -d --restart=always -p 8080:8080 --name=rancher-server rancher/server Go to http://ip-address:8080 and click on Add Host. It is important that you do not use a localhost address (127.0.0.1, localhost). If you do so, and you want to add your local computer as an agent, you will not be able to reach it.
Netbeans is one of my beloved day to day applications. Yesterday, when I installed Ubuntu 15.10 (Wily Werewolf) on my computer, Netbeans started to hang on the startup screen, specifically at the Loading Modules phase. It took me hours looking for solutions on the internet; and reinstalling different versions of the Java Development Framework didn’t seem to help.
Finally I found the following fix at an Ubuntu forum, which turned out to be very simple to apply.
If you are new on the Linux platform, I am sure you feel overwhelmed with all the different versions available. Choosing one is not an easy task, and each version has its own pros and cons.
Let me tell you why I like CentOS:
It is very stable It has well tested features There is a big community around it It has many large software repositories It is Part of the RedHat / Fedora family Installing CentOS Installing a new operating system may seem challenging, but CentOS has always made this task a simple one.