This gist shows a quick overview of calling Rust in a Swift project, with Swift Package Manager configured.
Let's go ahead and create a folder containing all our sources:
mkdir swift-rs && cd $_
// When you call new HandleAboutMac(), it will set the action on what has to be done when a Mac user selects the about menu | |
// in [your app name] > about [your app name] | |
public class HandleAboutMac { | |
public HandleAboutMac() { | |
com.apple.eawt.Application application = com.apple.eawt.Application.getApplication(); | |
application.setAboutHandler(new AboutHandler() { | |
@Override | |
public void handleAbout(AppEvent.AboutEvent aboutEvent) { | |
// This is where your code goes for what has to be done when a Mac user selects the about menu | |
// For example: |
This gist shows a wrapper around Lightbox, a convenient and easy to use image viewer for iOS, for SwiftUI.
This gist contains 2 files:
This is a list of packages that I have used throughout my own projects. Most packages that have something to do with UI are for SwiftUI and if not I'll leave an explanation of how to use them within SwiftUI.
#!/usr/bin/env swift | |
// This is a Swift implementation of Fireship's "Graph Search Algorithms in 100 seconds - And beyond with JS" video | |
// You can find it here: https://www.youtube.com/watch?v=cWNEl4HE2OE | |
let airports = "PHX BKK OKC JFK LAX MEX HEL LAP LIM".split(separator: " ") | |
let routes = [ | |
["PHX", "LAX"], | |
["PHX", "JFK"], |
This plugin for RPG Maker MV (should work for MZ as well) moves any event marked with to the player.
Copy playerFollower.js to project folder > js > plugins
and then select the plugin in the plugin menu.
'Parse a coordinate to an array of numbers containing hours, minutes, seconds (still represented as strings) | |
Private Function ParseCoOne(Co As String) As String() | |
Dim parsed(3) As String | |
Dim tmp() As String | |
tmp = Split(Co, "°") | |
parsed(0) = tmp(0) | |
tmp = Split(tmp(1), "'") | |
parsed(1) = tmp(0) |
// | |
// RWLock.swift | |
// | |
// MIT License | |
// | |
// Copyright (c) 2023-2024 Jonas Everaert | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights |