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

0
votes
0answers
11 views

Transferring a CSV file to a database while merging some columns

Say I am given a csv file that I want to import into an sqlite3 database. The first two columns in the csv file contain unique, important information while the rest of the columns are really a list ...
2
votes
1answer
19 views

Kernighan & Ritchie - detabbing program

Task (1.20) Write a program detab that replaces tabs in the input with the proper number of blanks to space to the next tab stop. Also, the condition is is not to use pointers and structs ...
-1
votes
0answers
12 views

(FORTRAN)*** glibc detected *** [on hold]

I have some glibc error like ;*** glibc detected *** double free or corruption (out): 0x00000000005099d0 *** In my code, when I compiled it with n = 10, it works ...
1
vote
0answers
20 views

Adding elements in two lists as numbers

The problem is adding two lists as numbers L1 = [1,9,9] and L2 = [0,9,9]: ...
4
votes
2answers
78 views

Multiple similar methods to compute the average student grade

I have bunch of similar methods in different classes to average student grades. In the Student class: ...
1
vote
2answers
24 views

Counting length-2 substrings that are common to two strings at the same offset — Python

I solved the CodingBat task: Given 2 strings, a and b, return the number of the positions where they contain the same length 2 substring. So "xxcaazz" and "xxbaaz" yields 3, since the "xx", ...
0
votes
1answer
21 views

Random fadeIn has unwanted pauses [on hold]

I have a title with each character and word split into a <span>, using lettering.js. I am relatively new to jQuery and ...
5
votes
2answers
119 views

Counting length-2 substrings that are common to two strings at the same offset

I am working through the CodingBat exercises for Java. I just completed this one, an exercise that requests the comparison of substrings of two strings: Given 2 strings, a and b, return the number ...
1
vote
0answers
18 views

Server side form validation library

Have I followed best practices for PHP development, or can this class be improved? GitHub ...
15
votes
7answers
2k views

Checking if a number is divisible by 9

I tried to develop a new way to check if a number is divisible by 9. I have written my code and it is working fine. I'm not allowed to use *,...
4
votes
2answers
60 views

Text files: Copy, Rename, Append/Merge together

I wrote 3 subroutines related to batch data processing, they will be used together. A bit of background, I wrote this for my admin colleagues who do not write code. An application dumps daily ...
1
vote
1answer
17 views

Implementing OR with the lc-3

Today, something possessed me and I started learning assembly. My poison of choice is the lc-3, this is my very first program. It is actually only the first part of a two part problem, but this ...
-3
votes
0answers
22 views

Parsing apache log files [on hold]

I am quite new with Python. My goal is to extract all information from the apache log file. The file has the format like: ...
0
votes
0answers
29 views

Beginners C++ file stream homework [on hold]

The assignment is to make a program that allows would prompt the user to locate a .txt file, convert it to an encrypted mess, create an output file of said mess named "encrypt.txt", then have the ...
3
votes
0answers
45 views

Markov chain-based random text generator in Perl

This is the first thing I've written in Perl besides one-liners. It just generates random text based on a text file. I was inspired by this. Any tips on making this better are welcome. I'd especially ...
2
votes
3answers
59 views

Torrent File Remover

This script to locate torrent files in a given directory, and if they have been seeding for 2 weeks, delete the files. I realize the comments are overboard. The reason for that is it's being shared ...
9
votes
1answer
421 views

Beginner text editor

I wrote a simple text editor and I would like to get some critical comments. Below I present only a main part of code. I removed icons, irrelevant functions, etc. I am aware,that JTextArea is not best ...
4
votes
3answers
178 views

Triangle categorizer — completely refactored and re-written

While reviewing a C question I started writing my own implementation and in no time I had a completely refactored completely different implementation. As the asker is learning I did not want to post ...
3
votes
2answers
117 views

Ulam numbers (calculates your life expectancy if you want to)

I'm new to Java and wanted to present to you my latest project: Ulam Numbers ...
3
votes
1answer
40 views

Webserver for handling GET and HEAD requests

I have a programming assignment where I need to build a webserver which can handle GET and HEAD requests. My webserver is working as it should but since I'm still a newbie at Java I'm not sure about ...
-2
votes
0answers
36 views

Python SOS! program looping only once [closed]

So I'm writing this program that receives the input from mysql it compiles correctly but just once. Python can't do {} while could anybody help because even two while true loops did not do the trick ...
6
votes
5answers
458 views

Simple technology quiz

This is my first program that uses more than just boring ol' if/else statements - I made a whole 246 line game that's still a ...
4
votes
1answer
71 views

Cleaning a WPA wordlist

I have a short bash script that processes gigs and gigs of data. I am looking for any improvements to make it faster. This is my very first bash script so please be gentle. I am really only ...
0
votes
1answer
31 views

Simple Batch Templating Utility in Python

I would like to present for review my (much) revised batch templating utility which had it's humble beginnings here in a previous post. As I mentioned there, this program is my entry into python ...
1
vote
0answers
49 views

Android calculator app

