Test Page¶
- Date
28th May 2019
- Modified
2019-07-28 14:18
- Author
Matthew Tunstall
Note
This is a test page that is used to check/test the styling of the site. Some elements may appear broken, this may or may not be on purpose.
This is my test page. I am going to use it try out a few ideas that might end up elsewhere.
Text Formatting¶
This is bold and italic
This is some general body text. This is some general body text. This is some general body text. This is some general body text. This is some general body text. This is some general body text. This is some general body text. This is some general body text.
This is some indented body text. This is some indented body text. This is some indented body text. This is some indented body text. This is some indented body text. This is some indented body text. This is some indented body text. This is some indented body text.
This body text is indented even more. This body text is indented even more. This body text is indented even more. This body text is indented even more. This body text is indented even more. This body text is indented even more. This body text is indented even more.
This is some general body text. This is some general body text. This is some general body text. This is some general body text. This is some general body text. This is some general body text. This is some general body text. This is some general body text.
Title 1¶
This section was headed by Title 1
Title 2¶
This section was headed by Title 2
Title 3¶
This section was headed by Title 3
Title 4¶
This secton was headed by Title 4
Recommended
This is a new recommended box that contains a very long line of text that will need to ideally wrap around.
This is some text in a container.
Inbuilt Admonition Styling
Attention
More Text Text
Caution
Text
Danger
Text
Error
Text
Hint
Text
Important
Text
Note
Text
Tip
Text
Warning
Text
See also
Text
Custom Admonition Styling
ToDo
Text
Recommended
Text
This is command line text. This is a second line of text.
This is root command line text.
Nested Admonitions
Hint
Caution
Tip
Hello
This is a filebox
This is a filebox, wrap = True
Multiline filebox works :)
1#!/usr/bin/env python
2"""
3show how to add a matplotlib FigureCanvasGTK or FigureCanvasGTKAgg widget and
4a toolbar to a gtk.Window
5"""
6import gtk
7
8from matplotlib.figure import Figure
9from numpy import arange, sin, pi
10
11# uncomment to select /GTK/GTKAgg/GTKCairo
12#from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
13from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas
14#from matplotlib.backends.backend_gtkcairo import FigureCanvasGTKCairo as FigureCanvas
15
16# or NavigationToolbar for classic
17#from matplotlib.backends.backend_gtk import NavigationToolbar2GTK as NavigationToolbar
18from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar
19
20win = gtk.Window()
21win.connect("destroy", lambda x: gtk.main_quit())
22win.set_default_size(400,300)
23win.set_title("Embedding in GTK")
24
25vbox = gtk.VBox()
26win.add(vbox)
27
28fig = Figure(figsize=(5,4), dpi=100)
29ax = fig.add_subplot(111)
30t = arange(0.0,3.0,0.01)
31s = sin(2*pi*t)
32
33ax.plot(t,s)
34
35canvas = FigureCanvas(fig) # a gtk.DrawingArea
36vbox.pack_start(canvas)
37toolbar = NavigationToolbar(canvas, win)
38vbox.pack_start(toolbar, False, False)
39
40win.show_all()
41gtk.main()
1void RunningLights(
2 uint8_t R, uint8_t G, uint8_t B,
3 uint8_t (&array)[NUM_LEDS][3],
4 uint16_t WaveDelay) {
5
6 // Compile Time Check for global NUM_LED value
7 static_assert(NUM_LEDS > 0, "RunningLights - NUM_LEDS needs to be > 0");
8 static_assert(NUM_LEDS <= 255, "RunningLights-NUM_LEDS needs to be <=255");
9
10 uint8_t Position = 0;
11 uint16_t j; // j needs to be large enough to hold MAX NUM_LED, 255*2 = 510.
12 for(j=0; j<NUM_LEDS*2; j++){
13 Position++; // = 0; //Position + Rate;
14 for(uint8_t i=0; i<NUM_LEDS; i++) {
15 setPixelRGB(((sin(i+Position) * 127 + 128)/255)*R,
16 ((sin(i+Position) * 127 + 128)/255)*G,
17 ((sin(i+Position) * 127 + 128)/255)*B,
18 i,pixels);
19 }
20 writeLED(pixels,NUM_LEDS,DMA_Buffer);
21 delay_ms(WaveDelay);
22 }
23}
void RunningLights(
uint8_t R, uint8_t G, uint8_t B,
uint8_t (&array)[NUM_LEDS][3],
uint16_t WaveDelay) {
// Compile Time Check for global NUM_LED value
static_assert(NUM_LEDS > 0, "RunningLights - NUM_LEDS needs to be > 0");
static_assert(NUM_LEDS <= 255, "RunningLights-NUM_LEDS needs to be <=255");
uint8_t Position = 0;
uint16_t j; // j needs to be large enough to hold MAX NUM_LED, 255*2 = 510.
for(j=0; j<NUM_LEDS*2; j++){
Position++; // = 0; //Position + Rate;
for(uint8_t i=0; i<NUM_LEDS; i++) {
setPixelRGB(((sin(i+Position) * 127 + 128)/255)*R,
((sin(i+Position) * 127 + 128)/255)*G,
((sin(i+Position) * 127 + 128)/255)*B,
i,pixels);
}
writeLED(pixels,NUM_LEDS,DMA_Buffer);
delay_ms(WaveDelay);
}
}
Recommended
1#!/usr/bin/env python
2# sercom_mon.py - Serial Monitor Script
3"""
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 3 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16"""
17
18import serial
19ser = serial.Serial('/dev/ttyUSB0',9600)
20
21def main():
22while True:
23while(ser.inWaiting() > 0):
24print(ser.readline().rstrip())
25
26if \__name_\_ == "__main__":
27# Someone is launching this directly
28main()
29
30# This is a long line of text to test the code highlighting plugin. This is a long line of text to test the code highlighting plugin.This is a long line of text to test the code highlighting plugin.This is a long line of text to test the code highlighting plugin.
Removing the code-block caption and placing the caption text directly into the admonition resolves the formatting issue.
Recommended
Python Highlight Example
1#!/usr/bin/env python 2# sercom_mon.py - Serial Monitor Script 3""" 4This program is free software: you can redistribute it and/or modify 5it under the terms of the GNU General Public License as published by 6the Free Software Foundation, either version 3 of the License, or 7(at your option) any later version. 8 9This program is distributed in the hope that it will be useful, 10but WITHOUT ANY WARRANTY; without even the implied warranty of 11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12GNU General Public License for more details. 13 14You should have received a copy of the GNU General Public License 15along with this program. If not, see <http://www.gnu.org/licenses/>. 16""" 17 18import serial 19ser = serial.Serial('/dev/ttyUSB0',9600) 20 21def main(): 22while True: 23while(ser.inWaiting() > 0): 24print(ser.readline().rstrip()) 25 26if \__name_\_ == "__main__": 27# Someone is launching this directly 28main() 29 30# This is a long line of text to test the code highlighting plugin. This is a long line of text to test the code highlighting plugin.This is a long line of text to test the code highlighting plugin.This is a long line of text to test the code highlighting plugin.
A Simple Table
Header1 |
Header2 |
Header3 |
---|---|---|
Column1 |
Column2 |
Column3 |
Column1 |
Column2 |
Column3 |
Hor Column Span |
Column3 |
|
Column1 |
Column2 |
Column3 |
Another Simple Table
Column A |
Column B |
Column C |
---|---|---|
One |
Two |
Three |
Four |
Five |
Six |
Seven |
Eight |
Nine |
A Grid Table
Grid Table |
Header2 |
Header3 |
---|---|---|
Column 1 |
Column 2 |
Vertical column span |
Horizontal Span |
A Wide Grid Table
Grid Table |
Header2 |
Header3 |
Header4 |
Header5 |
Header6 |
Header7 |
Header8 |
Header9 |
Header10 |
---|---|---|---|---|---|---|---|---|---|
Column 1 |
Column 2 |
Vertical column span |
|||||||
Horizontal Span |
A List Table
Treat |
Quantity |
Description |
---|---|---|
Albatross |
2.99 |
On a stick! |
Crunchy Frog |
1.49 |
If we took the bones out, it wouldn’t be crunchy, now would it? |
Gannet Ripple |
1.99 |
On a stick! |
Container Styles
These are styles applied to the rest container directive
This text is in TextNotes.This is some standard body text. It is just here to bulk out this section so I can see how it looks. I have nothing to say, I am just rambling on about nothing important. How much text should I write? Not really got a clue. Having a wide screen means I am struggling to get two lines of text at the moment. I can only hope that on a more confined page layout this wraps round into about 4-5 lines.
This text is in TextNotesLight.This is some standard body text. It is just here to bulk out this section so I can see how it looks. I have nothing to say, I am just rambling on about nothing important. How much text should I write? Not really got a clue. Having a wide screen means I am struggling to get two lines of text at the moment. I can only hope that on a more confined page layout this wraps round into about 4-5 lines.
This text is in TextNotesMid.This is some standard body text. It is just here to bulk out this section so I can see how it looks. I have nothing to say, I am just rambling on about nothing important. How much text should I write? Not really got a clue. Having a wide screen means I am struggling to get two lines of text at the moment. I can only hope that on a more confined page layout this wraps round into about 4-5 lines.
This text is in TextNotesLSide.This is some standard body text. It is just here to bulk out this section so I can see how it looks. I have nothing to say, I am just rambling on about nothing important. How much text should I write? Not really got a clue. Having a wide screen means I am struggling to get two lines of text at the moment. I can only hope that on a more confined page layout this wraps round into about 4-5 lines.
This text is in TextNotesRSide.This is some standard body text. It is just here to bulk out this section so I can see how it looks. I have nothing to say, I am just rambling on about nothing important. How much text should I write? Not really got a clue. Having a wide screen means I am struggling to get two lines of text at the moment. I can only hope that on a more confined page layout this wraps round into about 4-5 lines.
This is an embedded image file aligned right

This is another embedded image file

This is a line of text
Indirect Hyperlinks¶
This link DOES NOT use an indirect hyperlink
These links DO use indirect hyperlinks
Document Links¶
Add a link to another document with the “View Guide” text link. View Guide
Add a link to another document with the page title “Elog” as the text link. Elog