29 Posted Topics
Hi guys. Feels great to post back on DaniWeb. Hope everyone is doing great! I am currently playing around with the google websearch api. They have a javascript example where they created a "hello world" page. https://developers.google.com/web-search/docs/ This code only returns 8 pages of each type of search. I was … | |
Hey guys. hope everyone is doing well. I am trying to make a custom asp.net server just for the heck of it. turns out its quite a task!. I managed to get some code off the internet for a simple server, but it doesnt support asp.net pages. I looked into … | |
Re: she probably only slept with customers who seemed clean and who she was attracted to...that would make it quite enjoyable...and since she was a high class escort, she was probably able to find some good looking men(i think :D). even 1 a day would get he quite a bit of … | |
Re: clock_t startClock,finishClock; double timeCount; startClock = clock(); //-----your sort function goes here here-------- finishClock = clock(); timeCount = finishClock - startClock ; timeCount will give you ELAPSED CLOCK. If you divide that by 100 ie: timeCount/100...you will get ELAPSED TIME. Also, dont forget to import the following. #include <time.h> #include … | |
Hey guys. Last week I programmed a AVL tree. This week i am trying to build a Btree. Can someone explain the differences between a AVL tree and a Btree. They seem kind of similar in the sense that both need balancing, but how different are they when it comes … | |
Re: #include <iostream> and try it. I hope you actually have a method called int fork();. good luck. | |
Re: if you want to simply stop at 1 less than the char you input then simply stop the recursive call and make it like this. void f(char ch) { if (('A' <= ch) && (ch <= 'H')) { ch = ch -1; // <-- see this? cout << ch; } … | |
I am able to get the file names with current script. $dir = "var/www"; $dh = opendir($dir); while (($file = readdir($dh)) !== false) { echo "<A HREF=\"$file\">$file</A><BR>\n"; } but the www folder is local. i wanted to get the file names on my windows server which has the following address … | |
So what im doing is actually in php, but just wanted to know whats the working logic of what im trying to do. I currently have 2 servers(virtual machines). i have a php file in ubuntu server that calls some other files on the windows server and vice versa. as … | |
Hey Guys. I cant actually think of a way to do this. Let me rephrase my question. I essentially want a perl script to run based on something that i am doing in javascript. for example: <javascript> if(x == 1) { then run the perl script. } </javascript> i dont … | |
So I am very confused about XML in general. according to the things i read about it, its not a programming language. its not used to display anything. basically they even say it does nothing. then the question arises....WHY is it used?WHERE is it used?and HOW is it used?....i tried … | |
Re: couldn't you just use the standard substr() method to get that last word?...or do you have to have that method set up to return a pointer?... | |
Re: humm...couple of thing might help you. 1)you never prompt the user to enter a BMI 2)you never asked for height or weight before asking for new ones. 3)you need to set DoItAgain to false inside the loop to end the loop. your little if statement needs to be inside the … | |
Re: wow man...good for you...you got a genius like Narue to answer your questions :)....although I think question no 2 is a little ambiguous...selection sort finds the entries with the largest unsorted keys and puts it at the bottom of the list. then it finds the smallest unsorted key and puts … | |
Re: yezz yezz...this would work too [CODE] #include <iostream> #include <fstream> using namespace std; class MyMethods { public: void ReadingFileMethod(int,int); }; void MyMethods::ReadingFileMethod(int i,int k) { ifstream MyData("somefile.txt"); string data; string myDataArray[k]; string tempArray[k]; int counter = 0; for(int x=0;x<k;x++) { getline(MyData,data); myDataArray[counter] = data; counter++; } MyData.close(); for(int j=i;j<k;j++) { … | |
Re: I didnt read your code....I just read the question. From the question, It seems like the program is quite easy. I am not sure why you have so much code . If I am not Completely wrong, is this what you are trying to do? [CODE] #include <iostream> using namespace … | |
Hey guys. I have the following string array, say, string array[2]; array[0] = "hello7925"; array[1] = "bye344539"; I want to read the last two characters from each string in the array, which in this case are 25 and 39 and then put them in a separate array like this.. int … | |
Hello everyone. Got a bit of a weird problem here. I cant seem to figure out a way to read a file with a format like this... hello what 100 200 its a string string integer integer i need to put each of those values in separate arrays. eg: array1[0] … | |
Any ideas on how would I be able to traverse this BTree in asceding order? right now I am sorting the data and giving it to my retreival() function to look for the keys. But naturally it visits and prints the data in ascending order because I give it sorted … | |
Re: what do you exactly need?...how a hash table works(theory)?...or the direct code? | |
Re: Sanjana try not to use chat lingo while posting your question (I know its a Indian thing to do but simply don't do it). What exactly are you wanting to know? | |
Re: I am not sure what you mean by its not being read. I think it is being read thats why its printing it out. Just for making sure it is infact reading it, Here is a little name function I added. The name function would never output the names if … | |
Re: point 1)next time before posting please preview your post to check whether you have code tags. point 2)what the heck ?....this is probably the worst piece of code iv come across in years. I am thinking this is an assignment your teacher gave you to debug or something. But I … | |
Re: Humm...I coudnt compile gastoncis code. But try this T-Doog. [CODE] #include <iostream> #include <fstream> using namespace std; int main() {//start main 1s char c; int i; int newstar[26]={0}; int sum[26]={0}; do{//start do 2s start: c=cin.get(); if(c == ' ') { continue; } if(isalpha(c)) c=tolower(c); for (i=97;i<123;i++) {//5s if (c==(char)i) {//6s … | |
Re: This is how you can use the swap function to sort data in your array. Hope this helps. [CODE] #include <iostream> using namespace std; void swap(int a[],int arraySize) { int temp=0; int counter = 0; int secondCounter = 0; for(int i=0;i<arraySize;i++) { if(a[i] > a[i+1]) { temp = a[i]; a[i] … | |
Re: I can help you if you elaborate on what exactly you want to do. Your question is not very clear. This "then uses that to extract the entries themselves from the line below. If your first line in "a.txt" says 6, but the second line has 7 entries, the 7th … | |
Hey Guys. Im having a hard time figuring this out. I realize there are a bunch of topics out there discussing this problem but I couldn't find anything that was helpful to this particular situation. [CODE] #include <iostream> #include <string.h> using namespace std; typedef char charType[4]; int main() { char … | |
Hey guys. I apologize for my sloppy code. But it got a bit longer than i expected so i stopped bothering about giving meaningful names to Variables later on in the program. Below I have a AVL tree(atleast that's what I intended to write). But my approach to it was … | |
Hello everybody. All though I have joined recently, iv been following DANIWEB since years. I was wondering if someone could help me understand how link lists exactly work. I understand how they work in general, but when I tried to understand what the "->" operator does and how it exactly … |
The End.