637 Topics

Member Avatar for
Member Avatar for FraidaL

I wrote this code for an assignment that asked to create a program that calculates and displays the average of any amount of real numbers. The program is supposed to ask the user how many numbers they want to enter and then use a loop to ask the user to …

Member Avatar for FraidaL
0
3K
Member Avatar for jayadan

i dont know what mistake i have done here i could run the prog but i am not getting the o/p so guys pls help me and this is the coding if any corrections is need pls let me know and if possible change and send me the correct prog …

Member Avatar for stultuske
0
276
Member Avatar for ilovejava

This is my code for adding and removing from a binary tree but apparently its not complete can anyone tell me what to do to make it complete tree? [CODE] public void add(IBinaryTreeNode<E> e) { if (getRoot() == null) { setRoot(e); } else { //SAME HERE IBinaryTreeNode<E> node = getLastNode(); …

Member Avatar for ztini
0
249
Member Avatar for karthikprs

I am trying to extract the number in the string "(c) 2010 Elsevier Ltd" from a PDF document . I found that the textsearch method of PDFtron package would help me find the string as stated in the example code: [CODE]import pdftron.Common.PDFNetException; import pdftron.PDF.*; import pdftron.SDF.SDFDoc; // This sample illustrates …

Member Avatar for karthikprs
0
3K
Member Avatar for sagarrayudu

This is my xml file [CODE]<CATALOG> <category> <name>Engineering</name> <subject>Civil Works</subject> <subject>Water Supply</subject> <subject>Street Lighting</subject> </category> <category> <name>Public Health</name> <subject>Sanitation</subject> <subject>Dispensaries</subject> <subject>Maternity Services</subject> </category> <category> <name>Town Planing</name> <subject>T.P.S</subject> <subject>T.P.B.O</subject> <subject>Tracer</subject> <subject>Chairmen</subject> </category> <category> <name>Administration</name> <subject>Ministerial Manager</subject> <subject>Revenue R.O.</subject> <subject>Accounts Accountant</subject> </category> </CATALOG>[/CODE] I have to get the all subject names in …

Member Avatar for veedeoo
0
208
Member Avatar for WigglesMcMuffin

Hello, This isn't the typical "I wrote a heap sort that doesn't work, help me please" thread, instead, I'm one step before that. I'd really like to [B]understand[/B] the innards of a heap sort before I attempt to write one. I'd like to give it a go from scratch, or …

Member Avatar for DavidKroukamp
0
215
Member Avatar for ohblahitsme

So I have a function called start() and it has multiple if statements and I want all of them to run. [code=python] def start(): print """You have just woken up from a very long nap. You find yourself in a dimly lit cave. There is a patch of light in …

Member Avatar for woooee
0
281
Member Avatar for freedomflyer

Hello everyone. I have a TreeSet<State> that I want to iterator over in order to change the States within the TreeSet (more specifically, a private subclass within each state). However, I will most likely run into problems as I do something like this, or something to this effect: [CODE]for(State s …

Member Avatar for freedomflyer
0
1K
Member Avatar for mkaynutty

So basically this is suppose to be a grade calculator and the program works, I now just have to put it into a do-while loop so it can work for more than one student. My professor wants it to say Y for another student and N to quit at the …

Member Avatar for doma18
0
195
Member Avatar for alenD

Hi all, I am doing something like this int f(){ umap::iterator p = mmap.find(s); if(p != mmap.end()){ ....... } } My memory usage is somehow constantly increasing. While exiting the function do I need explicitly delete the iterator p? Thanks in advance, _alen

Member Avatar for MastAvalons
0
584
Member Avatar for wallet123

i was watching a tutorial about bubblesort, and i followed all the instructions the difference is that the tutor is using System.out while im using JOPtionPane, please help me thank you help me find my error and help me run it correctly! [CODE]public static void main(String[] args) { // TODO …

Member Avatar for rushikesh jadha
0
182
Member Avatar for codechrysalis

Basically I have to do this: [B]Write a program that displays the number of students that can still enroll in a given class. Design your solution using parallel arrays.[/B] my problem is what loops should I use for this I dont think [B]for[/B] loops would be useful at all...I think …

Member Avatar for codechrysalis
0
189
Member Avatar for nuttyniall

Hi hope someone can can help im having a problem with how ripple is dealing with for loops when emulating an android app using html5 css jquery and jqtouch simple loop [CODE] var len = 1; for (i = 0; i <len; i++){ alert('foo'); } [/CODE] run it through chrome …

Member Avatar for Airshow
0
212
Member Avatar for themenucha

Hi! I'm making a chess program, that need to move pieces on the chess board, get an input,check if the move is valid and print the output. The compiler finds some errors that i don't understand...I need some help with the pieces functions. Plz help me fix them!!! my attempts …

Member Avatar for DJSAN10
0
534
Member Avatar for shaynadz

Hi! I'm new here! I have a quick question about an error I found in my script. I'll jump straight into the code and then make my question: [CODE]$description = $_POST['desc'];[/CODE] this is a text description for example "Monthly Tuition". [CODE]$amount = $_POST['amount'];[/CODE] price of tuition [CODE]$dlnumber = $_POST['cedula'];[/CODE] drivers …

Member Avatar for diafol
0
180
Member Avatar for infantheartlyje

Hi folks, I did a program to find a number at a lower bound position and upper bound position. For example, this is my array values 1 1 2 3 5 5 5 5 7 8 9 10 if i search lower position for 5 , it will return 4 …

Member Avatar for histrungalot
0
4K
Member Avatar for BenzZz

Hi, The following code is working without errors: [CODE] <table> <tr> <td>Booking No.</td> <td>Driver Id</td> <td>Time Booked</td> <td>From</td> <td>Pick Up Time</td> <td>To</td> <td>No. of Passengers</td> <td>Distance</td> <td>Cost</td> </tr> <?php $stmt = $dbh->prepare("SELECT * FROM Booking WHERE cust_id = '$username' "); $stmt->execute(); while($row = $stmt->fetch(PDO::FETCH_ASSOC)){ echo "<tr><td>".$row['booking_no']."</td>". $row['driver_id']."</td>". $row['time_booked']."</td>". $row['pick_up_dest']."</td>". $row['pick_up_time']."</td>". …

Member Avatar for BenzZz
0
86
Member Avatar for klemme

Hi, I want to get information from each session set, EXCEPT when the session name is 'navigation': So basically: Create an exception for the session called 'navigation'.. [CODE] foreach ($_SESSION as $name => $value) // $name = navn pÃ¥ session: f.eks. 1 eller 2 - $value indeholder antallet der er …

Member Avatar for pritaeas
0
921
Member Avatar for npsgaming

I have put together some code for a homework assignment and I have almost got it working. There are a few key items that are missing or not fully functional and I am fresh out of ideas on how to attack it. The code is to take 9 digits/integers from …

Member Avatar for deceptikon
0
201
Member Avatar for Joe34

I'm trying to simply match these letters using php, but it's kind-of a complex matching formula... First, I have two arrays and one string. The arrays contain letters and the string is a near match of those letters. $a - [Array] Must be <= 7 $b - [Array] Must be …

Member Avatar for cereal
0
244
Member Avatar for pwolf

Stuck again, this time my problem is getting the dictionary to be sorted in ascending order. Please Advise! the following is what the task says: """ A sparse vector is a vector whose entries are almost all zero, like [1, 0, 0, 0, 0, 0, 0, 2, 0]. Storing all …

Member Avatar for pwolf
0
2K
Member Avatar for ahoysailor

Hey, I'm trying to search a List for a substring, but even if it does exist the result is coming out as negative (not present) using the BinarySearch. The idea is that once the file has been loaded into the list I search to see if substrings exist (i.e. IDS_STRING1 …

Member Avatar for ahoysailor
0
206
Member Avatar for jkembo

I am stuck, I know how binary tree works, but I don't have any clue how to add data recursively in a binary tree. The user needs to enter a formula with logical operators. If the user presses to a button e.g NOT(unary operator), then it should display at follow …

Member Avatar for jkembo
0
284
Member Avatar for Szabi Zsoldos

Hi guys, Working on a table. Each of the entries has an A or B in the 'tip' field. I order them by 'tip' how can i add a special row for the first entry of the A or B series from the query? I know it's not an IF …

Member Avatar for Szabi Zsoldos
0
132
Member Avatar for andy106

Hi I am trying to get the active state for my foreach loop for my magento site. I have have tried everything, but it just wont work.. here is my code: ksort($catArr); foreach($catArr as $postion=>$catId){ $_category = Mage::getModel("catalog/category")->load($catId); ?> <?php if($_category->getIsActive() ) { $caturl = $_category->getURL(); $catname = $_category->getName(); ?> …

0
134
Member Avatar for letters1417

Okay so this is another question printing patterns but this time using input! I have to prompt the user and read an odd number from the input. I can only use System.out.print('*'); System.out.print(' '); and System.out.println(); I need to maximize my use of repetition and minimize the number of output …

Member Avatar for DavidKroukamp
0
514
Member Avatar for jakizak

Does anyone see an issue with the following IF statement... I sure can't yet it doesn't work! VARIABLES: $CHECK = A returned value from the database either "y" or "n", the value is returned successfully so I know that is not the issue here. There is no error message returned, …

Member Avatar for almostbob
0
176
Member Avatar for aditdano

I have a problem with this code : [CODE] #include<iostream> using namespace std; void qsort(int A[], int len) { if(len>=2){ int l=0; int u=len-1; int pivot=A[rand()%len]; while(l<u) { while(A[l]<pivot)l++; while(A[u]>pivot)u--; swap(A[l], A[u]); } qsort(A,l); qsort(&A[l+1],len-l-1); } else{return;} } void swap(int a, int b) { int temp; temp=a; a=b; b=temp; } …

Member Avatar for jaskij
0
216
Member Avatar for pwolf

the objective is as follows: Write a function splitWord(word, numOfChar) that takes in a word and a number as arguments. The function will split the word into smaller segments with each segment containing the number of letter specified in the numOfChar argument. These segments are stored and returned in a …

Member Avatar for pwolf
0
893
Member Avatar for chebude

I am trying to catch error on file input/output. The try functions works fine but as it pass to the next line my code breaks. How can I exit gracefully when the 'infile' doesnt exist? [CODE] try: infile = open ('Book1.txt', "r") except IOError: print "input file %s is missing" …

Member Avatar for chebude
0
334

The End.