View nsurl.dtask.test1.swift
//
// command-line Swift test of an NSURLSession dataTask
// 2017-May-06 rhn@nicholson.com (hotpaw)
//
// compile and run using:
//
// swiftc nsurl.dtask.test1.swift -o mytest1
// ./mytest1
//
View MyMetalWaterfall.swift
//
// MyMetalWaterfall.swift
// version 0.1.104
//
// Demonstrates using a MetalKit compute shader to render a live waterfall RGB bitmap
// into a UIView
//
// This is a single file iOS app (it only compiles for iOS devices, not the Simulator)
//
// It includes AppDelegate for a minimal demonstration app
View MyURLStreamTask.swift
// MyURLStreamTask.swift
// Demonstrates using an NSURLSessionStreamTask to implement a bidirectional TCP socket connection
//
// by rhn@nicholson.com 2017-03-07
// distribution: BSD 2-clause
//
import Foundation
class MyURLStreamTask {
View RecordAudio.swift
//
// RecordAudio.swift
//
// This is a Swift 3.0 class
// that uses the iOS RemoteIO Audio Unit
// to record audio input samples,
// (should be instantiated as a singleton object.)
//
// Created by Ronald Nicholson on 10/21/16. Updated 2017Feb07
// Copyright © 2017 HotPaw Productions. All rights reserved.
View ToneOutputUnit.swift
//
// ToneOutputUnit.swift
//
// This is a Swift 3 class (which should be instantiated as a singleton object)
// that can play a single tone of arbitrary tone and frequency on iOS devices
// using run-time sinewave synthesis and the Audio Unit v3 API with RemoteIO.
//
// Created by Ronald Nicholson rhn@nicholson.com on 2/20/2016.
// revised 2016-Sep-08 for Swift 3
// http://www.nicholson.com/rhn/
View sieve.c
/* sieve.c */
/* An old small benchmark from Byte Magazine, circa 1983 and 1984, thus suitable for that vintage of computer. */
#include <stdio.h>
#define TIMES (100000L)
static unsigned char f[8192];
int main()
{