Writing /users/jbklauda/pub/wiki/data/cache/6/6193a558dc90ed4c190004bf67ecff70.captchaip failed
format_code
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| format_code [2016/08/28 22:40] – admin | format_code [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| [[resource]] | [[resource]] | ||
| + | Often time, you will need to post a code here to for share. Here is how you can do it. | ||
| - | < | + | '' |
| - | if (!$lang) $lang = NULL; | + | |
| - | // add one line | + | |
| - | if (!trim($title) && $lang) $title = " | + | |
| - | // end addition | + | |
| - | } else {} | + | |
| + | Here is an example. | ||
| + | |||
| + | <code python | code.py> | ||
| + | def function(){ | ||
| + | print " | ||
| + | } | ||
| </ | </ | ||
| + | Here is the source line: | ||
| - | < | + | '' |
| - | div.code, div.file | + | def function(){ |
| - | | + | print " |
| - | margin: 1em auto; | + | |
| - | border: 1px solid; | + | |
| - | padding: 4px; | + | |
| } | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | If you want to disable the download, | ||
| + | '' | ||
| + | |||
| + | |||
| + | <code python> | ||
| + | def function2(){ | ||
| + | print " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Here is the source line: | ||
| + | |||
| + | '' | ||
| + | def function2(){ | ||
| + | print " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | For a very simple commend, try '' | ||
| + | |||
| + | The advantage of using this is that you can include it in the sentence. | ||
| + | |||
| - | </ | ||
format_code.1472438459.txt.gz · Last modified: 2016/08/28 21:41 (external edit)