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
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override |
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
void main() async { | |
print("1"); | |
await registerFcmToken(); | |
print("4"); | |
} | |
Future<void> registerFcmToken() { | |
print("2"); | |
return addDevice(); | |
} |
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
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); |
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
import 'package:flutter/material.dart'; | |
import 'package:hooks_riverpod/hooks_riverpod.dart'; | |
final helloWorldProvider = StateProvider((ref) => 0); | |
void main() { | |
runApp( | |
// Adding ProviderScope enables Riverpod for the entire project | |
const ProviderScope(child: MyApp()), | |
); |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io/fs" | |
"os" | |
"path/filepath" | |
"regexp" | |
"strings" |
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
diff --git a/onlinejudge.py b/onlinejudge.py | |
index 16f3f48..80100ae 100644 | |
--- a/onlinejudge.py | |
+++ b/onlinejudge.py | |
@@ -149,6 +149,9 @@ class OnlineJudge: | |
print('CompileError') | |
exit(-1) | |
+ for input_file_path in glob.iglob(os.path.join(self.options.testcase_directory, '*.in.txt')): | |
+ os.remove(input_file_path) |
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
let canvas = swiftuiView | |
let hosting = UIHostingController(rootView: canvas) | |
hosting.view.frame = window.frame | |
window.addSubview(hosting.view) | |
window.makeKeyAndVisible() | |
hosting.view // これが UIView |
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
import SwiftUI | |
struct GameSettings { | |
var isHard: Bool = false | |
} | |
struct NextView: View { | |
@Binding var settings: GameSettings | |
var body: some View { |
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
osascript -e 'display notification "start" with title "GIF Encode"' | |
/usr/local/bin/ffmpeg -i "${@}" -filter_complex "[0:v] fps=8,scale=600:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" "${@}".gif | |
osascript -e 'display notification "Gif encode end"' |
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
import Foundation | |
import Combine | |
struct MyPublisher: Publisher { | |
typealias Output = Int | |
typealias Failure = Error | |
func receive<S>(subscriber: S) where S : Subscriber, | |
Failure == S.Failure, | |
Output == S.Input { |