package api
import (
"encoding/json"
"encoding/xml"
"net/http"
require 'sinatra/base'
require 'rack/protection'
class TransferApp < Sinatra::Base
enable :sessions
set :session_secret, ENV.fetch('SESSION_SECRET', 'a' * 64)
<?php
namespace App\Policies;
use App\Models\Article;
use App\Models\User;
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable, throwError } from 'rxjs';
import { catchError, shareReplay } from 'rxjs/operators';
export interface Project {
package httpx
import (
"net/http"
"strconv"
)
class FeatureFlag < ApplicationRecord
validates :key, presence: true, uniqueness: true
validates :percentage,
numericality: { only_integer: true,
greater_than_or_equal_to: 0,
less_than_or_equal_to: 100 }
<?php
namespace App\Orders;
enum OrderStatus: string
{
import { Injectable, NgZone } from '@angular/core';
import { Observable, Subject } from 'rxjs';
export interface ObserverOptions {
rootMargin?: string;
threshold?: number | number[];
const STORAGE_KEY = "auth.refreshToken";
let accessToken = null;
let refreshToken = localStorage.getItem(STORAGE_KEY);
const listeners = new Set();
<?php
namespace App\Message;
final class PurgeExpiredTokensMessage
{
const { AsyncLocalStorage } = require('async_hooks');
const storage = new AsyncLocalStorage();
function runWithTenant(tenantId, userId, callback) {
return storage.run({ tenantId, userId }, callback);
import { useCallback, useState } from 'react';
type CopiedValue = string | null;
type CopyFn = (text: string) => Promise<boolean>;
function legacyCopy(text: string): boolean {