... | @@ -144,8 +144,6 @@ Let us start with a few selected documentation examples from my [CS |
... | @@ -144,8 +144,6 @@ Let us start with a few selected documentation examples from my [CS |
|
|
|
|
|
Doxygen can be used for *C++*. Consider the following Doxygen Example:
|
|
Doxygen can be used for *C++*. Consider the following Doxygen Example:
|
|
|
|
|
|
\bExample{C++ Doxygen Documentation}
|
|
|
|
|
|
|
|
```c++
|
|
```c++
|
|
/**
|
|
/**
|
|
* Retrieve the value stored in three selected Cells
|
|
* Retrieve the value stored in three selected Cells
|
... | @@ -163,15 +161,10 @@ Doxygen can be used for *C++*. Consider the following Doxygen Example: |
... | @@ -163,15 +161,10 @@ Doxygen can be used for *C++*. Consider the following Doxygen Example: |
|
CellTriple get3Cells(int cell1Id, int cell2Id, int cell3Id) const;
|
|
CellTriple get3Cells(int cell1Id, int cell2Id, int cell3Id) const;
|
|
```
|
|
```
|
|
|
|
|
|
\eExample
|
|
|
|
|
|
|
|
|
|
|
|
### Java
|
|
### Java
|
|
|
|
|
|
Javadoc can be used for Java. Consider the following Javadoc Example:
|
|
Javadoc can be used for Java. Consider the following Javadoc Example:
|
|
|
|
|
|
\bExample{Javadoc Documentation}
|
|
|
|
|
|
|
|
```java
|
|
```java
|
|
/**
|
|
/**
|
|
* Multi-thread Coin Flip.
|
|
* Multi-thread Coin Flip.
|
... | @@ -187,15 +180,11 @@ public static FlipTask[] multiThread(long numTrials, int numThreads) |
... | @@ -187,15 +180,11 @@ public static FlipTask[] multiThread(long numTrials, int numThreads) |
|
throws InterruptedException
|
|
throws InterruptedException
|
|
```
|
|
```
|
|
|
|
|
|
\eExample
|
|
|
|
|
|
|
|
|
|
|
|
### Python
|
|
### Python
|
|
|
|
|
|
Pydoc or Sphinx can be used for Python. Consider the following Pydoc Example:
|
|
Pydoc or Sphinx can be used for Python. Consider the following Pydoc Example:
|
|
|
|
|
|
\bExample{Python 3 Pydoc Documentation}
|
|
|
|
|
|
|
|
```python3
|
|
```python3
|
|
def parse_raw_temps(original_temps: TextIO,
|
|
def parse_raw_temps(original_temps: TextIO,
|
|
step_size: int=30, units: bool=True) -> Iterator[Tuple[float, List[float]] ]:
|
|
step_size: int=30, units: bool=True) -> Iterator[Tuple[float, List[float]] ]:
|
... | @@ -212,12 +201,9 @@ def parse_raw_temps(original_temps: TextIO, |
... | @@ -212,12 +201,9 @@ def parse_raw_temps(original_temps: TextIO, |
|
CPU cores)
|
|
CPU cores)
|
|
"""
|
|
"""
|
|
```
|
|
```
|
|
\eExample
|
|
|
|
|
|
|
|
I prefer the Sphinx/Google style for Python.
|
|
I prefer the Sphinx/Google style for Python.
|
|
|
|
|
|
\bExample{Python 3 Sphinx/Google Style Documentation}
|
|
|
|
|
|
|
|
```python3
|
|
```python3
|
|
def parse_raw_temps(original_temps: TextIO,
|
|
def parse_raw_temps(original_temps: TextIO,
|
|
step_size: int=30, units: bool=True) -> Iterator[Tuple[float, List[float]] ]:
|
|
step_size: int=30, units: bool=True) -> Iterator[Tuple[float, List[float]] ]:
|
... | @@ -236,13 +222,10 @@ def parse_raw_temps(original_temps: TextIO, |
... | @@ -236,13 +222,10 @@ def parse_raw_temps(original_temps: TextIO, |
|
CPU cores)
|
|
CPU cores)
|
|
"""
|
|
"""
|
|
```
|
|
```
|
|
\eExample
|
|
|
|
|
|
|
|
|
|
|
|
### Rust
|
|
### Rust
|
|
|
|
|
|
\bExample{Rust Documentation}
|
|
|
|
|
|
|
|
```rust
|
|
```rust
|
|
///
|
|
///
|
|
/// Take a room and change the flooring
|
|
/// Take a room and change the flooring
|
... | @@ -260,8 +243,6 @@ fn upgrade_flooring(original: &House) -> House { |
... | @@ -260,8 +243,6 @@ fn upgrade_flooring(original: &House) -> House { |
|
}
|
|
}
|
|
```
|
|
```
|
|
|
|
|
|
\eExample
|
|
|
|
|
|
|
|
Rust and Python have similar documentation styles (give or take some `markdown`
|
|
Rust and Python have similar documentation styles (give or take some `markdown`
|
|
formatting). Since we only cover small snippets of Rust in this course (for
|
|
formatting). Since we only cover small snippets of Rust in this course (for
|
|
context), we will forgo a complete
|
|
context), we will forgo a complete
|
... | | ... | |