StackOverflow.com

VN:F [1.9.22_1171]
Rating: 8.5/10 (13 votes cast)

Random snippets of all sorts of code, mixed with a selection of help and advice.

inputs from fields on form output to print on image

26 April 2026 @ 10:11 pm

Years ago I worked for a place where we had an application form that was done on our website. The fields, Name, Address, phone, etc were overlayed based on coordinates to a copy of the application we had so we could actually read the applications and the information was placed so we could print. I cannot for the life of me remember the script or coding for it. Thanks

Will copilot studio allow different free technologies to work within one application? [closed]

26 April 2026 @ 10:00 pm

I am building a custom AI, that need scale and customization. I am unsure which stack to choose - Copilot Studio or .net. I have researched that Copilot studio can connect different Microsoft technologies. However, customisation is limited.

how to add table in tsx zad1 Sed ut perspiciatis unde omnis iste natus error

26 April 2026 @ 9:39 pm

import { useInfiniteQuery, useMutation } from '@tanstack/react-query'; import { useDebouncedValue } from '@tanstack/react-pacer'; import { useForm } from 'react-hook-form'; import { useQueryState } from 'nuqs'; import { useState } from 'react'; import z from 'zod'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '@/components/ui/table'; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from '@/components/ui/dialog'; import { Spinner } from '@/components/ui/spinner'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '@/components/ui/select'; import { Skeleton } from '@/components/ui/skeleton'; import { Trash2 } from 'lucide-react'; import { fetchCourses, createCourse, deleteCourse, type Course, } from '@/api/courses'; import { toast } fro

Designing a Thread-Safe, High-Performance Logging System in Modern C++ (C++17/20)

26 April 2026 @ 9:19 pm

I’m currently working on a medium-sized C++ project where I need to implement a custom logging system. The requirements go beyond basic logging, and I’d like to validate my design decisions before going too far. Context The logger is intended to be: Thread-safe (used across multiple worker threads) Low-latency (minimal blocking in hot paths) Flexible (support multiple output sinks like console and file) Extensible (easy to add new log levels or sinks later) Current Approach Right now, I have: A singleton-style global logger instance (getGlobalLogger()) A mutex-protected std::ostream-like interface Optional file output using std::ofstream Message formatting via std::stringstrea

What are the best practices for Common Lisp/SBCL via Docker, especially with multithreading?

26 April 2026 @ 9:01 pm

I'm serving my application via Docker for testing purposes. It's written in Common Lisp and runs in SBCL. I'm running into a few, so to speak, silly issues and would love your thoughts on best practices. In particular, I'd love to know your thoughts on the simplest, most straightforward way to load my package, bypassing the following snags: Docker images must be built by running a series of steps non-interactively, so QuickLisp's step that requires the user to "hit enter" at the end of the installation process is not possible (I think). Is there a way to bypass this? My application includes a webserver (Hunchentoot) and is thus multithreaded, does this mean I can't save my image via "save-lisp-and-die" and load in the container build process? Thank you so much, as always!

Convergence of integral using complex integration

26 April 2026 @ 8:32 pm

in the second part of Statistical Physics of Landau and Lifshitz they mention the integral: enter image description here They get to that result by contour integration, but I am not quite sure if the integral actually converges. At the upper limit it clearly goes to zero like exp(-z), but at the lower limit the denominators saturates to 1, while the numerator oscillates. Does anyone have any clue?

Confusing Behavior of ALL Subquery in Apache IoTDB

26 April 2026 @ 8:13 pm

I'm using the ALL syntax in Apache IoTDB 2.0.6 table model for a query, but the returned result is inconsistent with expectations. Minimal Reproducible Data CREATE TABLE main_data ( `time` TIMESTAMP `TIME`, device_id STRING TAG, value INT32 FIELD ); CREATE TABLE detail_data ( device_id STRING TAG, ref_value INT32 FIELD ); INSERT INTO main_data VALUES (2024-01-01T00:00:00, 'D1', 30), (2024-01-01T01:00:00, 'D1', 40), (2024-01-01T02:00:00, 'D1', 50); INSERT INTO detail_data VALUES (2024-01-01T00:00:00, 'D1', 30), (2024-01-01T01:00:00, 'D1', 40), (2024-01-02T00:00:00, 'D1', `NULL`); Query Statement SELECT * FROM main_data WHERE device_id = 'D1' AND value > ALL (SELECT ref_value FROM detail_data WHERE device_id = 'D1'); Returned Result

Split integer into chunks to monitor workflow

26 April 2026 @ 7:11 pm

I am using python and gspread to manipulate a google sheet and want to be able to track how many rows have been processed. I can pull then number of rows in the sheet by doing num_rows = len(sheet.get_all_values()). Now I want to take that integer and split it into even chunks of 500 (except for the final chunk) and iterate over those chunks so that I can print out the progress the code is making as it works. How would I do that?

Can someone explain to me why we use surrogate keys for joining some fact/dim tables?

26 April 2026 @ 6:13 pm

I'm new to SQL and I was looking at dimensional and fact tables, I was told that apparently we use surrogate keys to connect the fact and dim tables, but why not just use the natural key then? I tried to shorten the code with ... so it's less to read. -- create gold customer information dimensional view create view gold.dim_customers as select -- creating a surrogate key for joining purposes row_number() over (order by cst_id) as customer_key, ..... from silver.crm_cust_info ci left join silver.erp_cust_az12 ca on ci.cst_key = ca.cid left join silver.erp_loc_a101 la on ci.cst_key = la.cid; -- create gold product information dimensional view create view gold.dim_products as select row_number() over(order by pn.prd_start_dt, pn.prd_key) as product_key, -- surrogate key for connecting data model ..... pn.prd_start_dt as start_date from silver.crm_prd_info pn left join silver.erp_px_cat_g1v2 pc on pn.cat_id = pc.id where prd_end_dt is null; -- filter out all hi

UDP transmission Not working in new phone but working in old one

26 April 2026 @ 5:21 pm

I am new in Android. I made an app that controls a WROOM-02 board containing an esp8266 microcontroller in AP mode. I am using the WROOM module as it comes, with the original AT firmware. I could make it work mostly with code I found here in a moto e7. When I installed the same app in a RedmiNote 13 it doesn't work, but if I send an UDP packet from my laptop the WROOM receives it. I also tried using a UDP sender I downloaded to my phone and the WROOM doesn't receive the packet. I tried the following: Connecting the laptop and the cellphone to my router I can send and receive messages between the laptop and the cellphone. Connecting the laptop and the cellphone to the WROOM AP I can send and receive messages in the laptop, but in the cellphone I receive messages but when I send something to the laptop I don't receive it. As I am usin 3rd party apps and standard AT firmware in the WROOM I don't know if any of my code will be useful to you. Her