Set up react-native-iap
in your project :
npm install react-native-iap
then add react-native-iap
to your plugins in app.config.(js|ts) or app.json
import copy | |
import json | |
import os | |
from openai import OpenAI | |
client = OpenAI( | |
api_key="<Your api key here>" | |
) |
/* | |
* Usage: | |
* const { alert, confirm, prompt } = useModals() | |
* alert("Hey!") // awaitable too | |
* if (await confirm("Are you sure?")) ... | |
* const result = await prompt("Enter a URL", "http://") | |
*/ | |
import React, { | |
createContext, |
// SPDX-License-Identifier: MIT | |
pragma solidity =0.7.6; | |
pragma abicoder v2; | |
import "https://github.com/Uniswap/uniswap-v3-periphery/blob/main/contracts/interfaces/ISwapRouter.sol"; | |
import "https://github.com/Uniswap/uniswap-v3-periphery/blob/main/contracts/interfaces/IQuoter.sol"; | |
import {IERC20, SafeERC20} from "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.4-solc-0.7/contracts/token/ERC20/SafeERC20.sol"; | |
interface IUniswapRouter is ISwapRouter { |
This gist demonstrates how to use a Kotlin MPP library which depends on an iOS Framework in a native iOS application (XCode project).
First, see [how the Kotlin MPP Library is built][lib-build].
Key ideas:
mpp
.cinterop
klib
s, so we use [Carthage] again.ios*
targets.NO-SOURCE
. Just create# This file contains the fastlane.tools configuration | |
# You can find the documentation at https://docs.fastlane.tools | |
# | |
# For a list of all available actions, check out | |
# | |
# https://docs.fastlane.tools/actions | |
# | |
# For a list of all available plugins, check out | |
# | |
# https://docs.fastlane.tools/plugins/available-plugins |
When you look up how to compile swift faster for debug builds, people very earnestly give advice that seems contradictory: you should "try using the whole module optimization flag," and also "never use whole module optimization for debugging". [^1]
This is confusing because some of us are using these two general words:
compilation: "turning text into an executable program"
/* | |
Thanks David <3 - https://medium.freecodecamp.com/the-100-correct-way-to-do-css-breakpoints-88d6a5ba1862 | |
*/ | |
@for-phone: ~"screen and (max-width: 44.9375rem)"; // < 720 | |
@for-tablet-only: ~"screen and (min-width: 45rem) and (max-width: 74.9375rem)"; // > 720 < 1199 | |
@for-tablet-portrait-only: ~"screen and (min-width: 45rem) and (max-width: 56.1875rem)"; // > 720 < 900 | |
@for-tablet-portrait-up: ~"screen and (min-width: 45rem)"; // > 720 | |
@for-tablet-landscape-up: ~"screen and (min-width: 56.25rem)"; // > 900 | |
@for-desktop-up: ~"screen and (min-width: 75rem)"; // > 1200 | |
@for-big-desktop-up: ~"screen and (min-width: 112.5rem)"; // > 1800 |
/* | |
* Copyright 2017 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file | |
* except in compliance with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software distributed under the | |
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
import UIKit | |
open class LayerView<Layer: CALayer>: UIView { | |
public final override class var layerClass: Swift.AnyClass { | |
return Layer.self | |
} | |
public final var concreteLayer: Layer { | |
return layer as! Layer | |
} |