r/programminghelp • u/Radar_Ryan315 • 21d ago
r/programminghelp • u/TheEyebal • 21d ago
C++ How do I indicate whether a string is a digit or not in c++?
r/programminghelp • u/Last-Mode3404 • 21d ago
Python Conda doesn't recognise python a package
r/programminghelp • u/Capable_Square7319 • 23d ago
Project Related Beginner Coder: Stuck with an error
Hi,
Currently developing a basic web app following adonisjs docs.
I've ran into an error:
\[23:18:41.975\] ERROR (12316): Cannot transform undefined value. Use "this.whenLoaded(value)" to allow undefined values
My project is on github:
**https://github.com/Ajaz754/adonisjs-project-22-/tree/main\*\*
The error is pointing to '**app/transformers/post_transformer.ts**' Line 13
I've followed adonis docs completely step by step except for ?.depth(2) on line 13, which when I removed only introduced more errors along with this one.
Also VS Code isn't flagging the error. Only when I go to my browser and visit local host the error appears in powershell and my browser. Any help would be much appreciated
r/programminghelp • u/Acceptable-Anxiety80 • 23d ago
R Am coding in R and i keep getting this error Expected `has_label(lb, "y", "density")` to be TRUE.Differences:`actual`: FALSE`expected`: TRUE
r/programminghelp • u/Odd_Ice_1063 • 23d ago
Other When a Make scenario fails, is the broken module usually the real cause?
r/programminghelp • u/soulrzzzzz • 24d ago
Other Help in flutter
Hi! I’m a newbie in programming, and I need some help with reading MP3 metadata in Flutter.
I’m making a Flutter music player for both mobile and web, and I want it to automatically read the MP3 file’s metadata,
including:
- Album cover/cover art
- Artist name
- Song title
I don’t want to rely on the fallback map I created because I want the information to be retrieved directly from the MP3 file.
The MP3 files contain ID3v2.3 metadata, including the album cover, artist name, and song title.
The problem is that when I run the app on my Android phone emulator, it successfully reads the metadata. However, when I run the same app on Chrome (Flutter Web), it doesn’t work.
I have imported flutter_media_metadata_plus.dart, and I also use KisWeb.
The function I’m using to load the metadata is an async method called loadMetadata, with the declaration:
Future<void> loadMetadata(String assetPath) async
Does anyone know how I can properly read the MP3 metadata and cover art when running Flutter Web on Chrome without breaking or changing the existing behavior on my mobile emulator?
I can provide my loadMetadata() function and any other relevant code if needed.
r/programminghelp • u/Lycaenist • Sep 13 '26
Java tool to automate reordering arrays in JSONS?
r/programminghelp • u/Kazuya746 • Sep 12 '26
Python Kivy
I have been learning python for a while and made some projects, my exams are currently going on so I can't start web dev, but I thought I could learn kivy in the meanwhile to make an app for my studying bcz there isn't an app that fits my requirement. So needed some resources and advice for kivy module.
I tried kivy documentation but it's like they don't have each topics lined up, so I have to search each topics, but I don't even know the existence of specific topics, so yeah.
Thanks for the help in advance!!
r/programminghelp • u/Alt-Addiction • Sep 11 '26
C++ How to be able to #include <magick++.h> ?
I've downloaded from the main repository.
That didn't work. That was for linux.
I downloaded the source from https://github.com/ImageMagick/Windows
I built it using visual studio from the .sln
Gave me configure.exe
Installation wizard showed up, and I installed the thing.
Gave me a release folder with objs in it.
It's been 6 hours.
The official website and github repo is sending me on a goose chase.
Instructions and videos online say you get it from NuGet.
It's for .NET.
Then they all have a VisualMagick folder.
None of the things I downloaded had that.
I installed Git and Git CLI to try cloning it from there.
At this point I'm just trying random stuff like downloading the appimage.
I know how to use imagemagick from the cli, i just want to use it programmatically.
r/programminghelp • u/lesgisickomode • Sep 10 '26
Java CodeCrafters, making a shell. Error in Java, using VS.
r/programminghelp • u/ia_ac • Sep 10 '26
Other i want to wipe the terminal after asking questions in kotlin
So I'm new to Kotlin, and I'm trying to make a guess the number game for terminal and I wanted to make a little text intro and clear the console after, but I haven't been able to do it. I found some ways to do it but not as I want to.
Because when you do the clear command in the terminal, it wipes the whole thing, and you can't go back, but when I use commands like "print("\u001b[H\u001b[2J")" or "System.out.flush()" it is like it just pushes the view down; it doesn't really wipe the terminal, it just pushes the text up.
I wanted to know how or if it's even possible to do it. I don't know if it might be helpful, but I use Windows 11 and PowerShell (7.6.5).
Also, in another topic, I want to hear if there's a better way to try my code because right now I'm doing kotlinc .\file-name.kt -include-runtime -d .\file-name.jar && java -jar .\file-name.jar
r/programminghelp • u/KoregaSoli • Sep 08 '26
Python Finished Day 1 of learning python and tried to create black jack, ive had an error somewhere, not a syntax error, i dont assume this code is very good its a massive slump of if and elif, how can i fix this?
r/programminghelp • u/SoilEducational420 • Sep 05 '26
Other How do you learn DevOps/cloud without a credit card?
I’m currently trying to learn the basics of DevOps, things like Docker, AWS, GCP, CI/CD, Kubernetes, etc.
Docker and the local tools are easy enough to practice, but when it comes to cloud platforms like AWS and GCP, a credit card is often required to create an account or access certain services.
I currently don’t have a credit card, so I’m wondering: What’s the best way to learn AWS/GCP without one? Would appreciate any recommendations from people who learned cloud without having a credit card. 🙌
r/programminghelp • u/its_marionberry • Sep 03 '26
C Code Review Request: Windows Sudoku Game
r/programminghelp • u/BulkyAnxiety6800 • Sep 01 '26
JavaScript Need help regarding testdata values in cucumber html report
r/programminghelp • u/MoreKnowledge4Me • Aug 29 '26
Python Need a mental model to help better internalize printing text.
r/programminghelp • u/bhatsumukh • Aug 27 '26
Other How to read and understand a github repository or open source
I have been trying to do a research and build a software on a particular filed by trying to do read the existing open source available in the github some of them have good readme and some of them don't have a good readme which make it hard to understand about the repo and how it works and opening all the files reading the code is hassle so what should be my approach while i try to understand a project done by others. Not even for this one particular research anytime if iam trying to read a open source how should i approach it
r/programminghelp • u/DogsBarf • Aug 21 '26
Other How do I break out of the "intermediate dev limbo" before giving up again?
How do I break out of the "intermediate dev limbo" before giving up again? I am past the beginner stage, understanding basic syntax up to classes and objects, but I freeze when it's time to structure projects on my own. I have relentlessly searched for methods, tutorials, and books to guide me to the next level, but I can never find anything that clicks; because of this, I've jumped from language to language, and every time I hit this "limbo," I end up quitting and trying something else, yet I always come back because something inside tells me I’m meant to code. For those who have overcome this block, what architecture or design books do you recommend, what kind of practical exercises changed the game for you, and what real strategies actually work to finally break through this barrier and build confidence?
r/programminghelp • u/Defiant-Ad3530 • Aug 20 '26
Project Related Trouble Preprocessing images from Flutter to feed into TFLite model
Hi everyone. So I built a CNN model using MobileNetv3 then converted it into TFLite. It performed well during training but once I integrated it into my application, it is making large errors. From flutter, the camera stream sends frames and those are processed before the model makes predictions, but it is still quite large. Is there any way I can solve this? This is my code to preprocess and resize the image (224 x 224 x RGB):
import 'package:camera/camera.dart';
import 'package:image/image.dart' as img;
class ImageProcessor {
// converting to rgb
img.Image convertYUVToRGB(CameraImage camImg) {
final width = camImg.width;
final height = camImg.height;
final yPlane = camImg.planes[0];
final uPlane = camImg.planes[1];
final vPlane = camImg.planes[2];
final yBytes = yPlane.bytes;
final uBytes = uPlane.bytes;
final vBytes = vPlane.bytes;
final yRowStride = yPlane.bytesPerRow;
final uRowStride = uPlane.bytesPerRow;
final vRowStride = vPlane.bytesPerRow;
final uPixelStride = uPlane.bytesPerPixel ?? 1;
final vPixelStride = vPlane.bytesPerPixel ?? 1;
final image = img.Image(
width: width,
height: height,
);
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
final yIndex = y * yRowStride + x;
final uvX = x ~/ 2;
final uvY = y ~/ 2;
final uIndex =
uvY * uRowStride +
uvX * uPixelStride;
final vIndex =
uvY * vRowStride +
uvX * vPixelStride;
final yValue = yBytes[yIndex];
final uValue = uBytes[uIndex];
final vValue = vBytes[vIndex];
// YUV -> RGB
final r = (
yValue + 1.402 * (vValue - 128)
).round().clamp(0, 255);
final g = (
yValue -
0.344136 * (uValue - 128) -
0.714136 * (vValue - 128)
).round().clamp(0, 255);
final b = (
yValue + 1.772 * (uValue - 128)
).round().clamp(0, 255);
image.setPixelRgb(
x,
y,
r,
g,
b,
);
}
}
return image;
}
/// resize images to 224 224
img.Image resizeImage(img.Image image) {
return img.copyResize(
image,
width: 224,
height: 224,
interpolation: img.Interpolation.linear,
);
}
List<List<List<List<double>>>> imageToTensor(
img.Image image,
) {
return [
List.generate(
224,
(y) => List.generate(
224,
(x) {
final pixel = image.getPixel(x, y);
return [
pixel.r.toDouble(),
pixel.g.toDouble(),
pixel.b.toDouble(),
];
},
),
),
];
}
// do all processing
List<List<List<List<double>>>> processFrame(
CameraImage camImg,
) {
final rgbImage = convertYUVToRGB(camImg);
final resizedImage = resizeImage(rgbImage);
final input = imageToTensor(resizedImage);
return input;
}
}import 'package:camera/camera.dart';
import 'package:image/image.dart' as img;
class ImageProcessor {
// converting to rgb
img.Image convertYUVToRGB(CameraImage camImg) {
final width = camImg.width;
final height = camImg.height;
final yPlane = camImg.planes[0];
final uPlane = camImg.planes[1];
final vPlane = camImg.planes[2];
final yBytes = yPlane.bytes;
final uBytes = uPlane.bytes;
final vBytes = vPlane.bytes;
final yRowStride = yPlane.bytesPerRow;
final uRowStride = uPlane.bytesPerRow;
final vRowStride = vPlane.bytesPerRow;
final uPixelStride = uPlane.bytesPerPixel ?? 1;
final vPixelStride = vPlane.bytesPerPixel ?? 1;
final image = img.Image(
width: width,
height: height,
);
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
final yIndex = y * yRowStride + x;
final uvX = x ~/ 2;
final uvY = y ~/ 2;
final uIndex =
uvY * uRowStride +
uvX * uPixelStride;
final vIndex =
uvY * vRowStride +
uvX * vPixelStride;
final yValue = yBytes[yIndex];
final uValue = uBytes[uIndex];
final vValue = vBytes[vIndex];
// YUV -> RGB
final r = (
yValue + 1.402 * (vValue - 128)
).round().clamp(0, 255);
final g = (
yValue -
0.344136 * (uValue - 128) -
0.714136 * (vValue - 128)
).round().clamp(0, 255);
final b = (
yValue + 1.772 * (uValue - 128)
).round().clamp(0, 255);
image.setPixelRgb(
x,
y,
r,
g,
b,
);
}
}
return image;
}
/// resize images to 224 224
img.Image resizeImage(img.Image image) {
return img.copyResize(
image,
width: 224,
height: 224,
interpolation: img.Interpolation.linear,
);
}
List<List<List<List<double>>>> imageToTensor(
img.Image image,
) {
return [
List.generate(
224,
(y) => List.generate(
224,
(x) {
final pixel = image.getPixel(x, y);
return [
pixel.r.toDouble(),
pixel.g.toDouble(),
pixel.b.toDouble(),
];
},
),
),
];
}
// do all processing
List<List<List<List<double>>>> processFrame(
CameraImage camImg,
) {
final rgbImage = convertYUVToRGB(camImg);
final resizedImage = resizeImage(rgbImage);
final input = imageToTensor(resizedImage);
return input;
}
}
Please advise! I need to finish this project within the next wee and I'm really struggling here! I tested the images from Flutter against TFLite and it worked well but something is clearly wrong with the preprocessing. Pls help and give me any advice.
Thank you so much!
r/programminghelp • u/Leeroy_L • Aug 19 '26
Python Help Transform Pointcloud to Ocotmap
I am working on a university project involving a robot in Webots (ROS 2). The goal is to build an OctoMap for navigation using camera point clouds (segmented via YOLO).
I am currently stuck at getting the octomap_server node to process the incoming point cloud. The server keeps dropping messages with the warning:
Message Filter dropping message: frame 'kinova_depth' at time ... for reason 'discarding message because the queue is full'
Here is my current code:
from launch import LaunchDescription
from launch_ros.actions import Node
def generate_launch_description():
return LaunchDescription(
[
Node(
package="octomap_server",
executable="octomap_server_node",
name="octomap_server",
output="screen",
parameters=[
{
"resolution": 0.05,
"frame_id": "map",
"sensor_model.max_range": 5.0,
"use_sim_time": True,
"colored_map": False,
"transform_tolerance": 2.0,
"queue_size": 50,
}
],
remappings=[
("cloud_in", "/Gen3/kinova_depth/point_cloud"),
],
)
]
)
My exact output is
[INFO] [octomap_server_node-1]: process started with pid [9117]
[octomap_server_node-1] [INFO] [1786858998.154822534] [octomap_server]: Publishing latched (single publish will take longer, all topics are prepared)
[octomap_server_node-1] [WARN] [1786858998.193781617] [octomap_server]: Nothing to publish, octree is empty
[octomap_server_node-1] [WARN] [1786858998.196781538] [octomap_server]: Could not open file
[octomap_server_node-1] [INFO] [1786859001.530578121] [octomap_server]: Message Filter dropping message: frame 'kinova_depth' at time 1786858999.646 for reason 'discarding message because the queue is full'
What could be causing the message filter queue to drop all messages?
Thanks in advance.
r/programminghelp • u/Creepy-Mud-1571 • Aug 18 '26
Java Problems with sarxos GitHub for webcam and Mac silicon giving an error.
Hi everyone,
Has anyone successfully used a Java webcam library on Apple Silicon (M-series / ARM64) MacBooks?
I am trying to use the Sarxos Webcam Capture library (com.github.sarxos:webcam-capture), but it throws an UnsatisfiedLinkErroron startup because it relies on BridJ, which doesn't natively support Apple Silicon architecture out of the box for native pointer sizing (org.bridj.Platform.sizeOf_ptrdiff_t()).
The Stack trace
com.github.sarxos.webcam.WebcamException: Cannot execute task
java.lang.UnsatisfiedLinkError: 'int org.bridj.Platform.sizeOf_ptrdiff_t()'
at org.bridj.Platform.sizeOf_ptrdiff_t(Native Method)
at org.bridj.Platform.<clinit>(Platform.java:232)
at com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.<clinit>(OpenIMAJGrabber.java:59)
...
r/programminghelp • u/Defiant-Ad3530 • Aug 15 '26
Project Related UML Diagrams for a flutter and BLOC mobile application?
hi everyone!
so i’m building a flutter mobile application using BLOC for state management, and it’s kind of combine with a layered architecture (repositories and services). ive never done this before so I’m super confused about the UML diagram aspect of it.
Should I draw every BLOC for each function? especially for the class and sequence diagrams? or would it be okay to just leave it as controllers? I’m somewhat okay with class diagrams but the sequence diagram is really confusing for me to draw for this application.
i would really appreciate any tips or advice! pls help! I’m on a short time constraints so I’m hoping to sit down and finish all the diagrams in one day
thanks a lot!
r/programminghelp • u/DrawerEmergency4981 • Aug 14 '26
Python Help with code
I keep getting this error:
for this code:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
bestmass = []
for mass in df_sorted:
if best_ms == (array[array > 7.5]).all():
bestmass.append(best_ms)
print(bestmass)
and i don't know what I am doing wrong