What do you want to save?
Add Code snippet
New code examples
-
R 2021-10-19 09:06:11
how many pairwise combinations
# Given "LIST" a list of N elements, the number of unique pairwise comparisons # among them is given by the formula: ncomp = N(N-1)/2 # In order to operate all the pairwise comparison in R library(RcppAlgos) comboGeneral( LIST , m=2 ). #m = 2... Add solution -
C++ 2021-10-18 15:38:03
cpp lambda
- Good website to learn lambda in c++: https://docs.microsoft.com/en-us/cpp/cpp/lambda-expressions-in-cpp https://en.cppreference.com/w/cpp/language/lambda https://www.geeksforgeeks.org/lambda-expression-in-c/ https://stackoverflow.com/questions/7627098/w... Add solution -
Other 2021-10-17 06:19:10
variadic macros
// variadic_macros.cpp #include <stdio.h> #define EMPTY #define CHECK1(x, ...) if (!(x)) { printf(__VA_ARGS__); } #define CHECK2(x, ...) if ((x)) { printf(__VA_ARGS__); } #define CHECK3(...) { printf(__VA_ARGS__); } #define MACRO(s, ...) printf(s, ... Add solution