Imprint | Privacy Policy

Test klipsify

Jens Lechtenbörger

Created: 2024-08-31 Sat 12:44

1. Different languages

1.1. HTML and CSS


<style>
h1.demo-headline { color: blue; }
p.demo-para { color: green; }
#demo-id { color: yellow; }
</style>
<h1 class="demo-headline">Hello World!</h1>
<p class="demo-para">This is a paragraph of text with class “demo-para”.</p>
<p id="demo-id">This is another paragraph with id “demo-id”.</p>

1.2. JavaScript


console.log("success");
var x='string using single quote';
x

1.3. Python


def factorial(n):
    if n < 2:
        return 1
    else:
        return n * factorial(n - 1)

print(factorial(10))

1.4. Clojure


(defn greet [person]
  (str "Hello " person))
(map greet ["Alice" "Bob" "Carol"])

2. SQL as example of state across slides

2.1. SQL, Populate Database


CREATE TABLE Software (Name, License, Rating);
INSERT INTO Software VALUES
   ("GNU Emacs", "GPLv3", 5),
   ("GNU/Linux", "FLOSS", 5),
   ("Powerpoint", "Proprietary", 3);

2.2. SQL, Query 1


SELECT * FROM Software;

2.3. SQL, Query 2


SELECT Name FROM Software WHERE Rating = 5;

3. An exception, no klipse here

def factorial(n):
    if n < 2:
        return 1
    else:
        return n * factorial(n - 1)

print(factorial(10))