Skip to content

Instantly share code, notes, and snippets.

View btaczala's full-sized avatar

Bartek Taczała btaczala

  • Siili Solutions
  • Szczecin
View GitHub Profile
#include <atomic>
#include <bitset>
#include <iostream>
#include <tuple>
#include <type_traits>
namespace details {
template <typename... Args>
unsigned long long getULL(Args... as) {
using unused = int[];
/*
Matrix<M,N,T>
Napisać implementację:
posiada operatory:
x dodawania macierzy (+)
x mnożenia macierzy (+)
xdodawania skalara do macierzy (+)
xmnożenia macierzy przez skalar (+)
dostarcza konstruktory:
xdomyślny
#!/usr/bin/env python
from pydbus import SessionBus
import os
from subprocess import Popen, PIPE
from rofi import Rofi
r = Rofi()
bus = SessionBus()
purple = bus.get("im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject")
#include <iostream>
template <std::size_t... Args>
struct IsSorted;
template <std::size_t index, std::size_t next, std::size_t... Args>
struct IsSorted<index, next, Args...> {
constexpr static const bool sorted =
index < next && IsSorted<next, Args...>::sorted;
};
#include <gtest/gtest.h>
#include "ex2.hpp"
TEST(ex2, simple) {
// clang-format off
EXPECT_EQ(my_std::findN({0,2,3}, 0), 0);
EXPECT_EQ(my_std::findN({2,2,3,}, 4), -1);
EXPECT_EQ(my_std::findN({0,2,3}, 3), 2);
// clang-format on