package api
import "fmt"
type Resource struct {
Type string `json:"type"`
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct CancelReason {
pub reason: String,
pub feedback: Option<String>,
const express = require('express');
const AppError = require('./AppError');
const asyncHandler = require('./asyncHandler');
const errorMiddleware = require('./errorMiddleware');
const UserRepo = require('./UserRepo');
class ApplicationPolicy
attr_reader :user, :record
def initialize(user, record)
@user = user
@record = record
import hashlib
from datetime import datetime, timezone
from sqlalchemy import BigInteger, Column, DateTime, String, UniqueConstraint
from sqlalchemy.orm import declarative_base
import { z } from "zod";
export const rowSchema = z.object({
email: z.string().email(),
name: z.string().min(1, "name is required"),
age: z.coerce.number().int().min(0, "age must be >= 0"),
class InvoicesController < ApplicationController
def index
invoices = InvoicesQuery.new(current_account.invoices, filter_params).call
@invoices = invoices.page(params[:page]).per(25)
render :index
from django.conf import settings
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models, transaction
from .middleware import get_current_user
mod chunker;mod parallel_hash;
use parallel_hash::{hash_buffer, root_hash};
const CHUNK_SIZE: usize = 64 * 1024;
'use strict';
const fs = require('fs');
const path = require('path');
const zlib = require('zlib');
const crypto = require('crypto');
import { RefObject, useEffect, useRef } from "react";
type Handler = (event: MouseEvent | TouchEvent) => void;
export function useClickOutside<T extends HTMLElement>(
ref: RefObject<T>,
function escapeCell(value) {
if (value === null || value === undefined) return '';
const str = String(value);
if (/[",\n\r]/.test(str)) {
return '"' + str.replace(/"/g, '""') + '"';
}