Hi, I have a large text file I need to sort in Java. The format is:
word [tab] frequency [new line]
The algorithm for sorting is:
Read some of the file, filtering for purlely alphabetic words.
Once you have X number of alphabetic words, call Collections.sort and write the result to a file.
Repeat until you have finished reading the f...
So I've made easy math programs with C before, but my task at hand is a bit complex for where my knowledge is at the moment.
I need to take the calculator found here (calculator: http://ohts.wustl.edu/risk/calculator.html, appendix which covers it a bit: http://ohts.wustl.edu/risk/formula.html) and program it into a ObjC program. I'm ha...
Hi, in an assignment, I have designed a input validation loop in C#, and I would like it to be able to check for the correct input format. I'm not for sure, but I think my designed loop is not checking the type of input, just what char is entered. I know I could use a try-catch block, but shouldn't you only use exceptions for exceptio...
I have made an OS simulator for a project, for the next part I have to modify the simulator to include 4 CPUs in place of only 1 CPU from the previous part, so that all the processes get done in a faster time.
So I have to add concurrency but I am not sure what the right design pattern is for this kind of thing. I need to know if the f...
Hello,
I am trying to implement a breadth first (level) tree traversal. I'm very close, but I can't figure out how I'm getting duplicates. Any help is much appreciated. Thanks in advance.
JR
(define (atom? x)
(not (pair? x)))
;;Functions to manipulate a binary tree
(define (leaf? node) (atom? node))
(define (left node) (cadr node)...
I have a question where there are four arrays, two for men and two for women.
One of the men array is the age in increasing order and the other array is the height of men in increasing order. The two arrays for women are also the same.
Now if one of the men marries a women, then form the age array, the men to the left of this man should...
I am implementing my own linked list in Java. The node class merely has a string field called "name" and a node called "link". Right now I have a test driver class that only inserts several names sequentially. Now, I am trying to write a sorting method to order the nodes alphabetically, but am having a bit of trouble with it. I found...
I have an assignment to use JavaBeans to create an online Banking application. I am trying to make the signup form but I am having some issues. When the form submits I am not able to get the values.
The Form:
<jsp:include page="header.html"></jsp:include>
<h3>Create An Account</h3>
<form action="process_new_user_account.jsp" metho...
I am working on a program in C as a part of Homework in which I have to get the product of two long numbers which are taken as character string. eg: 123456789021 and 132456789098. Since it is taken as a string, I converted them to long long int for the multiplication. But the resulting product will be very large(larger than long long int...
I need to overload the stream extraction operator. I need to do this by allowing a user to input a string of characters at a prompt, say "iamastring", and then the operator would extract each character from the string and test whether or not it is whitespace and if it is not whitespace store it in a character array which is then passed ...
I'm trying to convert Morse code into text.
I have two text files to use with this problem.
morseCode.txt: I have a file that i read off that contains the letters and corresponding Morse code equivalent.
morse.dat: Its the file that contains the encrypted message in Morse code
I was able to read the first file properly and then store...
Hello,
I seem to be having trouble with pipe and select.
Context: Have to program something which will be shell executed as such:
logn [--tick n] cmd [args] [, cmd [args]]...
Basically, it's a program that multiple programs simultanously.
Constraints: Each output line has to start with it's command number in front in format printf ...
HI ALL:
I am trying to make an object oriented data base
and I have the types :
client is the base object(class)
player is under it
and captain is under player
and i need a a table to store data
how can i make a table of client so i can store all these types in it
and who can i insert into it and select
please give example if you can
tha...
I'm trying to create my first hierarchy with the following classes (Account, CheckingAccount, and SavingsAccount) and can't figure out how to link the classes together.
Also, should the balance value be public in the header?
Currently it is not, and it shows "error in this context" every time it's mentioned in this main code.
[stackover...
Okay this is my code for deleting a node from a linked list.
vec_store holds seq and size. Variable seq holds the vectors and a pointer.
For some reason, the else if(i<s->size-1) doesn't work which is the last condition.
Any1 can solve the problem? By the way this is C code.
void delete_vec(vec_store s, int i)
{
if (i<0 || s->si...
I need to find the find the current date in binary for Intel x86 Assembly on Windows. I'm allowed to use Windows procedures.
...
HI :) I have a program about linked lists and we're supposed to be able to delete two numbers if they are the same.. and i know how to do it from the start but how do you delete two numbers if they are in the middle of the linked list?? All 3 run together
Heres my numbers program
import java.util.Scanner;
public class Numbers {
/...
I am having problems for converting following algo in ocaml To implement this algorithm i used Set.Make(String) functor actualy in and out are 2 functions Can any one give me percise code help in ocaml for following
This is actually Algo for Live Variables[PDF] ..Help would be appreciated greatly
for all n, in[n] = out[n] = Ø
w = { s...
I'm trying to redefine two member functions from their parent's definition.I don't know if I have it right or not, but something in my code has errors attached and I can't find out what.
some of the header:
class Account
{
public:
Account(double);
void creditBalance(double);
void debitBalance(double);
double getBalance() c...
Ive managed to parse the entire contents of a given input text file and store each word in a hash set. But now i need to find the frequenct of each of these words in this input file, any suggestions as to how I can go about? :)
...