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

5
votes
2answers
96 views

Output int from string input

This takes a string input like 1,2,3,4,5, splits it using , delimiter, converts each char to int and output it in a single line ...
6
votes
2answers
188 views

Calculating the circumference and area of a circle

This simple program uses Scanner to obtain a radius from the user, then calculates and outputs the circumference and area. Questions: Is it customary in Java to ...
9
votes
3answers
72 views

Tic Tac Toe game in Java OOP

I have written a simple GUI Tic Tac Toe Application and since this is my first shot, I think it can be improved a lot. Please tell me what you think about it and what you see I made wrong so I can ...
0
votes
0answers
11 views

Filesystem kernel mode driver stack overflow error [on hold]

I am having an issue where my driver's stack is overflowing and causing the computer to bluescreen when I call ZwCreateFile. I am just starting to develop for the windows kernel and not really sure ...
1
vote
2answers
34 views

Menu selector code that changes the background of a selected div

i made this code to change the background color for a div in set of divs while disable the rest divs background it work fine as it look but i wanted to review the code for more improvement since I am ...
1
vote
2answers
52 views

Simple wrapper for an API

This is a wrapper for an API. For now all it does is get a certain document or search for relevant documents from a document store -- although I plan to build out more features later. I'm new to PHP ...
3
votes
3answers
62 views

Looping over files in C++ and changing their names to store data into a single file

I have a lot of data in separate files generated from a simulation program. All data is clear and formatted via a single space to read in 4 columns. I can open and store data from each file one at a ...
6
votes
2answers
172 views

Displaying content based on the current time

I'm new to PHP and just wrote a bunch of if statements to display content based on the current time. Is there a better way of writing the following block of code ...
1
vote
1answer
56 views

Simple Operations Calculator

I'm practicing Swing effects. Everything works but for some reason I get a ton of error messages in the command prompt when the fields are empty, despite my attempt to add some exception handling ...
3
votes
1answer
37 views

FizzBuzz - officially now in CLISP

I had to jump on the bandwagon for this one. The task does a great job of helping you learn a language you're unfamiliar with. So today I present you with my version of the infamous FizzBuzz game in ...
7
votes
5answers
290 views

Fraction class implemented in Objective-C

Inspired by this question: Fraction (rational number) structure with custom operators, I have written this class for doing some simple work with fractions. ...
11
votes
2answers
110 views

Dog owner simulator

I've just started programming and read a book called Head First Java. I thought it would be fun to make a training project that I can put all the stuff I learn into. Is the code I've written here ...
7
votes
5answers
439 views

FizzBuzz in Objective-C

In my quest for learning Objective-C, I have created the common FizzBuzz code in it. This is due to a suggestion/challenge from @nhgrif to re-implement anything he does in Swift in Objective-C. ...
5
votes
3answers
75 views

Returning the lowest and highest number based on input

This simple console program prompts the users for a number and returns the lowest and highest numbers from their inputs. It is difficult to add more user inputs, though. How can I make this easier to ...
2
votes
1answer
53 views

Rooms and trapdoors - for-loop and while-loop efficiency

I'd like to know if I can make this code more efficient in terms of line saving, or any other way: ...
3
votes
0answers
37 views

Generating prime numbers using Sieve of Eratosthenes with CUDA

I'm learning CUDA and wrote a little program which generates prime numbers using the Sieve of Eratosthenes. (I know the limitations of CUDA, specially with memory sizes and limits, but this program is ...
14
votes
3answers
902 views

FizzBuzz implementation using the ternary operator

This is my first time writing JAVA, and I'm trying to start off on the right track. Using my C++ knowledge, I was able to understand the syntax for the ternary operator, but I'm not sure how it ...
5
votes
1answer
54 views

JavaScript Weather App

I am pretty new to JavaScript, and put together a weather application. I'd like to get some feedback on improvements I could make to the code itself and also possible ways to speed up weather data ...
5
votes
3answers
78 views

Text-based Blackjack game in Python

I am new to programming in Python and wrote a simple Blackjack project. I am looking for experienced peers to provide a high level code review about the overall design patterns and proper usages. The ...
3
votes
1answer
28 views

Create Dummy Files for Testing

I have two different folders. In one folder, I have files that will be exported to a remote site via FTP. In a second folder, I have .dat files that will be processed by a ftp client program that ...
6
votes
3answers
392 views

Check efficiency of PHP code that will query over 8500 orders

I am querying all orders from a WordPress database that uses the WooCommerce Bookings plugin. I want to display upcoming bookings, and there is a potential to have every hour within 2015 to be booked; ...
-2
votes
0answers
37 views

path in a labyrinth [closed]

i have an algorithm in path in a labyrinth can you help me solve this problem ? I have a problem in my instructor during our discussion here is the algorithm - Let the current position in the ...
6
votes
1answer
104 views

Creating C++ classes and objects

I'm brand new to programming (in general) and C++ (in particular). I'm learning the basics of classes and objects. I'm trying to do the following: Create a class called ...
8
votes
1answer
69 views

Calculate torque of a bolt based on grade, size, and lubricant

To calculate torque I need to look up a value from a table which I've hardcoded based on three conditions: grade, size, and thread. Then I need to multiply it by coefficients associated with the ...
10
votes
3answers
225 views

Git pre-commit hook to check that changes to certain files only happen on the master branch

