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.
1
vote
0answers
14 views
Java MVC TicTacToe - follow-up
Here is my previous question:
Java Tic-Tac-Toe game (implemented through MVC)
I'm reposting again because I made a lot of changes to the code. I wasn't able to implement everything as I don't know ...
3
votes
0answers
22 views
Ship capt crew dice game
I built this game that I used to play at family get-togethers. I am still working on the final implementation of how to actually play someone in the game. Please critique the main logic of the dice ...
1
vote
0answers
19 views
JavaScript Pong clone - classroom use
I'm creating a Pong clone for use in teaching JavaScript to beginners. Unfortunately, I am largely a JS beginner myself, so I probably missed something in the below code; however, I do not want to ...
0
votes
0answers
16 views
Code for finding repeated entries with different data
project is the data frame. For the purpose of the code, HOUSE.NO is a column of the type character, and ...
5
votes
2answers
54 views
BF interpreter in Python that uses recursion to handle loops
I wrote a Brainfuck interpreter in Python and I'm wondering how to simplify it.
I handle separately loop commands and the others. A recursive function deals with loops.
...
1
vote
3answers
106 views
Project Euler #43
I'm having trouble optimizing the Project Euler problem #43 :
The number, 1406357289, is a 0 to 9 pandigital number because it is made up of each of the digits 0 to 9 in some order, but it also ...
2
votes
1answer
35 views
Texas Hold'em classes
I am working on a simple Texas Hold'Em dealing simulator. I am new to Python and was hoping to get some advice on my use of classes here. I feel like I am not using them as efficiently as possible, ...
6
votes
1answer
29 views
Console input prompt loop in F#
I'm learning F#, starting with baby steps. Is there a way to write this code in a more succint way, while keeping the same semantics? Maybe by using a Seq or ...
2
votes
2answers
73 views
Project Euler Problem #41
I recently finished the project Euler problem # 41 :
We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once. For example, 2143 is a 4-digit ...
0
votes
0answers
33 views
Template for a table to display suggested pledge amounts
I am building a template that will:
need to be edited by people with minimal JS/CSS/HTML training
need to be flexible enough to accept changing text and layout need
number of rows/columns will ...
0
votes
0answers
25 views
Settimeout socketio client or server?
I have a game (made with angular and socketio) in which a user selects a card, the card is highlighted for all the users to see (some css) and after 4-5 seconds a new round begins.
Currently I have ...
2
votes
3answers
206 views
Project Euler #34 Digit factorials
I'm having trouble improving the performance of the solution to the Project Euler problem #34
145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145.
Find the sum of all numbers which ...
5
votes
2answers
45 views
Time manipulation for notification reminders
I'm new to programming, Stack Overflow and Code Review. I was encouraged to post this method here based on a question I posted on StackOverflow here. Let me know if you have tips for improving this ...
6
votes
3answers
73 views
Find the date for the nearest day of the week, in this case Fri & Sat
General objective: Find the date (day of the month) of the nearest specified day of the week and output.
More specifically: Focusing on events which take place every Fri & Sat, want the page to ...
3
votes
1answer
30 views
Implementing tabs with panes
I am new to AngularJS. Here is my basic code for implementing Tabs with Pane. Eventually, each tab-pane will have a form and a ui-grid that will display data from the DB.
Can I use separate ...
1
vote
2answers
50 views
4
votes
3answers
35 views
User ranking system
I have written my first code of object oriented Python. Prior to this I have spent a week on learning the concepts and understanding the technique. I would appreciate it somebody reviews this and give ...
2
votes
1answer
74 views
Noughts & Crosses
This is my first ever program in my first language, Python. I wanted to know how I could improve my writing style.
...
5
votes
2answers
74 views
Java Tic-Tac-Toe game (implemented through MVC)
this is my first post. I'm pretty new at programming (just under a year and a half), and recently I wanted to start some projects.
After seeing Tic Tac Toe in MVC, I attempted to create something ...
3
votes
2answers
58 views
Reading in data from a file and then assigning vals and then creating object
So I have some code which I created from the top of my head. But in all honesty I know it can't be the most efficient way of doing it.
I have some data in a file all positioned 5 values per line ...
2
votes
1answer
67 views
Editing HTML based on instructions in a data structure
My getExtend() function, which will be included via require.js, has two inputs and one output:
HTML file content
config object which determine how to ...
-5
votes
0answers
48 views
finding two strings in a set of data
**does anyone know how to create a code to solve this question **
**cough cough this is on bluej **
How many URLs on this website end with either ".com" or ".com/"?
...
4
votes
2answers
56 views
Go lang Tour Webcrawler Exercise - Solution
I am new in Go and for study I have to hold a presentation about concurrency in Go. I think the Go lang Tour - Webcrawler exercise is a nice example to talk about that. Before I will do that, it would ...
6
votes
1answer
39 views
Randomly selecting an adjective and noun, combining them into a message
This is my first Rust program. I have previously written a lot of Python, and some C. I would like some advice on whether I am doing things idiomatically, and any improvements I could make! I also ...
0
votes
2answers
31 views
delegate click event on document
I'm adding an onclick listener to the whole document then checking the source of the click. If the source of the click contains the attribute data-widget I want to ...
1
vote
1answer
20 views
Node module to fetch/post API data
I'm fairly new to JavaScript and Node and am wondering if I'm on the right track.
Module file:
...
-4
votes
0answers
33 views
Why does this C program crash? Memory allocation and buffers (ie malloc and free) [closed]
I've been having some issues programming a long code for my university programming lab course. I've been asking around but cant figure out why my program crashes after everything executes and ...
-1
votes
0answers
10 views
Issue with HTML/CSS when making a navigation bar contain text in the middle [closed]
I am currently trying to learn how to code websites using HTML and CSS.
I have attempted to make a navigation bar however I can not get the text to align vertically in the middle in the navigation ...
4
votes
2answers
79 views
Project Euler #23 Non-abundant sums
I'm having trouble optimizing the Project Euler problem number 23 :
A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of ...
3
votes
3answers
63 views
Remove all vowel from file C++
i am just start to learn C++ and would like to know if there is a better and efficient way to solve this problem or some recommendations.
Problem: Remove all vowels from file and create new one ...
0
votes
1answer
32 views
Modbus connection over TCP and Serial port
I want to improve my code. In this code I don't like my contructor, but without it I keep getting an error while trying to connect NullPointerException.Any ...
5
votes
2answers
60 views
Determine playing card
I would like a code review on the coding I did for my assignment. The reason I have asked here is because my lecturer has no intention of going through (Don't ask me why, I asked before and he said ...
-3
votes
0answers
17 views
Logarithm of marginal likelihood [closed]
Problem:
The data "\erdata.txt" has n = 158 samples (rows) and p = 51
variables (columns). The rst variable (column 1) is your response
variable (levels of a probe corresponding with the ...
1
vote
2answers
74 views
HTTP Response/Request Class
This is just a simple class that you can you use to send requests and get the HTML code. I would like to get feedback on this.
For your request you can set:
URL
Request method: GET or POST
Request ...
0
votes
1answer
17 views
iframe play & thumbnail function
This is quite a simple function, but I just wanted some opinions on it, like is this the correct way to run a function and check if an element exists or not?
...
6
votes
2answers
104 views
Very Simple UNO Game
I made a simple text-based UNO game in Java. It lacks some features of the original game, but it's good enough for now. I'm new to Java, so I would like to receive as much feedback and suggestions as ...
1
vote
0answers
57 views
Project Euler #11 Largest product in a grid
Question
Link to the exercise : https://projecteuler.net/problem=11
I'm currently working on the Project Euler exercise's and I just finished the eleven exercise. It's working fast enough it takes ...
20
votes
7answers
5k views
Project Euler #7 10001st prime
I decided to start working on the Euler project exercises. I'm doing fine for now but the seventh problem is running quite slow and I can't think of anything to make it work faster. It takes around ...
4
votes
2answers
101 views
Calculating the equivalent value of 2 resistors or capacitors
I started learning C# and this is my first "project". Its main purpose is to calculate the equivalent value of two resistors or capacitors connected in either series or parallel.
I just finished it ...
2
votes
2answers
43 views
U2 puzzle in Haskell
Here is a puzzle:
U2 has a concert that starts in 17 minutes and they must all cross a bridge to get there. All four men begin on the same side of the bridge. You must help them across to the ...
7
votes
3answers
115 views
Turn logged data into fancy plot
I'm logging data from an embedded platform over UART. This gets saved to a log file and I want to process the saved log with Excel.
I have no idea whether what I did was even remotely a good ...
7
votes
1answer
66 views
Simple labyrinth
I'm making a a simple labyrinth. I want to make it so that I could hit a wall, and if I did hit the wall, I wouldn't cross it.
...
1
vote
1answer
20 views
Twitch client that notifies me when a followed streamer comes online
I've been writing code for a little while but I'm a little slapdash. I'd like to get better so I've been having a glance at best practices, other peoples code and reading a whole lot. I'd appreciate ...
2
votes
2answers
54 views
Python number guessing game
I'm a PHP Developer. I'm trying to learn Python. So I tried to create a simple game, a Number Guesser.
I tried to comment out as much as possible without making super obvious comments.
I also made ...
0
votes
0answers
23 views
Angular.JS directive to show 225 items in a grid
I'm a newbie in angularjs who has been tasked with optimizing this code.
The following directive lists information in a table. The table uses pagination with 25 items per page and 11 items that can ...
3
votes
1answer
40 views
Beginner FizzBuzz solution
Is this a bad solution to the FizzBuzz thing?
I decided to make it print "Fizz Buzz" for the numbers divisible by 3 and 5 just for practice/understanding.
...
5
votes
1answer
88 views
C# Sorting array without using the bubble sort
I'm a beginner and like to experiment new things so today I tried to implement sorting method for an array without using any Sort and the actual challenge was to do ...
4
votes
2answers
101 views
DAO to create, update, and delete a project
I'm trying to write my first "complex" program in Java. So far, I created a local H2 database but I'm not sure about the quality of my code (I'm newbie in Java) because I don't know how I can deal ...
3
votes
2answers
31 views
TCP client and server supporting six simple commands
For a class, I was given an assignment to code a simple TCP connection between a server and a client. Once the TCP handshake is done, the client sends inquiries to the server. It's a 2 second ...
14
votes
3answers
1k views
Simple worker class program
I Have written this program to add workers into a list and print them. I'd like a review of this. I'm especially concerned if the method Addworker should be inside ...