How to detect audio sampling rate with avprobe / ffprobe?

I am using libav 9.6, installed via Homebrew. $ avprobe -version avprobe version 9.6, Copyright (c) 2007-2013 the Libav developers built on Jun 8 2013 02:44:19 with Apple LLVM version 4.2...

Configure error with Mac OS X 10.8.5 Xcode 5.0.2: clang: error: argument to '-V' is missing (expected 1 value) clang: error: no input files

on MacOSX 10.8.5, after upgrading to Xcode 5.0.2 (and upgrading/installing the Command Line Tools (from within Xcode preferences) I was installing FFTW 3.3.3 and Open MPI 1.6.5 by configuring them...

How can I install clang-format in Ubuntu?

I am trying to use clang-tools in particular clang-format for automatic code formatting in vim but I couldn't find this tool with apt-get search. Is there anybody experienced this problem before,...

How to call clang-format over a cpp project folder?

Is there a way to call something like clang-format --style=Webkit for an entire cpp project folder, rather than running it separately for each file? I am using clang-format.py and vim to do this,...

prevent clang-format from indenting lambdas

what clang-format makes: QObject::connect(&w, &sap::Window::keyPress, [&w](auto* event) { if(event->key() == Qt::Key_Escape) ...

How to auto indent a C++ class with 4 spaces using clang-format?

I got the next .clang-format file in my project's root directory: --- AlignTrailingComments: true AllowShortFunctionsOnASingleLine: false AllowShortIfStatementsOnASingleLine:...

How to make clang-format indent extern C blocks in C++?

I'm just learning to use clang-format. I mostly managed to configure it to match my taste, but I can't figure out how to make it indent extern "C" blocks. This is the desired outcome: extern "C"...

How to make clang-format indent all detail namespaces by one

How can I make clang-format indent all *detail* and anonymous namespaces in C++ by one tab space (whatever that is, I am using 4 space tabs)

Prevent clang-format from collapsing multi-line if statements into a single line

Using clang-format with default settings, the following: if ((exprA) && (exprB)) turns into: if ((exprA) && (exprB)) I'm trying to prevent the collapsing the conditions into a single...

Are AllowShortFunctionsOnASingleLine and AlwaysBreakAfterReturnType compatible?

There's a repository which I want to use Clang Format with that has a peculiar coding style. It breaks the return type, but it also puts short function definitions on one...

How can you enable Clang Format for .c files in Qt creator?

I would like to use the automatic format on save with Clang format in qt creator for my C projects. I tested the automatic format on save for my C++ projects and it works fine. I also could apply...

OpenCV - undefined reference to 'cv::CascadeClassifier::detectMultiScale() after NDK update

Yesterday I updated my Android Studio included NDK to version 17.0.4754217and since then I can't run my app anymore. When I tried to rerun the code after the update it gave me the error ABIs...

Get clang format to put closing parenthesis of multiline function calls on separate lines?

I've been using clang format to help keep my code clean. For multiline function calls, is there any way to get clang to put the cloning parenthesis on it's own line? Example: What it's doing...

Where to add -g flag in vs code for debugging

I have two questions. I have just installed VS code and managed to make it compile C codes and show outputs. But I am not able to debug. When I add a breakpoint and Debug, Red circle greys out. I...

Unable to import xgboost in Python

I have installed xgboost successfully using pip for Python 2.7.16 (I installed this Python version using Homebrew on macOS High Sierra). My problem is that I'm unable to import xgboost in Python,...

How can I tell PVS-Studio to ignore all of the files in a third party library when using CMake on Linux

I am using PVS-Studio with CMake on Linux. I recently added a third party library to my project. PVS-Studio is flagging possible issues in the header files for the third party library. How do I go...

Clang-tidy header-filter regex: Makefile -> .clang-tidy

I'm attempting to move the hardcoded config option of clang-tidy from our Makefile to a .clang-tidy YAML file. As of now, we call run-clang-tidy-6.0.py as such: # Run clang-tidy. The header filter...

Is it possible to force a trailing return type to a new line with clang-format?

I'm looking a for a way to cause trailing return types to always be put on a new line. I noticed clang format will do this with long declarations, but will not if it's short enough. Is there a way...

Strange results with clang-format options AlwaysBreakAfterReturnType and AfterFunction

clang-format version 9.0.1, applied to C++ code. The combination of AlwaysBreakAfterReturnType and AfterFunction is giving me strange results. The interaction with different options seems quite...

Per-file (ideally per-section) clang-format style override

I would like to mark part of a file with something like: // clang-format -style="{ SomeSetting: NewValue }" ... // clang-format -style="{ SomeSetting: OldValue }" that would override the...

VS code c++ for macOS: compilation works but VS code detects errors

I followed the tutorial on this webpage: https://code.visualstudio.com/docs/cpp/config-clang-mac to be able to compile c++ programs using VS Code. After doing all things requested, I am able to...

Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65

I am new in react native development. I am using new MacBook Air (M1, 2020) with M1 chip. I have Installed the dependency below: Node = v14.15.3 Npm = 6.14.9 Homebrew = 2.7.0 react-native-cli:...

XCode Clang Format extension not working Xcode 12.3 MacOS Big Sur

I upgraded to mac os big sur and XCode 12.3. Earlier I was using XCodeClangFormat extension to format my C++ files. But now this extension is not getting recognized. When I open the extension I...

Getting error "CUDA backend requires cuDNN" when configuring OpenCV cmake build with cuda backend turned on

My goal: My goal is to configure a build of OpenCV 4.5.1-dev with support for cuda, tesseract and QT without any cmake error.. The problem I am having: I am getting the following error when I...

Install pg_partman on macOS

Hi I have PostgreSQL 12 installed by homebrew and I clone the pg_partman at this commit https://github.com/pgpartman/pg_partman/commit/63328c5bd1f8009fc95592fcdd8ff45f148829e6. In the cloned...

Potential bug in std::filesystem::remove_all with clang++

DO NOT TRY THIS AT HOME I am having a weird issue with std::filesystem::remove_all. I have written a program that writes N files to disk in a single directory and then deletes all the files...

How to create a function that forwards its arguments to fmt::format keeping the type-safeness?

I have two broadly related questions. I want to make a function that forwards the arguments to fmt::format (and later to std::format, when the support increases). Something like this: #include...

Failed building wheel for pillow

Trying to build a wordcloud in python. # Start with loading all necessary libraries import pandas as pd import matplotlib.pyplot as plt from wordcloud import WordCloud pandas imported just fine,...

Error while initializing SparkSession on pyspark

*So before I start I just wanna do a little disclaimer: yes, there's a bunch of similar questions here in SO but none of them seems to solve my problem, that's why I'm asking... So I bought got a...

error: command 'x86_64-linux-gnu-gcc' failed: No such file or directory when trying to use clang as compiler

Setup I'm trying to install a python wrapper for a library called TA-LIB. I installed clang on ubuntu20 with apt-get install clang clang++ Before installing the python wrapper, you have to install...