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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Domains</key> | |
<dict> | |
<key>Applications</key> | |
<true/> | |
<key>Printing</key> | |
<true/> |
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
recyclerView.also { recyclerView -> | |
val columnsNum = 3 | |
val layoutManager = GridLayoutManager(applicationContext, columnsNum) | |
layoutManager.spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() { | |
override fun getSpanSize(position: Int): Int { | |
return when (position) { | |
0 -> columnsNum | |
else -> 1 | |
} |
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
<GridView | |
android:id="@+id/gridview" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:verticalSpacing="0dp" | |
android:horizontalSpacing="0dp" | |
android:stretchMode="columnWidth" | |
android:numColumns="2"/> |
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 | |
extension Encodable { | |
func asDictionary(convertToSnakeCase: Bool = false) throws -> [String: Any] { | |
let encoder = JSONEncoder() | |
if convertToSnakeCase { encoder.keyEncodingStrategy = .convertToSnakeCase } | |
let data = try encoder.encode(self) | |
guard let dictionary = try JSONSerialization.jsonObject(with: data, options: .allowFragments) as? [String: Any] else { | |
throw NSError() | |
} | |
return dictionary |
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
for f in "$@" | |
do | |
ext=${f##*.} | |
if [ $ext = "mov" ]; then | |
osascript -e 'display notification "'$f'" with title "Gif encode start"' | |
/usr/local/bin/ffmpeg -i $f -filter_complex "[0:v] fps=8,scale=600:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" $f.gif | |
osascript -e 'display notification "'$f'" with title "Gif encode end"' | |
fi | |
done |
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 { |
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 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
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
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) |