So I'm learning Scheme in a class and my professor doesn't answer questions after 8:00, so I'm hoping you all can help me out. Basically I have a family tree type thing and I'm trying to get all the ancestors of one person, and display them as one string, sorted alphabetically.
The problem is, because of the recursion, each generatio...
So this is a homework assignment, and it's kind of a doozy so i'll try to TL;DR it. Basically Im making a Shared memory database with 5 files (load,query,clean,print,change)
Load loads the database from a file. (students have a first name/last name/address/telephone number)
Query lets someone "search" for a specific student
print....well...
Question:
Write a program that asks the user to enter a number of seconds, and works as follows:
There are 60 seconds in a minute. If the number of seconds entered by the user is greater than or equal to 60, the program should display the number of minutes in that many seconds.
There are 3600 seconds in an hour. If the number of secon...
include<iostream>
class Hanoi {
private:
int n;// no. of disks
public:
Hanoi(int);
solve(char, char, char int);
};
void Hanoi :: Hanoi(int a) {
cout << "Enter number of disks : " << endl;
cin >> a;
n = a;
}
void Hanoi :: tower(char from, char use, char to) {
if (n > 0) {
tower(n-1, from, use, to);
cout << "Move disk " << ...
I'm part of a team designing the server for a client/server model naval warfare video game (University course). We have a fairly concrete (well, I think) system design, but there is one aspect that bothers me.
The basic layout of the system is:
Server [thread] (handles incoming connections)
|
Game [thread] (deals with game events in it...
actually, i am doing a project that coverting 2d videos to a 3d video from 2 webcams. it is hard for me to do this. can anybody tell me how to do in detail??what should i do and how..iam very annoyed about this project!!thanks for helping
...
Hi,
given is any sequence of integers like 23 7 13 4 8 6. I want to detect local minima and maxima with the following rules:
the first number in the sequence is a local minimum when the following number is greater
the last number in the sequence is a local minimum when the previous number is greater
a number in the sequence is a local...
I have two big numbers (type int) which are stored in array with a size at least 1000,
and I want to compare these two numbers to get information which one is bigger than the other. How can I do this?
Actually , I will do two things
subtract these two
multiply these two (I am studying in this topic, indeed, and I didn't find an effi...
I'm debugging erroneous search returns from my data structures class project. This current project required us to build an ordered unrolled linked list, and run a search on the contents, then return a sublist of items from an inclusive start point to an exclusive end point. In order to do this, I have to search the internal array to fi...
In preperation for my upcoming Concurrent Systems Exam, I am trying to complete some questions from the text book "The Art of Multiprocessor Programming". One question is bugging me:
Exercise 129: Does it make sense to use the same shared BackOff object for both pushes and pop in our LockFreeStack object? How else could we structure the...
I have an error while trying to run aclocal although i have the Autoconf v 2.67 installed
configure.ac:6: error: Autoconf version 2.62 or higher is required
/usr/share/aclocal-1.11/init.m4:26: AM_INIT_AUTOMAKE is expanded from...
configure.ac:6: the top level
autom4te: /usr/bin/m4 failed with exit status: 63
aclocal: autom4te...
3rd requirement
3- At the end of the execution, the script must produce a file named report.txt that contains a list of all files in the user's home directory including full path, owner, group and permissions for each file.
...
I have this code from my professor and it's about finding abundant and defective numbers. A number x is effective if the sum of all integer divisors, except for x itself, is less than x. If it's greater than x, then it's abundant.
There are no compile errors and it seems all fine, but it just doesn't print anything, it doesn't get any r...
So Im making a Load.c file, that basically will load a bunch of "students" into shared memory.
The students are stored in a struct that looks like this:
struct StudentInfo{
char fName[20];
char lName[20];
char telNumber[15];
char whoModified[10];
};
Anyways I need to load this in shared memory, we were given some sample code. and we a...
I am trying to add an image to a JPanel class, which is a chess board. Then I want to be able to "cut" it to define each space as a part of an array list and then be able to place pieces on top of each according to the part of the board it is supposed to start in.
Here is part of what I have:
import javax.swing.*;
import java.awt.*;
im...
Write a program that merges two ordered list objects of integers into a single ordered-list
object of integers. Method merge of class ListMerge should receive references to each of the list objects to be merged and return a reference to the merged list object
...
I'm writing a console based program for my coursework, and am wondering how best to structure it so that it is both stable and efficient. I currently have
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int choice;
do
{
cout << "\E[H\E[2J" // Clear the console
<< "Main men...
I'm struggling to simply understand how to implement recursion in MIPS. I have an assignment to write a Fibonacci program and a Towers of Hanoi Program. I understand recursion and how each of them can be solved, but I don't know how to implement them in MIPS. I am completely lost and could use any help I can get.
...
int mystery( const char *s1, const char *s2 ) {
for( ; *s1 != '\0' && *s2 != '\0'; s1++, s2++ ) {
if( *s1 != *s2 ) {
return 0;
} //end if
} //end for
return 1;
}
I know it has typing errors but this is exactly how it was.
...
I am trying to check if a gas pump is free for use && full of gas, and then I am trying to make that pump the pump to be used by the cars in a queue.
Thread carThreads[]=new Thread[TOTAL_CARS];
try {
Pump pump1 = new Pump();
pump1.setName("pump1");
pump1.setFuelAmount(2000);
pump1.setState(0);
Pump pump2 = new Pum...