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 Dog: Codable, Identifiable { | |
public var id: String | |
public var status: String | |
enum CodingKeys: String, CodingKey { | |
case id = "message" | |
case status = "status" | |
} |
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 | |
import CoreData | |
struct ContentView: View { | |
@State private var taskName: String = "" | |
@Environment(\.managedObjectContext) var context | |
@FetchRequest( | |
entity: Task.entity(), | |
sortDescriptors: [NSSortDescriptor(keyPath: \Task.dateAdded, ascending: true)], | |
predicate: NSPredicate(format: "isComplete == %@", NSNumber(value: false)) |
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 | |
import GoogleMobileAds | |
struct AdView: UIViewRepresentable { | |
func makeUIView(context: Context) -> GADBannerView { | |
let banner = GADBannerView(adSize: kGADAdSizeBanner) | |
// 以下は、バナー広告向けのテスト専用広告ユニットIDです。自身の広告ユニットIDと置き換えてください。 | |
banner.adUnitID = "ca-app-pub-3940256099942544/2934735716" | |
banner.rootViewController = UIApplication.shared.windows.first?.rootViewController | |
banner.load(GADRequest()) |
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
$ chef -v | |
Chef Development Kit Version: 3.11.3 | |
chef-client version: 14.13.11 | |
delivery version: master (9d07501a3b347cc687c902319d23dc32dd5fa621) | |
berks version: 7.0.8 | |
kitchen version: 1.25.0 | |
inspec version: 3.9.3 |
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
public class Main { | |
public static void main(String[] args) { | |
// length:配列の長さを取得する | |
int[] array = {1, 2, 3}; | |
System.out.println(array.length); // 3 | |
// length():文字列の長さを取得する | |
String str = "lengthの長さ"; | |
System.out.println(str.length()); // 9 | |
} |
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 java.math.BigDecimal; | |
import java.math.RoundingMode; | |
public class Dentaku { | |
public static void main(String[] args) { | |
// 引数が3つであるかどうかのチェック | |
if (args.length != 3) { | |
System.out.println("引数は3つである必要があります。"); |
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
/* フッタ非表示 */ | |
.gist-meta { | |
display: none; | |
} | |
/* コード領域の下枠線調整 */ | |
.gist-file { | |
border-bottom: 1px solid !important; | |
border-bottom-color: rgb(221, 221, 221) !important; | |
} | |
.gist-data { |
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
$ find 検索対象のディレクトリ -name 検索対象のファイル -type f -print0 | xargs -0 grep 検索したい文字列 | |
# 例1. カレントディレクトリ配下の「foo*」ファイル内に「hoge」が含まれているものを検索する | |
$ find . -name 'foo*' -type f -print0 | xargs -0 grep hoge | |
# 例2. カレントディレクトリ配下の「.txt」ファイル内に「hoge」が含まれているものを検索する | |
$ find . -name '*.txt' -print0 | xargs -0 grep hoge | |
# 例3. /var/log配下のファイル内に「hoge」が含まれているものを検索する | |
$ find /var/log -type f -print0 | xargs -0 grep hoge |
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
alter session set nls_date_format="YYYY/MM/DD HH24:MI:SS"; | |
set echo off | |
set termout off | |
set pagesize 0 | |
set linesize 1000 | |
set trims on | |
set feedback off | |
spool output.csv | |
SELECT | |
id ||','|| |
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
001,Alice,2020/01/01 00:00:00 | |
002,Bob,2020/01/02 01:23:45 | |
003,Carol,2020/01/03 10:20:30 |
NewerOlder