class CreateAuditLogs < ActiveRecord::Migration[7.1]
def change
create_table :audit_logs do |t|
t.references :auditable, polymorphic: true, null: false
t.references :user, null: true, foreign_key: true
t.string :action, null: false
<?php
namespace App\Services;
use App\Models\Order;
use Illuminate\Support\Facades\Cache;
use serde::{Deserialize, Deserializer};
use time::OffsetDateTime;
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UserProfile {
import csv
class _LineBuffer:
def __init__(self):
self._data = ""
package com.example.signup.validation;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
const RETRYABLE_STATUS = new Set([408, 429, 500, 502, 503, 504]);
export function fullJitter(attempt, baseDelay = 300, maxDelay = 10_000) {
const ceiling = Math.min(maxDelay, baseDelay * 2 ** attempt);
return Math.random() * ceiling;
}
import { Injectable } from '@angular/core';
import { HttpClient, HttpParams } from '@angular/common/http';
import { Observable, of } from 'rxjs';
import { catchError } from 'rxjs/operators';
export interface SearchResult {
require 'sinatra/base'
require 'json'
class HealthApp < Sinatra::Base
configure do
set :dump_errors, true
package pipeline
import "context"
func generate(ctx context.Context, nums ...int) <-chan int {
out := make(chan int)
package com.shop.inventory;
import jakarta.persistence.*;
@Entity
@Table(name = "inventory_item")
from sqlalchemy import select
from .models import Order, db
def stream_orders(batch_size=1000):
use notify::{Event, RecommendedWatcher, RecursiveMode, Watcher};
use std::path::{Path, PathBuf};
use std::sync::mpsc;
pub fn spawn_watcher(root: &Path) -> notify::Result<(RecommendedWatcher, flume::Receiver<PathBuf>)> {
let (raw_tx, raw_rx) = mpsc::channel::<notify::Result<Event>>();