(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// A proxy for sending/receiving SMS via IRC | |
// | |
// This code is part of our family IRC server whose code is available at | |
// https://gist.github.com/mndrix/7947009178e4a18c247b4bd25821661f | |
// | |
// This file won't compile by itself because it's only one file from | |
// my larger family server (movie hosting, Asterisk dialplan, Git | |
// hosting, personal assistant, etc). | |
// | |
// Copyright 2018 Michael Hendricks |
/* | |
Joseph Weizenbaum's classic ELIZA chat bot in Swift. | |
Based on the IBM PC BASIC program from CREATIVE COMPUTING by Patricia | |
Danielson and Paul Hashfield, and the Java adaptation by Jesper Juul. | |
Run this script from Terminal: | |
$ swift eliza.swift | |
Press Ctrl-C or Ctrl-D to quit. (Or type "shut up".) |
import java.util.Objects; | |
/** | |
* Class representing a playing card from a standard 52-card deck. | |
*/ | |
public class Card | |
{ | |
/** | |
* Enum representing playing card suits. | |
*/ |
package main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
) | |
var path = "/Users/novalagung/Documents/temp/test.txt" |
func switchRootViewController(rootViewController: UIViewController, animated: Bool, completion: (() -> Void)?) { | |
if animated { | |
UIView.transitionWithView(window, duration: 0.5, options: .TransitionCrossDissolve, animations: { | |
let oldState: Bool = UIView.areAnimationsEnabled() | |
UIView.setAnimationsEnabled(false) | |
self.window!.rootViewController = rootViewController | |
UIView.setAnimationsEnabled(oldState) | |
}, completion: { (finished: Bool) -> () in | |
if completion { | |
completion!() |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Single-line comments are started with //
. Multi-line comments are started with /*
and ended with */
.
C# uses braces ({
and }
) instead of indentation to organize code into blocks.
If a block is a single line, the braces can be omitted. For example,
Create an empty git repo or reinitialize an existing one
git init
A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()
):