When I compiled a C source code directly into a Wasm binary using clang
, a-Shell crashed in a destructor of PrettyStackTraceEntry
.
Specifically, the following line's assert
fails after it is called some times.
extension Optional { | |
func expect(_ message: String) -> Wrapped { | |
guard let value = self else { | |
preconditionFailure(message) | |
} | |
return value | |
} | |
} |
import PlaygroundSupport | |
import SwiftUI | |
struct ContentView { | |
@State var rows = ["hoge", "fuga", "piyo"] | |
} | |
extension ContentView: View { | |
var body: some View { | |
Form { |
import XMLCoder | |
struct Root: Equatable { | |
let elements: [Choice] | |
let name: String | |
let description: String? | |
} | |
extension Root: Codable { | |
enum CodingKeys: String, CodingKey { |
import PlaygroundSupport | |
import SwiftUI | |
final class ContentViewModel { | |
@Published var text = "" | |
} | |
extension ContentViewModel: ObservableObject {} | |
struct ContentView { |
[Unit] | |
Description=Run usb0.sh | |
[Service] | |
Type=oneshot | |
ExecStart=/root/usb0.sh | |
[Install] | |
WantedBy=multi-user.target |
#!/bin/bash | |
set -e | |
modprobe libcomposite | |
cd /sys/kernel/config/usb_gadget/ | |
mkdir -p pi4 | |
cd pi4 | |
echo 0x1d6b > idVendor # Linux Foundation | |
echo 0x0104 > idProduct # Multifunction Composite Gadget |
When I compiled a C source code directly into a Wasm binary using clang
, a-Shell crashed in a destructor of PrettyStackTraceEntry
.
Specifically, the following line's assert
fails after it is called some times.
import AVFoundation | |
import UIKit | |
import PlaygroundSupport | |
class ViewController: UIViewController { | |
lazy var session: AVCaptureSession = { | |
let deviceResult = getDefaultDevice() | |
var device: AVCaptureDevice | |
switch deviceResult { | |
case let .success(value): |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Flyout Example</title> | |
<script> | |
{ | |
// サイドバーの表示をトグルするボタンにイベントを設定 | |
document.addEventListener('DOMContentLoaded', _ => |
import Foundation | |
extension Array { | |
public func partition(condition: (Element) -> Bool) -> (trueList: [Element], falseList: [Element]) { | |
return self.reduce(([], [])) { | |
condition($1) ? ($0.0 + [$1], $0.1) : ($0.0, $0.1 + [$1]) | |
} | |
} | |
} |