I am new to android developement. Created calculator application. Want to improve my code quality. Will be helpfull for any advice to make the code better and more professional (overall structure, ...
4
votes
4answers
40 views

Math expression on-the-fly interpreter

In the last few day, I wanted to sharpen my C skills a bit, so I wrote a math expression interpreter that can handle + - * / ( ) and only integers. I just want to know how good this code is, if ...
4
votes
3answers
297 views

ATM program in C

Had to create this for my class, figured I'd get some advice/insight on how I can advance my program while making it more efficient. Also want to help anyone who may come across the same assignment ...
4
votes
1answer
79 views

White Elephant Gift Exchange game using object-oriented design

I'm learning about OOP and I'm attempting to solve the White Elephant Gift Exchange game. The way I've done it is that I have created a bunch of set variables which store the set of gifts opened, set ...
5
votes
1answer
28 views

Determining prices for wholesalers or retailers

It is my first year in college and I have designed a code using pretty much my own basic knowledge. I have designed a program to work out the price of items for wholesalers or retailers. Special ...
4
votes
2answers
63 views

Program for a packing company

It's my first year in college studying Java so please excuse my ignorance in programming. This is my 5th Task in my Sequential Programming assignment, where we had to design a program for a packing ...
3
votes
1answer
70 views

Tic Tac Toe Android game

Can you help me with suggestions regarding my code for Tic Tac Toe Game? This is my code, I've tested it and it works, but I feel like it can still be made shorter/clearer. I am not a good coder and ...
2
votes
2answers
58 views

Interfacing with instruments using pyvisa

I'm new to Python, and after running through some introductory exercises I wrote a class definition for working with some hardware, specifically a Signal Recovery model 7230 lockin amplifier. In the ...
7
votes
3answers
444 views

Checking if a number is prime

Is there a better way to check if a number is a prime? ...
5
votes
1answer
75 views

Basic cryptography algorithm

I wrote 2 classes in order to implement some basic cryptography algorithm. I tried to use some object-oriented concepts of C++. I'm a beginner, so any comment or suggestion is welcome. First class: ...
-2
votes
1answer
47 views

Simplify python conditional

This is a follow up to Log probe requests of WiFi devices focussing on a specific element of the code. Can I simplify this code and make it more readable? ...
-1
votes
1answer
40 views

Formatting a long filesystem path in Python

This is a follow up to Log probe requests of WiFi devices focussing on a specific element of the code. I have this line of code: ...
1
vote
1answer
31 views

Argparse implementation

This is a follow up to Log probe requests of WiFi devices focussing on a specific element of the code. How can I indent this code to make it look great and be well formatted? ...
0
votes
1answer
28 views

Read Space Delimited Text File to Standardized Data Type

From the README.md Introduction: The purpose of data-in is to read all the lines from a text file and return the file's contents as a Clojure value in a ...
16
votes
5answers
862 views

Implement a Shape abstract class

To learn more about OOP, @nhgrif challenged me to implement a Shape abstract class (more details in code remarks below. Here is how I did it. Any and all advice appreciated! Shape.java ...
7
votes
1answer
103 views

Log probe requests of WiFi devices

I developed a program that collect probe requests from WiFi devices. It already works but I think that a programmer can improve it. ...
3
votes
1answer
324 views

Computing average market spread in C#

My task is to compute average half spread in percentages on a stream of market. This is part of the coding assignment that I have received. ...
2
votes
1answer
56 views

Printing calculator - Stephen Kochan exercise

I'm a newbie at programming, just one month into C. Working with Stephen Kochan's programming in C. There is a question in chapter 6 to write a printing calculator where 's' tells the program to set ...
6
votes
4answers
344 views

Constructing a JavaScript slide

I am a newbie to native JavaScript and am pretty much coming to grips with the operators, etc. At the moment I am currently constructing a slide. ...
2
votes
1answer
38 views

Rust version of my C++ command-line tool

First program I've written in Rust (besides the demos in the tutorial site). I decided to start by converting my C++ command line tool to Rust. This is not necessarily a 1 to 1 conversion, but I've ...
2
votes
1answer
54 views

PHP include page index.php?page=GET safety preg_replace

I found a lot of working codes to include page in page on Internet but I could not find a safe code. So I decided to create one myself. The pages will be only stored in folder /pages/ and whitelist ...
6
votes
2answers
159 views

Basic C++ tone generator

I'm trying to learn C++ (with experience in C and Java, inter alia). I wrote a program to output a waveform of multiple (superimposed) tones, each varying in pitch. To execute: Compilation: ...
4
votes
1answer
162 views

Check whether a number is positive, negative, or zero

I have a program which generates a number between 0 and 4 for both the player and the computer. If the number is positive the player wins, and if it is negative the computer wins. ...
1
vote
1answer
42 views

PHP PDO Database Wrapper

I'm trying to wrap my head around OOP, and am fairly new to PHP in general, so please forgive me if the following makes you cringe. I've decided to try and create a basic database wrapper using PDO. ...
3
votes
1answer
48 views

Form builder class

I am trying to learn OOP in PHP. My PHP knowledge is pretty good, but haven't tried OOP before. I'm currently building a formbuilder class. Can you take a look and tell me if this is the right way? ...
4
votes
2answers
164 views

Return a random line from a file when user enters a specific text

I am a beginner trying to fetch a random line from a file and wondering if this code can be improved. Should I use try and catch in this case? Should I take a parameter for the function "quote"? How ...