import { createContext, useContext, useEffect, useMemo, useState, ReactNode } from 'react';
import { authApi, User } from './authApi';
type Status = 'loading' | 'authenticated' | 'anonymous';
interface AuthValue {
package listing
import "encoding/base64"
func Encode(name string) string {
return base64.RawURLEncoding.EncodeToString([]byte(name))
package config
import (
"encoding/json"
"fmt"
"time"
require 'sinatra/base'
require_relative 'upload_store'
class UploadApp < Sinatra::Base
MAX_BYTES = 50 * 1024 * 1024
class ImportResult
RowError = Struct.new(:line, :messages)
attr_reader :imported, :row_errors
def initialize
package api
import (
"encoding/json"
"net/http"
)
import { Injectable, NestMiddleware, UnauthorizedException } from '@nestjs/common';
import { Request, Response, NextFunction } from 'express';
import { TenantService } from './tenant.service';
@Injectable()
export class TenantContextMiddleware implements NestMiddleware {
class PriceBreakdown < Struct.new(:subtotal_cents, :discount_cents, :tax_cents, keyword_init: true)
def initialize(*)
super
freeze
end
use std::fmt;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum OrderState {
Pending,
Paid,
from datetime import datetime, timedelta, timezone
from jose import jwt, JWTError
from jose.exceptions import ExpiredSignatureError
SECRET_KEY = "change-me-in-production"
package com.example.billing.config;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
@Configuration
package com.example.orders.event;
import java.math.BigDecimal;
import java.time.Instant;
public final class OrderPlacedEvent {