class RegistrationsController < ApplicationController
def new
@user = User.new
end
def create
package pricecache
import (
"context"
"sync"
import functools
import threading
import time
from collections import OrderedDict
<?php
namespace App\Exports;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Carbon;
module KeysetPaginatable
extend ActiveSupport::Concern
class_methods do
def keyset_page(cursor: nil, limit: 20, direction: :desc)
limit = limit.to_i.clamp(1, 100)
use std::collections::HashMap;
use std::hash::Hash;
use std::sync::{Arc, RwLock};
pub struct Memoizer<K, V> {
store: RwLock<HashMap<K, Arc<V>>>,
import { useState, useEffect, useCallback } from 'react';
export function useLocalStorage(key, initialValue) {
const readValue = useCallback(() => {
if (typeof window === 'undefined') return initialValue;
try {
package com.example.orders;
public final class Order {
public static final Order POISON_PILL = new Order(-1L, 0.0);
export interface Cursor {
createdAt: string;
id: string;
}
export function encodeCursor(c: Cursor): string {
package ratelimit
import (
"sync"
"time"
)
import asyncio
import time
from dataclasses import dataclass, field
@dataclass
import abc
from typing import IO
class Exporter(abc.ABC):
name: str = ""