3,815 Topics
![]() | |
Hello ladies and gents, I had to do the following exercise: Write a (1)function that reads words from an input stream and stores them in a vector. Use that function both to write programs that (2)count the number of words in the input, and to (3)count how many times each … | |
Hello ladies and gents, in Accelerated C++ I have an exercise wich goes as follows: [quote]Write a program that will keep track of grades for several students at once. The programcould keep two vectors in sync. The first should hold the student's names, and the second the final grades that … | |
Hi people, I am just including a link to a great resource for using Linux to create real time visual effects. [quote]Use EffecTV and Simple DirectMedia Layer (SDL) to create your own real-time visual effects on live video. Learn how to integrate geometric primitives, bitmap image loading, and simple motion … | |
Hello everyone, I am wondering how to transpose a matrix (m * n) with only constant space complexity O (1). (The transpose algorithm should execute/operate on the original matrix.) thanks in advance, George | |
[COLOR=Magenta]if any one know how can i use recursion tree in algortihm and i hope an example fro explanation :rolleyes: :!: :idea:[/COLOR] | |
Hello ladies and gents, Wondered if any of you could help me out here, I'm trying to increment an element of a vector of integers. Here's the code: [code] #include <algorithm> #include <cctype> #include <iostream> #include <string> #include <vector> using namespace std; int main() { vector<int> scores; scores.push_back(500); scores.push_back(600); scores.push_back(300); … | |
I figured it was about time I updated my mod_rewrite tutorial for vBulletin. Therefore, I decided to provide you guys with the exact, full mod_rewrite that I use here at DaniWeb. It's written for a clean install of vB 3.0.7. [b]This version is not for the faint of heart![/b] Some … | |
Hi for all... i have to implement unifiction algorithm (in first order logic) using c++ language so can any help me with basic ideas?? ![]() | |
In SEO, we have to know two things are very important. The first one is open directories project (ODP), which is dmoz.com. The idea of open directories is to submit your site to other big web hosts' directories in order to increase the listed frequency from the searching results by … | |
Hello Im trying to understand and explain how the quick sort code actually works, i unable to understand or xplain line 4 to 11. Can ne of u xplain to me briefly what those lines actually do in the code algorithm.... Apreciate ne help. [CODE]do { while(strcmp(array[i].Genre,x)<0 && i<right) i++; … | |
Hello Can someone tell me what this sort algorithm is called.? And if possible a little bit of information about it... [CODE]void record_search(struct CdRecords cdDB[]) { system("CLS"); int i; char name[20]; printf("Enter Name:"); scanf("%s", name); for(i = 0;i<datasize;i++) { if((strcmp(name,cdDB[i].Artist))==0) { ENTER DATA TO BE DISPLAYED } } printf("Press Enter … | |
Hey after spending a few hours trying to understand why my quick sort is not owrking, i've tried calling the q_sort() and quick_sort() but with no luck...... below is how i had it from the start for less confusion,, can someone tell me why it isnt working... i've checked the … | |
This program is almost the same as the one last i posted but here the bubble sort algorithm is not working, i get a compiler error saying:: size of cdRecords is not known and need explicit cast to convert I cant work out what the problem is because another program … | |
HI, I wanted to know how could I retrieve a sealed object from a signed object and then verify it? Heres my attempt: if(!sending){//if we are receiving (being the server) ServerSocket server = new ServerSocket(port); Socket s = server.accept(); ObjectInputStream oin = new OnbjectInputStream(s.getInputStream()); ObjectOutputStream oout = new ObjectOutputStream(s.getOutputStream()); System.out.println("Please … | |
Does anyone know the code to show the critical count for a quick sort algorithm. Basically my cd database is almost finished. What i need to do is show a critical count for the quicksort quicksort for my database [CODE]void q_sort (struct CdRecords array [], int count) { quick_sort(array,0,count-1); } … | |
Hello, If I want to check my algorithm if it works good in every cases so can i check very outer cases and then I can conclude that my algorithm works well in all cases? | |
I know you don't do homework for people. But I'm not really sure where else to turn to, because my online tutor for my class isn't really helping. I'll show you the code I have. (I worked about 6 hours on it, honestly. I'm really really bad at this.) If … | |
a) Suppose we have an unsorted array of size ‘n’ and we want to find a middle element of the array. Describe an algorithm which will take O(nlogn) time.(just a paragraph of maximum three lines). b) What will be the upper bound to choose middle element, if array( in part … | |
Hi all : ) Im messing around with the game of Nim and i want to create some strategies to make the game more interesting. I have finished all the other code and all i need to do is this. Basically i want 4 classes The first strategy will be … | |
I have written a binary search algorithm in java. I have a statement that when the search key is found it is printed to a terminal window. This statement when when called just keeps printing over and over and i cant figure out why :sad: . Can any one help? … | |
I have an application web based. using Oracle backend and Java front end. App server is in weblogic and Solaris os and two cpu with 8 applications. DB server is oracle 8.1.7 on Solaris This application is getting slow when number of threads are more ( like many users login … | |
Hello everyone, I have always seen some methods are described as "best practice". I am wondering what means "best practice", an algorithm? Thanks in advance, George | |
Having troubles handling text from a multiline edit box.. the first part of this algorithm runs fine by itself.. the second part (highlighted in blue) runs fine as a DOS console project using 'char' data types.. but when I add it to this windows project (using TCHAR's) it distorts the … | |
hi friends, I have an application web based. using Oracle backend and Java front end. App server is in weblogic and Solaris os and two cpu with 8 applications. DB server is oracle 8.1.7 on Solaris This application is getting slow when number of threads are more ( like many … | |
Hi all I am implementing the TSP problem in Java. Here is the question: [quote] There are many strategies to approximate the optimal solution, amongst is the MST-Preorder-Walk strategy. Implement an algorithm that will give an approzimate solution of the TSP using this strategy. You must be able to save … | |
Can someone please have a look and help me on making this Binary Search algorithm work. Donmt know what is wrong with it . [CODE]#include <stdio.h> #include <stdlib.h> #include <time.h> enum SearchResult {FOUND, NOT_FOUND}; SearchResult binarySearch(int array[], int key, int low, int high, int *comparisons); void fill_array(int array[], int sizeOfData); … | |
I can't seem to get this sorting alogorithm to work: [code] #include <iostream> void sortAssending(int nums[], int size); int main() { int nums[] = {175,167,160,164,183,187,188,179,176,175, 169,175,176,178,165,160,173,165,187,178}; sortAssending(nums, 20); for (int i=0; i<20; i++) { std::cout << nums[i] << std::endl; } system("PAUSE"); } void sortAssending(int nums[], int size) { for (int … | |
If someone could help me doing a code in VB to do the following: The output should be a list of all posible ways in which (m) different Males and (f) different female could be line up if no two females could be together (one female can not stand after … | |
Hello ppl. Ok have to investigate and write a report on the efficiency of the following Linear Search algorithm. But im having problems starting off.... can anyone here help me kick start this 3 page report... would apreciate any information & help you guys here can give. [CODE]// This program … | |
Hello, I'm trying to understand how this heap sort algorithm works (how this particular implementation from [url]www.eternallyconfuzzled.com[/url]) works. [code] void jsw_do_heap ( int a[], int begin, int end ) { int save = a[begin]; while ( begin <= end / 2 ) { int k = 2 * begin; while … | |
i need to write a simulation of CPU scheduling. The operating system must select one of the processes in the ready queue to be executed. i have real problems understanding what the professor wants in this program, can anybody here help me develop some pseudocode for the logic behind this … | |
Please , I'm at the 2nd year in computer science dept & i don't know what is " Big O " and "Algorithm time complexity " I'd be grateful if anybody answered my Question .. | |
Hello, reading one article I found that performance one algorithm is measured in O(log* V). Can you explain me what log* V means. I generally understand big Oh notation and I know what O(NlogN) means, but what is the meninig of '*'? | |
Hi, I want to know what is the logic used for generating a random number. Can anyone tell me the algorithm for random number generation without using standard library functions? Thanks | |
1. (a) What is trashing and list possible causes of thrashing. (b) How does the operating system detect thrashing and what can it do to eliminate thrashing? [15 marks] 2. The given program simulates the effect of changing page sizes in a demand paging system. The following sequence of request … | |
Hi all, I just added a clustering module to the code snippets. There are classes for modeling points and clusters of points, as well as two point-clustering functions - one is an implementation of the k-means algorithm, which I believe I posted earlier this year, and the other is an … | |
I'm writing a basic piece of code to perform a successive approximation algorithm, however, when it runs the approximation loop, it seems unable to distinguish between a positive and a negative number in that it runs both if statements. The code is shown below, and if someone could point out … | |
Write a program that prompts the user to input a length expressed in centimeters. The program should then convert the length to inches and output the length expressed in yards, feet, and inches, in that order. For example suppose the input for centimeters is 312. To the nearest inch, 312 … | |
Greetings, I'm a former hardware guy (embedded C & C++ experience mainly) trying to get up to speed with Java and Perl for a set of graduate courses. I've written up a Perl script that simulates a scheduling algorithm, the script consists of two primary loops the first to parse … | |
Hey, I don't know if am wrong but I think a new idea has just striked me. We can all see that almost every program that we can imagine of has been created, thus making it difficult for us to think of new ideas or programs. But all these programs … | |
I have a string that is retrieved from a socket. I display this string as the text of a button. Some strings contains a '' which doesn't get printed because it's an escape character. So, I want to find all '' and replace it with a "\\" so it will … | |
1- A certain algorithm takes twice as long to process 1000n elements as it does to process n elements. Give a possible time complexity for this algorithm and a specific value of n 2- A certain O(nlogn) algorithm is always used in practice over an available O((logn)^2) algorithm 1 - … | |
Hi, I am looking for a text justification algorithm that fully justifies the text. I suppose that I could design one of my own. However, why reinvent the wheel? I tried googling and doing other stuff, but it surprisingly was unable to find anything useful. Any help will be greatly … | |
Why doesn't this compile? I am trying to use multimap and am unsuccessful. [code] #include <iostream> #include <map> #include <algorithm> using namespace std; int main() { multimap<string,long> test; string a="BLAH"; long b=8; pair<string,long> c( a, b ); test.insert( c ); return 0; } CC Test.cpp -o Test "Test.cpp", line 11: … | |
Hello ladies and gents, I'm reading about the algorithm partial_sum and there are two different versions of this. The first one just calculates cumulative numbers like this: [code] #include <iostream> #include <numeric> #include <vector> using namespace std; int main() { int a[4] = {10, 20, 30, 40}, b[4]; partial_sum(a, a+4, … | |
hi everyone i'm doing my final year project. most probably i'll be implementing them in java.i have norrowed my choices down to two possibilities......one is the implementation of an algorithm for a perfect hash function. the other project is an XML to relational database converting software product. i m interested … | |
![]() | i tried for sorting the link list for weeks already, and yet still couldnt get the output as what i want. i search through the forum and i found the coding "algorithm" (in blue color) for sorting...but it seems tooo alit bit toooooooooooo long. so far, i was trying to … ![]() |
I saw an example function for some unknown algorithm in a book that was explaining big theta/o/omega notation. I understand how it all works, but this example is throwing me off: f(n) = 3n^2-2n-10 And what I'm wondering is this: What kind of operation could you possibly do that would … | |
Here's a cute little encipher/decipher program with a Tkinter GUI I wrote a while back. It's an implementation of a derivative of the Vigenere algorithm; the algorithm is taken from Laurence Smith's [U]Cryptography: The Science of Secret Writing[/U], Amazon link [URL=http://www.amazon.com/exec/obidos/tg/detail/-/048620247X/qid=1125004078/sr=8-1/ref=sr_8_xs_ap_i1_xgl14/102-6170856-3267319?v=glance&s=books&n=507846]here[/URL]. It's a dated book (and the technique itself is … | |
My homework is to write the [B]quicksort[/B] algorithm in 8085 assembly. So I tried to write it and of course it has too many bugs but my main problem is that I don't know how to handle the recursive character of the algorithm and control the loops. For example, what … |
The End.