Questions tagged [beginner]

Add this tag to your question to indicate that you are new to the language of your code. This will often be taken into consideration by reviewers when assessing your code.

Filter by
Sorted by
Tagged with
14
votes
3answers
2k views

Python 3 - simple temperature program

I have been teaching myself Python (as well as Tkinter) and today one of the sites I was reading, asked us to write a program to covert one value from Fahrenheit to Celsius, once - an easy three line ...
0
votes
1answer
159 views

Simple calculation of sector coefficients using PHP

Function This class extends the key class, called EQ, and does basic calculation based on minutely data. It then calculates weight coefficients (e.g., [0, 1]) for ...
2
votes
1answer
51 views

Backup program in Python3 for Linux

Python beginner here. Created this program as a project to help learn python. Just ran this in a centos7vm so far to test. What it does is - zip up files containing certain extensions (excluding those ...
1
vote
1answer
49 views

blueBox dashboard Dribble design challenge

I have coded an UI from dribble design as a challenge and completed it but I think The CSS I wrote is really bad. I am a beginner. How can I improve my CSS?. One of the main problems is that I am ...
3
votes
2answers
62 views

Add three integers and report the sign of the sum

I am in my first high school programming course; the assignment is: Write a program that asks the user to input three integers and outputs a message indicating their sum and whether it is ...
1
vote
1answer
76 views

Program that deletes near duplicate directories and directories that have .ini like files

The program needs to only keep directories that have at least 1 .osu (.ini like) file with certain restrictions in them. It also needs to delete duplicate .osu files. But since duplicate files are ...
1
vote
1answer
39 views

Splitting a String into words and add to an array, Only using StringBuffer and String Array

I've been doing a Java for beginners course for a few weeks (2 hours a week), we had an exam question. Take a sentence as an input from a user for twitter. Using only String Arrays and String ...
1
vote
1answer
65 views

Initialize various commands for the SqlDataAdapter

This is my code for my SqlDataAdapter which is similar to the code example given in the docs: ...
2
votes
0answers
76 views

Total steps of of long process, track completed steps, reuse query [closed]

I have some long-time method (PrintInfo). I need to know total steps of that method and track completed parts. How to reuse same filtered query in: TotalSteps (ex, Program: progressMonitor....
5
votes
0answers
148 views

Spliting PDF and get thumbnail while adding it to a ListView

I'm doing a application to work with PDF and TIFF files. To divide them, the user opens the file or folder (if it is a folder, it gets all the files inside) and the app splits the file, getting a tiny ...
4
votes
4answers
161 views

Largest Palindrome Product - Project Euler #4

This is my code for Project Euler Problem #4 The question: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. ...
6
votes
1answer
164 views

Game that fights random enemy

This program is the basis for a bigger game I'm working on. I want to make sure I did this correctly before moving on. Please give pointers to anything I can improve. I'm learning on my own, so I ...
4
votes
0answers
62 views

Butter side up?

I've written a piece of code that determines if a piece toast with butter lands on the butter-side or not, depending on its initial velocity and the table height. The code is written in Mathematica ...
6
votes
2answers
163 views

Calculator in Python 3 using Tkinter

Edit: New version at Python 3 Tkinter Calculator - follow-up New status: I´ve refactored the code trying to follow the recommendations from the guys who answered this question. The new version is on ...
3
votes
2answers
151 views

VBA code to import data, doing lookups to detect duplicates

I have an import macro, which creates ID by concatenating cells, then I compare using VLOOKUP with another sheet if any duplicate found. It's running very slowly, so I want to know better ways to ...
3
votes
1answer
41 views

Utmost function that takes a comparator function

I'm working through Paul Graham's "ANSI Common Lisp". In Chapter 6 (p105), he introduces the idea of utility functions. He points out these are core to bottom-up programming and reusability. He ...
1
vote
1answer
86 views

A faster way to compute largest prime factor (Again, but a lot better)

I came up with this code after implementing the feedback given by @200_success. The previous one (A faster way to compute the largest prime factor) tested my patience, but still failed to give the ...
1
vote
2answers
82 views

Input class in Java

I'm a newcomer to Java (I primarily do C# ) and I have to say that they have made I/O handling much more difficult than it should have been. I am accustomed to the scenario where when I need keyboard ...
3
votes
1answer
42 views

Opening YouTube videos according to chakra cycles

I'm learning how to write code in Python. This code makes an .ini that saves different cycles adding one new operation to the previous cycle. It starts at 1;1, saves that it has run 1 cycle and will ...
9
votes
4answers
2k views

A faster way to compute the largest prime factor

I am self-learning js and came across this problem(#3) from the Euler Project The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? ...
5
votes
1answer
78 views

Create a town administration report

I am Learning Javascript, after doing Java development for 2 years. I am doing a module on udemy which had a coding challenge which I completed and it works but wanted to get it reviewed to find out ...
4
votes
1answer
102 views

Running AWS commands works ok, but the code seems messy and I don't like the time.sleep bit

This is what I've come up with for a class that handles parsing AWS Textract output. So far it only gets the AWS Textract output into a .txt file. ...
2
votes
1answer
87 views

Beginning C, hangman

I have been working on this hangman game for a little while trying to get familiar with C programming. The game seems to work fine but I am looking for some pointers on my code. Are the global ...
4
votes
4answers
190 views

two integers one line calculator

I created this simple one line calculator for two numbers only where user can input any two numbers and and operator in between for example 20+45 and computer will return result of 65. ...
5
votes
1answer
115 views

Tic-Tac-Toe with changeable board size

I've created a Tic-Tac-Toe program with python which has a option to change a standard 3x3 board to NxN board. I've also created easy, hard and insane AIs. Please help me in improving the code and ...
3
votes
0answers
47 views

Recursively create a tree in Rust

This code is meant to take a rectangular area, and randomly divide it up into smaller rectangles in a binary tree. I'm somewhat new to Rust. I'm concerned mostly about the ...
5
votes
3answers
171 views

Simple BMI Calculator (Python 3)

As my first Python program I have written a simple BMI calculator. I want to know how i can improve this program. Would functions be useful? How can I improve the way that it is presented? ...
3
votes
1answer
59 views

Project Euler #5 in C++

I'm currently doing the Project Euler challenges to learn C++. The fifth problem is the following. 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any ...
2
votes
1answer
44 views

Converting words/numbers to Discord “letter/number emojis”

I am a beginner to Python (and programming overall) and I decided that it would be funny if I wrote a program that could convert Letters/Numbers to these "Letter Emojis" in Discord. It works but I am ...
1
vote
0answers
39 views

Sliding marker on link hover and click with jQuery

The code I'm bringing forward is for a vertical menu, where I needed a marker to do the following: When hovering over a link the marker should slide down next to it. When not hovering over a link the ...
5
votes
2answers
115 views

Simulation of spring-loaded inverted pendulum

I've finally committed to moving to Python 3 from MATLAB. I'm currently porting my MATLAB code, and I'm sure I'm missing a lot of common best-practices. For reference, I'm simulating a spring-loaded ...
18
votes
4answers
4k views

Project Euler #1 in C++

I'm learning C++ and currently doing Project Euler challenges. The first challenge is the following. If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. ...
2
votes
3answers
107 views

Statistical methods using PHP (mean, co/variance, standard deviation, skew, correlation)

Functionality This class has a list of statistical functions such as mean, variance, standard deviation, skewness, and it works okay. These functions are applied to arrays of charts data. It is an ...
0
votes
1answer
49 views

GUI that searches files using user inputted search strings [closed]

Basically, I've got a GUI where the user can select text files, enter in strings (that may or may not contain wildcards) and search those files for those strings. Currently, I take the user inputted ...
2
votes
1answer
112 views

Game to shuffle and guess a word

I'm new to C++ and while learning, I wrote a simple program that asks for a word, shuffle sthe characters and then asks another person to find the original word, given the shuffled letters. I would ...
4
votes
1answer
45 views

Comparing 2 iOS and Android versions

Please review and let me know which version is better. I'm just trying to find any caveats or better ways to accomplish the a version comparison independent from Android and iOS. Formats accepted: '1....
1
vote
0answers
15 views

Google ChartWrapper bar formatted table

The end result is a bar formatted table chart that has expanding and minimising rows. The code below works fine but I'd like to know if there is a cleaner way to achieve the same result (see JSFiddle ...
7
votes
0answers
63 views

ASCII Mandelbrot Set “image” producer

As an exercise, I decided to try implementing a Mandelbrot Set viewer that produces ASCII images. Small Example: ...
2
votes
1answer
52 views

VBA - If value in sheet1 found in sheet2, then delete data from sheet2

I have 2 sheets setup: Exclusions and Issues Issues has a list of CASE ID's and Columns that list the "Issue" Exclusions will be populated with CASE ID's that are to be excluded (and removed) from ...
2
votes
1answer
44 views

Edit button toggles modal and load data from PHP using AJAX and JQUERY

I've been working on an edit/update button that will toggle a modal that looks like this: Is there a better code for this JavaScript code that I made? ...
1
vote
0answers
129 views

Simple Asynchronous Dispatch Queue

I'm practicing C++11/14/17 and am teaching myself the STL multithreading library by writing an asynchronous dispatch queue for my simple use case. It seems to "work ok" but I want to know if it's ...
10
votes
0answers
205 views

Windows keylogger in C++

Windows keylogger in C++ Known issues: Not implementing rule of five Having to use hack to use member variables, out_, in static method Pressing caps-lock won't ...
15
votes
6answers
5k views

Check which numbers satisfy the condition [A*B*C = A! + B! + C!]

#include <iostream> #include <cmath> using namespace std; int s = 1; //Serial No. Should I use recursion for the factorials function? ...
0
votes
2answers
93 views

User interface HTML string generated using PHP

Goal This is very basic beginner script, only for prototyping, probably never to reach alpha/beta prototyping/production, is being designed/tested for performance. Its performance quality might be ...
0
votes
1answer
69 views

Combinational string search using Java

I wrote a program that receives 2 strings (Input and Search) in the Search string. The sign '+' indicates that if the substring before the '+' exists in the Input string. (The search string cannot ...
3
votes
1answer
39 views

Getting limited user input: strings and numbers

I posted part of this module earlier (here). I implemented that feedback and now am looking for another round of gut checking. Questions/Concerns I have: Does the way I've structured my functions ...
5
votes
2answers
244 views

Calculating the number of coins in money change

I wrote a program that calculates the minimum number of coins required to give a user change. One concern I have is: When do we initialize the value of a float to be negative or positive? I recently ...
6
votes
1answer
95 views

Optimizing my 2D Ising model code in Julia

I'm just starting to learn Julia, I work primarily in physics and am used to writing most of my code in Fortran90 and occasionally Python for Tensorflow (also Mathematica but that's less relevant). ...
6
votes
2answers
142 views

Simulation of a banking system with an Account class in C++

I have been learning C++ and recently I have started practicing classes. I made this simulation of a banking system with an Account class. I would like to hear feedback on my code, what is good - what ...
5
votes
1answer
62 views

Extracting watermark from a video using Python

I'm extracting a few frames from a video: Comparing the similarity or equality of pixel color (from first two images) Saving to a new image Comparing the new image (conjunction of first two images) ...