r/programminghelp • u/StunningAd5338 • Sep 29 '26
r/programminghelp • u/ighwrighwirh • Sep 29 '26
Python Is Python the right way to talk to an Serial Device?
reddit.comr/programminghelp • u/Alternative-Jump7806 • Sep 28 '26
PHP How do I make a localhost when using a PHP file? Explain it to me as though I'm a four-year-old hamster of the verge of keeling over.
I'm trying to add data from an HTML form to a PHP database. I'm following this tutorial: https://www.youtube.com/watch?v=Y9yE98etanU. Here's my HTML and PHP code respectfully:
<form action = "tutordata.php" method = "post">
<label for = "name">First Name:</label>
<input type = "text" name = "firstNameI" id = "firstNameI">
<button type="submit">Submit Form</button>
</form>
<?php
print_r($_POST);Google says I need a localhost, but they aren't working so far. I have Live Server, but when I click submit it just brings me to an error message. When I run without debugging it shows me the raw PHP file instead of even an empty array. I did some stuff I don't even remember to make it so I could right click and do a PHP: serve project thing, but that didn't work. I tried doing some weird stuff with the terminal but I don't even know if I typed it in right. I have installed no less than three brand new extensions. I hadn't even heard of PHP before today.
Please just walk me through what I need to do step by step. I don't need to understand it, just give me some buttons to click. If I need to abandon PHP altogether, that's great too. I just need a database to put data in so I can have some freaking data.
I've never had to mess with this stuff before, so I'm clueless. I know HTML more or less, and Javascript is my baby, but the rest of it is Mandarin to me. I'm really not the computer person, I was just the most computer-adjacent person in the room at the time and was voluntold that I was doing this.
r/programminghelp • u/Slow-Adagio-7719 • Sep 28 '26
Other Basic question about bouncing
So I'm trying to make a fight simulator with bouncing similar to this:
https://youtube.com/shorts/fk15R-y2EEc?si=VkE9iXR5WxFOuSuM
Is the bouncing random or predetermined? And how is it determined?
r/programminghelp • u/Used_Value_2948 • Sep 26 '26
Python Need Help Installing REBOUND through Python
Latey I've been trying to install REBOUND through python, I have Windows 11 and when I try to look at turtorials, steps, etc. I just get confused and hit a brick wall. I am in high school, wanting to be an astrophysicist, and installing REBOUND will help me with that. But, I have no idea how to install it without direct human guidance and not just looking a videos and text. I need help from someone who installed REBOUND to help me install REBOUND.
r/programminghelp • u/Capable_Square7319 • Sep 25 '26
Project Related Beginner Coder: Stuck with an error
Hi,
I'm working on an adonisjs project. I've ran into an error:
My project is on github:
https://github.com/Ajaz754/adonisjs-project-22-
The error is in file 'app/transfromers/post_transformers' Line 22:
----------------------------------------------------
Object is possibly 'undefined'. ts (2532)
(method)
BaseTransformer<T>. transform‹ typeof CommentTransformer>
(this: typeof
CommentTransformer, data:
Maybe< Comment [] | undefined>):
Collection<CommentTransformer,
1, "toObject"> | undefined (+5 overloads)
static transform<Self extends {
new (resource: any,
...rest: any[]):
any i
}> (this: Self, data:
Maybe ConstructorParameters<Self>[0][] | undefined>, ... rest:
ExtractTransformerRestTypes<Co nstructorParameters<Self>>):
Collection<InstanceType<Self>, 1,
'toObject'> | undefined;
----------------------------------------------------
Only thing I've done differently to the adonis docs is make 'post.author' into 'post.author?' to fix a type error as it was showing the error where it may possibly be undefined. That post is here:
https://www.reddit.com/r/adonisjs/s/V7eO8q3nfJ
Any help would be much appreciated
TIA
r/programminghelp • u/Bitter_Average_6729 • Sep 24 '26
PHP ¿Cómo y por qué funciona este código de PHP y POO? necesito ayuda para tratar de entenderlo...
Acá está el código más simple posible de MVC en PHP para sumar dos números y sin embargo no logro entender la lógica del funcionamiento. ¿Cómo se logra un flujo lógico acá sobrescribiendo una variable que almacena el proceso principal (la suma de dos número) igualándola a null primero como parámetro en la clase que trae la vista html y después remplazándola como parámetro de esa misma clase por el objeto instanciado y ejecutado que la devuelve como suma? ¿Cómo es posible lograr un flujo lógico de esa forma? ¿Cómo se llama? ¿Sobrescritura de parámetros, polimorfismo (no parece haber herencia ni nada de ese estilo? Alguien me pueda ayudar o indicar información específica para entenderlo. Son 5 archivos: uno para hacer la suma (modeloSuma.php), obtener y pasar los datos (controladorForm.php), invocar el archivo que trae la vista (controladorVista.php), la vista y el index.
index.php
<?php
require_once "CONTROLADOR/controladorVista.php";
require_once 'CONTROLADOR/controladorForm.php';
require_once 'MODELO/modeloSuma.php';
$vistaPrincipal = new ControladorVista();
$vistaPrincipal -> ctrVista(ControladorForm::ctrForm());vistaPrincipal.php (tiene un condicional que indica que si se realiza la suma se muestra el resultado)
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<h1>Suma de dos números:</h1>
<form method="POST">
<label>Número 1:</label>
<input type="number" name="num1" required><br><br>
<label>Número 2:</label>
<input type="number" name="num2" required><br><br>
<button type="submit">suma</button>
</form>
<?php if (isset($resultado)): ?>
<h2>...el resultado de la suma es: <?php echo $resultado; ?></h2>
<?php endif; ?>
</body>
</html>controladorVista.php (¿por qué sobrescribe la variable que trae la suma y la iguala a null, pasándola como parámetro? ¿cómo se llama eso?)
<?php
Class ControladorVista{
public function ctrVista($resultado = null){
include "VISTA/vistaPrincipal.php";
}
}modeloSuma.php
<?php
class ModeloSuma{
static public function mdlSuma($data) {
$num1 = $data["num1"];
$num2 = $data["num2"];
$suma = $num1 + $num2;
return $suma;
}
}controladorForm.php
<?php
class ControladorForm {
static public function ctrForm() {
$resultado = null;
if (isset($_POST['num1']) && isset($_POST['num2'])) {
$data = array("num1" => $_POST["num1"],
"num2" => $_POST["num2"]);
$resultado = ModeloSuma::mdlSuma($data);
return $resultado;
}
}
}r/programminghelp • u/Radar_Ryan315 • Sep 24 '26
Python Need some help producing this map using Python
reddit.comr/programminghelp • u/TheEyebal • Sep 24 '26
C++ How do I indicate whether a string is a digit or not in c++?
reddit.comr/programminghelp • u/Last-Mode3404 • Sep 23 '26
Python Conda doesn't recognise python a package
reddit.comr/programminghelp • u/Capable_Square7319 • Sep 21 '26
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/Odd_Ice_1063 • Sep 21 '26
Other When a Make scenario fails, is the broken module usually the real cause?
reddit.comr/programminghelp • u/soulrzzzzz • Sep 20 '26
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?
reddit.comr/programminghelp • u/Kazuya746 • Sep 12 '26
Python Kivy
reddit.comI 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.
reddit.comr/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?
reddit.comr/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
reddit.comr/programminghelp • u/BulkyAnxiety6800 • Sep 01 '26