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

-2
votes
0answers
9 views

Logarithm of marginal likelihood

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 ...
0
votes
0answers
11 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
11 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
1answer
77 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
49 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 ...
17
votes
7answers
4k 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 ...
3
votes
2answers
96 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 ...
-4
votes
0answers
21 views

Using Dictionaries to count first letter in a string [on hold]

I've been working on a dictionaries exercise in Python, and I'm fairly new to the language and programming in itself. I've been trying to take a string or list of strings and have my code compare the ...
-7
votes
0answers
31 views

test.exe has stopped working when trying to get a simple temparature converter to work [on hold]

I'm a novice and started learning C just a few days ago. So far I've learned if and else statements and how they work. So I wanted to make a program that will convert celcius to fareheight and vice ...
2
votes
2answers
41 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
96 views

Turn log into fancy data

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
58 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
16 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
52 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
22 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
39 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
77 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
85 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
0answers
38 views

Simple Text Based Console Game [closed]

I made a simple text based console game in C++ for my assignment. I was just wondering if you guys had any initial feedback. You can find the files here ...
3
votes
2answers
29 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 ...
13
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 ...
6
votes
2answers
78 views

User registration and login program

I've recently stared learning C++ so I'm new to all of it. I've got my fourth "software" under development. Could someone have a look through and give me some constructive criticism on what should I ...
5
votes
1answer
107 views

VBA Copy Cells Stable

I'm very new to VBA and have put together a macro that currently does exactly what I want: copy cells from one worksheet to another, clear the cells copied, refresh my pivot tables and save the file. ...
0
votes
0answers
27 views

Prompt to pay for in-app purchases

I have the following code that prompts the user to pay for an in-app purchase when they click a button. I was wondering whether it was efficient or not: ...
4
votes
2answers
76 views

Python program to calculate the area of two-dimensional shapes

This is the first mini-project I have completed by myself with Python 2.7. I wrote a simple program that calculates the area of different two-dimensional shapes and it works. I want to know what you ...
5
votes
4answers
764 views

Find all instances of element in array

I've created a function to return all the indices where an element is to be found in an array. If it occurs twice or more, all the respective indices will be returned, for now it returns them in ...
3
votes
2answers
59 views

Port pinger command line tool

Checking if some port is up on the network is a very common task when working with remote services. A common way to check is using telnet, but I have two practical ...
3
votes
3answers
135 views

Bowling scoring kata

I've been writing basic Python scripts for a while now to help process data or automate some task but I've decided I should start picking up unit testing and objective orientated programming (the vast ...
4
votes
2answers
49 views

Print max no of recent duplicate words

I am new to C++, learning from the book primer C++ The exercise: Write a program to read strings from standard input looking for duplicated words. The program should find places in the input ...
3
votes
2answers
46 views

Area calculator in Python

I'm pretty new with programming in general. I'm using Python 2 right now as it seems most of the courses are teaching Python 2 and not 3. I built this area calculator that will calculate square, ...
-4
votes
0answers
27 views

C# Try/Catch Skips Nested If/Else Statement [closed]

Im working on a project for school and I cannot solve this bug. When the first IF statement returns false, it doesnt continue on with the else statement but skips it and goes straight to my exception. ...
5
votes
2answers
71 views

Prompting for a positive integer and validating user input in Java

I'm just starting out with Java, and trying to make a method to get a positive integer input from the console. My currently working implementation is this: ...
3
votes
2answers
54 views

Prime Number Calculator with GUI

I wrote a Java program with a Swing UI that calculates prime numbers. The primes are displayed into a listbox. I used a few optimizations to generate the primes faster. I’m using the NetBeans IDE, so ...
6
votes
1answer
164 views

Quote of the day program

Create a class diagram and Java code for the following system and scenario, taking into account the possibility of future extensions. The system is a command line utility that prints a short ...
6
votes
1answer
207 views

Pong game in C++

This is my second SFML game, which is Pong. Please tell me what you think. ...
4
votes
2answers
58 views

SFML game using moving circles

This is my first SFML game. There are 2 players: the red circle and the yellow circle. The red circle is controlled by Up,down,left and right keys, the yellow one is controlled by WASD keys. The ...
2
votes
0answers
23 views

Simple native JS Calc

I've never been into web a lot, but I really want to. I started from simple things. I have some experience in .NET and c#. But the world of javascript is completely new for me. I wrote simple ...
2
votes
1answer
50 views

Profile picture upload method in Laravel 5.2

I am a Laravel newbie so please forgive me for my code... I have a method, in a Laravel controller, that updates the current logged user profile (...
0
votes
1answer
25 views

Collect several API call results

Want to brush up my rusty web dev skills. I want to call the twitch API for several channels and eventually call a callback function when all results are in without using a sync call. I didn't work ...
3
votes
2answers
131 views

Validating e-mail address input in C

I have this little function to validate e-mail. It's a little piece of code to search major mistakes in e-mail input and it's part of a bigger program I have to complete as a school assignment. Is ...
5
votes
3answers
97 views

Compose valid subtractions using all digits from a set

I have created a brainteaser, which I called the "impossible problem" (see this video I made). The aim is to create a valid 3-digit subtraction which uses every digit from 1 to 9 once. Here is an ...
1
vote
2answers
96 views

Encryption algorithm using CTR mode

I am using CTR mode (it is a cipher in itself) in this code. I just wanted to see what you thought about it before I finish it. (Yes, I know that the plaintext length and key length must be highly ...
4
votes
1answer
125 views

Detecting the duration of a button press in a microcontroller project

I'm a C++ newbie and so far have written my code mostly in an not OO way. Since this is getting confusing I'd like to start creating libraries for some of the functionalities that I've implemented. ...
3
votes
0answers
45 views

Basic Python Tic-Tac-Toe Game

I have just decided to get into programming as a hobby (and possibly a job in the distant future). After learning the basics of Python, I made Tic-Tac-Toe to apply what I've learned. I would ...
25
votes
5answers
2k views

Event scheduler in C

One of my university assignments asked us to create a program using struct in order to create a simple event scheduler. This program is for a single day only, not ...
3
votes
2answers
48 views

Count calls and update table accordingly

This is literally the first time I've ever used JavaScript so I know it's really bad and how to improve it just not how to implement it. Basically, I need to loop through all the elements instead of ...
3
votes
1answer
42 views

Learning nested for loops in Python with Pig Latin translator

I've been trying to learn Python for a bit now. I've taken a few courses, but I've found that I've been going about them wrong and had allowed them to "hold my hand" too much. I'm trying to build ...
3
votes
3answers
73 views

Scrape HTML into separate files for each chapter

I have written a program to read HTML file, find particular text, write text from that particular text to next particular text in a newly opened file. I am interested in code review. I am very new ...
2
votes
1answer
28 views

Optimally allocating a resource with time-varying demand and cost

I'm working on the following DP which finds the optimal way to allocate a resource. At each time step I can either allocate (0.2 resources) at cost C or not in which case the storage is reduced by the ...
0
votes
1answer
30 views

Compressing a file using zip or gzip

Write a Compress class defines two static methods, gzipFile(), which compresses a file using GZIP compression format, and zipDirectory(), which compresses the files (but not directories) in a ...