Typography

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

An apple is a sweet, edible fruit produced by an apple tree (Malus pumila). Apple trees are cultivated worldwide, and are the most widely grown species in the genus Malus. The tree originated in Central Asia, where its wild ancestor, Malus sieversii, is still found today. Apples have been grown for thousands of years in Asia and Europe, and were brought to North America by European colonists. Apples have religious and mythological significance in many cultures, including Norse, Greek and European Christian traditions.1


Inline styles:

strong, emphasis, strong and emphasis,code, underline, strikethrough, 😂🤣, $\LaTeX$, X^2^, H~2~O, ==highlight==, Link, and image:

test_xixx2a


Headings:

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Table:

Left-AlignedCenter AlignedRight Aligned
col 3 issome wordy text$1600
col 2 iscentered$12
zebra stripesare neat$1

Lists:

  • Unordered list item 1.
  • Unordered list item 2.
  1. ordered list item 1.
  2. ordered list item 2.
    • sub-unordered list item 1.
    • sub-unordered list item 2.
      • something is DONE.
      • something is NOT DONE.

Syntax Highlighting:

var num1, num2, sum
num1 = prompt("Enter first number")
num2 = prompt("Enter second number")
sum = parseInt(num1) + parseInt(num2) // "+" means "add"
alert("Sum = " + sum)  // "+" means combine into a string
using System.Management.Automation;
using System.Management.Automation.Provider;
using System.ComponentModel;


namespace Microsoft.Samples.PowerShell.Providers
{
   #region AccessDBProvider

    /// <summary>
   /// Simple provider.
   /// </summary>
   [CmdletProvider("AccessDB", ProviderCapabilities.None)]
   public class AccessDBProvider : CmdletProvider
   {

   }

   #endregion AccessDBProvider
}
#!/usr/bin/env python3
def dump_args(func):
    "This decorator dumps out the arguments passed to a function before calling it"
    argnames = func.func_code.co_varnames[:func.func_code.co_argcount]
    fname = func.func_name
    def echo_func(*args,**kwargs):
        print fname, ":", ', '.join(
            '%s=%r' % entry
            for entry in zip(argnames,args) + kwargs.items())
        return func(*args, **kwargs)
    return echo_func

@dump_args
def f1(a,b,c):
    print a + b + c

f1(1, 2, 3)

def precondition(precondition, use_conditions=DEFAULT_ON):
    return conditions(precondition, None, use_conditions)

def postcondition(postcondition, use_conditions=DEFAULT_ON):
    return conditions(None, postcondition, use_conditions)

class conditions(object):
    __slots__ = ('__precondition', '__postcondition')

    def __init__(self, pre, post, use_conditions=DEFAULT_ON):
        if not use_conditions:
            pre, post = None, None

        self.__precondition  = pre
        self.__postcondition = post
import java.io.*;
import java.util.*;

public class KeyboardIntegerReader {

 public static void main (String[] args) throws java.io.IOException {
  String s1;
  String s2;
  int num = 0;

  // set up the buffered reader to read from the keyboard
  BufferedReader br = new BufferedReader (new InputStreamReader (
            System.in));

  boolean cont = true;

  while (cont)
     {
      System.out.print ("Enter an integer:");
      s1 = br.readLine();
      StringTokenizer st = new StringTokenizer (s1);
      s2 = "";

      while (cont && st.hasMoreTokens())
     {
          try
          {
           s2 = st.nextToken();
           num = Integer.parseInt(s2);
           cont = false;
          }
          catch (NumberFormatException n)
          {
           System.out.println("The value in \"" + s2 + "\" is not an integer");
          }
    }
     }

  System.out.println ("You entered the integer: " + num);
 }
}
<!DOCTYPE html>
<html>
<head>
 <meta charset="utf-8">
 <title>GitHub Dark Syntax Highlighting Themes</title>

 <!-- themes -->
 <link rel="stylesheet" title="Fruity" href="themes/pygments-fruity.css">
 <link rel="stylesheet" title="Monokai" href="themes/pygments-monokai.css">
 <link rel="stylesheet" title="Native" href="themes/pygments-native.css">
 <link rel="stylesheet" title="GitHub Dark" href="themes/pygments-github-dark.css">
 <link rel="stylesheet" title="Slate" href="themes/pygments-slate.css">
 <link rel="stylesheet" title="Solarized Dark" href="themes/pygments-solarized-dark.css">
 <link rel="stylesheet" title="Vim" href="themes/pygments-vim.css">
 <link rel="stylesheet" title="Wombat" href="themes/pygments-wombat.css">
 <link rel="stylesheet" title="Zenburn" href="themes/pygments-zenburn.css">

 <!-- jQuery -->
 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

