Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

9
votes
6answers
309 views

Just checking - does my code look good? Rock+Paper+Scissors

Doing some homework and just curious if everything I've done looks good and/or if you'd suggest I modify something to keep with "javaese" Thanks! Here's the code: import java.util.Scanner; import ...
-1
votes
0answers
65 views

C# Coursework - Need Testers [closed]

I was wondering if anyone could help me speed up the testing of my Computing coursework. I would like to have several screenshots of my program running on several different operating systems. The ...
3
votes
2answers
73 views

Can someone check if my code follows the instructions of the given assignment?

I would like someone to check if I followed the instructions of the assignment. I find the instructions a little confusing. Here is the assignment: Dynamic character arrays str and add contain ...
3
votes
3answers
79 views

JavaScript Objects- Can you confirm?

Ok, I am in a JavaScript class, and I have no desire for anyone to do my schoolwork, I have already done what I think is correct, I am just hoping someone can take a look and tell me if I am close, or ...
13
votes
9answers
578 views

Most efficient way in C++ to strip strings

If I want to strip a string completely of its whitespaces, punctuation and numbers (i.e. anything that is not A-Z, a-z), what is the most efficient way of doing it in C++? I tried this: string ...
0
votes
0answers
42 views

Python 2.7 - Abstract Programming

import math class Point: def __init__(self,x,y): self.x = x self.y = y def move(self,x,y): self.x += x self.y += y def __str__(self): return "<"+ str(self.x) + "," + ...
2
votes
1answer
88 views

Design+code review of an implementation of Dijkstra's shortest path algo

this is my code that implements dijkstra's single source shortest path algorithm (as submission to a coding forum hence tag:homework) which is called multiple times to recalculate after graph changes. ...
2
votes
1answer
92 views

Can I make the class more abstract?

import math class Point: def __init__(self,x,y): self.x = x self.y = y def move(self,x,y): self.x += x self.y += y def __str__(self): return ...
1
vote
0answers
24 views

ArrayList error [closed]

I'm new to this community. I'm 7th grade student and I'm trying to learn java. Can anyone tell me what's wrong with this piece of code?? if (animalAtRungList.get(i+1) == null) { ...
3
votes
1answer
138 views

Pouring Water = My first scala code

This is my first time in CodeReview, I'd hope like something like that existed and voila, a fellow StackExchange site has already been done. I just began to study Scala (coming from Python I had ...
3
votes
3answers
143 views

Missed lab, wondering how this bit of Java code could be improved anyway?

I'm not able to get feedback on this because I forgot about the lab due date, but I'd appreciate some critique anyway. It takes in a user specified number of points then finds the two points with the ...
0
votes
4answers
162 views

A string crunching routine… input to the routine is “aabbccdef” and output “a2b2c2def” or input: “a4bd2g4” and output: “aaaabddgggg”

here is the code that I've written...but I'm sure it can be optimized...any suggestions??? char *crunch(char *s) { char *temp,buff[MAX]; int repeat,count,i,j,k; if (*s == '\0') return ...
1
vote
2answers
243 views

Programming of 3 x 7 trick

The puzzle is The deck contains 21 unique numbers The numbers should be laid up in rows of 7 (3 rows in total) ask the player to memorize a number to start the game once the game starts, ...
1
vote
1answer
74 views

Optimized Python code

Suppose we have a data set, ls=(0.3,1.4,1.6,2.3,3.2,4.7) Find the count of values within intervals of 2. I have to implement this functionality in python whose c code looks like this: ...
1
vote
1answer
90 views

Is my function failproof?

I am implementing a list structure in C. My current function I am working on is a destructive append function that takes two lists and appends the second one onto the end of the first. Right now, it ...

1 2 3 4
15 30 50 per page