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

learn more… | top users | synonyms

0
votes
0answers
15 views

Rock Paper Scissors game that simulates one random play and one consistent player [on hold]

This is my homework for my CS101 class, I'm not looking for an exact answer, just some guidance please! The program is supposed to simulate Rock Paper Scissors where one player chooses completely at ...
0
votes
1answer
12 views

Using JavaScript-bitwise AND and -bitwise NOT for setting a number to 0

Obviously is the XOR-operator is used in low-level programming-languages used a lot for setting a value back to all bits 0. For example: 11010 ^ 11010 => 00000 Brought my teacher to figuring a out ...
5
votes
3answers
31 views

Running a MySQL query with an admin class

This is my admin class, DB class and how I use OOP. I am looking for ways to improve my code to make better use of OOP. Please help me if you think I can improve my code in some way. db.class.php <...
1
vote
0answers
13 views

Matching a current user's “liked / followed” items with results from a search query

This is pretty ugly now. My main objective is to perform a search query, which I do via mongoosastic / elastic search (the search paginates 12 items at time). Then, I want to match those results with ...
3
votes
0answers
27 views

Code to create and check a numeric password

I am very new to coding and I have created this relatively simple code to do with my basic knowledge of the language. However I have had to do with some unwanted code including shutting it down if ...
2
votes
2answers
31 views

Calculating the Collatz Conjecture

Today I read this thing about the Collatz Conjecture and wanted to try and write a program that calculates all the numbers. If you have any idea how the code could be shortened, please tell me. ...
3
votes
2answers
28 views

Program that organizes files based on folder name and file name

I am rather new to coding, and I would like to see what improvements should I make to the code I wrote to ensure that I am using good practices, and that it will function as it's supposed to. The ...
5
votes
1answer
84 views

Checking that a password contains a '$', a digit, and an uppercase letter

I have this code, which reads in a string password from the user and checks if it has a dollar sign $, a number, and an upper case letter. If it has all three, it ...
3
votes
3answers
85 views

Removing numbering gaps in a series of filenames

I've recently started programming and have been working through some problems such as the one below: Write a program that finds all files with a given prefix, such as spam001.txt, spam002.txt, and so ...
3
votes
0answers
89 views

Jarvis the discord.js chat bot

Just finished creating my first bot using Discord.js for the chat application, Discord. This is my first bot and first javascript program I have ever created. I'm mainly interested in ways I can ...
3
votes
1answer
50 views

PHP Login/cookie authentication

I have an authetication api for an intranet site but I'm a little worried that my design of the authentication is bad and unsafe. Below is the basic part of the authetication process and I hope I can ...
6
votes
1answer
68 views

Dice simulation and counting pairs

This is my first time putting a code together for Java based on my own so i was hoping if you someone would be kind enough to review and provide feedback or constructive criticism on this code. The ...
4
votes
2answers
56 views

Scrabble Tile Counter

Introduction Inspired by this r/dailyprogrammer problem, I've written a Scrabble tile counter. Given a Collection of Scrabble tiles known to be in play, it can ...
3
votes
1answer
31 views

X-up utility for EVE Online

I am learning Rust. I also play EVE Online – a video game about internet spaceships. I decided that it would be fun to practice Rust by writing a simple utility to help me x up. to x up (verb) ...
8
votes
1answer
49 views

Basic GUI library for an LCD built (nearly) from scratch

I am working with an LCD screen and an RPi. The library I use sends 1-bit images to the screen, so I wrote this library based on Pillow to help developing the on-screen GUI. I am playing with the ...
3
votes
1answer
63 views

Basic Nim game vs computer in JavaScript

This is my first time writing a basic program/game in any programming language. It is supposed to a be a Nim game vs a computer with these basic parameters: Use ...
5
votes
3answers
490 views

Snake game in C for Linux console

