CSC/ECE 517 Fall 2012/ch1 1w10 pk

From Expertiza_Wiki
Revision as of 16:34, 10 September 2012 by Pmocampo (talk | contribs) (Added a template)
Jump to navigation Jump to search

1w10: Language extensions (not patterns or packages) for ORM.

There are many design patterns and software tools for referencing relational dbs from o-o languages. ActiveRecord, however, is a new approach, integrating support into the Rails framework itself. Do other languages have support that is as tightly integrated as ActiveRecord? Compare the ease of programming with language-level support to the ease of programming with external tools. Improve the existing work.

Section headings

Headings organize your writing into sections. The wiki software can automatically generate a table of contents from them. Start with 2 'equals' ("==") characters.

Subsection

Using more 'equals' characters creates a subsection.

A smaller subsection

Don't skip levels, like from two ("==") to four ("====") 'equals' characters.

A defined term
A semicolon at the

start of a line is a way of making a definition where the word being defined appears in bold. The definition itself follows the colon and is not rendered bold by default. It is not a heading and does not appear in the table of contents.

Lists

  • Unordered lists are easy to do:
    • Start every line with a star.
      • More stars indicate a deeper level.
      Previous item continues.
    • A new line
  • in a list

marks the end of the list.

  • Of course you can start again.
  1. Numbered lists are:
    1. Very organized
    2. Easy to follow
    Previous item continues

A new line marks the end of the list.

  1. New numbering starts with 1.

Format

Text formatting

Description What you type What it looks like

Italics, bold, Template:Smallcaps.

To ''italicize text'', just put
2 apostrophes on each side.

3 apostrophes will '''bold the text'''

5 apostrophes for '''''bold italics'''''

For text as {{Smallcaps|small caps}},
that uses a [[Help:Template|template]].

To italicize text, just put 2 apostrophes on each side.

3 apostrophes will bold the text

5 apostrophes for bold italics

For text as Template:Smallcaps, that uses a template.

Small chunks of source code within a line of normal text.

Code is displayed in a monospace font.

function <code>int m2()</code> is nice

function int m2() is nice

Syntax highlighting for source code.

Computer code has colored text and more stringent formatting. For example, to define a function: int m2(), with highlights.

<syntaxhighlight lang="cpp">
#include <iostream>
int m2 (int ax, char *p_ax) {
  std::cout <<"Hello World!";
  return 0;
}</syntaxhighlight>
#include <iostream>
int m2 (int ax, char *p_ax) {
  std::cout <<"Hello World!";
  return 0;
}

Small text.

Use <small>small text</small> if needed.

A span tag can set text font-size as
being <span style="font-size:87%">87%
of prior size</span>, to match an
image caption.

Use small text if needed.

A span tag can set text font-size as being 87% of prior size, to match an image caption.

Big text.

Better not use <big>big text</big>,
unless <small> it's <big>within</big>
small</small> text.

Better not use big text, unless it's within small text.

You can include a non-breaking space (sometimes called non-printing character) where you require two words to always appear together on the same line, such as Mr. Smith or 400 km/h, using &nbsp; in place of a regular space between the two "words" that need to behave as a single word (never be separated on different lines).

Mr.&nbsp;Smith or 400&nbsp;km/h.

Mr. Smith or 400 km/h.

Extra spacing within text can best be achieved using the pad template.

Mary {{pad|4em}} had a little lamb.

Mary       had a little lamb.

Typewriter font.

(Also works beyond the end of a paragraph.)

<tt>arrow      &rarr;</tt>

<tt>''italics'', '''bold'''</tt>

<tt><nowiki>[[link]]

New paragraph </tt>started here.

arrow →

italics, bold

link

New paragraph started here.


Link to another wiki article

  • Internally, the first letter of the target page is automatically capitalized and spaces are represented as underscores (typing an underscore in the link has the same effect as typing a space, but is not recommended).
  • Thus the link hereafter is to the Web address en.wikipedia.org/wiki/Public_transport, which is the Wikipedia article with the name "Public transport". See also Canonicalization.
  • A red link is a page that doesn't exist yet; it can be created by clicking on the link.
  • A link to its own page will appear only as bold text.
What you type What it looks like

London has [[public transport]].

London has public transport.

Link to this own article: "[[Help:Wiki markup]]" will appear only as bold text.

Link to this own article: "Help:Wiki markup" will appear only as bold text.