This file contains hidden or 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
| extension View { | |
| func conditionalSensoryFeedback(trigger: [Order]) -> some View { | |
| self.modifier(ConditionalSensoryFeedbackModifier(trigger: trigger)) | |
| } | |
| } | |
| struct ConditionalSensoryFeedbackModifier: ViewModifier { | |
| var trigger: [Order] | |
| @ViewBuilder |
This file contains hidden or 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
| // swift-tools-version:5.6 | |
| import PackageDescription | |
| let package = Package(name: "DisplayBuddy", | |
| defaultLocalization: "en", | |
| platforms: [.macOS(.v10_12)], | |
| products: [.library(name: "DisplayBuddy", | |
| targets: ["DisplayBuddy"])], | |
| targets: [.target(name: "DisplayBuddy", |
This file contains hidden or 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
| - (NSTimeInterval)processStartTime { | |
| pid_t pid = [NSProcessInfo processInfo].processIdentifier; | |
| int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid }; | |
| struct kinfo_proc proc; | |
| size_t size = sizeof(proc); | |
| sysctl(mib, 4, &proc, &size, NULL, 0); | |
| return proc.kp_proc.p_starttime.tv_sec + proc.kp_proc.p_starttime.tv_usec / 1000000.0; | |
| } |
This file contains hidden or 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
| #include <cstdio> | |
| #include <cstring> | |
| #include <algorithm> | |
| using namespace std; | |
| const int MAX = 31; | |
| int N, C, D; | |
| int S[MAX]; | |
| bool G[MAX][MAX]; | |
| int child[MAX], sibling[MAX]; | |
| int dp[MAX][MAX][MAX]; |
This file contains hidden or 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
| #include <cstdio> | |
| #include <cstring> | |
| #include <algorithm> | |
| using namespace std; | |
| const int MAX = 31; | |
| int N, C, D; | |
| int S[MAX]; | |
| bool G[MAX][MAX]; | |
| int child[MAX], sibling[MAX]; | |
| int dp[MAX][MAX][MAX]; |
This file contains hidden or 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
| from Tkinter import * | |
| import tkFileDialog, shutil, os, tkMessageBox | |
| root = Tk() | |
| # to cut --- ./ffmpeg -i input1.mp3 -acodec copy -t 10 -ss 20 output1.mp3 | |
| # to join --- ./ffmpeg -i "concat:output1.mp3|output2.mp3" -acodec copy finalOutput.mp3 | |
| def selectFile(): |