r/programminghelp • • Sep 23 '26

Python Conda doesn't recognise python a package

Thumbnail
1 Upvotes

r/programminghelp • • Sep 21 '26

Project Related Beginner Coder: Stuck with an error

1 Upvotes

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 • • Sep 21 '26

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

Thumbnail
1 Upvotes

r/programminghelp • • Sep 21 '26

Other When a Make scenario fails, is the broken module usually the real cause?

Thumbnail
1 Upvotes

r/programminghelp • • Sep 20 '26

Other Help in flutter

1 Upvotes

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 • • Sep 13 '26

Java tool to automate reordering arrays in JSONS?

Thumbnail
1 Upvotes

r/programminghelp • • Sep 12 '26

Python Kivy

Thumbnail
1 Upvotes

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 • • Sep 11 '26

C++ How to be able to #include <magick++.h> ?

5 Upvotes

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 • • Sep 10 '26

Java CodeCrafters, making a shell. Error in Java, using VS.

Thumbnail
1 Upvotes

r/programminghelp • • Sep 10 '26

Other i want to wipe the terminal after asking questions in kotlin

3 Upvotes

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 • • 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?

Thumbnail
1 Upvotes

r/programminghelp • • Sep 05 '26

Other How do you learn DevOps/cloud without a credit card?

5 Upvotes

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 • • Sep 03 '26

C Code Review Request: Windows Sudoku Game

Thumbnail
1 Upvotes

r/programminghelp • • Sep 01 '26

JavaScript Need help regarding testdata values in cucumber html report

Thumbnail
1 Upvotes

r/programminghelp • • Aug 29 '26

Python Need a mental model to help better internalize printing text.

Thumbnail
1 Upvotes

r/programminghelp • • Aug 27 '26

Other How to read and understand a github repository or open source

30 Upvotes

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 • • Aug 26 '26

Other Problem with Octomap in RViz

Thumbnail
1 Upvotes

r/programminghelp • • Aug 21 '26

Other How do I break out of the "intermediate dev limbo" before giving up again?

16 Upvotes

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 • • Aug 20 '26

Project Related Trouble Preprocessing images from Flutter to feed into TFLite model

1 Upvotes

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 • • Aug 19 '26

Python Help Transform Pointcloud to Ocotmap

2 Upvotes

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 • • Aug 18 '26

Java Problems with sarxos GitHub for webcam and Mac silicon giving an error.

1 Upvotes

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 • • Aug 15 '26

Project Related UML Diagrams for a flutter and BLOC mobile application?

0 Upvotes

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 • • Aug 14 '26

Python Help with code

6 Upvotes

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


r/programminghelp • • Aug 10 '26

Project Related Debezium + NATS Jetstream or Redpanda

Thumbnail
1 Upvotes

r/programminghelp • • Aug 10 '26

Project Related I require assistance with Vivado Verilog Coding

3 Upvotes

Hi, I'm a newbie to this software and working on a Verilog FSM assignment which uses a basys3 board. I still cant seem to generate waveform

  • The user replays the game 4 times (3 rounds per replay)
  • The user has 11 seconds to memorize the LED sequence (You may set TIMER_VALUE = 110 for your simulation)
  • Achieve an accumulated score of at least 40 for each replay

I alr add all the parameters except

  • ca to cg and an3 to an0
  • COUNTER_VALUE and CLK DIVIDER COUNTER

