3,815 Topics
![]() | |
Hey everyone, So awhile back I built a program that contained a function to merge two databases (well SQLite ones that are read in as Lists). When the first database is read in, well the file, it's read into a Binary Search Tree, while the second is read into a … | |
Hi, I m facing difficulties in replacing this C code with C++? For e.g : Can we use Fopen in C++? Please suggest me changes here to make it c++ equivalent! How to write this in C++ --> void fileRead(FILE *ofp); void fileScanner(FILE * ifp,int i); void fileRead(FILE *ofp); int … | |
Hi All, Can any one tell me the algorithm for MD5,SHA-256 encryption and decription. I can found MD5 emcryption but not unable to found decryption. Thanks & Regards Bhanu Teja M. | |
Sir, I wanted to know the implementation code for krushkal algorithm in C++. Anyone can help me to give the code. ThnQ | |
How to calculate time complexity and space complexity of the algorithm? | |
is there any function to add a character at the end of a string? or algorithm? | |
Im having a few problems developing an algorithm to find the Minimum subsequence sum. Can anyone offer any advice? | |
How would I search within a vector array for a user input? I need to find the city in the vector array and use it's index to compare distances between other arrays with the array. This is what I have so far, I've read the cvs file to a vector … | |
I have to convert it to using for loop from while loop. I don't know how to start with it :/ import java.util.Random; //to use the random number generator public class DiceSimulation { public static void main(String[] args) { final int NUMBER = 10000; //the number of times to roll … | |
![]() | Hey everyone, I'm doing a practice problem and I'm stuck. The question is "Given an array a of n numbers (say doubles), consider the problem of computing the average of the first i numbers, for i ranging from 0 to n-1. That is, compute the array b of length n, … |
Hello everyone, I'm an amateur programmer, and I am working on a program to help me practice my mental math. The essence of this program is that the user inputs an expression which will be the form of each question. Their goal is to solve those expressions as fast as … | |
Hey guys, noob programmer here. Over the last week or so we've been learning about classes and inheritance in my latest progamming class. I've recieved a variation of the ever so popular poker program and am having some problems putting it all together. I haven't had the opportunity to test … | |
I want to develop **JavaFX/Java AUTOMATIC CODE GENERATOR**. I need algorithm or sample program. If anyone can help please mail solution to <snip> *DaniWeb Rules include: Do not ask anyone (member or moderator) for help by email or private message* | |
Can anyone recommend me a good Data Structure and Algorithm book for java programmers? Possibly intended for game development, but not required to be. Thanks. | |
Applying the famous Gauss algorithm to determine the date of Easter for a given year. | |
MaxElement(A[0...n-1]) //Determine the value of the largest element in a given array //Input: An Array A[0...n-1] of real numbers maxval=A[0] for i=1 to n-1 do if A[i]>maxval maxval=A[i] return maxval Thanks in Advance | |
how to test if a num is a square root? ex: 9 is square root 3 is not square root ///////////////////////////////////////////// //do not worry about sytax. int x = 0; //always start at 0 int y = 101010; //is this a square root? square(x, y){ if((x*x) >= y){ //not a … | |
Hi, I was thinking of making a big website with an algorithm in place to decipher the multiple match pair chance of same hash occurance for long strings but the only problem is I need a database of hashes. A really big one at that. So does anybody know of … | |
UniqueElements(A[0...n-1]) //Determines Whether all the elements in a given array are distinct //Input: An array A[0...n-1] //Output: Returns "True" if all the elements in A are distinct &"False" oterwise for i =0 to n-2 do for j=i+1 to n-1 do if A[i]=A[j] return false return true Thanks | |
I need help with this two questions, its not hard for experts I guess, here it is: Determine the time of executing the following algorithm fragment: a) if (x == 0) then for i = 1 to n do a[i] = i; b) i = 1; repeat a[i] = b[i] … | |
Hey guys, I've been working on a little project of mine, and part of it requires sorting. I'm using bubble sort and before I put the algorithm in the code, the program ran fine. void ranking(){ int count = getcount("all"); // get total members and save value to count int* … | |
Hi I need help to draw a circle using c++. I have never used any programming before and have to do computer science to become a Maths Teacher. My first task is to write a program to draw a circle with the user inputing two x,y coordinates and the centre … | |
Demonstrates the Right Hand Rule maze solving algorithm, with some sweet console colors and text display and erasing, in Windows. Note that if the Start is moved away from all the walls in the maze, the right hand rule fails, circling endlessly. Also, a similar failure happens if the Start … | |
As we all know, the latest version of Panda (hit in March 2013) was the last one to be pushed out manually. Google announced that from now on, Panda will be integrated into the main Google algorithm and will be a rolling update. As someone who was hit in November … | |
Hey guys, I am new here and have found many answers to my problems from this website so I figured it was time to join. Here's the deal: I have just started trying to learn Python through MIT's OpenCourseWare. I am currently on PS1a (Problem set 1a) and am having … | |
Does anyone know if there is a way in which I can install my own Encryption Algorithm into a MySQL database? | |
| |
Simple Encryption and Decryption Function using rijndael algorithm. Imports this: Imports System.Security Imports System.Security.Cryptography Imports System.IO Imports System.Runtime.InteropServices Imports System.Text.RegularExpressions Imports System.Text Source : [snipped] | |
What I know is Linear Search and Sequential Search are same, if my knowledge is correct then kindly guide me wether the below algorithm work for linear search or not as it is a Sequential Search algorithm. > Step 1. Initialize searcharray, searchno, length. > Step 2. Initialize pos=0. > … | |
Hi all, I want to create all possible combinations of a full binary tree which must have exactly 4 leaf nodes and 3 internal nodes. I want to create it using recursion and tree must be simple binary tree not a binary search tree or BST. Kindly suggest algorithm to … | |
Hi Guys, I was wondering if someone could help me with this small program, i am kinda new to programming and well i have been given this assignment on collision detection for airplanes. i have done some coding implementing the algorithm and well i have specified the coordinates or points … | |
Hi!! I am fairly new to computer science and programming. I am interested in doing the Google Code-Jam competition. It is a contest for programming that asks algorithms. Problem is, I have no clue how to even begin to solve these problems! Do I create an html code? JS? What … | |
I am searching a matlab code of canonical swarm optimization algorithm for knapsack problem.If anyone knows the code, then please tell me. | |
I am trying to read user input from console using Scanner but it only reads my first input, and then on my second input it closes my program. Here is my code: import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.security.KeyPair; import java.security.KeyPairGenerator; … | |
Hello, I have been researching the minimax algorithm for a few days, but I can't apply it properly. I have read that for the 8 lines in Tic Tac Toe, you give certain scores. However, I don't understand what they are trying to tell me. Could I have a simple … | |
Hello all, I am new to Glut, and I have made a program in C to draw lines and triangle using bresenham algorithm. But, when i run the code, the display function is called 3 times automatically. I want it to run only once. If I give input for one … | |
Look at this: http://www.codinghorror.com/blog/2007/01/how-to-become-a-better-programmer-by-not-programming.html Did someone who simply couldn't write efficient code (complexity-wise) before, felt intimidated by people who did, decide to work really hard, try to solve an insane number of problems, actually get better? I've been in touch with programming since some 4-5 years. Some of my friends … | |
Hi all, Really appreciate your help if my function on dijkstra algorithm is correct or wrong? Many thanks... Function Dijkstra(Graph, source): Graph randomGraphGenerator = new Graph: Source V0 = new Source: for each vertex n in randomGraphGenerator: // initializations weight[n] := infinity // Unknown path // function from source to … | |
Hey guys, I'm tring to develop an android application which will solve differentiation and intgration problems and show the steps to solving it. Like a learning tool for students. But the thing is i cant find a algo which will help me on solving integration. can u guys please help … | |
What is the best multiplication algorithm which has lower time complexity than Strassen's multiplication algorithm?? | |
i want help to write an algorithm for a wireless sensor network for use in matlab | |
Here, i've built a script that gets the time a user accessed the login page and stores it in a session with the user's i.p address and when next the same user accesses the login page, if the time difference is less than 5 seconds, the script wil display a … | |
Need help dhcpdiscovery message...using raw sockets..dont want dhcp headers or libraries..do it myself anyway im getting error on sending my packet..any USEFUL help? #include <stdio.h> #include <stdlib.h> #include <netdb.h> #include <arpa/inet.h> #include <sys/socket.h> #include <netinet/in.h> #include <netinet/ip.h> #include <sys/types.h> #include <string.h> #define DHCP_UDP_OVERHEAD (14 + /* Ethernet header */ \ … | |
Sorting algorithms are an important part of managing data. There are many sorting algorithms. Each algorithm has particular strengths and weaknesses. You are asked to write two programs in C++, one for Insertion Sort and another for Merge Sort. Compare the execution time for both programs for different data sets. … | |
Hello everyone, I want to start implementing some of my mathematics knowledge into programming through AI. Back 3 months ago I had no idea what is AI, but then I took Machine Learning course on Coursera and finally realized how much maths is included in AI. However I wasn't able … | |
Google Panda rollout this week, confirmed by Google today, even though they previously said they were no longer going to confirm Panda updates. Word on the street is that they've softened the algorithm to not penalize border cases, and I've heard that some people are talking about recovery. DaniWeb hasn't, … | |
Kambo company pays employee Gratuity on retirement that can be computed using the Formula Gratuity=(Salary*Fixed Rate*Number of Years Worked)+One month Salary. Formulate an algorithm that can be used to calculate the gratuity and write a c++ program that can be used for the computation. | |
Hello. I am currently working on a huffman code program for my class. As of right now, I am currently in the development/debugging stage. I've got the whole thing pretty much covered, but I am having trouble with my tree traversal. I am trying to do an inorder traversal but … | |
I was looking for the find and replace algorithm which editor softwares are using. for ex: notepad. when i search something and then when i replace it , how exactly it works. I am aware of rabin-karp and KMP algos. but i am wondering if they are most efficient ? … | |
An algorithm runs a given input size n.If n is 4096,the run time is 512 ms .If n is 16384 the run time is 2048 ms .what is the complexity of the algorithm in big-o notaion ? a)o(n^1/2) b)o(n) c)o(nlogn) d)o(n^2) o() is big-oh! is it logical ? I have … |
The End.