3,815 Topics
![]() | |
Basically I'm trying to adapt the quicksort algo for array based lists for linked list as shown on a text book. This is only for learning the principles than practically effective sorting. I have struggled to get this code to work, but stil seems to break on a few test … | |
[CODE] import java.net.*; import java.io.*; import java.security.*; import javax.crypto.*; public class messagedigestsend { public static void main( String [ ] args) throws Exception{ byte ttl= (byte) 0; try { MulticastSocket mSocket = new MulticastSocket(); MulticastSocket mSocket2 = new MulticastSocket(); InetAddress mAddr = InetAddress.getByName("224.0.0.1"); String sendString = "M"; byte[] plainText = … | |
hello .... i just want to ask.. what is the algorithm for searching a data in database.,. example : txtbox is equal to 060100 .. i want to search all the information about 060100.. thanks.. :D | |
Greetings everyone, So I posted earlier a similar problem which I wrote in python, but now after accomplishing that, I think ill try to write it up in C++. The link to the original question is [URL="http://www.daniweb.com/forums/thread254474.html"]here[/URL]. If there are any other questions or if you need any more information … | |
So I've been working on two small programs to calculate prime numbers, fast and memory efficiently. Both my algorithms are based upon the 'Sieve of Eratosthenes', and I know that the 'Sieve of Atkin' would be the way to go since its faster, however I'm just trying to optimize the … | |
what data structure is best for a star algorithm? at a time i may have 100 items in open list........ | |
Hi everyone, I am writing an[URL="http://www.8puzzle.com/8_puzzle_problem.html"] 8-puzzle Problem[/URL] Solving Program that utilizes the [URL="http://en.wikipedia.org/wiki/A*_search_algorithm"]A* (A Star) search algorithm[/URL]. I've come this far in completing the desired program, and somehow summed up to this: (entire source code posted below). But I can't compile it just yet due to this builder error: … | |
despite its simplicity, for some reason, my code refuses to work, even though the encryption works [CODE] # add() is just (a+b)%2**32. for some reason, without the function, it doesnt work delta = 0x9e3779b9 sum = 0xc6ef3720 for x in range(cycles): # 32 data[1] = add(-add(data[0]<<4, key[2]) ^ add(data[0], sum) … | |
Note to mods: This is in the php section as the question is mainly directed to the php gurus. I have been reading on some rather old news and discovered that the Secure Hash Algorithm (SHA1) has been cracked. Does anybody know where I can download a copy of this … | |
Please help...I am having a problem with comparing double values in C++. I have stumble across this issue when my sorting algorithm tries to compare double values to check whether a < b / a > b. Based on the comparison result my sorting algorithm does sorting by ascending or … | |
hey i just need some help understanding how to do this question, i need to find the running time, and show it in algebra like "2i+2" and also in Big O notation such as O(n^2), the question also asks to state the number of additions and subtractions in the algorithm … | |
Ok... so i am making a rather simple calculator, that solves for either derivatives or a polynomial. Though I have to make my own linkedlist is the challenge. Ok, I will just copy and paste the LinkedList.cpp file: [code]#include <stdlib.h> #include <cstdlib> #include <string> #include <cstdlib> #include <iostream> #include <algorithm> … | |
[URL="http://img686.imageshack.us/img686/3380/hw1.jpg"]http://img686.imageshack.us/img686/3380/hw1.jpg[/URL] Okay so I got homework from my IT programming. I am completely oblivious in programming so I need a bit of help getting me into the right direction. Here is the question to understand my flowchart: Above is the link to my flowchart. Consider N students receiving the marks … | |
Hi, i have to create a algorithm called find2D, to find an element x in an n × n array A. The find2D function iterates over the rows of A, and it calls the algorithm findArray shown below, on each one, until x is found or it has searched all … | |
hello every one. this is my last year in cs,i'll soon make a thesis but I have'nt decided a proposal yet. here's some topics that our thesis advisor suggested.(i'm not decided yet which one would be the best proposals) *Implementation of the Traveling Salesman Algorithm on Networking Systems. *Graph Traversal … | |
Hi and I thought I would write an algorithm where the computer can learn from text being input into its database and the computer will be able to have a normal conversation with somebody. I already have my database of paragraphs but will need converting into something more complex for … | |
I have created a completely new new Windows Form application and are trying to add this namespace: [code] #include "stdafx.h" #include <ctime> #include <iomanip> #include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <limits> #include <ios> #include <cstdio> #include <numeric> #include <cstdlib> #include <ctype.h> … | |
Hi guys, can you please describe the knapsack algorithm in English. I googled this, the first page was wikipedia. The algorithm there is too mathematical which doesn't help me to understand the solution. Can you please describe its algorithm? | |
Hi, I have to implement in C an distibuted algorithm, which counts the number of processes in a full-connected network when happens f byzantine faults. Could you help me with the algorithm ? Only a basic idea! I don't want the implementation. I am looking in web and I found … | |
Hello, im trying to implement a template matching algorithm with the use of Python + PIL and I'm trying to follow the code that wikipedia gives for template matching -> [URL="http://en.wikipedia.org/wiki/Template_matching"]http://en.wikipedia.org/wiki/Template_matching[/URL] Basically it loops through all pixels of a search image, and all pixels of a template. The sum of … | |
Hello I have many different processors (they not the same) for example first has a 3 stage pipe: EXE->MEM->EXE and the second has a 3 stage pipe: MEM->EXE->EXE.I want to decide for the operations in which CPU it has to be computed for example *(R1+R2)+R3 has to be computed in … | |
Problem: Write a program that has an array of at least 20 integers. It should call a function that uses the linear search algoritm to locate one of the values. The function should keep a count of the number of comparisons it makes until it finds the value. The program … | |
hie, i want to operate a usb webcam using c or c++ language that is i want it to take pictures using c/c++ commands can any1 suggest me how can this be done. Also i want to find out two laser spots from an image using processing and track them … | |
In this assignment a scheduler algorithm needs to be designed and implemented. The scheduler designed will be used for scheduling different tasks/process to be executed in a system. There are different kinds of processes in a system. When the process enters the system it will be directly stored in the … | |
I have been asking for some time to move [URL="http://www.daniweb.com/forums/forum28.html"]forum28[/URL] to it's own main forum in web development instead of being a subforum of web design but it seems everybody has been confused about what I am talking about. So I've now started my own thread... Anyways, it seems that … | |
I have a problem with this topic ..Solution to algorithm using static and dynamic data structure | |
Hello everybody, I'm looking for a ready code in Java for JADE implementation of Bellman-Ford algorithm. I really need in developing Agent for the research. I am not an expert in programming. For anyone who has been developed or seen the Bellman-Ford algorithm source code in Java, I would be … | |
This is what I have so far. This program should contain a recursive function that will compute the binomial coefficient according to the definition if k=0 or k=n [CODE]#include <iostream> #include <algorithm> using namespace std ; int C(int n,int k) { if (k < 0 || k > n ) … | |
Given a certain size, n, I would like to implement an array (of size n) which has an init, add object [in a location given by user] and remove object functions which work in O(1) time. In other words, I'm trying to create an array which knows where "Junk values" … | |
hey guys i have a noob question. i'm trying to program this little text based RPG, i've made several but you're always controlling only 1 character and fighting 1 enemy, i want to change that and make you take control of 4 characters and fight 1-4 enemies at once (turn … | |
Hi, I have a data I want to make fix length records Like suppose:- [CODE]one two three four one two three one[/CODE] In this case the fixed length should be of the maximum string length which is of the first line. My code below is giving creating faulty fix lengths. … | |
I am now making the huffman algorithm. I have generated the tree but I cannot generate the codes.. please if anyone can help tell me how? [B]This is the class Node[/B] [CODE] public class Node { private Node left=null; private Node right = null; private Node parent = null; boolean … | |
Hi, I'm supposed to write a code of my TSP assignment using brute force algorithm. Although there are still some darkness about how to do it. I know what is TSP but I don't know how to start it. Let's say that we have 4 cities(A, B, C, D). Using … | |
Hello, I need to write the recursive algorithm of type divide and conquer. The input is integer array S. The output is true if the array is sorted or false if not. Algorithm should divide the array in two halves, then to check the sorting of both halves with the … | |
Hey, I have done a little project in the past involving Genetic Algorithms (GAs), written in VB6 (really poorly). Now, after I understand the whole concept of programming much better, I decided to give it another try. This time I've decided to try tackling the Traveling Salesman Problem. For those … | |
Hey everybody :) I'm looking for a ready code in [B]Java or C[/B] for[U] Ford - Fulkerson algorithm[/U]. I need to program something very similar and I thought it'd be great if I wouldn't have to start from scratch since I'm not that good programer anyways.:-/ I couldn't find any … | |
Suppose the user wants to input a string. The length of the string is unknown. I also don't want a character array of size 1000 or what so ever. I want the size of the character array increasing by 1 byte for every character entered. Here is a sample output … | |
I have been asked to program a spellchecker in C for an assignment. I am quite new to C and programming in general, so I have decided to start by writing a program that does the following: [LIST] [*]Reads words into an array from a dictionary text file. [*]Reads words … | |
i need algorithms similar to A *. in A * we know the starting point and ending point. suggest an algorithm when starting point is not known. | |
can anyone suggest how to write a notepad app using c??algorithm for programming is needed..gui is not so important..graphics in c enough..i just need the idea of what to do..pls help me... | |
Hello there, I am trying to self-learn some Assembly and just picked up The Shellcoder's Handbook. There is a short C program regarding a triangle in Ch. 1: [code=C] int triangle (int width, int height){ int array[5] = {0,1,2,3,4}; int area; area = width * height/2; return (area); } [/code] … | |
![]() | Hey guys! I need I quick help I heard about a sorting algorithm that I want to use but I can't find any info about it..so if any of you know the name of this sort or a place where I can read about it, it would be great:icon_mrgreen: what … |
Hi, Im new here and to java programming in general. I've been given an assignment to write a sorting algorithm and then test it using JUnit tests. The problem is when I try to compile the tester class i get a ".class expected" errors followed by three "; expected" errors … | |
Hi, I am trying to implement some distributed algorithm (minimum spanning tree) where each node is represented by a process running in a different machine. Each edge represented by a client server communication channel. Suppose host0 is connected to host1, host2 and host5. I create 1 server sockets in each … | |
Hi and I am making a maths library which will accept infinit digits but what is the best formula a computer can understand for devision. The only one I have come across so far is long devision but is there anything better? The following is the kinda formula I am … | |
Today is my second day with *<Accerlerated C++>,* and so far I've read until chapter three. Below is the code written in the book and as a part of solving the chapter's exercise problem 3-0, I typed and compiled the code. (using vc++ 6.0) I assumed there would be no … | |
How can I define this algorithm to calculate the matrix that has uneven nr of rows and columns? //============================================================================== // // Linear System Solution by Gauss method // // // //============================================================================== #include <iostream> #include <stdio.h> #include <windows.h> #include <cmath> //============================================================================== void VectorPrint(int nDim, double* pfVect) { int i; printf("------------------------------------------------------------------\n"); for(i=0; … | |
Hey all, I am having trouble with the ""std_lib_facilities.h" header. I am getting the complier message: error C2614: 'String' : illegal member initialization: 'string' is not a base or member I am going through Bjarne Stroustrup's - Programming Principles and Practice Using C++ and he suggests that if you cant … | |
Can you guys check my work i want to perfect my studies at school.. this will be passed on sunday also there some that dont have answer which you know please do tell.. [QUOTE]False 1. When you go through a list of names, from beginning to end, until you reach … | |
I need Help! Consider this following modified version of the binary search algorithm. (Modifications are indicated by a comment highlighted asterisks.) With this new version of the binary search algorithmn work correctly for all data? If not, specify a situiation in which this version will fail. [code]template<class element, class Keytype> … |
The End.