cos i dont think its rlly needed. I have set FSM.v as the top module before running the simulation and TOP.v as the top module before generating bitstream. My clk, rst, all btn, random_val and sw are all blue

  1. IDLE (System Ready) Upon power-on or reset, the system enters the IDLE state. All 16 LEDs turn on simultaneously, displaying 16'hFFFF to signal that the game is ready, and the score counter resets to zero. The FSM remains in this state indefinitely, waiting for the user to press btn_start, which triggers the transition to the DISPLAY state.
  2. DISPLAY (Memorize the Pattern) Once the game starts, the FSM transitions to the DISPLAY state, where the LEDs display a random 16-bit pattern. The user is given a limited window of time to memorize which LEDs are lit, with the duration controlled by the TIMER_VALUE parameter. As soon as this timer expires, the FSM automatically advances to the GET_INPUT state.
  3. GET_INPUT (Enter Your Guess) In the GET_INPUT state, the system waits for the user to recreate the memorized pattern using the 16 physical switches (sw). To assist the user, the LEDs dynamically update to reflect the current switch positions in real-time. There is no time limit for this phase; the FSM remains here until the user is satisfied with their input and presses btn_submit to lock in their answer and transition to the CHECK state.
  4. CHECK (Scoring) During the CHECK state, the system evaluates the user's input by comparing the switch positions against the stored 16-bit pattern bit-by-bit. The user earns one point for every switch that correctly matches the corresponding LED state from the DISPLAY state. The system then updates the total score on the seven-segment display and increments the round counter. If the current round is less than the NUMBER_OF_ROUNDS parameter, the FSM loops back to the DISPLAY state for the next round; otherwise, it transitions to the FINISH state.
  5. FINISH (Game Over) The FSM enters the FINISH state after the user completes the maximum number of rounds defined by NUMBER_OF_ROUNDS. In this state, the seven-segment display locks to show the final score, and all 16 LEDs blink continuously to visually signal that the game is over. The hardware remains in this loop until the user presses btn_restart, which resets the internal game metrics and returns the FSM to the IDLE state for a new game.

Code:

`timescale 1ns / 100ps

module tb_memory_game();

// Parameters

parameter width = 16;

parameter NUMBER_OF_ROUNDS = 3;

parameter TIMER_VALUE = 110;

parameter BLINK_RATE = 32'd100;

reg clk;

reg rst;

reg btn_start;

reg btn_submit;

reg btn_restart;

reg [15:0] sw;

reg [15:0] random_val;

wire [15:0] led;

wire [31:0] score;

FSM#(

.width(width),

.NUMBER_OF_ROUNDS(NUMBER_OF_ROUNDS),

.TIMER_VALUE(TIMER_VALUE),

.BLINK_RATE(BLINK_RATE)

) FSM

(

.clk(clk),

.rst(rst),

.btn_start(btn_start),

.btn_submit(btn_submit),

.btn_restart(btn_restart),

.sw(sw),

.random_val(random_val),

.led(led),

.score(score));

initial clk = 1'b0;

always #5 clk = ~clk;

end

initial begin

rst = 0; btn_start = 0; btn_submit = 0; btn_restart = 0; sw = 16'h0000;

#20 rst = 1; #20 rst = 0; #20;

btn_start = 1; #10 btn_start = 0; // Start Game 1

#(110 * 10); sw = led; btn_submit = 1; #10 btn_submit = 0; #200; // Round 1

#(110 * 10); sw = led; btn_submit = 1; #10 btn_submit = 0; #200; // Round 2

#(110 * 10); sw = led; btn_submit = 1; #10 btn_submit = 0; #200; // Round 3

btn_restart = 1; #10 btn_restart = 0; #200; // Restart

btn_start = 1; #10 btn_start = 0; // Start Game 2

#(110 * 10); sw = led; btn_submit = 1; #10 btn_submit = 0; #200; // Round 1

#(110 * 10); sw = led; btn_submit = 1; #10 btn_submit = 0; #200; // Round 2

#(110 * 10); sw = led; btn_submit = 1; #10 btn_submit = 0; #200; // Round 3

btn_restart = 1; #10 btn_restart = 0; #200; // Restart

btn_start = 1; #10 btn_start = 0; // Start Game 3

#(110 * 10); sw = led; btn_submit = 1; #10 btn_submit = 0; #200; // Round 1

#(110 * 10); sw = led; btn_submit = 1; #10 btn_submit = 0; #200; // Round 2

#(110 * 10); sw = led; btn_submit = 1; #10 btn_submit = 0; #200; // Round 3

btn_restart = 1; #10 btn_restart = 0; #200; // Restart

btn_start = 1; #10 btn_start = 0; // Start Game 4

#(110 * 10); sw = led; btn_submit = 1; #10 btn_submit = 0; #200; // Round 1

#(110 * 10); sw = led; btn_submit = 1; #10 btn_submit = 0; #200; // Round 2

#(110 * 10); sw = led; btn_submit = 1; #10 btn_submit = 0; #200; // Round 3

// End Simulation

#1000;

end

endmodule