Difference between revisions of "Template:1010CaseStudy"

From CompSciWiki
Jump to: navigation, search
Line 17: Line 17:
 
!colspan="3" valign="top" align="left" style="font-weight: normal"|
 
!colspan="3" valign="top" align="left" style="font-weight: normal"|
 
=Code=
 
=Code=
{{ #if: {{{SolutionCode|}}} | {{#tag:spoiler |{{#tag:pre |{{{SolutionCode}}}}}}} | SolutionCode goes here. Please DO NOT put your code in <pre> tags!}}
+
SolutionCode|SolutionCode
|}
+
  
 
[[Category:COMP 1010]]
 
[[Category:COMP 1010]]

Revision as of 15:20, 23 January 2013


This template is used for the Case Studies page. Instructions and example usage are below.

Original design by User:WikiSysop. Modified and updated by User:BrianT and User:KarelK. Based on Program A Day template.


Example Code Usage

{{1010CaseStudy
|ProblemName=The name of the program

|Problem=The problem 

|SideSectionTitle=...by students

|SideSection=
[[Image:OperatingSystemExample.jpg|center|200px]]
<BR>
An image or By Students section

|Solution=The solution...

|SolutionCode=public class MySolution
{
  public static void main ( String [] args )
  {
    System.out.println("Hello, world!");
  }
}
}}

Current Issues

  • In the SolutionCode parameter, all OR pipe characters ( | character ) should be replaced with the pipe wiki template: {{!}}
  • Syntax highlighting will have to wait for the Wikimedia system to be updated to a more recent version.
  • Note that there is NO WORDWRAP in use inside <pre> tags. Please be sure to restrict the number of characters per line in your SolutionCode parameter and inside any <pre> tags.

Sample Output

Please note that the layout gets a bit skewed while displaying the template in itself; if you don't have horribly oversized images, everything will look fine when used in production.

Everything below this line is the sample output



Back to the Case Studies homepage

Problem

The problem

 

...by students

OperatingSystemExample.jpg


An image or By Students section

Solution

The solution...

Code

SolutionCode goes here. Please DO NOT put your code in <pre> tags!

Back to the Case Studies homepage