Random snippets of all sorts of code, mixed with a selection of help and advice.
Load data to DT_TEXT from SSIS Script Component
10 December 2025 @ 10:18 am
I am trying to load data from a data source via REST API in an SSIS Script Component into a flat file. On of the columns of said data source contains a large string that must not be truncated. I am failing to implement this. What I have tried:
Setting the Output columns in the script component to DT_TEXT. Then
a) Directly assigning the column
Output0Buffer.Applicationname = item.Application_name;
-> Error "The value being written to the column of type DT_TEXT or DT_NTEXT is neither a string nor a byte array."
b) Next I tried converting the string to byte
string desc = item.Application_name;
byte[] descBytes = Encoding.UTF8.GetBytes(desc);
Output0Buffer.AddBlobData(descBytes)
-> Error CS1061 'Output0Buffer' does not contain a definition for 'AddBlobData' and no accessible extension method 'AddBlobData' accepting a first argument of type 'Output0Buffer' could be
How to reduce the logging of OpenTelemetry with ASP.NET Core and Azure web service
10 December 2025 @ 10:10 am
I have an ASP.NET Core web application running as an Azure App Service.
Recently I have noticed our costs for Application Insights has rocketed up. I think this might be due to upgrading to a newer implementation of the .NET Core Open Telemetry/Azure Monitor packages. I would like to configure the Traces that are being logged so that anything below a warning level is not logged as a trace unless I alter the configuration to turn that on.
I have the following code in my Program.cs to configure open telemetry and logging:
builder.Services.AddOpenTelemetry().UseAzureMonitor();
// setup logging - read from configuration
var seriLog = new LoggerConfiguration()
.ReadFrom.Configuration(configuration)
.Enrich.FromLogContext()
.WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3} {Service} {Version}] {Message:lj}{NewLine}{Exception}")
.CreateLogg
Polars: out-of-memory problem of groupby-max
10 December 2025 @ 10:09 am
I have several ndjson files that are nearly 800GB. They come from parsing the Wikipedia dump. I would like to remove duplicates html. As such, I group by "html" and pick the json with the most recent "dateModified".
from pathlib import Path
import polars as pl
inDir = r"E:\Personal Projects\tmp\tarFiles\result2"
outDir = r"C:\Users\Akira\Documents\out_polars.ndjson"
inDir = Path(inDir)
outDir = Path(outDir)
schema = {"name" : pl.String,
"dateModified": pl.String,
"identifier" : pl.UInt64,
"url" : pl.String,
"html" : pl.String}
lf = pl.scan_ndjson(inDir / "*wiktionary*.ndjson", schema=schema)
lf = lf.group_by(["html"]).agg(pl.max("dateModified").alias("dateModified"))
lf.sink_ndjson(outDir,
mai
Hilt compilation error : Android BaseExtension not found
10 December 2025 @ 10:07 am
Following this tutorial https://medium.com/@mohit2656422/setup-of-hilt-with-ksp-in-an-android-project-2025-e76e42bb261a to add Hilt to my project, I get this error when compiling the code :
* Exception is:
org.gradle.api.plugins.InvalidPluginException: An exception occurred applying plugin request [id: 'com.google.dagger.hilt.android', version: '2.57.2']
at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.exceptionOccurred(DefaultPluginRequestApplicator.java:183)
at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.access$400(DefaultPluginRequestApplicator.java:54)
at ....
org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
at org.gradle.
Error 0x80010135: Path too long Sentinel-1 Data Extraction
10 December 2025 @ 10:06 am
Error 0x80010135: Path too long.
I keep getting this error while trying to extract my Sentinel-1 datasets zip folder
Note that I am using Windows 11 PC.
Rust Iced Markdown View isn't Showing in the window
10 December 2025 @ 10:06 am
I've tried the rust iced framework and tried to create a markdown view from the documentation and the code compiles and renderes the windows but the code
pub fn new() -> Self {
Self {
markdown: markdown::parse("this is some **markdown** ").collect(),
}
}
does not show on the window. i'm not sure what am i doing wrong but the window doesn't show for me here is the full code down.
use iced::{
Border, Element,
widget::markdown::{self, Highlight},
};
#[derive(Debug, Default)]
struct Editor {
markdown: Vec<markdown::Item>,
}
#[derive(Debug, Clone)]
enum Message {
LinkClicked(markdown::Url),
ButtonPressed,
}
impl Editor {
pub fn new() -> Self {
Self {
markdown: markdown::parse("this is some **markdown** ").collect(),
}
}
fn update(state: &mut Self, message:
Strange behaviour: FastAPI and Curl not working with "localhost" but ok with 127.0.0.1
10 December 2025 @ 10:02 am
When I run my first sample (first official tutorial) using FastAPI and I notice something weird with the test using curl.
Launch the server with:
fastapi dev main.py
and to test the endpoint, I execute
curl http://127.0.0.1:8000
and I logically receive the output:
{"Hello":"World"}
but If I execute using the localhost instead 127.0.0.1, I get:
curl: (52) Empty reply from server
Note that if I use wget
wget -qO - http://localhost:8000
it returns the proper hello world json body (works).
I saw many po
Ionic + Cordova Android build fails: "A problem occurred evaluating project ':app' — DependencyHandler.module(Object)"
10 December 2025 @ 9:59 am
I’m working on an Ionic + Cordova project. After adding the Android platform and trying to sync/ build with Gradle, I keep getting this error:
A problem occurred evaluating project ':app'.
> 'org.gradle.api.artifacts.Dependency org.gradle.api.artifacts.dsl.DependencyHandler.module(java.lang.Object)'
I’ve tried multiple approaches but nothing helped so far:
manually changing the Gradle version
switching Java versions
switching Node.js versions
updating Cordova (from v12 to v16)
regenerating the Android platform
The error still appears every time I run the build.
Do you have any idea what might cause this and how I can resolve it?
Thanks!
Firebase manual initialization
10 December 2025 @ 9:57 am
I’m using multiple Firebase configurations in my project that change at runtime. The setup follows the approach described here: https://github.com/firebase/firebase-android-sdk/issues/66 — meaning I’m using a ResourcesWrapper, removing the Google Services plugin, and not using any google-services.json files.
The issue is that when I run the Gradle task uploadCrashlyticsMappingFile, I get the error “Google-Services plugin not configured properly”, which happens because the google-services plugin is removed.
Has anyone encountered this problem and managed to solve it?
I tried restoring the plugin and adding the following to the manifest:
<provider
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:authorities="${applicationId}.firebaseinitprovider"
tools:node="remove" />
stuck at error code 21 using Dahua Java NetSDK
10 December 2025 @ 9:56 am
So I'm trying to read the thermal data from the Dahua IP Cam model TPC-BF5401. I couldn't find any comprehensive documents so I just read the manual tried to follow the examples bundled with the SDK at https://depp.dahuasecurity.com/integration/guide/download/SDK (I'm using the x64 Java version on Linux). I managed to read the point-wise temperature using this script
package com.netsdk.demo.frame;
import java.io.File;
import java.util.Scanner;
import com.netsdk.lib.NetSDKLib;
import com.netsdk.lib.NetSDKLib.*;
import com.netsdk.lib.ToolKits;
import com.sun.jna.Pointer;
import com.sun.jna.ptr.IntByReference;
/**
* Console demo:
* - Init SDK
* - Login to camera
* - Query temperature at a given (x,y) pixel coordinate on a channel
* - Print the result
*/
public class QueryTempEx {
public static final NetSDKLib netSdk = NetSDKLib.NETSDK_INSTANCE;
pri