class ExplainAnalyzer
def initialize(relation, watched_tables:)
@relation = relation
@watched_tables = Array(watched_tables).map(&:to_s)
end
CREATE TABLE posts (
id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
author_id bigint NOT NULL REFERENCES authors (id),
title text NOT NULL,
body text NOT NULL,
published_at timestamptz NOT NULL DEFAULT now()
Rails.application.configure do
# Bullet configuration
config.after_initialize do
Bullet.enable = true
Bullet.alert = true # Show JavaScript alert
Bullet.bullet_logger = true # Log to bullet.log
use parking_lot::Mutex;
use std::sync::Arc;
use std::thread;
fn main() {
let counter = Arc::new(Mutex::new(0));
<%= turbo_refreshes_with method: :morph, scroll: :preserve %>
<div class="posts-index">
<div class="sticky top-0 bg-white border-b" id="search-bar">
<%= form_with url: posts_path, method: :get, data: { turbo_frame: "_top", turbo_action: "morph" } do |f| %>
<%= f.search_field :q,
export const CACHE_VERSION = 'v7';
export const APP_SHELL = '/index.html';
export const PRECACHE_URLS = [
'/',
import { Agent as HttpAgent } from 'http';
import { Agent as HttpsAgent } from 'https';
const shared = {
keepAlive: true,
keepAliveMsecs: 1_000,
use std::mem::MaybeUninit;
fn main() {
let mut uninit: MaybeUninit<i32> = MaybeUninit::uninit();
unsafe {
uninit.as_mut_ptr().write(42);
import { useCallback, useEffect, useState } from "react";
interface Options {
rootMargin?: string;
threshold?: number;
}
// Creating elements
const div = document.createElement('div');
div.id = 'container';
div.className = 'box rounded';
div.textContent = 'Hello World';
import UIKit
class ImageCache {
static let shared = ImageCache()
private let cache = NSCache<NSString, UIImage>()
class CheckoutService
def initialize(cart:, user:)
@cart = cart
@user = user
end