Random snippets of all sorts of code, mixed with a selection of help and advice.
I want to sell/forward unused inventory/request from the publisher for a admanager
14 May 2026 @ 8:10 am
Can anyone give me any idea how to implement this system inside a adnetwork !
I have the implementation for DSP with open RTB 2.5.
But now I want to redirect my unused inventory/request to other SSPs. But I Actually didn't find anything on the internet how to implement this system. If anybody have any idea please give me some advice !
Plotting an envelope curve using nlrq()
14 May 2026 @ 7:54 am
I am trying to use this function for a 99th quantile regression in order to draw an envelope curve.
However, the obtained curve has been rising continuously and shows no decrease.
y ~ a * exp(b * x) - c - d * exp(e * x)
library(ggplot2)
library(quantreg)
points <- data.frame(
x = c(6, 9, 12, 15, 20, 25, 9, 12, 15, 18, 21, 24, 27, 27, 9, 12,
15, 18, 21, 24, 27, 6, 9, 12, 18, 24, 27, 6, 9, 12, 18, 21, 24,
27, 6, 9, 12, 15, 18, 21, 24, 27, 7, 18, 24, 27, 7, 12, 18, 24,
27, 7, 10, 15, 20, 25, 8, 10, 14.5, 15, 20, 25, 5, 7, 10, 15,
20, 22.5, 24, 12.5, 17.5, 21, 23, 26.5, 12.5, 17.5, 21, 23, 26.5,
29, 12.5, 17.5, 21, 23, 26.5, 29, 12.5, 17.5, 21, 26.5, 29, 8,
15, 18, 22, 26, 27, 28, 8, 15, 18, 22, 26, 27, 28, 8, 15, 18,
22, 26, 27, 28, 8, 15, 18, 22, 26, 27, 28, 8, 15, 18, 22, 26,
27, 28, 8, 15, 18, 22, 26, 27, 28, 8, 15, 18, 22, 26, 27, 8,
15, 18, 22, 26, 2
Python variables to JS [closed]
14 May 2026 @ 7:41 am
I am trying to make a program that tells you what period you are in, and I am using JS, but for the time I’m using Python so I need to communicate the variables between the 2 languages. Everything I have tried doesn’t work. I have tried:
from datetime import datetime
time = datetime.now()
if time > 08.40.00:
period = 1
elif time < 08.40.00 and time > 09.10.00
period = 2
I need to get the period variable to communicate with JS but I do not know how.
Neutralino Window PID
14 May 2026 @ 7:34 am
I have created a Neutralino app that includes various widgets like news, weather that sort of thing. All works fine except for one irritating thing. A new window is created for each widget and during this process the PID of the window is saved. The problem arises when wanting to close the window using the PID and taskkill. It transpires that when creating a window and returning the status or info the PID is not the same as the PID in task manager. I have got around this problem by doing a search in the windowtitle in the os and then killing it. What I don't understand is why a false PID is return by Neutralino. In my simple mind a PID is a PID and not something to be made up on the fly. Anybody got any answers?
BaseX HTTP Client http:send-request() returns Content is not allowed in prolog when executing remote REST XQuery
14 May 2026 @ 7:20 am
I am trying to execute XQuery remotely on another BaseX server using http:send-request() and the BaseX REST API.
Architecture:
Server 1:
Contains the testdatabase
BaseX REST API running on port 8080
Server 2:
Contains only BaseX application/code
Executes pipeline XQueries
Sends REST requests to Server 1 to query the DB remotely
The problem is that every POST request to the REST endpoint fails with:
[experr:HC0002] Conversion failed:
"" (Line 1): Content is not allowed in prolog.
or sometimes:
[XPST0003] Empty query.
I can successfully access the REST endpoint using a simple GET request:
let $DataServer := 'http://xx.xx.xx.xx:8080/rest/'
let $httpTarget := fn:concat($DataServer,'test','/data/')
How do I cache images in local storage?
14 May 2026 @ 7:13 am
I have an Android application with camera and album features. It can take high-resolution photos and display them in albums. The problem is that each photo can be several hundred MB, which significantly increases the loading time when the user accesses the album page. I'm using Coil, and with RAM caching, the loading is very fast after the first attempt. However, the cache is cleared after a certain time, and it needs to be reloaded when the user opens the album page again. I tried using disk caching with Coil, but I think Coil doesn't offer disk caching for local images. What's the best way to do this?
I keep my files in this location:
/storage/emulated/0/CameraApp/Album/
Thank you
How do I stop transform.rotate() from tanking my FPS?
14 May 2026 @ 6:57 am
I have been working on a top-down game where, instead of the player character facing the mouse, the map is rotated around the player. The direction of the map is modified by mouse movement, the player faces the same way. Basically, imagine facing straight down in a 3rd person shooter.
I have been having an issue where the direction the player faces effectively dictates the game's framerate, almost halving it at 45 degrees, then returning to normal at 90. I know rotating bitmap images is processor-intensive, but I figured the exact direction wouldn't have that much of a bearing on the performance.
I researched possible fixes to my problem. Pre-rotating
I researched possible fixes to my problem. Pre-rotatingWhy Oracle Apex Interactive Grid not saving updated values?
14 May 2026 @ 6:34 am
I have an Interactive Grid in Oracle APEX using the following query:
SELECT a.ROWID AS ROW_ID,
a.TESTID,
a.UNITID,
a.RESULT,
b.ACCEPTED_BG,
a.PERF_ID,
a.VALIDATED
FROM HAJJ_QC_RESULTS a
JOIN HAJJ_SAMPLE_DETAILS b
ON a.SAMPLE_ID = b.SAMPLE_ID
WHERE b.ACCEPTED_BG IS NOT NULL
AND a.SAMPLE_ID = :P52_SAMPLE
AND a.HOSPITAL_NO = :P52_HOSPITAL
AND a.APPROVED_DATE = :P52_DATE
AND a.PROGRAM_ID = :P52_PROGRAM
AND a.MACHINE_ID = :P52_MACHINE;
I created a manual process (type: Execute Code) with the following code:
BEGIN
CASE :APEX$ROW_STATUS
WHEN 'U' THEN
UPDATE HAJJ_QC_RESULTS
SET PERF_ID = :PERF_ID,
VALIDATED = 2
WHERE ROWID = :ROW_ID;
END CASE;
END;
Requirement:
I want the user to select only PERF_ID from an LOV.
Once selected and saved,
How to build a Laravel Library Borrowing and Penalty System with authentication, borrowing, and penalty modules
14 May 2026 @ 5:19 am
The system uses:
Laravel Breeze Authentication
MVC Architecture
MySQL Database
Blade Templates
Modules:
Login Module
Book Management
Borrowing and Return Management
Penalty Management
Features
Book Management
Add/Edit/Delete books
Store:
title
author
category
available copies
Borrowing Module
Select member
Select book
Borrow date and due date
Return date
Borrow status (Borrowed, Returned, Overdue)
Penalty Module
Compute penalties for overdue books
Mark penalties as Paid/Unpaid
So my questions
how to solve or write when you want to write an array for a website [closed]
14 May 2026 @ 3:19 am
I want to apply arrays in real life coding, so that I can create a website. I haven't understood how to use arrays, so can you help me?
let fruits=["apple","tomato","salad"];
let newFruit=fruits.push("limon");
console.log(newFruit);