In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:
- You can separate the code into different repositories.
#include <cstdio> | |
#include <cstdlib> | |
#include <sys/epoll.h> | |
#include <libudev.h> | |
#include <string.h> | |
enum class DeviceAction : std::size_t { | |
Added = 0, | |
Removed | |
}; |
/*! | |
* Copyright (C) 2017-2018 Andreas Hollandt | |
* | |
* Distributed under the Boost Software License, Version 1.0. | |
* See copy at http://boost.org/LICENSE_1_0.txt. | |
*/ | |
#pragma once | |
#include <exception> |
#include <vector> | |
#include <string> | |
#include <random> | |
#include <iostream> | |
#define _0_9 "0123456789" | |
#define _A_Z "ABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
#define _a_z "abcdefghijklmnopqrstuvwxyz" | |
#define _ALNUMS _0_9 _A_Z _a_z |
#include <bits/stdc++.h> | |
using namespace std; | |
using i32 = std::int32_t; | |
const int INF = 1e9 + 7; | |
class RangeSlow { | |
public: | |
vector<i32> arr; |
// C++ includes used for precompiling -*- C++ -*- | |
// Copyright (C) 2003-2013 Free Software Foundation, Inc. | |
// | |
// This file is part of the GNU ISO C++ Library. This library is free | |
// software; you can redistribute it and/or modify it under the | |
// terms of the GNU General Public License as published by the | |
// Free Software Foundation; either version 3, or (at your option) | |
// any later version. |
#include <concepts> | |
#include <vector> | |
#include <cassert> | |
#include <iostream> | |
using namespace std; | |
template <typename T> | |
concept Comparable = requires (T a, T b) { | |
{a < b} -> std::convertible_to<bool>; |
package main | |
import ( | |
"cmp" | |
"fmt" | |
) | |
func compare[T cmp.Ordered](a T, b T) bool { | |
return a > b | |
} |
from typing import TypeVar, Any, Protocol, Sequence, Generic | |
class Comparable(Protocol): | |
def __lt__(self, param: Any) -> bool: | |
... | |
def __gt__(self, param: Any) -> bool: | |
... |