This file contains 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 ContentView: View { | |
var body: some View { | |
VStack { | |
Image(systemName: "globe") | |
.imageScale(.large) | |
.foregroundStyle(.tint) | |
Text("Hello, world!") | |
Text("`Hello, world!`") |
This file contains 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 | |
class Closures { | |
let memberVariable = "member" | |
let memberVariable2 = "member2" | |
func execute() { | |
closures { [self] in |
This file contains 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
a=['ボ','ン','ボ','ン','ジョ','ヴィ'] | |
b=0 | |
str='' | |
cou=0 | |
loop{ | |
c=rand(6)+1 | |
str=a[c] | |
print str | |
cou+=1 |
This file contains 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
if [ -z `which hogehoge` ]; then | |
echo "The command you specified does not exist.🤷🏻♂️" | |
fi |
This file contains 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
/* | |
MIT License | |
Copyright (c) RxSwiftCommunity | |
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 | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all |
This file contains 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 String { | |
func compareVersion(version: String) -> Bool { | |
let versions = version.components(separatedBy: ".") | |
let selfVersion = components(separatedBy: ".") | |
for index in 0 ..< versions.count { | |
var isGreaterThan = false | |
if versions[index] <= selfVersion[index] { | |
isGreaterThan = true | |
} | |
if !isGreaterThan { |
This file contains 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
// | |
// main.cpp | |
// Seiki | |
// | |
// Created by Shichimitoucarashi on 2020/07/12. | |
// Copyright © 2020 keisukeYamagishi. All rights reserved. | |
// | |
#include <iostream> | |
#include <regex> |
This file contains 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
def pattern (items, pattern) | |
(fact 4) / (fact (items.count - pattern)) | |
end | |
#階乗 | |
def fact(n, a=1) | |
return a if n == 0 | |
fact(n-1, n*a) | |
end |
This file contains 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
var token = String(format: "%@", deviceToken as CVarArg) as String | |
let characterSet: CharacterSet = CharacterSet.init(charactersIn: "<>") | |
token = token.trimmingCharacters(in: characterSet) | |
token = token.replacingOccurrences(of: " ", with: "") | |
print("deviceToken: \(token)") |
This file contains 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
def dupli (d) | |
uniqDups = d.uniq | |
dups = Array.new | |
uniqDups.each { |e| | |
if d.grep(e).size > 1 | |
dups.push(e) | |
end | |
} | |
return dups |
NewerOlder