Skip to content

Instantly share code, notes, and snippets.

BetterProgramming

View GitHub Profile
View modelcoordinates.swift
struct Location {
let id = UUID()
let title: String
let coordinate: CLLocationCoordinate2D
}
extension Location: Identifiable { }
extension Location {
static func getLocation() -> [Location] {
return [
Location(title: "KLCC Park", coordinate: CLLocationCoordinate2D(latitude: 3.155699, longitude: 101.713934)),
View vertalignment.swift
extension VerticalAlignment {
private enum TheVerticalAlignment : AlignmentID {
static func defaultValue(in d: ViewDimensions) -> CGFloat {
return d[VerticalAlignment.center]
}
}
static let theVerticalAlignment = VerticalAlignment(TheVerticalAlignment.self)
}
View alignmentid.swift
extension HorizontalAlignment {
private enum TheHorizontalAlignment : AlignmentID {
static func defaultValue(in d: ViewDimensions) -> CGFloat {
return d[HorizontalAlignment.center]
}
}
static let theHorizontalAlignment = HorizontalAlignment(TheHorizontalAlignment.self)
}
View circle.swift
struct SwiftUIView: View {
var body: some View {
Circle()
.border(Color.red)
}
}
View ExtractTables.py
import boto3
from trp import Document
# Document
s3BucketName = "<Your bucket name>"
documentName = "<Image with text>"
# Amazon Textract client
textract = boto3.client('textract')
# Call Amazon Textract
response = textract.analyze_document(
Document={
View KeyValueExtractPrompt.py
import boto3
from trp import Document
# Document
s3BucketName = "<Your bucket name>"
documentName = "<Image with text>"
# Amazon Textract client
textract = boto3.client('textract')
# Call Amazon Textract
response = textract.analyze_document(
Document={
View RawTextImageExtract.py
import boto3
# Document
s3BucketName = "<Your bucket name>"
documentName = "<Image with text>"
# Amazon Textract client
textract = boto3.client('textract')
# Call Amazon Textract
response = textract.detect_document_text(
Document={
'S3Object': {
View RawTextExtract.py
import boto3
import time
def startJob(s3BucketName, objectName):
response = None
client = boto3.client('textract')
response = client.start_document_text_detection(
DocumentLocation={
'S3Object': {
'Bucket': s3BucketName,
'Name': objectName
View navorder.html
<p>
<button>First</button>
<button>Second</button>
<button>Third</button>
<button>Fourth</button>
</p>
View redoutline.css
input:hover, input:focus,
button:hover, button:focus,
select:hover, select:focus,
a:hover, a:focus {
outline: red solid 10px;
}
You can’t perform that action at this time.