659 Topics
|
|
I have this assignemt to make a double link list for a student database. I have tried to make it in single link list so that i can understand the implementation. the problem is that i can't make it a double link list :S i am so confused! plz someone … |
|
I've been working on this for a couple days and know it's something small but for the life of me I can't figure it out. (I've been using Daniweb for a long time, but just joined because everyone seems so helpful. :) ) Maybe someone can help me too. Here's … |
|
|
I'm having a little trouble finding any kind of info on how to do what im going to ask. I have a list menu... How would I, or can I with an onclick event display more boxes. Heres what i mean. When someone clicks on cancel account for instance, when … |
hello there guys, was wondering if anyone could help me,im new to C++ and at the moment im trying to make an array of people which then has either an array or list of other variables, it would be an array of people (this would have their details such as … |
|
Hello, I'm having trouble translating an algorithm. I'm not sure I coded bits of this correctly, but I'm certain that I have no idea how to compare an item with a node identifier (cannot apply > operator with T,T) but since this is an insert sorted method rather than insert … |
|
I'm stuck. I currently have the following example file structure: X, Y, Z 0.000234E+04, 0.000244E+03, 0.000234E+04 0.000244E+03, 0.000234E+04, 0.000238E+05 0.000238E+05, 0.000244E+03, 0.000234E+04 I would like for the Scientific Notation to be converted to float or integer values: X, Y, Z 2.34, 0.244, 2.34 0.244, 2.34, 23.8 23.8, 0.244, 2.34 I … |
|
I have a list [CODE]x = ['abc','1','2','3','def','6','8','5','13','mcg','568','35469','6453'][/CODE] I want the output file in a dictionary as follows: [CODE]dict = {'abc':['1','2','3'],'def':['6','8','5','13'],'mcg':['568','35469','6453']}[/CODE] How can i do this? |
|
Been working on this for 2 hours non stop. Can't seem to figure out exactly what's the problem. Perhaps I'm taking a wrong approach to this problem. Right, I need to copy a singly linked list to another new list. Can use any method EXCEPT RECURSION. Here's the code so … |
|
i want to know whats the error over here. i just want to store the three value in a node and making a linked list but after storing two nodes that is headptr and than temptr, when the third node is made it stops. I think my error is somewhere … |
|
My question is that what is the effect if I delete a pointer in a linked list by mistake??? What problems will arise and how will I come to know that is a missing pointer that is causing the trouble? |
|
Am I able to read or write to a file with this code or what is stumping me. The following is what I am suppose to do. Calculate each employee’s pay, and write it out to a sequential file. Be sure to include file I/O error handling logic. Include only … |
|
Hi I have been searching many forums including this one and not found the answer to this anywhere (sorry if it has been and I have missed it) I have a drop-down list in my website. The user can use this to browse the categories and then select a product. … |
|
How do I sort a list in Python alphabetically? The code that is used for Python 2 doesn't seem to work: [CODE=python] mylist.sort() [/CODE] Since the file I'm working with has all text in the same case, case doesn't matter here. Please help. Thanks. |
|
I am attempting to create code where the user can alter the A elements in the list continuously. If another letter in the list is replaced however, it should ask for new input from the user, and go back to the code where the user can alter A elements in … |
|
Hello Everyone, I have a list of digits. What is the most efficient way to count the number of tokens between two known digits? Here is what I came up with: [CODE] def dis(l, a1, a2): i1 = l.index(a1) i2 = l.index(a2) distance = i2 - i1 - 1 return … |
|
Hi, How do I find the frequency of each item in a list in Python? For example if there are five 'apple', two 'banana', and so on in the list, how do I write a program so that it displays the item as well as the number of times it … |
|
I have dictionary with single element lists. [CODE]dictionary={'a':['A'], 'b':['B'], 'c':['C']} [/CODE] How can i change it to [CODE]{'a':'A', 'b':'B','c':'C'}[/CODE] |
|
I dont know what goes wrong in this piece of code?!! I keep getting the following error. File "<stdin>", line 11 t1.append(list[temp]) ^ SyntaxError: invalid syntax [CODE]tl = [] for inlist in token_list: temp=[] for token in inlist: temp.append((zlib.adler32(token,65521)) tl.append(temp)[/CODE] |
|
I have a list of lists [CODE]x=[['a', 'b', 'c', 'd'], ['e', 'f'], ['g', 'h']][/CODE] I need the following output. [CODE]a-b a-c a-d b-c b-d c-d e-f g-h[/CODE] How can i do this? Can a regular expression be used here?? |
|
I am unsure how to describe this question, but I'll try my best. I am building a website in XHTML and have the text in a div over the background, which contains a box that I position the text in. Is there a way to get the box in the … |
|
I have been messing with this program for my class for days now. I can get the program to run fine....I can get it to return highest value in list but i need it to return the month it occurs in. Here is the exercise as it appears in my … |
|
I've searched all over google and this site. I've found a few hints here and there but after i make the changes either my compiler throws a fit or it doesn't produce the desired results. Here's what i want: I want to create a linked list in the main function … |
|
[code] class Node { private: int integer; Node *pointer; public: Node(int x = 0, Node *y = NULL) { integer = x; pointer = y; } int getInteger() { return integer; } Node getPointer() { return *pointer; } }; [/code] [code] private: Node *stack; Node *top; int listSize; int pushedValue; … |
|
|
Hi all, to simplify my problem, I'll use a quick example. Imagine I have a class of 'Cat' which has accessors for things like 'name', 'colour' and 'height'. I then put these cats in a list [CODE]List<Cat^>^ catList;[/CODE] I want to be able to search this list based on the … |
I have an win32 console phonebook application. Phone records are held as linked list. [CODE] struct Tel_dugum{ char name[NAMELEN]; char telno[TELNOLEN]; Tel_dugum *next; }; [/CODE] You can see the structure of the linked list above. My problem is when i search i dont want my app to search whole records … |
|
Here are my questionsand my answers. Could you guys/gals tell me if i am right or wrong? Which array-based operations are O(1)? inserting item or deleting item in unsorted array Which linked-list operations are O(1)? inserting and deleteing item in unsorted lsit Which array-based operations are O(n)? traversing through the … |
|
Hi There, - I've got a list similar to the following: <ul> <li><a href="item1.php">item1</a></li> <li><a href="item2.php">item2</a> <ul> <li><a href="item2-5.php">item2-5</a></li> </ul</li> <li><a href="item3.php">item3</a></li> </li> - Item 2 needs to have a class added to the li using jquery. I've tried the following but it isn't working: <script> jQuery(function(){ $(this).parent('li').addClass('current'); }); </script> … |
|
Hey, I am working on a program for my class where we are supposed to count the letters that occur in a given string, with decreasing frequency. For instance, it would say there are 150 A's, 234 B's, 25 C's, etc. Plus, it would then become possible to sort the … |
|
I have 2 lists X=['a'] Y=['b','c','d','e','f'] I need to make a new list Z such that, Z = ['ab','ac','ad','ae','af'] I know this uses simple concatenation. I tried several times but without success. I am a beginner so please help me with the code. Thanks in advance. |
The End.