Random snippets of all sorts of code, mixed with a selection of help and advice.
Performance in springboot
24 February 2026 @ 9:54 am
I´m working in a api using springboot with java and maven that get a bunch of users from an external api, they told me to use pagination, but the external api doesn´t have pagination but there´s a field that allow me to put the number of accounts I want, I have to implement pagination in my api, what would be the most performatic way to do that?
Restricting duplicate Family Number in EBS R12 (Form Personalization)
24 February 2026 @ 9:49 am
Restricting duplicate Family Number in EBS R12 (Form Personalization)
Below is a concise, recommended approach using Form Personalization (no custom PL/SQL program unit required) to prevent duplicate Family Number entries on the Contact form.
Steps (Form Personalization — recommended)
Open the Contact form.
Navigate to: Help → Diagnostics → Custom Code → Personalize
Click Create Item to add a new personalization rule.
Fill the Rule Header:
Seq: 10
Description: Restrict Duplicate Family Number
Level: Form
Enabled: Yes
Define the Trigger Event (under Conditions):
Trigger Event: WHEN-VALIDATE-ITEM
Trigger
CVAT annotation tool with only annotation draw and saving annotations
24 February 2026 @ 9:45 am
I’m trying to use CVAT only as an annotation drawing tool (bounding boxes/polygons + saving annotations) via API, without using the full CVAT workflow like projects, tasks dashboard, etc.
My requirement is very minimal:
I already have my own existing application and database.
I just need CVAT’s annotation UI to draw rectangles/polygons on an image.
After drawing, I want to save and retrieve annotations via API (JSON/COCO/etc).
I do NOT need:
Projects page
Tasks dashboard
User management UI
Full CVAT workflow
Basically I want this flow:
Upload an image from my application.
Open CVAT annotation editor directly for that image.
Draw annotations (rectangles/polygons with labels).
Save annotations.
Building a local LLM (ChatGPT-like assistant) for Odoo 18 Community to query e-commerce business data without external APIs
24 February 2026 @ 9:30 am
I’m working on a project for an e-commerce startup that uses Odoo 18 Community as the main ERP platform, along with a website for customer orders.
We want to build an internal ChatGPT-like AI assistant that can understand natural language questions from employees and retrieve or compute information from Odoo.
Examples of queries:
“How many items did we sell today?”
“Show today’s revenue.”
“How many new customers were created this week?”
The company does not want permanent dependency on paid AI APIs due to recurring costs.
However, they are open to temporarily using paid APIs during development
and I’m looking for guidance on the best architecture that can meet those requirements ,
-Is fine-tuning an open-source model on our specific Odoo schema the best approach here and how ?
- What is the best way to make the model awar
FastAPI HttpOnly cookie not being stored in browser (Vercel frontend + Render backend, CORS enabled)
24 February 2026 @ 9:26 am
I have the following setup:
Frontend: React (Vite) deployed separately - Vercel
Backend: FastAPI deployed separately - Render
Auth: JWT stored in HttpOnly cookie
Axios requests use withCredentials: true
Frontend and backend are on different domains.
FastAPI CORS configuration
app.add_middleware(
CORSMiddleware,
allow_origins=[FRONTEND_URL],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
Cookie configuration
response.set_cookie(
key="access-token",
value=token,
httponly=True,
secure=True,
samesite="none",
path="/"
)
Axios configuration
protoc3 grpc (go) code generation problem
24 February 2026 @ 9:25 am
trying to generate protoc 3 code for my go project. The protoc documentation lists that I can just take the latest version like :
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest and
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest.
With these I issued the following command:
protoc -I=api --go_out=. --go-grpc_out=. auth.proto
This however doesnt work : in my generated (rpc) code (auth_grpc.pb.go) I get errors as follows:
const _ = grpc.SupportPackageIsVersion9 (undefined)
grpc.CallOption{grpc.StaticMethod()}, opts...) (StaticMethod undefined) - twice
It seems to have something to do with version incompatiblity between the 2 exes I installed? (Protoc3 compiler itself is probably neutral?) Since I am not familiar with this can someone please point to a combination that does work or point to a "protoc-gen / protoc
How can the client certificate be accessed in ASP.NET Core 10 Minimal API?
24 February 2026 @ 9:16 am
I want to be able to get visibility of the client's certificate in my middleware. I have verified that, in Postman, the certificate is being sent. I tried this on both Linux and Windows 11. The root certificate of the server cert and the client cert is imported into both operating systems.
Ultimately, my goal is to view the cert's fingerprint in the middleware, compare against a list of allowed fingerprints, and the allow or deny (401) the request to proceed. I don't care where the cert is from, or who signed it, or whatever. Only these thumbprints are allowed.
My packages in the project:
<PackageReference Include="Microsoft.AspNetCore.Authentication.Certificate" Version="10.0.3" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.3" />
Here is the full app. This is a complete minimum example that should run and demonstrate the problem. Just replace the redacted pl
Micropython: How to find the callback created with python in ffi from my C++ function?
24 February 2026 @ 8:31 am
I want to async not only call the cpp functions in Python but return Python functions in my cpp functions to make callbacks.
Example
python script
import ffi
import exemplecpp
def hello():
print("Hello world\n")
hello_callback = ffi.callback("v", hello, "")
exemplecpp.cppfunc(hello_callback)
How in the usermodule to retrieve the callback as a function to use it in my cpp function
cpp function
mp_obj_t cppfunc(mp_obj_t func_obj)
{
...
func_obj();
...
return mp_const_none
}
Docker container will not start if "-device is" unavailable
24 February 2026 @ 7:55 am
I have a Docker Compose file where i make USB device accessible to a container.
devices:
- /dev/ttyACM0
But i am having a problem: If the USB device isn't available, the container won't start at all.
While it would be bad if the USB device weren't available, since the application has other tasks to perform, it would be even worse if it didn't start at all.
I've looked at the documentation but can't find a way to make the USB device optional.
Link to Docu
Perhaps someone can give me some advice?
Thank you !
Numeric or value error: character string buffer too small ORA-06512
24 February 2026 @ 7:34 am
select * from order_items
table definition
Currently I'm learning about stored procedures, and I am receiving this message:
ORA-06512: Numeric or value error: character string buffer too small
Could you see what my problem in my script is?
CREATE OR REPLACE PROCEDURE get_order_summary (
p_order_id IN number,
p_total_items OUT number,
p_total_amount OUT number
)
IS
BEGIN
SELECT
NVL(SUM(quantity), 0),
NVL(SUM(unit_price * quantity), 0)
INTO
p_total_items,
p_total_amount
FROM order_items
WHERE order_id = p_order_id;
END get_order_summary;
/
BEGIN
get_order_summary(499, :v_items, :v_amount);
END;
/