- macOS latest
- Python3
- 下载mrc-converter-suite并解压
void main() { | |
// Define different scenarios for t5 using Dart records | |
// (String name, double t5_value, String expected_behavior) | |
final List<(String name, double t5Value, String expectedBehavior)> scenarios = | |
[ | |
('t5 is a regular number', 1.0, 'Simplification is okay'), | |
( | |
't5 is positive Infinity', | |
double.infinity, | |
'Simplification breaks due to NaN', |
import 'package:graphql/client.dart'; | |
class HttpTimeoutLink extends HttpLink { | |
final Duration queryTimeout; | |
final Duration mutationTimeout; | |
HttpTimeoutLink({ | |
required String uri, | |
required this.mutationTimeout, | |
required this.queryTimeout, |
import { useEffect, useState } from "react"; | |
interface LocationOptions { | |
enableHighAccuracy?: boolean; | |
timeout?: number; | |
maximumAge?: number; | |
} | |
interface LocationState { | |
coords: { |
// Website you intended to retrieve for users. | |
const upstream = 'api.openai.com' | |
// Custom pathname for the upstream website. | |
const upstream_path = '/' | |
// Website you intended to retrieve for users using mobile devices. | |
const upstream_mobile = upstream | |
// Countries and regions where you wish to suspend your service. |
// Copyright 2021, Thea Choem, All rights reserved. | |
import 'package:badges/badges.dart'; | |
import 'package:flutter/material.dart'; | |
class CustomTabBarItem { | |
final String label; | |
final String? value; | |
CustomTabBarItem({ |
extension Color { | |
/// Return a random color | |
static var random: Color { | |
return Color( | |
red: .random(in: 0...1), | |
green: .random(in: 0...1), | |
blue: .random(in: 0...1) | |
) | |
} | |
} |
/** | |
* This Gist is part of a medium article - read here: | |
* https://jamiecurnow.medium.com/using-firestore-with-typescript-65bd2a602945 | |
*/ | |
// import firstore (obviously) | |
import { firestore } from "firebase-admin" | |
// Import or define your types | |
// import { YourType } from '~/@types' |
This is the full Cloud Functions code explained in my blog post: How to schedule a Cloud Function to run in the future (in order to build a Firestore document TTL)