As a beginner in Ruby, I am trying to optimize this script that is a client side pre-commit hook for git. Was hoping I could get a review to ensure I am following all ruby idioms, and to ensure I ...
0
votes
0answers
31 views

Strange LINQ Join behaviour [closed]

I've got a table in database for allocation and a view for containers. I'm using EF and LINQ to get data. One allocation can be related to one or more entries in containers view. If i use T-SQL ...
0
votes
1answer
33 views

Implementing a bubble sort on a linked list [closed]

I'm using the following prototype: Data* bubble_sort(Data *list); I'm trying to implement a bubble sort given a linked list of names. Note: this returns ...
10
votes
3answers
664 views

Basic timer from one minute to 0

I'm a beginner in JavaScript and I am sure that there is a better way to do it (basic one minute timer from 01:00 to 00:00 running from pageload): JSFiddle ...
5
votes
2answers
110 views

Short XML parser

This is my first code in C# ever. It compiles and works as intended (not complete), but I want to see what I'm doing right and wrong as a first-timer. ...
5
votes
1answer
120 views

Replacing occurrences in NSString and NSMutableString

I ran it and it's working, but I just want someone to double check that I followed the directions. Any suggestions or corrections will be appreciated. Assume you have a ...
3
votes
0answers
51 views

Fixed point iteration and cobweb plot

I'm using Python to find fixed points of a given function and then draw a cobweb plot to visualize it. Thanks to this question, I have the core of the code written and can accomplish the task, but I ...
4
votes
3answers
50 views

Parsing US address with Clojure

The parser below is not designed for every single US address. I am parsing through a file where each line may or may not be an address. I am more focused on speed rather than robustness. ...
-2
votes
1answer
20 views
4
votes
2answers
49 views

User Authentication Bundle

I wrote a user authentication program(s) for an MVC application. Before you ask part of the project specs are I have to store user information in company databases on servers that aren't the web ...
2
votes
1answer
30 views

Creating a New User Account

I feel like this maybe to much for one method... This method lives inside of a service class which is called by an interface. It dumps data into three different tables within a database. ...
5
votes
1answer
55 views

First text game with Python - Higher or Lower

Recently I have been learning Python programming, for about a week. I have covered all basic stuff - loops, strings, input masks - and have challenged myself by making a little game. It isn't much, ...
12
votes
2answers
105 views

Nokogiri crawler

The following code works but is a mess. But being totally new to Ruby I have had big problems trying to refactor it into something resembling clean OOP code. Could you help with this and explain what ...
1
vote
0answers
20 views

Angular ui.route

I'm new to ui.router in Angular and have to build an app, which contains a header, sidebar (off-canvas), feedback area (save successful and warnings area) and a content area. I thought it would be ...
5
votes
4answers
101 views

Passing parameters to a query

I have a function that takes a Dictionary<String, Object> as an argument. It uses this Dictionary to create parameters ...
2
votes
2answers
70 views

Error Handling When Using Dictionary

I have set up a Dictionary that calls on a class to fill a DataGridView via SQL statements. The problem is in two (out of 5) ...
8
votes
5answers
743 views

Splitting company name into 3 strings

I wrote an algorithm which should cut a companies name into 3 strings. Input: 1 String Output: 3 String. Conditions: String 1 2 and 3 shall not be longer then 35 signs. If the Input ...
5
votes
3answers
69 views

DRYing out a basic image slider

I built a very basic image slider, but I'm still having trouble refactoring. I caught myself reusing same code for clicking the previous/next buttons, selecting a slider dot, and the automated ...
2
votes
1answer
55 views

Parsing Solr log files

I am kind of new to programming. Picked up some Perl about a year ago and now learning some Python. I am pretty confident in Perl, but Python seems un-natural to me. I wrote a little script that ...
7
votes
4answers
389 views

Basic Entity Framework Repository implementation

Here is simple repository pattern that I use to access data in my database. I would like some advice on how to improve this code. Commenting on my code quality is also welcome too! ...
4
votes
2answers
97 views

jQuery Dropdown Navigation

I've written some jQuery code that works, but I'm a novice in jQuery and I want to know how to improve my code if possible. I know I have 3 near identical blocks of code. If I create a function, the ...
8
votes
5answers
244 views

Convert total minutes into “Hours:minute:seconds” for marathon data

The point of the script below is to read in the 10th column which is the total number of minutes a runner took to finish the marathon and convert it into form of "hours:minutes:seconds". Is there a ...
6
votes
3answers
86 views

Generate random 10% of file to be used in testing with Ruby

I'm new to Ruby, but not to programming. I just need a simple script that, given a text file, will pull out around 10% of the lines at random. Below is what I came up with based upon a Python script ...
1
vote
0answers
26 views

Elementary foldMap implementation

I think I got the implementation right, but I'm a bit unsure if this implementation will do fine in terms of space (stack) because I'm doing a foldRight. Would I ...
7
votes
3answers
108 views

Dataset with optional addition to where statement

I am trying to generate a dataset from a query that has a where statement. If the user passes a value additional things need to be added to the ...
20
votes
4answers
1k views

Standardly deviated Fibonacci

I'm new to C++ (about 4 weeks with no prior programming experience in other languages) and am writing a program that's supposed to do the following: Define an array of 100 sequential numbers of type ...