- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 3
- Posts with Downvotes
- 2
- Downvoting Members
- 3
Re:
I have to complete a lab which basically takes a text file and finds path between 2 actors that you input by going through the movies in the text file. (For the labs purposes we are only doing 3 degrees of separation) For example if the text file is: [QUOTE]Apollo13 … |
|
Find an simple grammar for L(aaa*b+b) I have not idea about this. any help? |
|
Hello, I need to create 6X6 2D array in MIPS, but I don't have any idea and I cannot find any information about it. any help? |
|
Program received signal SIGSEGV, Segmentation fault. 0x001c74a5 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/libstdc++.so.6 (gdb) where #0 0x001c74a5 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/libstdc++.so.6 #1 0x0804b444 in Time::getTOD (this=0x0) at Time.cpp:63 #2 0x0804a4f0 in main (argc=2, argv=0xbffff7a4) at printsongs.cpp:102 (gdb) frame 1 #1 0x0804b444 in … |
|
I have a class that contains two arraylists- student names and Ids I want to put them into LinkedHashSet( so, I can sort, delete, add and edit e student profile); I created a class called Student that contains setName getName setId getId and toString methods. now, I try to do … |
|
Hello everyone. I want to change the background color of the button when I click it. the problem now is the only the last button works, but not the way I want to.(It changes color I click other buttons.) here is my button code. [CODE] for (int i=0; i<(5; i++) … |
|
Re:
Alright, I admit that I'm struggling a bit with Java but for the project that I'm trying to do I need to create a bunch of bank accounts and then calculate the interest and return the names of the account holders and their balance and interest, as well as the … |
|
Re:
Hi, I have to make a linked-node based priority queue for an assignment. For some reason, however, the enqueue and dequeue just won't work. I have honestly no idea why, because I think the algorithm should work. Can anyone point out the problem? It would be greatly appreciated. [CODE] public … |
|
how can i passing the list from addCard to printHand? [CODE] public void addCard(Card c){ ArrayList<String> list= new ArrayList<String>(); list.add(c.toString()); } public void printHand(){ for(String i:list){ System.out.print(i+" "); } }[/CODE] Thanks |
|
Hello I want to write a loop that quit the loop if the user hits Enter or there is negative number. this is what i have so far. it only quits the loop if user enter characters. [CODE] import java.util.Scanner; import java.util.ArrayList; public class loop { public static void main(String[] … |
|
Hi,everyone Im new to JAVA and not sure how does recursion work in JAVA I have to use JAVA Turtle to draw snowflake here is the pseudocode. procedure snowflakePart( S, N ) : if N is greater than 0: move turtle forward S units if N is greater than 1: … |
|
How to modify the hash table implementation to use chaining instead of open addressing? [CODE]class HashTable( object ): """A data structure that contains a collection of values where each value is located by a hashable key. No two values may have the same key, but more than one key may … |
|
Re:
I need to write a program that implements this algorithm. create a hash table. for each word in words.txt sort the letters in word and use that as a key enter the(key, word) pair into the hash table prompt the user for a string while the string s not empty … |
|
Hello,everyone.Im doing the same project as Slash12 source:[url]http://www.daniweb.com/forums/thread331507.html[/url] I thought the data structure I constructed is correct but I don't know how to test it until my search function works. The errors i have now are: TypeError:__init__() takes exactly 3 arguements(1 given) for i in range(len(board)) has no len() TypeError:object … |
|
Re:
I have a project to do and I'm pretty lost on it. The purpose of the project is to make a game like quoridor, but for this part you only need to have your program ready walls from a file (Walls are given in the format of: (startx, starty)(endx, endy) … |
|
its a 9x9 squares. im wondering how to find neighbors. for example the neighbors of[i,j] is [i-1,j][i,j+1][i+1,j][i,j-1] how can i code them? [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, … |
|
try to get the current cursor position without removing the node [CODE]class List(object): ___slot___=('cursor', 'size') def __init__(self): self.cursor=EmptyCircleNode() self.size=0 def __str__(self): result = "<" node = self.cursor count = self.size while count != 0: result = result + str(node.data) if count != 1: result = result + ", " node … |
|
Re:
Hey guys, just like the other graph/node problem on here, I too have a problem with graphs. The problem is as listed here: [URL="http://www.cs.rit.edu/~vcss241/Homeworks/08/AlternateDFS-stu.pdf"]http://www.cs.rit.edu/~vcss241/Homeworks/08/AlternateDFS-stu.pdf[/URL] and the pseudocode for what I'm trying to do is this: [QUOTE]DFSnodeWithDeletion( graph, node ): count the node itself for every neighbor of node: remove the … |
|
To maximize the value of the knapsack The output should like this >>>Bags=[mkBag('cooper',30,120),mkBag('silver',20,100),mkBag('gold',10,60)] >>>knapsack(Bags,50) [('gold',1.0),('silver',1.0),mkBag('copper',0.666666666)] [CODE] class Bag(): __slots__ = ('name', 'weight','value', 'ratio') def mkBag(name,weight,value): bag=Bag() bag.name = name bag.weight = weight bag.value = value bag.ratio=value//weight return bag def printbag(bags): print("Name:", bag.name, "Weight:",bag,weight,"Value:", bag.value) def knapsack(bags,maxweight): bags=sorted(bags, key=lambda mkBag: mkBag.ratio) … |
|
def sort(l, x) if len(l) <= 1: ### if my list is smaller than 1, simply return l return l else: ### Here is the problem i don't know how to solve - how to find smallest element within a list using recursion? I've tried to call another function in … |