About: Sample code in a wiki   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : dbkwik.org associated with source dataset(s)

To put code in one of these cute boxes, you have to indent each line of wiki-text by one space: def function(): print "hello" Fortunately, cutting and pasting out of the cute box results in properly formatted Python code. To quickly format your code for cut-and-paste into the wiki on a Linux computer, you can use the sed command. $ sed -e 's/^/ /' < file.py This command adds a single space to the beginning of each line of your file. Since empty lines cause new boxes to be created, you'll probably want to adjust the output code to taste.

AttributesValues
rdfs:label
  • Sample code in a wiki
rdfs:comment
  • To put code in one of these cute boxes, you have to indent each line of wiki-text by one space: def function(): print "hello" Fortunately, cutting and pasting out of the cute box results in properly formatted Python code. To quickly format your code for cut-and-paste into the wiki on a Linux computer, you can use the sed command. $ sed -e 's/^/ /' < file.py This command adds a single space to the beginning of each line of your file. Since empty lines cause new boxes to be created, you'll probably want to adjust the output code to taste.
dbkwik:code/proper...iPageUsesTemplate
abstract
  • To put code in one of these cute boxes, you have to indent each line of wiki-text by one space: def function(): print "hello" Fortunately, cutting and pasting out of the cute box results in properly formatted Python code. To quickly format your code for cut-and-paste into the wiki on a Linux computer, you can use the sed command. $ sed -e 's/^/ /' < file.py This command adds a single space to the beginning of each line of your file. Since empty lines cause new boxes to be created, you'll probably want to adjust the output code to taste.
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software