Random snippets of all sorts of code, mixed with a selection of help and advice.
WooCommerce Extra Product Options: Radio button image replacement always uses thumbnail (blurry). How do I force full-size image?
4 December 2025 @ 4:28 pm
I’m using ThemeComplete – TM Extra Product Options (v7.5.3) with WooCommerce and Flatsome.
I have a radio-button field that replaces the main product image when selected. The functionality works, but the plugin always switches the product image to a thumbnail-sized version of the image (e.g., -300x127.jpg). The full-size file is high resolution, but TM Extra Product Options only outputs the resized version, so the result is blurry.
I want the plugin to use the full-size image instead of the thumbnail.
I checked the plugin settings and there is no option for controlling the replacement image size.
I found filters like wc_epo_image_size and woocommerce_tm_epo_image_size, but they don’t affect this behavior. It appears the plugin is using its own logic to grab the thumbnail and not the original file.
Question:
What is the correct hook or method to force TM Extra Product Options to use the full-size product option image when replacing the main pr
How to simulate BLE mesh using zephyr babblesim
4 December 2025 @ 4:26 pm
I am trying to run the "samples/bluetooth/mesh" code in zephyr using babblesim:
west build -b nrf52_bsim samples/bluetooth/mesh
I am able to run this code with babblesim PHY:
simulation output
But I am not sure how to proceed further. I tried adding code to send message at the end of the main method, but its not doing anything:
code addition
How can I proceed further to test communicate via mesh? Can some share some relevant tutorial?
ZeRO Stage 3 Communication Volume Result
4 December 2025 @ 4:24 pm
I'm doing a project comparing different distributed training libraries. One of the ones I'm looking at is DeepSpeed, and I'm specifically focusing on the improvements in memory utilization that occur when using ZeRO. I read their paper ZeRO: Memory Optimizations Toward Training Trillion Parameter Models and had a question regarding their result concerning ZeRO stage 3 and the total volume of data that gets sent between devices. I understand why the total volume sent with ZeRO stage 1 and 2 is 2x the non-distributed parameter size, but with ZeRO stage 3 they say that the volume is 3x the non-distributed parameter size. This is confusing to me since they also state that they need an all-gather for both the forward pass and the backwards pass, so wouldn't the total volume be 4x the non-distributed parameter size?
As an aside, I'm not entirely sure this is the best place to post this, but I figured that some
raspberry pi zero installs old version of pymodbus
4 December 2025 @ 4:20 pm
i have a raspberry Pi Zero V.1. I have pymodbus installed but struggle to get the latest version. On pypi.org the latest version is 3.11.4. The version on my pi is 3.0.0-7
If i type
sudo apt install python3-pymodbus
i get the answer: python3-pymodbus is already the newest version (3.0.0-7)
Why does the pi reference an old version?
Works with 48.0. Why does this fail
4 December 2025 @ 4:16 pm
double x = 4320000000.0;
x = x*48;
makes x end up a smaller number than originally set but if i change the code to
double x = 4320000000.0;
x = x*48.0;
it works
I understand this is a floating point issue and some sort of overflow but just trying to understand what C is doing that causes this
MySQL Eloquent ORM - where clause: value could be null
4 December 2025 @ 4:14 pm
I'm a bit unsure about how to proceed with Eloquent ORM (Laravel 12) queries when a value COULD be NULL.
Normally, you would check for a NULL value with:
->whereNull("column")
But if you don't know whether the value is NULL at all, that's nonsense, of course. So you would use:
->where("column",value)
Laravel (I think from version 8 onwards?) automatically translates this into ‘column IS NULL’ in MySQL. Should you rely on this? To test it out, I like to check with Google Gemini, which offers the following option:
// app/Models/YourModel.php
public function scopeWhereXIs($query, $search_value)
{
//if $search_value is NULL, use whereNull
if ($search_value === null) {
return $query->whereNull('x');
}
//otherwise use where clause
return $query->where('x', $search_value);
}
So, the use of scopes. This means that in the quer
Android Studio - Fail to load plugin descriptor from file smalidea.zip
4 December 2025 @ 4:10 pm
I want to use smalidea plugin in Android Studio (version 4.1.1) from this github repo but after downloading many version of smalidea (.zip file) using their DOWNLOAD LINK and installed plugin from disk in Android Studio. AS returned the same error: "Fail to load plugin descriptor from file JesusFreke-smalidea-xxx.zip".
I tried to use the some solution like changing version of Android Studio (3.5.1, 3.6.3) but it's not working.
I also tried to
Download smalidea-0.05.zip from bitbucket
Extract the plugin.xml in smalidea/META-INF/ somewhere you can edit
Add the following tag under the tag:
< depends>com.intellij.modules.androidstudio</ depends>
Please help me to fix this, I appreciate any answer.
two sources and two destinations in dbt
4 December 2025 @ 4:08 pm
I have two source schemas:
source_prd
source_dev
I also have two targets schemas:
target_prd
target_dev
All the tables are the same between dev and prd. I am essentially creating bunch of views from the source and inserting them to target.
I have defined two targets in my profiles.yml. and I have the following on my sources.yml:
schema: {{ "source_prd" if target.name == "prd" else "source_dev" }}
but I am getting a parse error on my schema definition.
What signs indicate that Python's dataclasses are NOT a good fit for a particular use-case?
4 December 2025 @ 3:44 pm
I find Python's dataclasses to be incredibly convenient.
They cut out a ton of boilerplate code (no more needing to write self.foo = foo for every __init__ parameter, and no more needing to spell out attribute after attribute in the rich-comparison methods)
They cut out code maintenance when a new attribute is added to a class (the automatic __eq__, __repr__, etc. will all automatically incorporate the new field)
They make it easy to inspect classes or their instances (dataclasses.fields, dataclasses.asdict, etc.)
It's easy to pick-and-choose functionality; if you need something more specific than its default __eq__, just write it yourself and the @dataclasses.dataclass decorator incorporates it seamlessly
They're so good, in fact, that I find myself using them all over the place for new code, and looking
Error while deploying python code to linux based azure function
4 December 2025 @ 3:42 pm
I am trying to deploy python code to azure function (linux based, python 3.12).However, I am getting the following error on azure:
> ImportError: Unable to import required dependencies: numpy: Error
> importing numpy: you should not try to import numpy from
> its source directory; please exit the numpy source tree, and relaunch
> your python interpreter from there. Cannot find module. Please check the requirements.txt file for the missing module. For more info,
Azure function app is using App Service plan.
Please find below python code and other dependent files:
function_app.py
import azure.functions as func
import logging
import json
import pandas
import numpy
import statsmodels.api as sm
from scipy import stats
@app.route(route="health_check", methods=["GET"])
async def health_check(req: func.HttpRequest) -> func.HttpResponse:
# Basic usage of panda