Test Page

Date

28th May 2019

Modified

2019-07-28 14:18

Author

Matthew Tunstall

This is my test page. I am going to use it try out a few ideas that might end up elsewhere.

This is some bold text
This is some italic text
Text cannot be bold and italic using plain reStructuredText. To achieve it requires CSS styling.

This is bold and italic

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


This is command line text. This is a second line of text.
This is root command line text.
This is a highlight box used for a note.

This is some more body text.

This is a highlight box used for warning.

This is alternative body text.

This is a highlight box used for important.

This is some more body text.

This is a highlight box used for todo items.

The following boxes are generated with shorter references

Note

This is my new note.

Warning

This is a new warning box.

Important

This is a new important box.

This is command line text.

This is root command line text.

This is a filebox

/home/matt/Git This is my git repo

This is a filebox, wrap = True

/home/matt/Git This is my git repo

Multiline filebox works :)

Python Highlight Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python
"""
show how to add a matplotlib FigureCanvasGTK or FigureCanvasGTKAgg widget and
a toolbar to a gtk.Window
"""
import gtk

from matplotlib.figure import Figure
from numpy import arange, sin, pi

# uncomment to select /GTK/GTKAgg/GTKCairo
#from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas
#from matplotlib.backends.backend_gtkcairo import FigureCanvasGTKCairo as FigureCanvas

# or NavigationToolbar for classic
#from matplotlib.backends.backend_gtk import NavigationToolbar2GTK as NavigationToolbar
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar

win = gtk.Window()
win.connect("destroy", lambda x: gtk.main_quit())
win.set_default_size(400,300)
win.set_title("Embedding in GTK")

vbox = gtk.VBox()
win.add(vbox)

fig = Figure(figsize=(5,4), dpi=100)
ax = fig.add_subplot(111)
t = arange(0.0,3.0,0.01)
s = sin(2*pi*t)

ax.plot(t,s)

canvas = FigureCanvas(fig)  # a gtk.DrawingArea
vbox.pack_start(canvas)
toolbar = NavigationToolbar(canvas, win)
vbox.pack_start(toolbar, False, False)

win.show_all()
gtk.main()
C++ Highlight Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
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);
    }
}
C++ Highlight Example
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);
    }
}

A Simple Table

Header1

Header2

Header3

Column1

Column2

Column3

Column1

Column2

Column3

Hor Column Span

Column3

Column1

Column2

Column3

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

This is an embedded image file

A Furby

This is a line of text