Skip to content

Instantly share code, notes, and snippets.

View klaeufer's full-sized avatar
:octocat:

Konstantin Läufer klaeufer

:octocat:
View GitHub Profile
@klaeufer
klaeufer / README.md
Last active March 21, 2022 17:55
Loyola COMP 271 GitHub account creation

Loyola COMP 271: GitHub-Based Project Workflow

Individual activity

Collaborate with your classmates on a conceptual level but do not share code. Submit individually.

Learning Objectives

  • Get started with Git source code management
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import scala.util.Random
import java.util.concurrent.locks.ReentrantLock
def dinner(number: Int, delayInMs: Int) =
val forks = Array.fill(number)(new ReentrantLock)
// warning: running each philosopher in their own explicit Java thread
def phil(i: Int) = new Thread {
override def run(): Unit =
object Q extends App { val s = "object Q extends App { val s = %c%s%c ; printf(s, 0x22, s, 0x22) }" ; printf(s, 0x22, s, 0x22) }
@klaeufer
klaeufer / README.md
Last active September 6, 2018 14:21
cs2-lab1-fizzbuzz-java

Loyola COMP 271 Lab 1

Individual project

Collaborate with your classmates on a conceptual level but do not share code. Submit individually.

Objectives

An understanding of the following concepts and techniques:

@klaeufer
klaeufer / README.md
Last active November 29, 2018 13:56
cs2-lab10-graphs-java

Loyola COMP 271 Lab 10 (FALL 2017)

Individual project

Collaborate with your classmates on a conceptual level but do not share code. Submit individually.

Objectives

An understanding of the following concepts and techniques:

@klaeufer
klaeufer / TODO.md
Last active November 6, 2018 16:35
cs2-lab7-linkedstack-recursive-java

Loyola COMP 271 Lab 7

Individual project

Collaborate with your classmates on a conceptual level but do not share code. Submit individually.

Objectives

An understanding of the following concepts and techniques:

Advanced Functional Programming with Scala - Notes

Copyright © 2017 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@klaeufer
klaeufer / README.md
Last active February 2, 2017 20:20
sbt-scalariform local configuration files

Instructions

  • local.sbt goes in the project root
  • project-local.sbt goes in project/local.sbt
  • also add local.sbt to .gitignore

Purpose

Install sbt-scalariform in such a way that formatting taking place only on demand. This does not seem to work with a global plugin installation.

// simple example illustrating how to replace
// https://github.com/LoyolaChicagoCode/scalamu
// with https://github.com/slamdata/matryoshka
//
// libraryDependencies ++= Seq(
// "org.scalaz" %% "scalaz-core" % "7.2.8",
// "com.slamdata" %% "matryoshka-core" % "0.16.4",
// "com.slamdata" %% "matryoshka-scalacheck" % "0.16.4" % Test
// )