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
13 views

What's the best approach to achieve two-way communication with TIdTCPServer and TIdTCPClient?

I'm a newbie in Delphi and I'm trying to create a client/server application using INDY. I want to have a server that is capable not only of receiving messages and streaming, but also sending data to ...
-5
votes
0answers
28 views

Building a Triangle out of input in a for loop in Java [on hold]

*I need help making a triangle based on the output of the base of the triangle. For example When you put enter the size of the triangle it always prints the same size triangle, Please Help me * ...
-2
votes
1answer
58 views

Display multiple subtype objects in one page

I have a base class with 3 sub ones: Item <-- Book, MusicCD, Software They have some common and different properties but in the view I want to get a mixed list of them and show in one table: ...
5
votes
1answer
42 views

Fascinating, ma'am

Finding a famous question with high score I haven't voted on yet was proving to be a bit difficult for me. So I came up with this simple SEDE query to find good candidates: ...
4
votes
2answers
51 views

Calculate all cyclic subgroups of a group under multiplication of modulo n (group theory)

The task was to calculate all cyclic subgroups of a group \$ \textbf{Z} / n \textbf{Z} \$ under multiplication of modulo \$ \text{n} \$ and returning them as a list of lists. The first level has all ...
6
votes
3answers
255 views

Simple random falling object animation in Java

I am new to programming but I tried to make my code as readable as possible! Hopefully you can see what it does before you run the program. I did not implement an ups or fps controller, the animation ...
3
votes
1answer
38 views

Clojure Fibonacci

I'm a Clojure novice working through 4Clojure problems. In one problem I am supposed to create a function that takes a number and returns that number of Fibonaccis. My first thought was to create a ...
11
votes
2answers
515 views

Counting Calories

I have this program for counting calories. There isn't a whole lot to it yet. It's a moderately sized project, so I'll do my best to make it as short as possible, posting only the main of the program ...
6
votes
3answers
108 views

Simple addition, multiplication, divison, and subtraction program

I made a post a couple of days ago asking if anyone noticed bad habits or thought of any suggestions: (First Hangman game) I've made 2 math programs just to make sure I got it all down pat. The first ...
10
votes
3answers
478 views

Coding multiples that equal 100

The objective was to see what numbers can be multiplied to equal 100. Example: 1 x 1 = 1 //no match 5 x 20 = 100 //match The objective (as I'm learning) was ...
13
votes
6answers
1k views

Guess My Number - computer guesses the user's number

I'm learning C++ right now and one of the activity/tutorial things was to re-write the "High/Low Guess My Number" game - with a twist. I had to re-write it so that the computer had to guess the ...
3
votes
1answer
52 views

Morse Code Converter

I wanted an uncomplicated project to get myself started again. Although this works I was wondering if it's the best approach, especially when it comes to validation parts? It seems to me that I'm ...
6
votes
1answer
40 views

Monitor Downloads folder and sort files as they are downloaded

I have written my first shell script that uses inotify-tools to monitor my Downloads directory. What I intend to do with the script is that, as soon as a file is ...
8
votes
2answers
75 views
+50

Making kexec reboots less painful

kexec is a way for a Linux kernel to directly boot another Linux kernel without going through the usual BIOS startup sequence, which can take several minutes on enterprise servers. The big problem ...
2
votes
1answer
54 views

Validating input against rules

I have created a method that validates inputs based on a set of rules. If an error is found, it is put into an array which can later on be used to display the errors to the user. Below is my code: ...
0
votes
0answers
7 views

“Out of Bounds” Error while calculating the mean gene [migrated]

This is my first time trying to complete work in Octave. I have attempted to complete "for loops" to get the mean of each gene and then subtract this to centre the gene results in the 25 samples of ...
5
votes
1answer
63 views

Simple 1-player Battleships game

This is my simple code for a Battleships game: ...
3
votes
1answer
41 views

Generating a game board with squares in a rectangle

I am trying to generate a game board (similar to a Monopoly board). I am new to Scala and am thinking that there may be a better way to do this. But improvements to the code are also welcome. ...
5
votes
1answer
156 views

High/Low Guessing Game

This is my first by-self written code. Looking for advice on what not to or to do so I could deal with any bad habits now. It's a guessing game and works perfectly fine. I just wanted to know if more ...
4
votes
1answer
41 views

Macroing program with Java

When you press CTRL you activate the "Register" mode. In this mode, when you click, the program stores the X and Y of the mouse. To turn it off, you press CTRL again. When you turn "Register" mode ...
6
votes
3answers
280 views

Towers of Hanoi

I am just learning how to code in Ruby now with no prior experience. This is 3 towers of Hanoi where the user selects where to choose from and where to go with each disc, and not to have a bigger disc ...
5
votes
2answers
57 views

Retrieving input from either GET/POST

Today, I created an input class with a method to check whether or not input via GET/POST exists, and another method to retrieve input from either GET/POST, without having to check both individually. ...
2
votes
1answer
21 views

Keeping track of calculation dependencies

Suppose I have a set of calculations: x = x() y = y(x()) z = z(y(), x()) I would like to create a Python class to implement these calculations, being mindful of ...
8
votes
2answers
1k views

It's almost Friday, right?

This is my final post for my CS1 saga. Mostly all I had to do was just "class-ify" my past project in this post. Here are the requirements: Make all data members private and use constructors, ...
3
votes
2answers
51 views

Magic square functions

