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.

gpt 5.2 chat model is not giving complete output

2 March 2026 @ 5:51 am

I am using azure openai gpt 5.2 chat model for extraction of data from given input text. Here i have passed the text which contain all required data. but model is not giving me complete output. I am extracting contacts from text but its giving only 1 contacts or 3 contacts. Output is not constant every time its different. In this model i am not able to set temperature parameter also. Can anyone has solution for this. Or can you suggest the openai model which is best for my usecase where i don't need more reasoning. Currently i am using gpt4o but now I need to upgrade the model.

Why ticklabel_format has no effect in this matplotlib script?

2 March 2026 @ 5:46 am

This Python 3.14.3 script with matplotlib 3.10.8: import numpy as np, matplotlib.pyplot as plt a = np.random.rand(5)*3 b = np.random.rand(5) + 1000 fig, ax = plt.subplots() ax.plot(a, 'r') ax.ticklabel_format(axis='y', style='plain') axx = ax.twinx() axx.plot(b, 'b') axx.ticklabel_format(axis='y', style='plain') plt.show() produces a plot with scientific notation for Y-axis ticks, contrary to ticklabel_format documentation. enter image description here How to get a non-scientific notation for Y-axis ticks?

Instagram Graph API-Cannot get green checkmark for instagram_business_* scopes in App Review due to UI bug (API test calls remain 0)

2 March 2026 @ 5:36 am

I'm currently trying to submit my Meta App for App Review to get advanced access for the Messenger API for Instagram. My app is already business-verified and the use case ("Manage messages and content on Instagram") is added. However, I am stuck in an endless loop because of a UI sync bug in the App Dashboard, preventing me from getting the required green checkmark ("API Test Calls") for the new instagram_business_* scopes. The Problem: I need to make API test calls for: instagram_business_manage_messages instagram_business_manage_insights instagram_business_content_publish But these scopes are completely missing from the Graph API Explorer dropdown and the Business Login "Configuration" permissions search bar. What I have tried so far: 1. Manual UR

Best Query tool for Text search (VB.NET- Studio 2019 and 2026 (long story)

2 March 2026 @ 5:30 am

I'm finally getting around to implement custom languages to my application I did design all my messages from the start around a common function that includes custom variables (\VAR1,\VAR2.....) and Line feed (\n) Example of one of my messages "- FIRST= \VAR1 \n- SECOND=\VAR2", 10,20 This will result in the following Assembled Message -FIRST=10 -SECOND=20 For me to display the message in another language I need to be able to search a text file for the original message segment and then replace it with the updated language entry. I therefor would have to search for simple text strings. "- FIRST=" and "- SECOND=" I would like to get some inputs on what tool to use for searching/ Indexing a simple text file - ? The first thing that comes to mind is SQLite but maybe the

Type inference not correctly inferring type of generic

2 March 2026 @ 5:25 am

I have the following code enum UnionType { a, b } type A = { type: UnionType.a }; type B = { type: UnionType.b }; type AB = A | B; function f<T extends AB>(x: T, y: T) { if(x.type == UnionType.a) { // in here, it correctly infers that x is of type A // but it does not infer that y is also of type A } } Should this work the way I think it does? I would prefer not to have to put x, y into an object and do type inference on the object if at all possible.

Ceres: Is my SO(3)+R³ LocalParameterization correct for IMU preintegration factor (especially ComputeJacobian)?

2 March 2026 @ 5:03 am

I am trying to add IMU preintegration factor to my optimization in VIO. I just want to be sure if I am doing everything correctly, especially LocalParameterization part. Below is given the IMU preintegration factor. I just pasted .h file, so you can have an idea on parametrization used in factor. #ifndef IMU_INTEG_FACTOR_H #define IMU_INTEG_FACTOR_H #include <ceres/ceres.h> #include "IMU/basicTypes.hpp" #include "IMU/imuPreintegrated.hpp" namespace vio { class ImuIntegFactor : public ceres::SizedCostFunction<15, 6, 9, 6, 9> { public: ImuIntegFactor(IMUPreintegrated* pre_integration) : pre_integration_(pre_integration) { Eigen::Matrix<double, 15, 15> info = pre_integration_->get_information(); sqrt_info_ = Eigen::LLT<Eigen::Matrix<double, 15, 15>>(info.cast<double>()).matrixL().transpose(); } void ScaleSqrtInfo(double scale) { // only scale the sub information m

Chatbot that converts questions to SQL queries

2 March 2026 @ 5:01 am

I have a usecase where we need to perform complex calculations (aggregate function from multiple tables) on the given customer knowledge base, so I can't use simple RAG mechanisms like Azure Search or Copilot agents etc. I'm planning to convert each question to a SQL query and execute it to get answers for the chatbot. Since I cannot let AI directly generate the SQL query, I plan to use it as a query planner like it identifies the metrics and filters to add, or what calculation to do SUM, COUNT, JOIN, GROUP BY etc.., and build the query from code. Also RBAC should be applied in the code. How much production ready is this, is there any better technolgy that can well analyse data other than this or any better ideas? Looking forward to your thoughts

How to prevent child component from re-rendering when parent state changes?

2 March 2026 @ 4:40 am

I have a parent component that updates its own state. However, when the parent state changes, a child component re-renders even though its props have not changed. I want to prevent unnecessary re-renders of the child component for performance reasons.

Missing domain from Google Cloud platform

2 March 2026 @ 4:16 am

I have recently got a new cloud domain with Google cloud console and for some reason has totally disappeared I have followed all tutorials online and everything Gemini suggested. I performed a whois and it said it was with Squarespace and Google reseller. I also contacted Squarespace to see if they had control over it and it seems they don't... I cannot find it anywhere in any of my projects on the cloud console under cloud domains. I had everything setup and working for my domain so am not sure where it's gone. I have also followed all troubleshooting guides and asked Gemini but I have hit a brick wall. Please can anyone assist with helping me locate this? I have checked all my projects linked to the account and can see the billing info saying the domain was paid for. I also had my website up and running with the domain and did some custom dns through Cloud DNS but again, my domain has totally dissappeared. .

Unique combinations of length 2^N of four elements with constraints

2 March 2026 @ 3:53 am

I'm trying to generate lists of length 2^n of all the unique combinations of the following elements: A, B, X, Y. This in and of itself is trivial. However, I have constraints! The elements are grouped into two sets: (A, B) and (X, Y). The order of the sequence must alternate choosing an element first from (A, B) and then from (X, Y). For example, for n=3, "A X B Y A X B Y" is allowed, but "A B X Y A B X Y" is not. I see how I can brute-force this. I'm wondering if there's an elegant way to do this. This would also make a fun code golf exercise.