class AddSoftDeleteToUsers < ActiveRecord::Migration[7.1]
def change
add_column :users, :deleted_at, :datetime
add_index :users, :deleted_at, where: "deleted_at IS NULL", name: "index_users_on_live"
import { useCallback, useEffect, useState } from 'react';
function parseSearch(search) {
const params = new URLSearchParams(search);
const out = {};
for (const [key, value] of params.entries()) out[key] = value;
package upload
import (
"errors"
"io"
"log"
package com.example.users.domain;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import { Injectable, NestMiddleware, UnauthorizedException } from '@nestjs/common';
import { Request, Response, NextFunction } from 'express';
import { TenantService } from './tenant.service';
@Injectable()
export class TenantContextMiddleware implements NestMiddleware {
import queue
import time
from dataclasses import dataclass, field, replace
from typing import Any, Dict, Tuple
class ProjectPresenter
def initialize(project, include_tasks: true)
@project = project
@include_tasks = include_tasks
end
const { EventEmitter } = require('events');
class NotificationBus extends EventEmitter {
constructor(bufferSize = 100) {
super();
this.setMaxListeners(0);
require 'sinatra'
require 'json'
require_relative 'book'
require_relative 'helpers'
set :books, {
use std::sync::Arc;
use std::time::{Duration, Instant};
use tokio::sync::Mutex;
use tokio::time::sleep;
#[derive(Debug)]
const jwt = require('jsonwebtoken');
const SECRET = process.env.JWT_SECRET;
const ALGORITHM = 'HS256';
const ACCESS_TTL = '15m';
import { AsyncLocalStorage } from 'node:async_hooks';
interface Store {
requestId: string;
}