import type { Redis } from "ioredis";
export interface RawEntry {
member: string;
score: number;
}
module KeysetPaginatable
extend ActiveSupport::Concern
class_methods do
def keyset_page(cursor: nil, limit: 20, direction: :desc)
limit = limit.to_i.clamp(1, 100)
package feed
import (
"encoding/base64"
"encoding/json"
"time"
export interface Page<T> {
items: T[];
nextCursor: string | null;
}
export interface Post {
import { useState, useRef, useEffect, useCallback } from 'react';
export function useOnScreen(options = {}) {
const [node, setNode] = useState(null);
const [isIntersecting, setIsIntersecting] = useState(false);
module Paginatable
extend ActiveSupport::Concern
Page = Struct.new(:records, :next_cursor, keyword_init: true)
DEFAULT_LIMIT = 25
package listing
import "encoding/base64"
func Encode(name string) string {
return base64.RawURLEncoding.EncodeToString([]byte(name))
import base64
import json
from datetime import datetime
from typing import NamedTuple
from fastapi import HTTPException
package com.example.catalog.web;
import com.example.catalog.domain.Product;
import java.math.BigDecimal;
public record ProductResponse(
@RestController
@RequestMapping("/api/exports")
public class ExportController {
private final CsvStreamWriter csvStreamWriter;
import { useLayoutEffect, useRef, useCallback } from 'react';
export function useScrollAnchor(anchorItemCount) {
const containerRef = useRef(null);
const savedRef = useRef(null);
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use App\Http\Resources\PostResource;