import enum
import datetime as dt
from sqlalchemy import Column, Integer, String, BigInteger, Enum, DateTime
from sqlalchemy.orm import declarative_base
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
@RestController
@RequestMapping("/api/notifications")
public class NotificationController {
private final SseEmitterRegistry registry;
private final NotificationService service;
class ExportWriter
def initialize(export)
@export = export
end
def append(rows)
framework:
workflows:
order:
type: state_machine
marking_store:
type: method
@Entity
@Table(name = "idempotency_records",
uniqueConstraints = @UniqueConstraint(columnNames = "idempotency_key"))
public class IdempotencyRecord {
public enum Status { IN_PROGRESS, COMPLETED }
import { useEffect, useState } from 'react';
export function useLocalStorage<T>(
key: string,
initialValue: T
): [T, (value: T) => void] {
class Article < ApplicationRecord
has_many :taggings, dependent: :destroy
has_many :tags, through: :taggings
scope :published, -> { where.not(published_at: nil) }
<?php
namespace App\Jobs;
use App\Models\Invoice;
use App\Services\StripeGateway;
<?php
namespace App\Observers;
use App\Models\Product;
use App\Jobs\WarmRelatedProductsCache;
import { useCallback, useMemo, useState } from 'react';
function compare(a, b) {
if (typeof a === 'number' && typeof b === 'number') return a - b;
return String(a ?? '').localeCompare(String(b ?? ''));
}
import { useState, useEffect, useCallback } from 'react';
export function useLocalStorage(key, initialValue) {
const readValue = useCallback(() => {
if (typeof window === 'undefined') return initialValue;
try {