659 Topics

Member Avatar for
Member Avatar for korobaton

SO YEH MY problem is its not reading the whole file and inputing it to the stucture.. i believe that the problem lies in the adt.( the last source code on the bottom) in the private adt search function, insert function, and traversal..... ive been wreking my brains out trying …

0
154
Member Avatar for ezekit

SO im trying to get this source code transformed to a double link list it has two nodes sentinel and header....the source code was used to be a singly linked list..... nyhow i cant seeem to get this whole thing right..... it works fine when it was on its orginal …

0
94
Member Avatar for urbangeek

hi everyone. i want to list and show the table names in a database in a php page. how to do that? in phpmyadmin 'show tables' works in query window. bt showing it through a php script i think i would have to SELECT?

Member Avatar for veedeoo
0
143
Member Avatar for k_arjun

Hi, I am a newbie to coding. I am trying to implement a graph in the following format. User input: v1 v2 edge_cost 1 3 10 1 2 20 2 3 40 3 1 30 I am storing the graph as an adjacency list, so that the output should be …

Member Avatar for k_arjun
0
872
Member Avatar for effBlam

Im trying to find the first element in each nested list: x = [['hey','wassup'],['are','you','ok'],['i','am','fine'] So that I get print a string: "hw ayo iaf" so far I have: def first_letters(): x = [['hey','wassup'],['are','you','ok'],['i','am','fine'] Thanks!

Member Avatar for Gribouillis
0
90
Member Avatar for effBlam

Im trying to get the last element in each nested list such as double list = [['Hello','how','are','you'],['I','am','fine'],['How','about','yourself']] so that it will print out ['you','fine','yourself] I am also trying to do this all under a function such as def last_words(): #where my double_list is already in this function Thank you!

Member Avatar for Gribouillis
0
87
Member Avatar for badllama

Last year I built a generic list, everything was good. This year I'm adding classes to the list. These classes have lists. Everything is okay until the program ends, then it crashes. If I comment out my list destructor the crash doesn't happen. So I'm assuming the destructors aren't unraveling …

Member Avatar for jmichae3
0
239
Member Avatar for corby

i have this code for adding a node after the previous node, but valgrind is saying that there is a memory leak of 16 bytes, can someone please help me identify where the leak is? i think i didnt assign a null pointer somewhere but im not sure exactly where …

0
115
Member Avatar for giancan

Hi guys, I have a difficult problem to solve. I have a list with 4 columns of values as follow 750.633 379.039 652.524 1112.63 930.491 452.16 842.753 1191.78 882.063 446.411 787.56 1183.43 434.362 410.174 325.863 1145.34 954.426 445.297 865.449 1183.74 1233.67 194.909 1155.27 908.305 1505.97 917.95 1441.07 1698.01 852.882 133.219 …

Member Avatar for Gribouillis
0
285
Member Avatar for paraclete

I'm having difficulties splitting up a string (that I read from a textfile) into three parts in a list (that I will then use in a function). The issue I'm having is that the 3rd element of the string is not always one word (sometimes its multiple words, but I …

Member Avatar for Gribouillis
0
142
Member Avatar for ggeoff

Hi Most people want to disable bullets! I can't see mine. If I disable my CSS external stylesheet I see the bullets, and as a consequence disable my horizontal list used to create navigation for my website! I thought that assigning a class to the real list that is part …

Member Avatar for ggeoff
0
2K
Member Avatar for jonjacob_33_0

Write and test a function to meet this specification: squareEach(nums) nums is a LIST of numbers. Modifies the list by squaring each entry. [CODE]def squareEach(nums): for number in nums: number = number ** 2 return number def main(): nums = [3,4] print(squareEach(nums)) main()[/CODE] The output in this case is 9... …

Member Avatar for TrustyTony
0
2K
Member Avatar for rizla777

okay so i've been at this for 2 days. i've tried recoding the entire site but nothing seems to work. It's only 1 navigation bar that is giving me a problem. ul#sub-nav. I can get it to align horizontally in firefox except sometimes it works in IE and sometimes. you'll …

Member Avatar for Dandello
0
287
Member Avatar for jonjacob_33_0

[CODE]def toNumbers(strList): for char in strList: return strList[0:len(char)] def main(): sttr = ['120','125'] print(toNumbers(sttr)) main() [/CODE] The output is: ['120','125'] I want the output to read: 120 125 <-- without the brackets and quotes I'm supposed to take a list of numbers (as strings) and simply return the same numbers …

Member Avatar for JoshuaBurleson
0
818
Member Avatar for Y DIY

I would like to know how to use a list contain with file names returned from a function to search a directory based on that list then copy the matching files to another directory. Following is what I would like to accomplish in logical order. 1. Existing Function getPromptList() return …

Member Avatar for Y DIY
0
3K
Member Avatar for gumbum8

Hello daniweb! Yes, I'm another amateur coder who needs a little assistance getting some code to work, I hope it's alright :?: A little background is necessary I suppose, so the deal is I'm a self taught noob who's working on a pet project of crafting a little program that …

Member Avatar for gumbum8
0
181
Member Avatar for TrustyTony

Here unsystematic play with linked list structure Object Oriented style. If you have performance critical code, please do not use this but use the superb faster than list [URL="http://pypi.python.org/pypi/blist/"]blist module[/URL] (including sorted versions of main data structures). As OO newbie (though with some 30 years of other programming), I wanted …

0
208
Member Avatar for Khodz

Hello All I'm not quite sure you can do this but it seems to me like something python is probably able to do. Basically, I need to assert that somewhere in my list of lists i have a '2', and a '1'. Now my lists in the biglist are all …

Member Avatar for Khodz
0
3K
Member Avatar for hladdha.bhl2009

I am Making A program for malking a phonebook. for that i am storing a list in dictionary. Like this: [code] phbuk={} def add(): a=raw_input('Name :') b=raw_input('Email :') c=raw_input('Mobile :') name=[a,b,c] d=len(phbuk) phbuk[d+1]=name [/code] Now if i want to delete a particular record just by giving name then how can …

Member Avatar for JoshuaBurleson
0
254
Member Avatar for fonzi

So i have been assigned a program where i create a interface a bag and the main or tester i have been trying to get this done for a while now and so far two other people have checked my work and have no idea why my list prints the …

Member Avatar for fonzi
0
169
Member Avatar for ghostile

Hey just a quick question with list <Object*> object; when i put an object in the container i use object.push_front(new thing(param1,param2,param3,param4,param5)); because i have used new how do i go about deleting this certain object in the list i figured somthing like this [CODE] while(p != object.end()) { if((*p)->exists(param)) { …

Member Avatar for dospy
0
226
Member Avatar for asa88

i am trying to do this consider a=[[(34,5),(34,6)],[(35,5),(35,6)]] b=[(36,5),(36,6)] i want to put elements of b in a so i do a.append(b) now if i do b.pop() why does it effect a? a ends up being `a=[[(34,5),(34,6)],[(35,5),(35,6)],[(36,5)]]` WHY?? is there a way around it?? i don't think i had this …

Member Avatar for Enalicho
0
12K
Member Avatar for georgeoshardo

I don't know if I can't find my problem, or I'm just getting my keywords wrong when searching for a solution, but I can't solve it. I'm getting problems with adding values to lists, here is my code: [CODE=Python]x=[] a=raw_input ("Hello, add your first database entery") b=raw_input ("Hello, add your …

Member Avatar for TrustyTony
0
161
Member Avatar for anonadre

I'm having trouble with the 3rd if statement of my code if(select == 3). Here, if the user selects '3', then they should be able to search for students (given that students have already been inputted), via their ID. The ID that is searched and the subsequent Name relating to …

Member Avatar for anonadre
0
124
Member Avatar for dappe

Hey, I just started programming but im stuck. so lets say I have a wordlist with words containing 2-12 letters and I want to remove all words containing less than 3 letters or more than 7 letters. How would i do that? Another problem I have is, I want to …

Member Avatar for TrustyTony
0
8K
Member Avatar for dolfan55aj

I'm a new member and this is my first post, so be gentle ;) It's been a while since I've gotten a chance to practice with recursion so to say I'm a bit rusty is an understatement. Not to mention I've never implemented it with a linked list. My current …

Member Avatar for mike_2000_17
0
521
Member Avatar for Zexsz

I have a webpage that builds an html table if there is any data in a mySQL table. That works fine, the html table is populated with data from the mySQL table. My problem is when there is data it populates the html table but lists the first mySQL table …

Member Avatar for Zexsz
0
240
Member Avatar for kaskoraja

Hello friends, I have a list similar to ['9.48E+02', '9.42E+02', '9.79E+02', '9.58E+02', '9.28E+02', '9.47E+02'].List has around 9000 elements. I need to convert this list in to file with a format similar to 9.48E+02 9.42E+02 9.79E+02 9.58E+02 9.28E+02 9.47E+02 so that i can access it in another mechanical software i.e without …

Member Avatar for kaskoraja
0
158
Member Avatar for mangal123

i want to do accessing files and folders in listbox and when i click in any folder then thier subfolder displayed in other listbox ......... reply sooooon ....................... magdy .......................

Member Avatar for yash_shukla
0
85
Member Avatar for JoshuaBurleson

I have no idea what went wrong with my most recent code, but I suspect it has something to do with the following so I'll start there. Did I do something wrong in this? [CODE]cards=['1','1','1','1','2','2','2','2','3','3','3','3','4','4','4','4','5','5','5','5','6','6','6','6','7','7','7','7','8','8','8','8','9','9','9','9','A','A','A','A','K','K','K','K','J','J','J','J','Q','Q','Q','Q'] import random random.shuffle(cards) h1=[] for card in cards[1:7]: h1.append(card) cards.remove(card)[/CODE]

Member Avatar for TrustyTony
0
225

The End.