Skip to content

Commit

Permalink
Add tags to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Aug 16, 2024
1 parent 6bb2669 commit 706bd12
Show file tree
Hide file tree
Showing 243 changed files with 466 additions and 48 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ docs/_build
**/coverage
**/dist/*
javascript/src/lib/fallbacks
docs/languages*.svg
docs/languages*.svg
docs/_tags
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef EULER_MATH_H
#define EULER_MATH_H

#include "macros.h"
#include "macros.hpp"
#include <math.h>
#include <stdlib.h>
#include <stdint.h>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion cplusplus/src/p0015.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ How many such routes are there through a 20×20 grid?
#define EULER_P0015
#include <stdint.h>
#include <iostream>
#include "include/math.h"
#include "include/math.hpp"

#define lattice_paths(height, width) (n_choose_r(height + width, height))

Expand Down
2 changes: 1 addition & 1 deletion cplusplus/src/p0022.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <iostream>
#include <vector>
#include <algorithm>
#include "include/utils.h"
#include "include/utils.hpp"

uint64_t p0022() {
uint64_t answer = 0;
Expand Down
2 changes: 1 addition & 1 deletion cplusplus/src/p0034.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Note: as 1! = 1 and 2! = 2 are not sums they are not included.
#include <stdint.h>
#include <iostream>
#include <cstdio>
#include "include/math.h"
#include "include/math.hpp"

uint64_t p0034() {
uint64_t answer = 0, sum;
Expand Down
2 changes: 1 addition & 1 deletion cplusplus/src/p0076.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ positive integers?
#define EULER_P0076
#include <stdint.h>
#include <iostream>
#include "include/macros.h"
#include "include/macros.hpp"

uint32_t p0076() {
uint32_t answer = 0;
Expand Down
2 changes: 1 addition & 1 deletion cplusplus/src/tests/test_compiler_macros.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <stdio.h>
#include "../include/macros.h"
#include "../include/macros.hpp"

int main(int argc, char const *argv[]) {
printf(
Expand Down
3 changes: 3 additions & 0 deletions docs/_static/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.rst-content .toctree-wrapper:not(:last-child) ul {
margin-bottom: 10px;
}
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
rust_crates = [
"../rust",
]
html_css_files = [
'style.css',
]

try:
check_call(['rpm-ostree', '--version'])
Expand Down
4 changes: 4 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ Problems Solved

usage
src/*

.. toctree::
:maxdepth: 1

_tags/tagsindex

Indices and tables
Expand Down
2 changes: 0 additions & 2 deletions docs/src/c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Library Code

.. toctree::
:glob:
:numbered:
:maxdepth: 1

c/lib/*
Expand All @@ -20,7 +19,6 @@ Problems Solved

.. toctree::
:glob:
:numbered:
:maxdepth: 1

c/p[0-9][0-9][0-9][0-9]
2 changes: 2 additions & 0 deletions docs/src/c/lib/bcd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,5 @@ It was also a good exercise in x86 assembly, as several portions are accellerate
.. literalinclude:: ../../../../c/src/include/bcd.h
:language: C
:linenos:
.. tags:: large-numbers
2 changes: 2 additions & 0 deletions docs/src/c/lib/digits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ Includes
.. literalinclude:: ../../../../c/src/include/digits.h
:language: C
:linenos:
.. tags:: c-iterator
4 changes: 3 additions & 1 deletion docs/src/c/lib/factors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ factors for a given number. It is generally used by first calling
.. literalinclude:: ../../../../c/src/include/factors.h
:language: C
:linenos:
:linenos:
.. tags:: factorization, divisor-count, c-iterator
4 changes: 3 additions & 1 deletion docs/src/c/lib/fibonacci.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,6 @@ Includes
.. literalinclude:: ../../../../c/src/include/fibonacci.h
:language: C
:linenos:
:linenos:
.. tags:: c-iterator, fibonacci-number
4 changes: 3 additions & 1 deletion docs/src/c/lib/iterator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,6 @@ Includes
.. literalinclude:: ../../../../c/src/include/iterator.h
:language: C
:linenos:
:linenos:
.. tags:: c-iterator
4 changes: 3 additions & 1 deletion docs/src/c/lib/primes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,6 @@ Includes
.. literalinclude:: ../../../../c/src/include/primes.h
:language: C
:linenos:
:linenos:
.. tags:: prime-number, divisibility, factorization, c-iterator
2 changes: 2 additions & 0 deletions docs/src/c/lib/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ View source code :source:`c/src/include/utils.h`
.. literalinclude:: ../../../../c/src/include/utils.h
:language: C
:linenos:
.. tags:: file-io
2 changes: 2 additions & 0 deletions docs/src/c/p0001.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ Solution
.. literalinclude:: ../../../c/src/p0001.c
:language: C
:linenos:
.. tags:: c-iterator, divisibility
2 changes: 2 additions & 0 deletions docs/src/c/p0002.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ Solution
.. literalinclude:: ../../../c/src/p0002.c
:language: C
:linenos:
.. tags:: c-iterator, divisibility, fibonacci-number
2 changes: 1 addition & 1 deletion docs/src/c/p0003.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ Solution
:language: C
:linenos:
.. tags:: c-iterator factorization prime-number
.. tags:: c-iterator, factorization, prime-number
4 changes: 3 additions & 1 deletion docs/src/c/p0004.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ View source code :source:`c/src/p0004.c`
Includes
--------

- `iterator.h <./lib/digits.html>`__
- `digits.h <./lib/digits.html>`__

Solution
--------
Expand All @@ -23,3 +23,5 @@ Solution
.. literalinclude:: ../../../c/src/p0004.c
:language: C
:linenos:
.. tags:: c-iterator, palindrome
2 changes: 2 additions & 0 deletions docs/src/c/p0005.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ Solution
.. literalinclude:: ../../../c/src/p0005.c
:language: C
:linenos:
.. tags:: c-iterator, divisibility, factorization, prime-number
2 changes: 2 additions & 0 deletions docs/src/c/p0006.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ Solution
.. literalinclude:: ../../../c/src/p0006.c
:language: C
:linenos:
.. tags:: arithmetic-progression, sequence-summation
2 changes: 2 additions & 0 deletions docs/src/c/p0007.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ Solution
.. literalinclude:: ../../../c/src/p0007.c
:language: C
:linenos:
.. tags:: c-iterator, prime-number
2 changes: 2 additions & 0 deletions docs/src/c/p0009.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ Solution
.. literalinclude:: ../../../c/src/p0009.c
:language: C
:linenos:
.. tags:: pythagorean-triple
2 changes: 2 additions & 0 deletions docs/src/c/p0010.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ Solution
.. literalinclude:: ../../../c/src/p0010.c
:language: C
:linenos:
.. tags:: c-iterator, prime-number
2 changes: 2 additions & 0 deletions docs/src/c/p0011.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ Solution
.. literalinclude:: ../../../c/src/p0011.c
:language: C
:linenos:
.. tags:: optimization
2 changes: 2 additions & 0 deletions docs/src/c/p0012.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ Solution
.. literalinclude:: ../../../c/src/p0012.c
:language: C
:linenos:
.. tags:: c-iterator, divisor-count, divisibility, marked-slow
2 changes: 2 additions & 0 deletions docs/src/c/p0013.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ Solution
.. literalinclude:: ../../../c/src/p0013.c
:language: C
:linenos:
.. tags:: large-numbers
2 changes: 2 additions & 0 deletions docs/src/c/p0014.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ Solution
.. literalinclude:: ../../../c/src/p0014.c
:language: C
:linenos:
.. tags:: collatz, recursion, longest-path
2 changes: 2 additions & 0 deletions docs/src/c/p0015.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ Solution
.. literalinclude:: ../../../c/src/p0015.c
:language: C
:linenos:
.. tags:: combinatorics
2 changes: 2 additions & 0 deletions docs/src/c/p0016.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ Solution
.. literalinclude:: ../../../c/src/p0016.c
:language: C
:linenos:
.. tags:: large-numbers, digit-sum, power
2 changes: 2 additions & 0 deletions docs/src/c/p0017.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ Solution
.. literalinclude:: ../../../c/src/p0017.c
:language: C
:linenos:
.. tags:: word-problem, combinatorics
2 changes: 2 additions & 0 deletions docs/src/c/p0020.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ Solution
.. literalinclude:: ../../../c/src/p0020.c
:language: C
:linenos:
.. tags:: large-numbers, digit-sum, factorial
2 changes: 2 additions & 0 deletions docs/src/c/p0022.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ Solution
.. literalinclude:: ../../../c/src/p0022.c
:language: C
:linenos:
.. tags:: word-problem, sorting, file-io
2 changes: 2 additions & 0 deletions docs/src/c/p0025.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ Solution
.. literalinclude:: ../../../c/src/p0025.c
:language: C
:linenos:
.. tags:: fibonacci-number, large-numbers
2 changes: 2 additions & 0 deletions docs/src/c/p0030.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ Solution
.. literalinclude:: ../../../c/src/p0030.c
:language: C
:linenos:
.. tags:: power, digit-sum, c-iterator
2 changes: 2 additions & 0 deletions docs/src/c/p0034.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ Solution
.. literalinclude:: ../../../c/src/p0034.c
:language: C
:linenos:
.. tags:: factorial, digit-sum, c-iterator
2 changes: 2 additions & 0 deletions docs/src/c/p0076.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ Solution
.. literalinclude:: ../../../c/src/p0076.c
:language: C
:linenos:
.. tags:: partition
2 changes: 2 additions & 0 deletions docs/src/c/p0836.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ Solution
.. literalinclude:: ../../../c/src/p0836.c
:language: C
:linenos:
.. tags:: word-problem
2 changes: 0 additions & 2 deletions docs/src/cplusplus.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Library Code

.. toctree::
:glob:
:numbered:
:maxdepth: 1

cplusplus/lib/*
Expand All @@ -20,7 +19,6 @@ Problems Solved

.. toctree::
:glob:
:numbered:
:maxdepth: 1

cplusplus/p[0-9][0-9][0-9][0-9]
6 changes: 3 additions & 3 deletions docs/src/cplusplus/lib/macros.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
macros.h
========
macros.hpp
==========

View source code :source:`cplusplus/src/include/macros.h`
View source code :source:`cplusplus/src/include/macros.hpp`

.. c:namespace-push:: cppmacros
Expand Down
6 changes: 3 additions & 3 deletions docs/src/cplusplus/lib/math.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
math.h
======
math.hpp
========

View source code :source:`cplusplus/src/include/math.h`
View source code :source:`cplusplus/src/include/math.hpp`

Includes
--------
Expand Down
8 changes: 5 additions & 3 deletions docs/src/cplusplus/lib/utils.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
utils.h
=======
utils.hpp
=========

View source code :source:`cplusplus/src/include/utils.h`
View source code :source:`cplusplus/src/include/utils.hpp`

.. cpp:namespace-push:: utils
Expand All @@ -16,3 +16,5 @@ View source code :source:`cplusplus/src/include/utils.h`
.. literalinclude:: ../../../../cplusplus/src/include/utils.h
:language: C++
:linenos:

.. tags:: file-io
2 changes: 2 additions & 0 deletions docs/src/cplusplus/p0001.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ View source code :source:`cplusplus/src/p0001.cpp`
.. literalinclude:: ../../../cplusplus/src/p0001.cpp
:language: C++
:linenos:

.. tags:: divisibility
2 changes: 2 additions & 0 deletions docs/src/cplusplus/p0002.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ View source code :source:`cplusplus/src/p0002.cpp`
.. literalinclude:: ../../../cplusplus/src/p0002.cpp
:language: C++
:linenos:

.. tags:: fibonacci-number, divisibility
2 changes: 2 additions & 0 deletions docs/src/cplusplus/p0004.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ View source code :source:`cplusplus/src/p0004.cpp`
.. literalinclude:: ../../../cplusplus/src/p0004.cpp
:language: C++
:linenos:

.. tags:: palindrome
2 changes: 2 additions & 0 deletions docs/src/cplusplus/p0006.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ Solution
.. literalinclude:: ../../../cplusplus/src/p0006.cpp
:language: C++
:linenos:

.. tags:: arithmetic-progression, sequence-summation
2 changes: 2 additions & 0 deletions docs/src/cplusplus/p0009.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ Solution
.. literalinclude:: ../../../cplusplus/src/p0009.cpp
:language: C++
:linenos:

.. tags:: pythagorean-triple
Loading

0 comments on commit 706bd12

Please sign in to comment.