</head>
<body>
 <h1><a href="http://userstyles.org/styles/37035">GitHub Dark for Stylish</a></h1>
 <h2>Syntax Highlighting themes</h2>
 <h3>Select a syntax highlighting theme: <select></select></h3>

<h3>Code block</h3>
<div class="highlight">
 <pre><code>
   <-- ... -->
 </code></pre>
</div>
package main
import "fmt"
func main() {
    name := "Chris Mien"
    age := 29
    weight := 200.21
    fmt.Println(name)
    fmt.Println(age)
    fmt.Println(weight)
}
$(function(){
 var t,
   $links = $('link[title]'),
   $select = $('select'),
   theme = "Native-Mod",
   ls = false,
   selectTheme = function(theme){
     $links.prop('disabled', true);
     $links.filter('[title="' + theme + '"]').prop('disabled', false);
   };
 // https://gist.github.com/paulirish/5558557
 if ("localStorage" in window) {
   try {
     window.localStorage.setItem('_tmptest', 'temp');
     ls = true;
     window.localStorage.removeItem('_tmptest');
   } catch(e) {}
 }
 if (ls) {
   theme = localStorage['github-dark-theme'] || theme;
 }

 t = '';
 $links.each(function(){
   t += '<option>' + this.title + '</option>';
 });
 $select
   .append(t)
   .on('change', function(){
     selectTheme(this.value);
     if (ls) {
       localStorage['github-dark-theme'] = this.value;
     }
   })
   .val(theme);

 $(window).load(function(){
   $select.val(theme);
   selectTheme(theme);
 });

});
<?php
class A_Request {

   private $_request;

   private $_fields = array(
 'title',
 'fullname',
 'email',
 'company',
     );

   public function __construct() {
 $this->_request = array();
 $this->_errors  = array();
   }

   public function initialize($data) {
 foreach ($this->_fields as $field) {
     if ( ! in_array($field, $this->_optional_fields)) {
   if (array_key_exists($field, $this->_validation_exceptions)) {
       $method = $this->_validation_exceptions[$field];
       $this->$method($data[$field]);
       continue;
   }

   if (isset($data[$field]) AND !empty($data[$field])) {
       if (array_key_exists($field, $this->_specific_validations)) {
     $method = $this->_specific_validations[$field];
     $this->$method($data[$field]);
       }
       $this->_request[$field] = $data[$field];
   } else {
       $this->_errors[$field] = 'error';
   }
     } else {
   if (isset($data[$field])) {
       $this->_request[$field] = $data[$field];
   }
     }
 }
   }

   public function valid_email($str) {
 $valid = ( ! preg_match(
     "/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix",
     $str
 ) ) ? FALSE : TRUE;

 if ( ! $valid) {
     $this->_errors['email'] = 'error';
 }
   }

}
#!/bin/bash
# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi
#
# aliases
alias grpe=grep
alias grep='grep --color --line-number'
alias vim="vim -p"
alias rebash="source ~/.bashrc"

alias install='sudo apt-get -y install'
alias search='apt-cache search'
alias purge='sudo apt-get purge'

export EDITOR=vim

# set up the prompt to the hostname
shopt -s checkwinsize
PS1="\e[1;35m[\w]   ---   \@ \d \n$>\[\e[0m\]"
PS2="\e[1;35m->\[\e[0m\]"

#--------------------------------------------------
#    grabs some definitions from google
#--------------------------------------------------
define () {
 lynx -dump "http://www.google.com/search?hl=en&q=define%3A+${1}" | grep -m 25 -w "*"  | sed 's/;/ -/g' | cut -d- -f5 > /tmp/templookup.txt
             if [[ -s  /tmp/templookup.txt ]] ;then
                 until ! read response
                     do
                     echo "${response}"
                     done < /tmp/templookup.txt
                 else
                     echo "Sorry $USER, I can't find the term \"${1} \""
              fi
  rm -f /tmp/templookup.txt
}

#--------------------------------------------------
#    Extracts most files, mostly
#--------------------------------------------------
extract () {
 if [ -f $1 ] ; then
   case $1 in
     *.tar.bz2)  tar xjf $1    ;;
     *.tar.gz)   tar xzf $1    ;;
     *.bz2)      bunzip2 $1    ;;
     *.rar)      rar x $1      ;;
     *.gz)       gunzip $1     ;;
     *.tar)      tar xf $1     ;;
     *.tbz2)     tar xjf $1    ;;
     *.tgz)      tar xzf $1    ;;
     *.zip)      unzip $1      ;;
     *.Z)        uncompress $1 ;;
     *)          echo "'$1' cannot be extracted via extract()" ;;
   esac
 else
   echo "'$1' is not a valid file"
 fi
}


