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

4
votes
2answers
40 views

Bash script to replace substrings in a file with strings

I am an editor of the Funtoo Linux wiki and was looking to create a shell script that would help to ease the updating of pages on the wiki that use old tags by replacing certain deprecated tags with ...
4
votes
1answer
47 views

Unit testing a CharGrid

I wrote NUnit tests for class CharGrid from this homework assignment. My goal here is DRY: I want to keep the testing code as short and simple as possible. In addition, want to run every test ...
0
votes
0answers
16 views

Skip sending for all that return no results but still send to others [on hold]

PHP below checks person's preferences in the database then pulls relevant jobs that match their preferences from another database table. It then compiles it into an email... I can't get it to stop ...
5
votes
4answers
87 views

Efficient random code generator

I made a 16 character code generator. It works like a charm now, but I was wondering if there's any way to do it more efficiently. ...
3
votes
1answer
35 views

Find allele frequencies at each site for each iteration for each population from FASTA file

The script takes a FASTA format file in input and outputs the frequencies of each amino acid (A, C, ...
4
votes
2answers
42 views

Reading and merging multiple data files

I've recently started teaching myself Python but have no prior programming experience or formal training. I've successfully created a program that outputs what I wanted it to output, but I'm looking ...
7
votes
1answer
49 views

Media lending library

My assignment was to make a "Lending Library" that keeps track of items. We were advised to create two classes and a main method. What I am unsure of is if any of my code would be considered bad ...
11
votes
4answers
437 views

Compute the day of the year

I am new to programming. I saw this Java code with a lot of if-else statements that is copied below. People say that such a code ...
7
votes
3answers
77 views

Writing a program to read a maximum of 99 elements in an iteration from a list

I want to read a list of elements and pass a maximum of 99 elements to a function for some logical operations. I have tried this with an array as an example and this code was successful in achieving ...
2
votes
2answers
72 views

Selecting results as a comma-separated string

The below code is working correctly, however, I am not sure if the combination of while, foreach and ...
4
votes
2answers
48 views

Linear cryptanalysis of a substitution permutation network

I was translating a script I had that would automate linear cryptanalysis of SP networks from Python to C++. For those who aren't familiar with cryptography, linear cryptanalysis involves finding ...
-3
votes
0answers
21 views

movement of character up, down, left, right, diagnal, keep getting error message [closed]

hey guys here is my problem. I am new to programming, and I am probably making a rookie mistake. In the line that reads "public var speed:Float = 200;" I keep getting "unexpected public" Error. ...
2
votes
2answers
50 views

Linked list insertion

I have written the code below for inserting an element at the position specified by the user. I have seen the code in multiple books, and they have always used two pointers in the function that ...
3
votes
2answers
61 views

Add two 4-D arrays in Python

I have two arrays, each with shape (1, 51, 150, 207) I need to add them such that: ...
4
votes
1answer
124 views

Comparing FFTs to deduplicate IVR recordings

I've got a Python script that traverses two file trees, checking all .wav files for duplication. I'm still an undergrad, and have never worked with audio before. I'm not entirely sure this is going ...
6
votes
3answers
107 views

Extracting data from CSV file on the internet

This is my code I made that extracts data from a .csv file stored on the web. My sheet called 'New Data' stores this data for 2 days. I store 2 days worth of data so that when I run it next time, it ...
2
votes
2answers
72 views

Program that reads 4 files and outputs contents of it into another file after formatting it

The below Python 3 program scans 4 files a.txt, b.txt, c.txt, ...
2
votes
3answers
89 views

Find number of whole weeks between months in the same year

I wrote a class to return the number of whole weeks between months in the same year. I need suggestions on my code. ...
2
votes
0answers
45 views

Saving nested JSON to db, inferring order and record deletion

I've written a method for an API call that updates a store menu. It takes JSON as input, in the following format: ...
3
votes
1answer
27 views

Date validation with html5 dates

This code validates the following: enddate should not be less than or equal to startdate. ...
5
votes
1answer
80 views

Finding word acronyms for telephone numbers

Having read most of Learn You a Haskell as well as parts of Real World Haskell, I decided to embark on an easy project to see if I can apply the Haskell that I've learned. ...
8
votes
4answers
857 views

Armstrong numbers in C

I have very little experience with C, so I decided to code a simple numerical program. An Armstrong number with \$N\$ digits is a number that is equal to the sum of its digits to the \$N^{th}\$ ...
5
votes
1answer
120 views

Classic Snake game using Python, Tkinter, and threading

I have just installed Ubuntu and am re-familiarizing myself with Python. I learned the basics in late 2012-early 2013 and I'm practicing with it in order to get better at programming concepts and ...
4
votes
3answers
104 views

Generating Heighway dragons in Unity C#

I'm basically looking for a general critique. I'm just starting out and would like to know if I should have done anything differently to make it faster or to make it much more readable. I don't know ...
4
votes
1answer
48 views

Adding proper validations on all the parameters coming from the URL in Rest Service

I am working on a RestService in which my URL will take lot of parameters. Below are the parameters my URL will take: UserId: ...
5
votes
3answers
165 views

K&R 4-12 recursive converter int to string

The exercise is: Adapt the ideas of printd to write a recursive version of itoa; that is, convert an integer into a string by calling a recursive routine. I wonder if I have correctly ...
3
votes
2answers
66 views

Image processing routines for an image de-noising program

I have written a multi-language software to implement an image denoising algorithm (composed of many sub algorithms) called CANDLE. I have a C program that is part of the software and would like to ...
1
vote
1answer
24 views

Inserting filename, reading data, inserting regex, and testing if each line matches - version 2

This is a improved version of the program seen in my older question. This program first displays a menu which shows some options that the user can select. Each option will the respective functions ...
6
votes
1answer
50 views

Monte Carlo Pi (MASM)

I'm currently trying to brush up on my assembly skills and, being at the FPU section of the tutorial, I implemented a very basic version of a Monte-Carlo-Algorithm to compute pi. I deliberately use ...
2
votes
1answer
52 views

Reading from file, changing characters and writing to another file with FileInput/OutputStream

I'm a freshwoman at Systems Information, new to Java and programming and was assigned this task by my professor. My job is to read characters from a text file (file details in the bottom), recognizing ...
5
votes
2answers
53 views

Printing out Armstrong numbers

This is my first Java program to print out the Armstrong numbers. An Armstrong number is a number that is the sum of its own digits each raised to the power of the number of digits. I want to ...
13
votes
2answers
413 views

A turn based battle simulator (aka Pokemon) in Python 3.4

I am embarking on the daunting journey of learning to program on my own two feet and have created a turn based battle simulator (think Pokemon). The idea came from here. It's very crude and could ...
3
votes
1answer
46 views

Inserting filename, reading data, inserting regex, and testing if each line matches

This program first displays a menu which shows some options that the user can select. Each option will the respective functions which do some things. The user can insert a filename, read data from ...
6
votes
2answers
398 views

Beginner number guessing game

I am a beginner to Java and have just written a number guessing game which involves guessing numbers from 1 to 10. I would like to improve my code by sticking strictly to conventions, improving code ...
2
votes
2answers
109 views

Edited simple Blackjack game in Python 3.4

I'm a beginning Python programmer, and earlier I made a simple Blackjack game in Python. The original version (which can be found here) got a lot of great feedback, so I rewrote the entire program to ...
5
votes
3answers
258 views

Simple Blackjack game in Python 3.4

I made a simple Blackjack game in Python 3.4.3. I'm a beginner, so it would be awesome if you could rip up my code and tell me everything I did wrong. I know there's no insurance for when the dealer ...
7
votes
1answer
46 views

jQuery Dialog for Help popup

I used jQuery-UI and jQuery to create a dialog popup for help snippets on search form inputs. (I am still a novice when it comes to JavaScript, but I am learning fast) Here is the code for one of ...
4
votes
2answers
69 views

Calculate amount of seconds from user birth date to beginning of current year

I'm trying to make a program where user will put in his birth date in DD/MM/YYYY form and he will get back amount of seconds between his birth day and 01/01/2015. It counts with fact that different ...
6
votes
4answers
707 views

Playing Card & Deck Class in Java

I am currently learning how to write code in Java. To improve my understanding of OOP concepts, I am creating a playing card and deck class. The deck has the functionality of drawing and shuffling. I ...
5
votes
2answers
80 views

Minimum number of coins to make change

I am new to programming and I am taking CS50 2014 online through iTunes University. This is the change-making problem in Problem Set 1: Write a program that first asks the user how much change is ...
1
vote
2answers
36 views

Making numbers palindromic

This is a challenge I found here. You're suppose to list how many steps it takes to convert a number to a palindromic number, where each step consists of adding number to the reverse of itself. For ...
11
votes
4answers
783 views

Basic Tic-Tac-Toe

I am starting a software engineering degree soon and have been practicing the last couple months. I have posted some code I wrote for a basic Tic Tac Toe game below (C++). I have read the worst thing ...
7
votes
2answers
230 views

Printing the number in large size

Problem Description Receive a 5 digit number and print out in a large size. Sample input 32145 Sample output ...
24
votes
4answers
2k views

When “How To Ask” is too subtle

This is the first JavaScript code I've ever written, alert("hello, world!"); aside. This site is closing quite a lot of questions because people won't read ...
4
votes
3answers
165 views

Sorting and color-coding based on variables

I have the following three macros all running in the same module. Each one is attached to its own button (3 buttons total). All three buttons take an average of 6-12 mins to run. As I am working on ...
16
votes
2answers
242 views

“How can I make this SEDE query better?” (bad title finder)

It was suggested on Meta for July 2015 Community Challenge to make a bot that can find questions with bad titles. I wrote this query to help others find examples to help them make write their code. ...
4
votes
1answer
160 views

Find missing numbers in a sorted array

Array of size \$(n-m)\$ with numbers from \$1..n\$ with \$m\$ of them missing. Find all of the missing numbers. The array is sorted. Example: If ...
6
votes
1answer
74 views

Relative relationships

This is a question in Udacity JS course. I am starting to like Javascript. I feel its a misunderstood language :) We learned about relational operators and how they can classify the relationship ...
2
votes
1answer
79 views

Book constructor pattern

I am learning how to do object-orientated programming in JS. In particular, I am learning about the constructor pattern. In an attempt to exercise what I have been learning, I made this: ...
3
votes
2answers
74 views

Finding the min and max of an array, using a pointer

Modify the maxmin.c program so that the max min function uses a pointer instead of an integer to keep track of the current position in the array. maxmin.c ...