Random snippets of all sorts of code, mixed with a selection of help and advice.
MSVC isn't capable of building a simple module and including glaze json library header
23 December 2025 @ 12:28 pm
The error given is simply C1001 Internal compiler error. This problem has been here for a really long time, like I discovered it about months ago. I am on version Visual Studio 2026, version 18.1.1.
Here is a reproducible example.
It simply looks like this:
//main.cpp
import serialisation_module; // error still occurs if you don't import (comment this out)
#include <iostream> // doesn't make a difference if this is here or not.
int main()
{
}
And:
//serialisation_module.cppm
module;
#include "glaze/glaze.hpp"
export module serialisation_module;
template <typename T>
void read_json(T& obj_out)
{
char buff[1024];
static constexpr glz::opts options{ .error_on_unknown_keys = false };
glz::error_ctx ret_val2 = glz::read<options>(obj_out, std::string_view(buff, 1024));
Difficulty connecting Choregraphe with Nao1
23 December 2025 @ 12:26 pm
I have a quite outdated version of Naoqi 1 robot which I am trying to connect using chroreographe 1.14.5 on windows, but I am running into the issue where the robot connects for a second and then disconnects with the following messages in Choregraphe
[INFO ] core.common.broker: Starting ALNetwork
[INFO ] core.common.network: Choregraphe is listening on 192.168.68.105:54011
[INFO ] con.connection: Remote connection created with 192.168.68.101:9559
[INFO ] core.common.broker: Starting ALChoregraphe
[INFO ] core.common.broker: Starting ALChoregrapheRecorder
[INFO ] qi.log: Verbosity set to 6
[VERB ] behavior.manager: DefaultBehaviors preference file could not be read: ALPreferences::xXMLToALValue
Preferences file corrupted:
[WARN ] con.connection: disconnectCallback has been called! Connection is lost.
[INFO ] core.common.network: Choregraphe server lost
[INFO ] con.connection: closeCurrentConnection
[VERB ] core.common.broker: Shutdown "Choregr
Module not found after installing in vs code
23 December 2025 @ 12:20 pm
When I install module with help of pip it get install but when I use it in code with command import it show error
Kivy RecycleView - dynamically updating element attributes
23 December 2025 @ 12:13 pm
I would like to modify appearance of elements in Kivy RecycleView conditionally, e.g. highlight an element if it contains specific text. I took the published example from here https://github.com/kivy/kivy/blob/master/examples/widgets/recycleview/basic_data.py and slightly modified it to add MyLabel class which implements the text highlighting:
from random import sample, randint
from string import ascii_lowercase
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.label import Label
from kivy.graphics import Color, Rectangle
kv = '''
<MyLabel>:
canvas.before:
Color:
rgba: [1, .85, .85, 1]
Rectangle:
size: self.size
pos: self.pos
<Row@RecycleKVIDsDataViewBehavior+BoxLayout>:
canvas.before:
Color:
Powerbi Slicer option affects visualization
23 December 2025 @ 12:02 pm
I have a slicer with 9 domains, for example, finance, sell ect. I am showing the same bar chart for 8 of the domains. The values changes based on the domain, but it is the same chart. However when the 9th domain, called MDG is selected. I want the bar chart do not be shown but a differen bar chart with different table as source. How do I do that?
Cannot disable the chart scrolling on Y-axis on Highcharts flutter
23 December 2025 @ 11:57 am
I've been working with highchart's line chart to plot some data and that has worked fine. The only thing I cannot seem to find is, how to disable this movement on Y axis. I've tried disabling the panning option, zoom option but still the chart scrolls on Y axis (see the gif)
Below is the configuration of my chart:
return HighchartsChart(
key: chartKey,
keepAlive: true,
debug: true,
HighchartsOptions(
time: HighchartsTimeOptions(
timezone: 'Europe/Amsterdam'),
chart: HighchartsChartOptions(
panning:
HighchartsChartPanningOptions(enabled: false),
Below is the configuration of my chart:
return HighchartsChart(
key: chartKey,
keepAlive: true,
debug: true,
HighchartsOptions(
time: HighchartsTimeOptions(
timezone: 'Europe/Amsterdam'),
chart: HighchartsChartOptions(
panning:
HighchartsChartPanningOptions(enabled: false),
How to split byte array in C++
23 December 2025 @ 11:56 am
I am using C++ .NET.
Here is example:
cli::array<Byte>^ myBytes = bytes//the variable bytes
//contains unpredictable amount of bytes,
//it can be 32 or 128 or 256, no matter.
And I have to extract first 16 bytes from the array.
I need the following:
var1 have to be contains first 16 bytes from myBytes,
var2 have to be contains what's left after subtracting the first 16 bytes.
How to get count of physical USB ports on Windows (not changing when devices are attached) using Go?
23 December 2025 @ 11:54 am
I am working on a Windows application written in Go lang, and I need to programmatically determine the number of physical USB ports available on the system.
My requirement is:
The count should represent physical USB ports (host controller / hub ports)
The count must not change when USB devices are plugged in or removed
I am not looking for the number of currently connected USB devices
The solution must work on Windows
Preferably accessible or callable from Go (golang), either directly or via Windows APIs (SetupAPI, WMI, etc.)
So far, most approaches I’ve found (WMI queries like Win32_USBHub, Win32_PnPEntity, or SetupDi enumeration) return logical devices, and the count changes when devices are attached or detached.
The Working Principle of CSS Negative Margins
23 December 2025 @ 11:47 am
I want to understand how CSS negative margins work in the box model, but the official documentation is difficult for me to follow. Below, I use an example to illustrate my confusion.
Why can negative margins cause elements to overlap? Can someone help explain this?
.element1 {
height: 200px;
background-color: aqua;
line-height: 200px;
font-size: 50px;
text-align: center;
color: aliceblue;
margin-bottom: -140px;
}
.element2 {
height: 100px;
background-color: blueviolet;
line-height: 100px;
font-size: 30px;
text-align: center;
color: ali
.element1 {
height: 200px;
background-color: aqua;
line-height: 200px;
font-size: 50px;
text-align: center;
color: aliceblue;
margin-bottom: -140px;
}
.element2 {
height: 100px;
background-color: blueviolet;
line-height: 100px;
font-size: 30px;
text-align: center;
color: aliUnable to send push notifications about Apple Pass updates
23 December 2025 @ 11:36 am
According to Apple's documentation, I can create an Apple Pass and send it to a user so they can add it to their wallet. Then I can send push notifications to the pass holder's device. I've successfully implemented the entire pass workflow:
creating a pass and sending it to the user
registering the user and saving his push token after adding the pass to his wallet;
sending a request to initialize the push notification
sending Apple a list of serial numbers and sending updated passes
for each of them
The entire workflow works fine, except for the push notification — it's not sent. Wallet notifications and card notifications are enabled on the iPhone. Pass updates are also visible in the card. All requests are processed with a 200 status. The new pass has updated fi