I'm writing a program for magic square and I'm a relative beginner to C++ and programming. I was hoping someone could help me find alternate or better ways to implement my code. This is the main ...
2
votes
1answer
29 views

Class for formatting topics using BBCodes

I'm developing a program for users from a VBulletin's forum. This forum has a lot of people interested in write good articles but some of them don't know how to use the formatting bar in his favor. ...
3
votes
1answer
71 views

Look up parameters based on a numpy array of input values

Aim: Write a function that looks up empirical parameters A, B and C for a solar radiation ...
17
votes
5answers
2k views

Simple battle class

I'm new to Java, and this code could likely be squashed down a whole heap. How can I make this code simpler and easier to read? chance.base is a percentage. If it ...
3
votes
1answer
48 views

Functional organisation of JavaScript functions

In one of the web apps I contribute to, the main.js file has multiple interacting "objects". Unfortunately, I'm so bad at OOP in JavaScript, despite studying other ...
5
votes
3answers
72 views

Building an OPC client in Excel

I am pretty deep into building a very multi-faceted little app in Excel with VBA. It does a number of tasks, all centered around using OPC to get tag values from several PLC's and doing various ...
0
votes
1answer
82 views

User Registration

I'm fairly new to PHP and am very interested in learning best practices, etc. I have just created a user registration system mostly in OOP that will dump user info into a database I've created. This ...
4
votes
2answers
40 views

Perl 6 oneliner to sum up all numbers in a text file

The task is to sum up scores mentioned in a text file. Scores are floating point numbers as defined by the regexp float immediately preceded by a * character to ...
3
votes
1answer
71 views

Cleaning up website code

I am a bit of noob to jQuery so I got this jQuery code what I think can be way faster. Does someone want to help me clean it up? Explaining why you did what would be real nice but not needed. The ...
7
votes
4answers
117 views

Test a number for primality and return smallest divisor different from 1 if it’s is composite

In this exercise we were asked to test a number for primality and print the results. Additionally – in the case the number is composite – the smallest divisor different from 1 should be printed out. ...
6
votes
1answer
86 views

Performance of A* route

I'm new to the Swift language. I have a C# version of a simple A* route which is very fast. But I rewrote it with Swift, and the performance is very bad (3,4 seconds for a very simple road). Could ...
10
votes
2answers
97 views

A program that reads input until end-of-file and echoes it to the display

It echoes files or strings to output, never both at once. It does work (in both Linux and Windows), but I can NOT guarantee that it is bug free. It works much like echo, but it works with files as ...
3
votes
3answers
262 views

Creating a string from command line arguments

I am fairly new to C and am just overcoming my fear of pointers and segmentation faults. C is a strange language to me because I come from more object oriented languages like JavaScript and Java. ...
0
votes
1answer
48 views

Squashing multiplication identity in an expression

I'm learning Haskell, and one exercise was to implement squashing of identity-multiplications, e.g.: \$5 + (2*1) => 5 + 2\$ Here is my implementation: ...
4
votes
0answers
35 views

Copy directories while changing Unicode filenames to ASCII

I created a short Perl 6 script copyfnameascii.pl to copy a file hierarchy I have, applying an URL Decoding to the names of folders and removing non-ASCII ...
6
votes
2answers
186 views

Longest string in a vector — two implementations

I was given this piece of code, which calculates the length of the longest string in a vector of ...
1
vote
1answer
36 views

Determine if braces in a string are balanced in Clojure

I'm currently learning Clojure, and am working through a few exercises. The exercise that I'm working on right now is accept an arbitrary string and determine if the opening and closing parenthesis, ...
10
votes
8answers
1k views

FizzBuzz using switches

I'm learning about control structures now, and I want to see if I'm doing this as cleanly and efficiently as possible. Seems like there should be a less... verbose way of writing the ...
6
votes
4answers
63 views

Using PostgreSQL effectively with a banking app

I'm kind of newbie for these things but I did something and I want to know how I can do this effectively. ...
2
votes
1answer
60 views

Implementing a simple queue in C

I am learning C and I have some trouble with pointers. I decided to create a queue to practice a bit. The program works as intended, however I want to know some good practices and suggestions. Here ...
8
votes
5answers
490 views

HTML5 Elements - First markup

This is my first website. I would like to make sure that: I am using HTML5 sectioning elements correctly. I didn't forgot anything important for HTML5 compatibility like ...
18
votes
5answers
2k views

Hello World, Phrancis

I just yesterday started learning some Java. I wrote this piece and got some help from @Simon André Forsberg to refine it some. I added a few things since. It's super-simple but I just want to make ...
2
votes
2answers
102 views

Stock process program

I have the following program and it's working as I had hoped but now I would like to tidy up the code, putting bits into new methods, so I'm not left with loads of code in the main method. I'm new to ...
4
votes
3answers
159 views

Custom SkipList implementation in Java

I recently studied SkipList and thought i would create one on my own. This implementation uses a 2 layer Skip list where the size of the support list is roughly square root of the size of the original ...
3
votes
1answer
54 views

Managing tree nodes

I have complex logic manage EnvDTE.Project and EnvDTE.ProjectItem for a VS Addin (VS 2010). I would like elegant, easily maintainable code that follows DRY and KISS principles. Maybe using helper ...
2
votes
0answers
27 views

SharePoint and JSON output project - where can I do better?

I'm working on a project that reads a series of SharePoint lists and outputs them into JSON file(s) which will later be uploaded via FTP to use on a website. I'm aware that there's a lot I could be ...