'use strict';
function dedupeAsync(producer, keyFn) {
const pending = new Map();
const resolveKey = keyFn || ((...args) => JSON.stringify(args));
package listing
import "encoding/base64"
func Encode(name string) string {
return base64.RawURLEncoding.EncodeToString([]byte(name))
class ImportResult
RowError = Struct.new(:line, :messages)
attr_reader :imported, :row_errors
def initialize
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class Coupon < ApplicationRecord
before_validation :normalize_code
validates :code,
coupon_code: { min_length: 6 },
uniqueness: { case_sensitive: false }
pub enum Node {
File { name: String, size: u64 },
Dir { name: String, children: Vec<Node> },
}
impl Node {
package order
type CreateOrderRequest struct {
Reference string `json:"reference" binding:"required,min=3,max=40"`
Currency string `json:"currency" binding:"required,currency"`
Customer Customer `json:"customer" binding:"required"`
CREATE TABLE country (
code CHAR(2) PRIMARY KEY,
name VARCHAR(128) NOT NULL,
currency CHAR(3) NOT NULL,
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
class TenantResolver
RESERVED = %w[www app admin].freeze
def initialize(app)
@app = app
end
import { useEffect, useState } from 'react';
interface FetchState<T> {
data: T | null;
error: Error | null;
loading: boolean;
import jwt, { JwtPayload, SignOptions } from 'jsonwebtoken';
const SECRET = process.env.JWT_SECRET as string;
const ISSUER = 'auth.example.com';
const AUDIENCE = 'api.example.com';
import asyncio
import uuid
from dataclasses import dataclass, field
from typing import Any, Dict, Optional