This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AVFoundation | |
class Foo { | |
var x: AVAudioFile? | |
func someOtherMethod() async throws { | |
x = try AVAudioFile(forReading: URL(fileURLWithPath: "/path/to/file.m4a")) | |
} | |
//@MainActor annotation is not needed here and there are no warnings, why is it needed below? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global exports:true, module:true, require:true, define:true, global:true */ | |
(function (root, name, factory) { | |
'use strict'; | |
// Used to determine if values are of the language type `Object` | |
var objectTypes = { | |
'function': true | |
, 'object': true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// JAMLuaTokenizer.swift | |
// JamKit | |
// | |
// Created by Sim Saens on 7/4/2024. | |
// Copyright © 2024 Two Lives Left. All rights reserved. | |
// | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Dungeon variables | |
local dungeonWidth = 16 -- The width of the dungeon in tiles | |
local dungeonHeight = 16 -- The height of the dungeon in tiles | |
local tileSize = 40 -- The size of each tile in pixels | |
local dungeon = {} -- The dungeon map | |
local rooms = {} -- The list of rooms in the dungeon | |
local doors = {} -- The list of doors in the dungeon | |
local traps = {} -- The list of traps in the dungeon | |
-- Colors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SKPayment+Async.swift | |
// | |
// Created by Sim Saens on 15/12/21. | |
// | |
import Foundation | |
import StoreKit | |
//Adds an async extension to SKPayment to purchase products |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--# Main | |
-- 3D Snow | |
function setup() | |
viewer.mode = FULLSCREEN | |
parameter.watch("FPS") | |
parameter.boolean("camOrtho", false) | |
parameter.number("timeSpeed", 0, 8, 1) | |
parameter.number("hspread", 0, 50, 50) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------------------------------------- | |
-- Models | |
-- Written by John Millard | |
----------------------------------------- | |
-- Description: | |
-- Domonstrates model loading in Craft. | |
----------------------------------------- | |
Tag = class() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------------------------------------- | |
-- Models | |
-- Written by John Millard | |
----------------------------------------- | |
-- Description: | |
-- Domonstrates model loading in Craft. | |
----------------------------------------- | |
Tag = class() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL) canPerformAction:(SEL)action withSender:(id)sender | |
{ | |
switch ( menuState ) | |
{ | |
case JAMCodeEditorMenuStateHidden: | |
{ | |
if( self.selectedRange.length == 0 ) | |
{ | |
if( action == @selector(select:) || | |
action == @selector(selectAll:) || |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { | |
guard let menu = menuView else { | |
return super.point(inside: point, with: event) | |
} | |
let menuPoint = convert(point, to: menu) | |
if menu.point(inside: menuPoint, with: event) { | |
return true | |
} |
NewerOlder