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.
4
votes
3answers
293 views
Dr. Nim game in Java
This video should explain how the game works, but in simple form, it's a game where you enter a number between 1 and 3, This number is than removed from 12, in doing so the computer will then pick a ...
2
votes
1answer
39 views
Maximum subarray problem solved with divide and conquer also for the all negative element case
Solving the maximum subarray problem with added cases of finding non maximum non contiguous subarray as well. I used divide and conquer approach and tackled the 'all negative' case by keeping a ...
6
votes
1answer
49 views
Populating a listbox in a mock invoice with selected items
So I'm almost 100% certain I've done something wrong simply due to the inefficiency of what I've written, I'm entirely a novice to coding and am working on an assignment for my introductory ...
43
votes
6answers
7k views
How clean is my snow?
I just wrote a snow animation in Python. I think this is fairly clean but I have a few things that I don't like.
...
2
votes
1answer
51 views
Print HTML tables with information from some devices
I'm not sure if this is the right question but didn't come up with something else. I have this huge for{} loop which prints out some HTML Tables with some infos ...
3
votes
0answers
33 views
DocsGatherer - gathering and organizing fragmented documents
This script is used for gathering fragmented documents from your computer, and organizing them by extensions.
Here is the main things my algorithm does:
Search through path(s)
Stores documents' ...
8
votes
4answers
920 views
Program to Check If string is Palindrome (in C) [on hold]
Just wrote a program to check if a string is Palindrome. If that's true, return 1. Else, return 0. How can I improve it?
...
5
votes
5answers
419 views
5
votes
1answer
41 views
Uncompress archive, check contents, add missing files, recompress archive
The code looks for the specified .tgz file, if it's not present, it creates it. It looks for files ending in .txt in the cwd and adds them to a list. It decompresses the gzip, checks for the .txt ...
1
vote
1answer
31 views
What are the top voted comments on closed questions, and who made the comments?
Following this linked question and the feedback it generated, I put together a new query which utilizes a JOIN.
...
2
votes
1answer
31 views
Project Euler #7 in C: find 10001st prime using something like Sieve of Eratosthenes
I've gotten a solution for Project Euler #7 in C (find the 10,001st prime). I came up with the very simple algorithm myself (from what I can tell it's similar, if not identical, to the Sieve of ...
4
votes
1answer
51 views
What percentage of down votes are users responsible for?
I put together this simple query to calculate the percentage of downvotes each user is responsible for and displaying them in order of downvote percentage. It's generating the desired results, but I ...
-2
votes
0answers
37 views
“Cows and Bulls” game
We are working on an assignment where we have to generate code that will play player one in the game Cows and Bulls. I am working on a function that generates the code based on the values for ...
5
votes
1answer
88 views
CIS194: Risk!-style “battles”
After reading LYAH and using RWH as a reference, I've been doing the exercises from CIS194, which is often suggested to beginners on irc://freenode.net/#haskell and ...
2
votes
3answers
61 views
Calculating a payment price based on a selected phone
The program shows three phones with prices, and you need to select one of them. The program will then calculate the price based on the payment type you selected.
I'm very new to the world of OOP, and ...
2
votes
2answers
21 views
Outlook VBA-Macro for to check mails concerning recipients and attachments
Every week I've got to send a report to a clerk. I also have to add his deputy in case the clerk isn't available.
For not to forget the second recipient and the attachment I've wrote myself this ...
1
vote
1answer
33 views
Creating a dictionary
I have a Ruby programming task. My code passes all the rspec requirements, but I am not sure if I've done it in the right way. And I'm not quite sure why I need ...
6
votes
1answer
51 views
Simple JavaFX Calculator
Good day everyone, I made a simple JavaFX calculator. It does basic calculations, and works to the best of my knowledge. However, I'm a novice at both Java and JavaFX, so I seriously doubt this is as ...
4
votes
1answer
35 views
Sieve of Eratosthenes in Erlang
I just started learning Erlang. Here is my crack at the Seive, based on (https://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf):
...
8
votes
1answer
99 views
LaTeX code for presentation slides
I'm giving a presentation in a few days. I'm preparing my material in LaTeX; however, I am relatively new to it. How can I make my LaTeX code more concise and less repetitive?
Here is a reduced ...
3
votes
1answer
67 views
Implementing a Time class in c++
Design a class TIME which stores hour, minute and second. The class
should have
the methods to support the following:
User may give the time value in 24-hour format.
User may give ...
5
votes
2answers
699 views
Reverse an integer, find the absolute difference, then reverse again
Intro
For one of my university assignments we were asked to take an unsigned int, reverse its digits, find the absolute difference between the original and reversed, then reverse that, and you ...
1
vote
1answer
71 views
JavaScript Snake game
I recently followed a tutorial on a JavaScript snake game. I tried to improve that game by adding bad fruit which will make your snakes tail incredibly long.
...
7
votes
5answers
671 views
Finding the number of vowels in a string
I'm new to Java and is trying to solve the beginners problem of finding out the number of vowels in a string. I was just wondering if there is any alternatives to any of the steps that can improve ...
-4
votes
0answers
21 views
Need help making a simple text adventure with Python [closed]
I am attempting to make a super simple text adventure game but have come into a few problems. I am VERY new to this so please keep your answers simple. Here is what I have done:
...
5
votes
1answer
48 views
Build all possible phrase pairs from a sentence pair
I have an array for an English sentence (enSentence) and for a German sentence (deSentence). Each value represents one word. I ...
3
votes
3answers
67 views
Simple multiplication quiz
I am learning Python, and would like to learn how to make this code simpler and easier to read.
Things I am hoping to learn:
What variables might be appropriate?
How can I make it simpler?
Is there ...
8
votes
3answers
883 views
Replace spaces with '%20'
This is my attempted solution to Question 1.3 from "Cracking the Code Interview", 6th ed.
Question:
Write a method to replace all spaces in a string with '%20'. You may assume that the string has ...
1
vote
0answers
48 views
Restarting properly
I have an activity with a timer in it, which starts an activity when the timer goes down. Before, when onPause() would get called after a phone call, my activity ...
2
votes
0answers
19 views
Web Scrape, and Save To SQLite DB
Now I am pretty crappy at software architecture. I think I was able to make this relatively concise. Please, any input is helpful!
...
7
votes
4answers
152 views
First text-based number-guessing game
This was a learning experience. I have looked around and found some better ways to write some things but wanted a second opinion to look at what I've written and kind of analyze it as well.
I just ...
11
votes
9answers
867 views
Simple string inverter program
I am currently studying c programming, but I'm at a very basic level. So for practice I made a program that reads a string and inverts it. I want to know if the code is readable and how I can improve ...
3
votes
1answer
34 views
Using an Edit box in a table views header section to insert the values into the table using swift
Allow me to provide some context. I have a UITableViewCell that contains an EditText and a Button. This cell is then inserted into the ...
4
votes
0answers
45 views
Persistent shopping cart that allows users to do CRUD operations as well as perform a checkout
I have never dealt much with jQuery or JavaScript. The following code is something I wrote and while it is functional, I am pretty sure it is a complete mess and it could use some improvements for ...
2
votes
2answers
89 views
Java rolling dice + csv array output
I have made a program to take x number of die and rolls them y number of times, then stores the data into an array so that I may output a CSV file. Everything works as intended, but I am having ...
6
votes
3answers
79 views
Copying data from closed workbooks
I'm an intern in an industrial company in Brazil and it happens that I'm using excel a lot. I just started playing with VBA couple of days ago, and I'm amused of how many things it can do for me!
I ...
4
votes
2answers
58 views
Find all integers between m and n whose sum of squared divisors is itself a square
Divisors of 42 are : 1, 2, 3, 6, 7, 14, 21, 42. These divisors squared
are: 1, 4, 9, 36, 49, 196, 441, 1764. The sum of the squared divisors
is 2500 which is 50 * 50, a square!
Given two ...
2
votes
4answers
74 views
Recreating Google homepage for learning purposes
Like other posters, I'm currently working on recreating Google's Homepage for The Odin Project.
I'm new to HTML and CSS but I'm eager to learn and have been looking around for an answer, testing ...
5
votes
2answers
190 views
Efficiently return a ChatColor
I am working on a plugin for a Minecraft server. In it, I have a function that returns a ChatColor depending on what permission level you are.
Whenever I need ...
1
vote
1answer
79 views
PHP/MySQL - OOP database class
I use this database class in a CMS, just a project to learn OOP. Would like to have some review on how to improve it, what should I change, add, remove?
...
3
votes
1answer
79 views
Calculator in HTML, CSS, JS
I am new to Javascript and HTML. I have written code for a calculator, so review my code and points out pros and cons in it.
...
5
votes
1answer
48 views
Read through a log file to find “Fail” lines
Please bear with me, I'm only about a week into Python.
This code is something that I wanted to do once I completed the chapters dealing with opening and reading files, and RegEx. I always feel like ...
6
votes
1answer
74 views
JavaScript Breakout Game
I'm a novice programmer who is very new to JavaScript, and animation/graphics, and I have this breakout game on my flask website.
I tried to do as much as I could from scratch, and I'm unsure if my ...
2
votes
2answers
52 views
18 Motor, 6 Leg robot Walking code - Python / ROS - follow-up
I have re-designed my robot walking code from feedback I received on previous question and would love to hear some feedback and pointers.
Main.py:
...
1
vote
1answer
27 views
Extracting original values from cumulative sum values
I was writing a function in python to extract original values given a list containing cumulative sum values. For eg -
...
-4
votes
0answers
57 views
Classes representing a developer–manager relationship
I am fairly new to C++ and here is a piece of code I wrote while I was looking into the copy constructor working. The code compiles perfectly on MSVC. I am using VS2005 as IDE and using C++03.
My ...
0
votes
1answer
59 views
Program for helping people practice their maths [closed]
Please mention anything that could help me.
...
2
votes
1answer
39 views
RLE-like string compression in clojure
There have been already many similar questions to this one (e.g. this and this, just to point two), but I did not find any for clojure.
The goal is to compress a string in a RLE-like way: i.e. each ...
2
votes
1answer
96 views
Student Management
You are a computer science professor at South Harmon Institute of
Technology, and are in dire need of automatic grading! The good news
is you have all of your student's assignments in an ...
4
votes
2answers
73 views
18 Motor, 6 Legged robot walking using Python / ROS
I have been using ROS alongside Python to enable my built robot to walk. I am aware that my code needs some improvement such as classes etc. This is my first Python / ROS program so any help and ...