Affichage des articles dont le libellé est Blogspot. Afficher tous les articles
Affichage des articles dont le libellé est Blogspot. Afficher tous les articles

dimanche 16 juin 2013

how to use Google-code-prettify

in this tutorial I will show you how to use Google-code-prettify :
for more informations you can visit this Page :
      http://code.google.com/p/google-code-prettify/

To put a pretty code to your blog , try to follow this few steps :
  1. Include the script tag below in your document,You can load the JavaScript and CSS for prettify via one URL:
    <script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
    
    

  2. Marking code sections : Put code snippets in    <pre class="prettyprint"> ...</pre> or <code class="prettyprint">...</code> and it will automatically be pretty printed.

  3. How do I specify the language of my code?  You don't need to specify the language since prettyprint() will guess. You can specify a language by specifying the language extension along with the prettyprint class like so:

         <pre class="prettyprint lang-html">
    The lang-* class specifies the language file extensions.
    File extensions supported by default      include"bsh", "c",
     "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html","java",
     "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh",
    "xhtml", "xml", "xsl".
    </pre>
    

samedi 15 juin 2013

How to format my Source code for blogger & Website

You can format your source code for blogger & website in easy four steps.. :
  1.  go to the  http://codeformatter.blogspot.com/
  2.  Paste your source code into "Paste Here Your Source Code" Textarea.
  3. Choose appropriate options from "formatting options" and click Format Source Code button.
  4.  See preview of formatted source code if it's fine then copy from "Copy Formatted Source Code" textarea otherwise repeat step 3
  5.