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
func getTimeline(for configuration: ConfigurationIntent, in context: Context, completion: @escaping (Timeline<Entry>) -> ()) { | |
var entries: [SimpleEntry] = [] | |
let currentDate = Date() | |
let stickyNote = NSPlainNoteRepository.getStickyNote(configuration) | |
let entry = SimpleEntry(date: currentDate, stickyNote: stickyNote) | |
entries.append(entry) | |
let timeline = Timeline(entries: entries, policy: .never) | |
completion(timeline) |
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
<?xml version="1.0" encoding="utf-8"?> | |
<merge xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:android="http://schemas.android.com/apk/res/android"> | |
<com.google.android.gms.ads.nativead.NativeAdView | |
android:background="#ffffff" | |
android:layout_height="wrap_content" | |
android:layout_width="match_parent" | |
android:layout_centerInParent="true" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<merge xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:android="http://schemas.android.com/apk/res/android"> | |
<com.google.android.gms.ads.nativead.NativeAdView | |
android:background="#ffffff" | |
android:layout_height="wrap_content" | |
android:layout_width="match_parent" | |
android:layout_centerInParent="true" |
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
struct widgetEntryView : View { | |
var entry: Provider.Entry | |
// https://stackoverflow.com/questions/56487323/make-a-vstack-fill-the-width-of-the-screen-in-swiftui | |
var body: some View { | |
HStack { | |
VStack(alignment: .leading) { | |
Text("H H") | |
Text("Good bye world Good bye world Good byfd 3 4 5 6") | |
Spacer() |
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
class Fragment { | |
private void displayAdMob() { | |
initializeMobileAdsAsyncIfPossible(() -> { | |
... | |
adView.loadAd(adRequest); | |
}); | |
} | |
} |
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
// | |
// ShareViewController.swift | |
// share | |
// | |
// Created by Yan Cheng Cheok on 03/11/2022. | |
// | |
import UIKit | |
import lib | |
import CoreServices |
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
package com.demo.demo; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import androidx.annotation.Nullable; |
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 | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
... | |
FirebaseApp.configure() | |
// Not sure why. We need to call this function for first_open to be sent automatically. | |
// https://stackoverflow.com/questions/73600417/why-firebase-analytics-first-open-event-is-not-sent-automatically-unless-i-first |
This file has been truncated, but you can view the full file.
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
[{"symbol":"-S","exchange":"XNYS","exchangeSuffix":"","exchangeName":"New York Stock Exchange Inc","exchangeSegment":"XNYS","exchangeSegmentName":"New York Stock Exchange Inc","name":"Prudential Financial Inc. - 5.625% NT REDEEM 15/08/2058 USD 25","date":"2022-07-15","type":"ps","iexId":null,"region":"US","currency":"USD","isEnabled":true,"figi":"BBG00LNCR467","cik":"0001137774","lei":"5PRBRS5FEH7NREC8OR45"},{"symbol":"A","exchange":"XNYS","exchangeSuffix":"","exchangeName":"New York Stock Exchange Inc","exchangeSegment":"XNYS","exchangeSegmentName":"New York Stock Exchange Inc","name":"Agilent Technologies Inc.","date":"2022-07-15","type":"cs","iexId":"IEX_46574843354B2D52","region":"US","currency":"USD","isEnabled":true,"figi":"BBG000C2V3D6","cik":"0001090872","lei":"QUIX8Y7A2WP0XRMW7G29"},{"symbol":"AA","exchange":"XNYS","exchangeSuffix":"","exchangeName":"New York Stock Exchange Inc","exchangeSegment":"XNYS","exchangeSegmentName":"New York Stock Exchange Inc","name":"Alcoa Corp","date":"2022-07-15","type" |
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
/* | |
See LICENSE folder for this sample’s licensing information. | |
Abstract: | |
A class to set up the Core Data stack, observe Core Data notifications, process persistent history, and deduplicate tags. | |
*/ | |
import Foundation | |
import CloudKit | |
import CoreData |