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.

Writing a JSON to Oracle CLOB column with Nifi

7 January 2026 @ 11:46 pm

I have processor in Apache Nifi which prepares a big json (it varies between 4k to 500k), now I have the json which has nested objects and arrays in it. The flowfile has an attribute named "ETL_ID", now I want to persist content of flow-file to a CLOB attribute of a table in Oracle. I tried JOLT Transformer and created a JSON as { "ID": "1234", // value of ETL_ID "REQUEST": {.... the big json here } } but when I use PutDatabaseRecord with Oracle 12+ dialect, it writes something like: MapRecord\[{ContractId=null, PrintDocumentNo=1402/101/53034/53034/6, CompanyLifeProposalNo=qsn-190, InsurerId=116118216, FieldId=501, BranchId=null, AgencyId=130946, IntroducerBrokerId=null, IntroducerBranchId=null, IntroducerAgencyId=130946, BeginDate=2023-09-05, EndDate=2033-09-05, IssueDate=2023-09-05, PaymentType=233, Installment=10, InstallmentPeriod=242, Salary=null, SalaryPremiumPercent

DataGrid won't appear on Avalonia dialog

7 January 2026 @ 11:43 pm

I'm creating an Avalonia app, guided by the MVVM Community Toolkit practices. One function of the app involves opening a dialog which contains a DataGrid showing a list of language keys and translations in five languages. This data is loaded from a JSON file and each file may not have the same languages, so all but the first column of the DataGrid are generated at load time. The user then selects a row and its data is used by the main viewmodel after the dialog is closed. My problem is, while the data context for the dialog and its DataGrid appears to be properly populated with the list in an ObservableCollection and even registers a selected row, the DataGrid itself is never visible. I'm doing a lot of the same things that a previous app did, the largest difference being that the DataGrid was on the main window instead of a dialog. As a mechanical summary, clicking the button on the main win

return value from a vimscript to a variable in calling bash script

7 January 2026 @ 11:40 pm

In a bash script I run vim headless with vim $i.txt -u $HDV/test.vim where test.vim terminates with exe '!echo '.@m.' > red.cnt' q! This produces the desired result in the file red.cnt. But I would prefer to return the result directly into a variable defined in the calling bash script, something like exe '!let rct='.@m or exe '!rct='.@m q! neither of which produce any change in $rct How should I do this to get the value in @m into $rct?

Posit Cloud - I'm unable to save changes to github account

7 January 2026 @ 11:39 pm

I'm using Posit Cloud after a few months of inactivity. I'm having a problem that I've never seen before. I get a 403 error, but the URL it gives is strange: remote: Permission to BarryDeCicco/AARUG_Synthetic_Data_2025_05_22.git denied to BarryDeCicco. fatal: unable to access 'https://github.com/BarryDeCicco/AARUG_Synthetic_Data_2025_05_22.git/': The requested URL returned error: 403 I feel that this addition of .git to the URL is new. I've also checked my PAT and am using a new one, and then used the PAT which is works for RStudio for the same repo. Has anybody seen this? Does anybody have a way of debugging this? I've tried Google (AI and regular), but I can not get usable answers (too general). Thank you, Barry

Trouble running OpenTelemetry .NET with opentelemetry-collector

7 January 2026 @ 11:34 pm

I am trying to get an ASP.NET Core application to send logs to opentelemetry-collection by following the examples from https://opentelemetry.io/docs/languages/dotnet/exporters/ Here is my C# program: // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 using OpenTelemetry; using OpenTelemetry.Exporter; using OpenTelemetry.Logs; using OpenTelemetry.Metrics; using OpenTelemetry.Resources; using OpenTelemetry.Trace; const string serviceName = "Grocery.Price.Example"; var builder = WebApplication.CreateBuilder(args); builder.Logging.ClearProviders(); builder.Logging.AddOpenTelemetry(logging => { logging .SetResourceBuilder( ResourceBuilder.CreateDefault() .AddService(serviceName)) .AddOtlpExporter(options => { options.Endpoint = new Uri("http://local

How to not lose the cut ('x' key) text in Vim?

7 January 2026 @ 11:21 pm

I thought I have understood how the vim registers work pretty well until I came across this scenario. Consider following line. Toast #Mark Coffee Now, I want to move Toast in between the Mark and Coffee. So, I entered visual mode, selected Toast , Cut it using x key, Then realized there's a stray # char, so I removed that using the Del key. Now I lost the cut text. As a workaround, in step 1, I thought I could have used yank instead of cut, so the 'last yanked text' would be stored in reg 0. But pressing y takes me out of the visual selection. So I have to select Toast again to delete it. Is there any default Vim way to solve this, or must I add something to my config, to achieve this? If latter is true, I was thinking maybe I can assign reg "1, as

pipelines and using the latest image tag

7 January 2026 @ 11:20 pm

I'm working on setting up a pipeline for an application and for our lower environment, the team has decided that we will just use the latest tag. This brings up a question I have, I read that if you use latest on the deploys, the deployments will auto update for you, so you don't need to have a step inside your pipeline to trigger that, is that really how it works?

Why is my query not displaying 2 or more titles rather than just 2

7 January 2026 @ 10:59 pm

enter image description here I'm trying to figure out why my Having clause only displays the num of titles = 2 rather than 2 and above. In the screen shot. you see some of the employees have 3 titles. SELECT e.emp_no, e.hire_date, count(t.title) AS "Num of Titles" FROM employees AS e JOIN titles AS t USING(emp_no) WHERE EXTRACT (YEAR FROM e.hire_date) > 1991 GROUP BY e.emp_no HAVING count(t.title) > 1 ORDER BY e.emp_no;

I built a session-based message flow visualizer for backend

7 January 2026 @ 10:30 pm

I used to spend half my day doing the "Datadog dance" frequently. A user would report that their coupon didn't apply, I’d check the logs, and everything would look perfect: 200 OK across the board. I’d end up stitching together random fragments—"User 123 called Service A," "Service B responded"—trying to piece together a story from text files like a digital archaeologist. I could see the pipes were working, but I couldn't see the actual data inside them. I had no idea if the coupon service sent back a $0 or a $20 because the message body was hidden. I got fed up with the "guess-and-check" cycle of trying to reproduce these bugs in staging, so for my first Rust project, I built softprobe. It’s a WASM plugin for Istio that acts like a dashboard camera for my backend. Instead

Pass NetSuite saved search filter parameters through RESTlet API GET request

7 January 2026 @ 10:08 pm

I am building a NetSuite RESTlet that can accept the ID of a NetSuite saved search in a GET request and return the data for that saved search. I am sending the GET request from a custom R script. My RESTlet code works, but only for saved searches with a small number of records; NetSuite will kill the request if the number of records requested is too large. Is it possible to modify the RESTlet code below so that it not only accepts the saved search ID, but also additional filter parameters to modify the search before returning the data? And, if the above is possible, what those filter parameters need to look like once encoded to be sent in the GET request? Here is my RESTlet code: /** * @NApiVersion 2.1 * @NScriptType Restlet */ define(['N/search', 'N/log'], (search, log) => { function doGet(request) { const savedSearchId = request.id; const offset = parseInt(request.offset) || 0; const limit = parseInt(request.limit) || 1000;