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
#! /usr/bin/env python3 | |
""" | |
Adapted from https://github.com/WordPress/gutenberg/issues/23947#issuecomment-1738680230 | |
Setup ngrok for local development with WordPress when used with wp-env. Follows instructions from | |
https://ngrok.com/docs/using-ngrok-with/wordpress/ | |
Notes |
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 Combine | |
struct PointOfSaleEntryPoint {} | |
let isBetaFeatureEnabled = PassthroughSubject<Bool, Never>() | |
let isEligibleForPOS = PassthroughSubject<Bool, Never>() | |
let posViewModel = | |
Publishers.CombineLatest(isBetaFeatureEnabled, isEligibleForPOS) | |
// // Map to optional value | |
// // Output: |
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 | |
class MyData: ObservableObject { | |
// TIL: the type cannot be optional. | |
// If the selection type is optional, then the option in the UI & property here won't be binded. | |
@Published var selectedOption: String = "Option 2" | |
} | |
struct PickerSelectionTestView: View { | |
@ObservedObject var data = MyData() |
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
<!-- wp:heading --> | |
<h2>Comments</h2> | |
<!-- /wp:heading --> | |
<!-- wp:syntaxhighlighter/code {"language":"swift","lineNumbers":false} --> | |
<pre class="wp-block-syntaxhighlighter-code">// this is a comment | |
/* this is also a comment, | |
but written over multiple lines */ | |
/// This is a function level comment. | |
/// |
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
{ | |
"blog": 1600000, | |
"blog_id": 1600000, | |
"note_id": 5555555, | |
"type": "store_order", | |
"aps": { | |
"alert": "You have a new order! \Ud83c\Udf89", | |
"badge": 1, | |
"category": "store_order", | |
"content-available": 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
@propertyWrapper | |
public struct ThreadSafe<Value> { | |
private let queue = DispatchQueue(label: "com.private") | |
private var value: Value | |
public init(wrappedValue: Value) { | |
self.value = wrappedValue | |
} | |
public var wrappedValue: Value { |
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
Incident Identifier: 1ECDE596-F076-404F-88B2-05475EE63CA3 | |
CrashReporter Key: be1b0e9b09f93fa6569d12c263890cff0e401650 | |
Hardware Model: iPhone11,2 | |
Process: WooCommerce [416] | |
Path: /private/var/containers/Bundle/Application/DB1A25DA-ADD0-4270-81D8-90B4FC08D5F7/WooCommerce.app/WooCommerce | |
Identifier: com.automattic.woocommerce | |
Version: 4.4.0.2 (4.4) | |
AppStoreTools: 11E608a | |
AppVariant: 1:iPhone11,2:13 | |
Code Type: ARM-64 (Native) |
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
Incident Identifier: F727C508-4757-4CED-AC63-C9F2438791B3 | |
CrashReporter Key: bd231a4a42c8098c7b1e343b62f82dee88c4f10b | |
Hardware Model: iPhone12,1 | |
Process: WooCommerce [5820] | |
Path: /private/var/containers/Bundle/Application/19FE19D1-2101-4C51-B400-DCF1126475D6/WooCommerce.app/WooCommerce | |
Identifier: com.automattic.woocommerce | |
Version: 4.4.0.2 (4.4) | |
AppStoreTools: 11E608a | |
AppVariant: 1:iPhone12,1:13 | |
Code Type: ARM-64 (Native) |
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
{ | |
"blankLineBetweenMembers" : { | |
"ignoreSingleLineProperties" : true | |
}, | |
"indentation" : { | |
"spaces" : 2 | |
}, | |
"lineBreakBeforeControlFlowKeywords" : false, | |
"lineBreakBeforeEachArgument" : false, | |
"lineLength" : 100, |
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.util.Scanner; | |
import java.math.*; | |
public class NMul { | |
public static void main(String[] args) { | |
BigInteger sum; | |
long n; | |
Scanner sc = new Scanner(System.in); | |
while (sc.hasNext()) { |
NewerOlder