# Testing code - do not change it

if [ "$BIRTHDATE" == "Jan 1, 2000" ] ; then
    echo "BIRTHDATE is correct, it is $BIRTHDATE"
else
    echo "BIRTHDATE is incorrect - please retry"
fi
if [ $Presents == 10 ] ; then
    echo "I have received $Presents presents"
else
    echo "Presents is incorrect - please retry"
fi
if [ "$BIRTHDAY" == "Saturday" ] ; then
    echo "I was born on a $BIRTHDAY"
else
    echo "BIRTHDAY is incorrect - please retry"
fi
using System;

public class Tutorial
{
   public static void Main()
   {
      // write your code here

      // test code
      Console.WriteLine("productName: " + productName);
      Console.WriteLine("productYear: " + productYear);
      Console.WriteLine("productPrice: " + productPrice);

   }
}
#include "algostuff.hpp"
using namespace std;

bool bothEvenOrOdd (int elem1, int elem2)
{
    return elem1 % 2 == elem2 % 2;
}

int main()
{
    vector<int> coll1;
    list<int> coll2;

    float m = 40.0f;

    INSERT_ELEMENTS(coll1,1,7);
    INSERT_ELEMENTS(coll2,3,9);

    PRINT_ELEMENTS(coll1,"coll1: \n");
    PRINT_ELEMENTS(coll2,"coll2: \n");

    // check whether both collections are equal
    if (equal (coll1.begin(), coll1.end(),  // first range
               coll2.begin())) {            // second range
        cout << "coll1 == coll2" << endl;
    } /* TODO Shouldn't there be an 'else' case? */

    // check for corresponding even and odd elements
    if (equal (coll1.begin(), coll1.end(),  // first range
               coll2.begin(),               // second range
               bothEvenOrOdd)) {            // comparison criterion
        cout << "even and odd elements correspond" << endl;
    }
}
package Dancer::Handler::Standalone;

use strict;
use warnings;

use HTTP::Server::Simple::PSGI;
use base 'Dancer::Handler', 'HTTP::Server::Simple::PSGI';

use Dancer::HTTP;

        # ...

        $dancer->run();
    }
}

sub print_startup_info {
    my $pid    = shift;
    my $ipaddr = setting('server');
    my $port   = setting('port');

    # we only print the info if we need to
    setting('startup_info') or return;

    # bare minimum
    print STDERR ">> Dancer $Dancer::VERSION server $pid listening " .
                 "on http://$ipaddr:$port\n";

    # all loaded plugins
    foreach my $module ( grep { $_ =~ m{^Dancer/Plugin/} } keys %INC ) {
        $module =~ s{/}{::}g;  # change / to ::
def power(x,n)
  result = 1
  while n.nonzero?
    if n[0].nonzero?
      result *= x
      n -= 1
    end
    x *= x
    n /= 2
  end
  return result
end

def f(x)
  Math.sqrt(x.abs) + 5*x ** 3
end

(0...11).collect{ gets.to_i }.reverse.each do |x|
  y = f(x)
  puts "#{x} #{y.infinite? ? 'TOO LARGE' : y}"
end
# Map color names to short hex
COLORS = { :black   => "000",
           :red     => "f00",
           :green   => "0f0",
           :yellow  => "ff0",
           :blue    => "00f",
           :magenta => "f0f",
           :cyan    => "0ff",
           :white   => "fff" }

class String
  COLORS.each do |color,code|
    define_method "in_#{color}" do
      "<span style=\"color: ##{code}\">#{self}</span>"
    end
  end
end
CREATE TABLE My_table(
    my_field1   INT,
    my_field2   VARCHAR(50),
    my_field3   DATE         NOT NULL,
    PRIMARY KEY (my_field1, my_field2)
);

ALTER TABLE My_table ADD my_field4 NUMBER(3) NOT NULL;

GRANT SELECT, UPDATE
    ON My_table
    TO some_user, another_user;

REVOKE SELECT, UPDATE
    ON My_table
    FROM some_user, another_user;

SELECT Book.title,
        COUNT(*) AS Authors
    FROM  Book JOIN Book_author
       ON Book.isbn = Book_author.isbn
    GROUP BY Book.title;

  1. From https://en.wikipedia.org/wiki/Apple ↩︎


2019-11-13 19:56 +0000