SE250:HTTB:WIP:Test
Hidden text testing
Doesn't seem to work on this wiki :(
Test 2
<html> <embed src="https://www.se.auckland.ac.nz/courses/SOFTENG250/resources/rwan064-1.swf" height="500" width="500" /> </html>
Another test
<html>
<head> <title>CSS Testing</title> <style type="text/css">
source { color: red; }
source.java { color: blue; }
</style> </head> <body>
<source class="java"> class Java { private int myname; } </souce> <source> extern int c; </source>
</body>
</html>
<html>
<head> <title>CSS Testing</title>
<style type="text/css"> mytag { color: red; }
table { }
td { color: #121212; background: #D0D0D0; }
td.line_num { color: white; background: gray; }
clang { }
clang.keyword { color: blue; font-style: bold; }
source { color: red; }
source.java { color: blue; } </style>
</head> <body> <mytag>hello</mytag> my body
void arraylist_init( ArrayList *alist ) { alist->arr = 0; alist->length = 0; alist->capacity = 0; }
1 | <clang class="keyword">void</clang> arraylist_init( ArrayList *alist ) { |
2 | alist->arr = 0; |
3 | alist->length = 0; |
4 | alist->capacity = 0; |
5 | } |
<source class="java"> class Java { private int myname; } </souce> <source> extern int c; </source>
</body>
</html>
<html> <head>
<title>LL.c</title>
</head> <body bgcolor="#ffffff" text="#000000">
<a name="line1"> 1</a> <font color="#444444">/* <a name="line2"> 2</a> File: LL.c <a name="line3"> 3</a> Date: 1 April 2008 <a name="line4"> 4</a> Author: John Hamer <a name="line5"> 5</a> Purpose: Starter code for SOFTENG 250 lab 4, 2008 <a name="line6"> 6</a> */</font> <a name="line7"> 7</a> <a name="line8"> 8</a> <font color="0000ff"><strong>#include <font color="#008000"><assert.h></font></strong></font> <a name="line9"> 9</a> <font color="0000ff"><strong>#include <font color="#008000"><stdlib.h></font></strong></font> <a name="line10">10</a> <font color="0000ff"><strong>#include <font color="#008000"><stdio.h></font></strong></font> <a name="line11">11</a> <a name="line12">12</a> <strong>typedef</strong> <strong>int</strong> <font color="#2040a0">element_t</font><font color="4444FF">;</font> <a name="line13">13</a> <a name="line14">14</a> <strong>typedef</strong> <a name="line15">15</a> <strong>struct</strong> <font color="#2040a0">Cons</font> <font color="4444FF"><strong>{</strong></font> <a name="line16">16</a> <font color="#2040a0">element_t</font> <font color="#2040a0">head</font><font color="4444FF">;</font> <a name="line17">17</a> <strong>struct</strong> <font color="#2040a0">Cons</font><font color="4444FF">*</font> <font color="#2040a0">tail</font><font color="4444FF">;</font> <a name="line18">18</a> <font color="4444FF"><strong>}</strong></font> <font color="#2040a0">Cons</font><font color="4444FF">;</font> <a name="line19">19</a> <a name="line20">20</a> <strong>static</strong> <font color="#2040a0">Cons</font> <font color="#2040a0">NIL</font> <font color="4444FF">=</font> <font color="4444FF"><strong>{</strong></font> <font color="#FF0000">0</font>, <font color="4444FF">&</font><font color="#2040a0">NIL</font> <font color="4444FF"><strong>}</strong></font><font color="4444FF">;</font> <a name="line21">21</a> <font color="#2040a0">Cons</font><font color="4444FF">*</font> <font color="#2040a0">nil</font> <font color="4444FF">=</font> <font color="4444FF">&</font><font color="#2040a0">NIL</font><font color="4444FF">;</font> <a name="line22">22</a> <a name="line23">23</a> <a name="line24">24</a> <font color="#2040a0">Cons</font><font color="4444FF">*</font> <font color="#2040a0">cons</font><font color="4444FF">(</font> <font color="#2040a0">element_t</font> <font color="#2040a0">elt</font>, <font color="#2040a0">Cons</font><font color="4444FF">*</font> <font color="#2040a0">tail</font> <font color="4444FF">)</font> <font color="4444FF"><strong>{</strong></font> <a name="line25">25</a> <font color="#2040a0">Cons</font><font color="4444FF">*</font> <font color="#2040a0">cell</font> <font color="4444FF">=</font> <font color="#2040a0">malloc</font><font color="4444FF">(</font> <strong>sizeof</strong><font color="4444FF">(</font><font color="#2040a0">Cons</font><font color="4444FF">)</font> <font color="4444FF">)</font><font color="4444FF">;</font> <a name="line26">26</a> <font color="#2040a0">assert</font><font color="4444FF">(</font> <font color="#2040a0">cell</font> <font color="4444FF">!</font><font color="4444FF">=</font> <font color="#FF0000">0</font> <font color="4444FF">)</font><font color="4444FF">;</font> <a name="line27">27</a> <font color="#2040a0">cell</font><font color="4444FF">-</font><font color="4444FF">></font><font color="#2040a0">head</font> <font color="4444FF">=</font> <font color="#2040a0">elt</font><font color="4444FF">;</font> <a name="line28">28</a> <font color="#2040a0">cell</font><font color="4444FF">-</font><font color="4444FF">></font><font color="#2040a0">tail</font> <font color="4444FF">=</font> <font color="#2040a0">tail</font><font color="4444FF">;</font> <a name="line29">29</a> <strong>return</strong> <font color="#2040a0">cell</font><font color="4444FF">;</font> <a name="line30">30</a> <font color="4444FF"><strong>}</strong></font> <a name="line31">31</a> <a name="line32">32</a> <strong>void</strong> <font color="#2040a0">print_list</font><font color="4444FF">(</font> <font color="#2040a0">Cons</font><font color="4444FF">*</font> <font color="#2040a0">list</font> <font color="4444FF">)</font> <font color="4444FF"><strong>{</strong></font> <a name="line33">33</a> <strong>char</strong><font color="4444FF">*</font> <font color="#2040a0">sep</font> <font color="4444FF">=</font> <font color="#008000">""</font><font color="4444FF">;</font> <a name="line34">34</a> <font color="#2040a0">printf</font><font color="4444FF">(</font> <font color="#008000">"List["</font> <font color="4444FF">)</font><font color="4444FF">;</font> <a name="line35">35</a> <strong>for</strong><font color="4444FF">(</font> <font color="4444FF">;</font> <font color="#2040a0">list</font> <font color="4444FF">!</font><font color="4444FF">=</font> <font color="#2040a0">nil</font><font color="4444FF">;</font> <font color="#2040a0">list</font> <font color="4444FF">=</font> <font color="#2040a0">list</font><font color="4444FF">-</font><font color="4444FF">></font><font color="#2040a0">tail</font> <font color="4444FF">)</font> <font color="4444FF"><strong>{</strong></font> <a name="line36">36</a> <font color="#2040a0">printf</font><font color="4444FF">(</font> <font color="#008000">"%s%d"</font>, <font color="#2040a0">sep</font>, <font color="#2040a0">list</font><font color="4444FF">-</font><font color="4444FF">></font><font color="#2040a0">head</font> <font color="4444FF">)</font><font color="4444FF">;</font> <a name="line37">37</a> <font color="#2040a0">sep</font> <font color="4444FF">=</font> <font color="#008000">","</font><font color="4444FF">;</font> <a name="line38">38</a> <font color="4444FF"><strong>}</strong></font> <a name="line39">39</a> <font color="#2040a0">printf</font><font color="4444FF">(</font> <font color="#008000">"]"</font> <font color="4444FF">)</font><font color="4444FF">;</font> <a name="line40">40</a> <font color="4444FF"><strong>}</strong></font> <a name="line41">41</a> <a name="line42">42</a> <a name="line43">43</a> <strong>int</strong> <font color="#2040a0">main</font><font color="4444FF">(</font> <font color="4444FF">)</font> <font color="4444FF"><strong>{</strong></font> <a name="line44">44</a> <font color="#2040a0">print_list</font><font color="4444FF">(</font> <font color="#2040a0">cons</font><font color="4444FF">(</font><font color="#FF0000">1</font>,<font color="#2040a0">cons</font><font color="4444FF">(</font><font color="#FF0000">2</font>,<font color="#2040a0">cons</font><font color="4444FF">(</font><font color="#FF0000">3</font>,<font color="#2040a0">nil</font><font color="4444FF">)</font><font color="4444FF">)</font><font color="4444FF">)</font> <font color="4444FF">)</font><font color="4444FF">;</font> <font color="#444444">/* expect: List[1,2,3] */</font> <a name="line45">45</a> <strong>return</strong> <font color="#FF0000">0</font><font color="4444FF">;</font> <a name="line46">46</a> <font color="4444FF"><strong>}</strong></font> <a name="line47">47</a> <a name="line48">48</a> <font color="#444444">/* <a name="line49">49</a> Local Variables: <a name="line50">50</a> compile-command: "gcc -Wall LL.c -o LL && ./LL" <a name="line51">51</a> End: <a name="line52">52</a> */</font>
syntax highlighted by <a href="http://www.palfrader.org/code2html">Code2HTML</a>, v. 0.9.1 </body> </html>
Syntax Highlight
<html> <head> <title>Test</title> <style> keyword {
color: blue;
} datatype {
color: purple;
} number {
color: orange;
} prepro {
color: brown;
}
</style>
</head>
<body>
<prepro>#include <stdio.h></prepro>
<datatype>int</datatype> main( <datatype>int</datatype> argc, <datatype>char</datatype> **argv )
{
<b><keyword>return</keyword></b> <number>0</number>;
}
</body>
</html>
testing
<html> QUIZ
<button onclick='javascript:alert("Wrong")'>ans1</button> <button onclick='javascript:alert("Wrong")'>ans2</button> <button onclick='javascript:alert("Correct")'>ans3</button> <button onclick='javascript:alert("Wrong! weeeeeeeeeeee")'>HAI</button>
</html>
Previous Page | Contents | Next Page |
Back to HTTB | Contents | Next Page |