Please help me improve this code. Move snake using : a w s d. (My compiler doesn't support initialization of index variables inside loops, so please ignore this part) ...
5
votes
3answers
115 views

Determine if a function is bijective

Concise Problem Specification Given an integer \$n\$ and a function \$f : X \to X \$ where \$X = \{1,2,3,..,n\}\$ Determine whether the given function is a bijective function or not. Definition: ...
5
votes
1answer
111 views

TicTacToe Implementation With Classes

This is my first program using a class that I personally designed. Please pay special attention to the design of the class and I would love pointers and advice on how to better improve logical design ...
-2
votes
0answers
23 views

Using `flat_map` to unpack nested structs in Rust [closed]

Does this code use flat_map idiomatically? I am uncertain about my use of clone on the inner strings. ...
5
votes
3answers
108 views

Pausing a loop with a Raspberry Pi 3

I am trying to perform a loop and then stop the loop when the last line of code in the if statement is printed to screen saving on CPU cycles. I want to start a <...
1
vote
2answers
126 views

Tasks organizer app

I've created my first complete JS app, which lets you add tasks and control how much time you spend on them. I posted this to get some ideas how to improve readability, efficiency and the speed of my ...
2
votes
0answers
53 views

Display a simulation using Tkinter

I wrote a module to simulate physics of 2D elastic balls and the community helped me to improve it on this post. Now I implemented a GUI using Tkinter to display the simulation in a window. I'm a ...
1
vote
1answer
62 views

Weightlifting calculator

I'm building a simple iOS app using Swift that calculates the One Rep Max weight a user can theoretically lift. User inputs a weight lifted, the number of repetitions and the app uses one of several ...
4
votes
2answers
62 views

Processing trip route table in C

In fact, this is a group assignment for our C programming lesson, but seeking help from others is not considered cheating. The goal of the following code is to: Sort the data in ...
4
votes
1answer
40 views

Binary-octal-hexadecimal conversion table

I solved this exercise of displaying a table of numbers from 1 to 256 in binary, octal and hexadecimal. I made this program to convert from decimal to binary and took that binary number to convert to ...
4
votes
3answers
565 views

Project Euler 10: find the sum of all the primes below two million

This is question #10 from Project Euler: The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million. I just started programming and read that a Sieve ...
4
votes
1answer
104 views

Clearing filters, copying a range, and then pasting a formula down a row

Novice coder here. I have the following code to perform a few actions like clearing filters, copying a range, and then pasting a formula down a row till the last line. It works perfectly, but it ...
4
votes
1answer
106 views

Printing fizzy lines

Challenge Given a test case print out a FizzBuzz Series. Specifications The first argument is a path to a file. Each line includes a test case. Each test case is comprised of three spaced ...
2
votes
1answer
31 views

Table View Controller for selecting and saving user default preferences in an iOS app

This is the Swift code from one of the view controllers in my app that calculates a one rep maximum weight a person can theoretically lift. This particular view controller presents a list in a ...
12
votes
5answers
762 views

Validating integer or string input

I'm at uni and working on an assignment in c# that takes some user input (from they keyboard via console). The input validation required: numbers must be within range (range will vary depending on ...
10
votes
3answers
94 views

Userform for getting data from data sheet into a table

I am making a userform that grabs data from a data sheet and puts it into a table: Grabs the data based on what the user wants (Brand -> Items for brand) Allows multiple items to be added Displays ...
4
votes
0answers
60 views

Youtube playlist saver with Google API

I have a problem with Youtube videos being deleted from my big playlist and not knowing which videos got removed. So, I decided to write a Python script to save certain information(title etc.) about ...
4
votes
2answers
74 views

C++ object pool

I am a beginner and would like to build a pool. I made some research and found out that if my software has heavy object create and delete part, I should use a pool because of performance. I made some ...
-1
votes
0answers
37 views

Calculating my shocking monthly electricity costs [closed]

I've been learning Java for a few months now and have finally tried my first project from scratch. I succeeded partially in some of it, but I'm really confused by some other parts of it. I was hoping ...
4
votes
3answers
71 views

Nucleotide count in Scala

This is my second day in learning Scala and I still need to develop a taste of functional programming, I often find myself doing imperative coding. Below is the result of my TDD practice. Code ...
1
vote
1answer
26 views

PHP Script to write values from JSON on image and display image

This is a script I made that opens img.png, downloads the json data from the API, writes it on image and displays it. It currently is a community ad over Arqade. ...
7
votes
3answers
217 views

Summarize raw data in new sheet, 2.0

Thanks to zak for some great advice on this previous question. This is a follow up question: I have an Excel workbook with two sheets: "Raw data" and "Summary". In the raw data sheet there are ...
2
votes
1answer
37 views

Summarize raw data in new sheet

Note: This question has a follow up question here. I have an Excel workbook with two sheets: "Raw data" and "Summary". In the raw data sheet there are several blocks with data structured like the ...
5
votes
2answers
115 views

Creating a simple 52-card data structure for Blackjack in Python

I am fairly new to Python so I am trying to learn more about its conventions and ways to make my codes more efficient. I am making a Blackjack game and so far have this class that draws, organizes, ...
9
votes
4answers
1k views

Create a list of random numbers with sum = n

I want to create a list of random integers in the range [0, 9], that sums up to 100 in Excel, using VBA. The list should be printed in a single column. The routine I've written is as follows: ...
3
votes
0answers
68 views

Showing the slide named in the query string and hiding the others

I have this all figured out now thanks to the help of a mod. Here's the working code: ...
3
votes
1answer
102 views

Finding the prime factors of a positive number

I have an assignment to write on the standard output the prime factors of a positive number displayed in ascending order and separated by '*'. My code works, but I need help reviewing it before I ...
0
votes
1answer
14 views

Render SVG background with Gradient

I'm new to and still fairly confounded by SVGs. So feeling pretty happy with the following hobbled together SCSS code demonstrated here. ...
3
votes
1answer
51 views

Converting embedded JSON into flat table

I am new Python user, who decided to use Python to create simple application that allows for converting json files into flat table and saving the output in cvs format. I was wondering if you could ...
3
votes
1answer
42 views

Project Euler 23 - Non-Abundant Sums

I'm new to Python! Kindly suggest me improvements! Problem statement : A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum ...
6
votes
2answers
770 views

C the large print

This is the Longest lines challenge from CodeEval: Challenge Write a program which reads a file and outputs a specified number of lines, sorted on length in descending order. ...