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
<div class="m-2"> | |
<button class="cursor-pointer rounded-lg border-2 border-gray-950 bg-blue-300 bg-gradient-to-tr from-blue-400 to-yellow-400 p-2.5 text-white hover:bg-gradient-to-tl">Click Me</button> | |
</div> | |
<div class="flex h-10 w-10 items-center justify-center rounded-full border-2 border-blue-500 bg-blue-400 font-bold text-white shadow-2xl">MA</div> | |
<div class="h-screen w-full bg-gray-400 p-10"> | |
<div class="w-full max-w-[400px] rounded-3xl bg-white p-4"> | |
<div class="p-2"> | |
<div class="mb-10">Payment Template</div> |
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
//func hasPairWithSum(_ arr: [Int], _ sum: Int) -> Bool { | |
// | |
// for i in 0..<arr.count { | |
// for j in i + 1..<arr.count { | |
// if arr[i] + arr[j] == sum { | |
// return true | |
// } | |
// } | |
// } | |
// return false |
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 dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd"> | |
<dictionary title="Standard Terminology"> | |
<suite name="Standard Suite" code="????" description="Common classes and commands for all applications."> | |
<command name="open" code="aevtodoc" description="Open a document."> | |
<direct-parameter description="The file(s) to be opened."> | |
<type type="file"/> |
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
if let collectionViewLayout = collectionView.collectionViewLayout as? UICollectionViewFlowLayout { | |
collectionViewLayout.estimatedItemSize = UICollectionViewFlowLayout.automaticSize | |
} |
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
{"status":"ok","totalResults":38,"articles":[{"source":{"id":null,"name":"Kompas.com"},"author":"Rendika Ferri Kurniawan","title":"Fakta-fakta 8 Planet di Tata Surya dan Kemungkinan Planet Kesembilan - Kompas.com - KOMPAS.com","description":"Ada planet-planet yang bergerak tak searah jarum jam, bahkan porosnya miring. Ada juga yang berwarna merah tapi justru dingin. Ini fakta-fakta planet.","url":"https://www.kompas.com/tren/read/2022/03/08/193100965/fakta-fakta-8-planet-di-tata-surya-dan-kemungkinan-planet-kesembilan","urlToImage":"https://asset.kompas.com/crops/zJuFpHFHSpTLKGj4GElqaUkMx1s=/150x4:835x460/780x390/filters:watermark(data/photo/2020/03/10/5e6775d554370.png,0,-0,1)/data/photo/2021/04/19/607cec3127dfa.jpg","publishedAt":"2022-03-08T12:31:00Z","content":null},{"source":{"id":null,"name":"Kompas.com"},"author":"Reska K. Nistanto","title":"Cara Nonton Apple Event Malam Ini, iPhone SE 3 Bakal Meluncur? - Kompas.com - Tekno Kompas.com","description":"Apple akan menggelar acara peluncuran bertajuk 'Peek |
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 XCTest | |
extension XCTestCase{ | |
func trackMemoryLeaks(_ instance: AnyObject, file: StaticString = #file, line: UInt = #line){ | |
addTeardownBlock { [weak instance] in | |
XCTAssertNil(instance, "Instance should have been deallocated. Potential memory leak.", file: file, line: line) | |
} | |
} | |
} |
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 UIKit | |
class FeedViewController: UIViewController{ | |
var loadFeed: ((([String]) -> Void) -> Void)! | |
convenience init(loadFeed: @escaping (([String]) -> Void) -> Void){ | |
self.init() | |
self.loadFeed = loadFeed | |
} | |
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 numbers = [1, 2, 3 , 4 , 5, 6] | |
for number in numbers{ | |
if number.isMultiple(of: 2){ | |
print(number) | |
} | |
} | |
for number in numbers where number.isMultiple(of: 2){ | |
print(number) |
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 Optional where Wrapped == String{ | |
var orEmpty: String{ | |
switch self{ | |
case .some(let value): | |
return value | |
case .none: | |
return "" | |
} | |
} | |
} |
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
// | |
// ViewController.swift | |
// Pokemon | |
// | |
// Created by Ihwan ID on 04/02/21. | |
// | |
import UIKit | |
import Combine |
NewerOlder