Random snippets of all sorts of code, mixed with a selection of help and advice.
Google Captcha V3 trouble sending to gmail
6 February 2026 @ 8:01 pm
I am updating a contact form to include "google reCAPTCHA V3", when I add the code as per this guide "https://stackoverflow.com/questions/54183985/how-can-i-implement-google-recaptcha-v3-in-a-php-form?newreg=ed22141fdf9a4c97836f56e38f0d3d1d" everything seemingly works when testing with my work email(meaning you fill out the form then an internal team gets the information you submitted, and simultaneously the user or inquiry persons receives a thank you email), but when I switch to my personal email a Gmail account the users "thank you" email is never received while the internal email is still sent and received as normal.
- I am using PHP's built-in mail() function.
Use Nextjs and external backend Setup
6 February 2026 @ 8:00 pm
So I was trying to use Next.js and Express. I used Next.js only for frontend and SSR (ssr for some pages only). How can I add protected routes in Next.js in this two server setup?.
Normally, we would check cookies in Next.js middleware.
export async function proxy(req: NextRequest) {
const path = req.nextUrl.pathname
const cookies = req.cookies
if(!cookies.requiredCookie){ //redirect}
..........
It was working well, but only in localhost/dev mode. In production, cookies are set by Express, which is now on a different domain from Next.js.
So cookies set by express is not allowed to send to Next.js (cookie domain rules in browser). Now if we use this setup, we can log in but still can’t view protected pages because no cookies are sent to the middleware.
Im stuck at this point.
I also found that we can rewrite requests from Next.js via Next config, but for normal api requests Next rewrite config doesn
Good backend project to build in C++? (Any senior dev please help)
6 February 2026 @ 7:59 pm
Hey guys,
I’m a student currently in my third year (semester before 4th year) of college. I’m good at DSA and competitive programming in C++, but my experience with C++ is mostly at a DSA/CP level, not at a development or systems level.
Like many DSA-focused students, I don’t have strong development skills yet. I’ve recently started learning full-stack development from scratch, with a stronger focus on backend.
My long-term goal is to become a strong backend engineer and AI engineer.
I know that using C++ for backend development is hard, but my motivation is to learn deeply and stand out. Most good developers in my college are building backend projects using common stacks, but no one is building backend systems in C++. I feel that working on such projects will teach me a lot and also result in a
Inability to select a subsidiary for a Cash Sale in SuiteScript
6 February 2026 @ 7:55 pm
I'm writing a RESTlet that will allow my team to create Cash Sales from a local app. For some reason, though, the script fails to provide any subsidiary to pick from. I must select a subsidiary because I must select a location.
I've tried using getSelectOptions, since that field is the select type, and it returns no options. I have also tried changing the record to a sales order, but it made no difference.
The script is running, for debug purposes, as my user with admin rights, so permissions shouldn't be an issue.
/**
* @NApiVersion 2.1
* @NScriptType Restlet
*/
define(['N/log', 'N/record', 'N/search'],
/**
* @param {log} log
* @param {record} record
* @param {search} search
*/
(log, record, search) => {
/**
* @typedef RequestedOrderItem
* @prop {string} upc The UPC of the item to add
* @prop {number} quantity The quantity of the item
Is AI interview software actually useful or just another trend?
6 February 2026 @ 7:54 pm
Recently I have been seeing more conversations around AI Interview Software, especially as interviews continue to move online and competition for roles keeps increasing. A lot of candidates seem to be using AI-based tools to practice interviews, improve answer structure, and manage nerves during high-pressure situations.
I’ve heard about platforms like LockedIn AI through online discussions and job communities, which made me curious about how people are actually using these tools. From what I understand, AI interview software isn’t just about memorizing answers—it’s more about organizing thoughts, responding clearly, and handling behavioral or technical questions more confidently.
That said, I’m still unsure how effective this really is in real interviews.
Has anyone here used AI interview software and noticed a genuine improvement?
Does it help more with confidence and clarity, or does it feel artificial?
Do recruiters view AI-assisted p
JavaFx: Set font size of all labels
6 February 2026 @ 7:53 pm
I am using Java / JavaFx 17. In my application there are multiple label objects (ca. 25). Instead of setting for all labels individually the font size, I would like to know, if there is any possibility to set such font size globally for all created label objects? Currently I am setting this to every single label by this command:
Label labelName = new Label("Labelname");
labelName.setFont(new Font(16.0));
Addendum: I do not use a fxml file for creating the user interface.
PaddleOCR predict() method throws NotImplementedError
6 February 2026 @ 7:34 pm
I'm trying to use PaddleOCR:
from paddleocr import PaddleOCR
from PIL import Image
# Initialize the OCR engine
ocr = PaddleOCR(use_textline_orientation=False, lang='es')
# Run OCR on an image path
img_path = '../datos/casa_ley/febrero_2026/04022026_pagina_01.png'
result = ocr.predict(img_path)
# Print the results
for res in result:
res.print()
res.save_to_img("output")
res.save_to_json("output")
...but I'm getting a NotImplementedError when calling the predict() method:
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
Cell In[15], line 10
8 # Run OCR on an image path (can be a local file or a web URL)
9 img_path = '../datos/casa_ley/febrero_2026/04022026_pagina_01.jpg'
---> 10 result = ocr.predict(img_pa
Is it possible to loop a click event
6 February 2026 @ 5:15 pm
So for my present JavaScript when the user clicks the button to enter the desired squares they want to make it works but when I click it again to enter another number it doesn’t work till I reload my browser
How do I make it that when I enter an input I can still enter another input later without having to reload
That’s why I am asking if it’s possible to loop the click event and will it work for this situation.
I will appreciate any advice please
const container = document.getElementById("container");
const input = document.getElementById("btn");
const inputNew = document.getElementById("input");
function makeDivs(numDivs) {
for (let d = 0; d < numDivs; d++) {
let cells = document.createElement("d
Calculating time elasped in ChezScheme
6 February 2026 @ 4:17 pm
I am trying to solve the exercise 1.22 in SICP with ChezScheme on my MacOS, I did some reading here and found out I could use time procedure to get the CPU runtime of any other procedure. I couldn't use the textbook-provided code as there's no runtime primitive in ChezScheme.
However I believe that the exercise is meant to calculate the time elapsed, per iteration of a prime number found, which the time procedure wouldn't be able to tell as it only tells the whole time duration of the procedure.
Here's my code:
(define (search-for-primes lb amt)
(search-iter lb 0 amt))
(define (search-iter lb fd amt)
(cond ((= fd amt) (display "all found"))
((not (prime
xcode uses wrong version of NSManagedObjectContext.perform
6 February 2026 @ 2:19 pm
I increased the target version, and xcode started giving me an error
Expression is 'async' but is not marked with 'await'" on each usage of NSManagedObjectContext.perform().
let context: NSManagedObjectContext = ...
context.perform{...}
It thinks I use newer method
NSManagedObjectContext.perform<T>(schedule::() throws -> T) async rethrows -> T,
but I don't.
How to make xcode to compile with old perform(() -> Void)?
Adding explicit closure header
let context: NSManagedObjectContext = ...
context.perform{() -> Void in ...}
is not helpful.