This app started of as a hello world test, but then I wanted to implement a function, then a function with parameters and a return value. I also wanted to lean user input and parsing a string to a numeric value.
I asked copilot to generate tests.
Contributed by Fabien Loudet, Linux SysAdmin at Rosetta Stone
Tired of always having to enter your SSH key passphrase when logging in to remote machines?
Here comes ssh-agent. Enter the passphrase once and it will keep it in memory for you
Using ssh-agent in your shell session:
| #include <cstdlib> | |
| #include <iostream> | |
| #include <string> | |
| std::string getHomeDirectory() { | |
| const char* home = std::getenv("HOME"); | |
| if (home == nullptr) { | |
| throw std::runtime_error("HOME environment variable not set"); | |
| } | |
| return std::string(home); |
| // rss-reader-opts.cpp | |
| // This program demonstrates the use of Boost.ProgramOptions to handle command line arguments | |
| // for a simple RSS reader application. It allows users to list, read, add, and delete feeds. | |
| // To Build: clang++ -O3 -std=c++11 -lboost_program_options rss-reader-opts.cpp -o rss-read | |
| #include <string> | |
| #include <vector> | |
| #include <boost/program_options.hpp> | |
| namespace po = boost::program_options; | |
| #include <iostream> |
Setting up analog surround sound on Ubuntu Linux with a 3 3.5mm capable sound card:
A while back, I received the Logitech Z506 Speaker system, and with Windows, setting it up was a pretty plug and play experience. On Linux, however, its' a wholly different ballgame. For one, there's no Realtek HD Audio control panel here, so what gives? How do you around this problem?
Introducing the tools of the trade:
You'll want to use a tool such as hdajackretask , pavucontrol and pavumeter for the pin re-assignments and audio output monitoring afterwards respectively. The tools are installed by running:
sudo apt-get install alsa-tools-gui pavumeter pavucontrol
| # Compiler | |
| CC = gcc | |
| # Compiler flags | |
| CFLAGS = -Wall -Wextra -pedantic | |
| # Source files | |
| SRCS = datecode.c date_validator_helper.c main.c | |
| # Object files |
| cmake_minimum_required(VERSION 3.20.0) | |
| # change this to your path | |
| set(CMAKE_TOOLCHAIN_FILE "E:/src/vcpkg/scripts/buildsystems/vcpkg.cmake") | |
| project(demo) | |
| add_executable(${PROJECT_NAME} main.cpp) | |
| # use your prefix paht if the toolchain doesn't work |
| sudo reflector --country "GB" --age 12 --protocol https --sort rate --save /etc/pacman.d/mirrorlist |
| CC = g++ | |
| CFLAGS = -g -Wall -Werror | |
| test: test.o | |
| test.o: test.cpp | |
| clean: | |
| rm test *.o | |
| # Installation on Dell XPS 9570 | |
| # Connect to Internet | |
| wifi-menu | |
| # Sync clock | |
| timedatectl set-ntp true | |
| # Create three partitions: |