3,815 Topics

Member Avatar for
Member Avatar for JOSheaIV

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 …

Member Avatar for JOSheaIV
0
214
Member Avatar for Andy90

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 …

Member Avatar for mridul.ahuja
0
517
Member Avatar for bhanu1607

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.

Member Avatar for gusano79
0
1K
Member Avatar for ravi_forum

Sir, I wanted to know the implementation code for krushkal algorithm in C++. Anyone can help me to give the code. ThnQ

Member Avatar for naamurad
2
2K
Member Avatar for pparvez1
Member Avatar for Nicholas_2
0
117
Member Avatar for Thundermax
Member Avatar for TalentedIndividual

Im having a few problems developing an algorithm to find the Minimum subsequence sum. Can anyone offer any advice?

Member Avatar for phorce
0
70
Member Avatar for VUEKID

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 …

0
87
Member Avatar for woochoi24

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 …

Member Avatar for JamesCherrill
0
3K
Member Avatar for jmartzr1

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, …

Member Avatar for JamesCherrill
0
235
Member Avatar for Aarowaim

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 …

Member Avatar for gusano79
0
260
Member Avatar for Jugottabe

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 …

Member Avatar for Jugottabe
0
390
Member Avatar for mitalawachat

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*

Member Avatar for stultuske
-1
45
Member Avatar for Stein102

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.

Member Avatar for prakash.seetharaman
0
115
Member Avatar for vegaseat
Member Avatar for vegaseat
2
1K
Member Avatar for ifraq

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

Member Avatar for phorce
0
132
Member Avatar for android_gl

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 …

Member Avatar for cwarn23
0
327
Member Avatar for cwarn23

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 …

0
119
Member Avatar for ifraq

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

0
97
Member Avatar for filipgothic

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] …

Member Avatar for filipgothic
0
264
Member Avatar for Sci3nc3F1cti0n

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* …

Member Avatar for Sci3nc3F1cti0n
0
593
Member Avatar for Tyra

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 …

Member Avatar for CarminPolitano
0
237
Member Avatar for Adak

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 …

0
3K
Member Avatar for Dani

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 …

Member Avatar for winstanleyf1
1
792
Member Avatar for Dunkler

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 …

Member Avatar for Ashley_4
0
212
Member Avatar for squeak24

Does anyone know if there is a way in which I can install my own Encryption Algorithm into a MySQL database?

Member Avatar for squeak24
0
153
Member Avatar for kadylopez
Member Avatar for sandeepparekh9

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]

Member Avatar for Reverend Jim
2
10K
Member Avatar for vishalonne

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. > …

Member Avatar for deceptikon
0
215
Member Avatar for pdwivedi

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 …

Member Avatar for pdwivedi
0
495
Member Avatar for khgcvjnhgvb

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 …

Member Avatar for rubberman
0
437
Member Avatar for williamscorn

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 …

Member Avatar for Yetzederixx
0
295
Member Avatar for deeksha saxena

I am searching a matlab code of canonical swarm optimization algorithm for knapsack problem.If anyone knows the code, then please tell me.

0
79
Member Avatar for MasterHacker110

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; …

Member Avatar for IIM
0
604
Member Avatar for Seth Lam

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 …

Member Avatar for Adak
0
1K
Member Avatar for punit.agarwal11

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 …

Member Avatar for rubberman
0
95
Member Avatar for theguitarist

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 …

Member Avatar for Reverend Jim
0
386
Member Avatar for RinzLove

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 …

Member Avatar for JamesCherrill
0
202
Member Avatar for darkenmac

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 …

Member Avatar for DarkLightning7
0
141
Member Avatar for rgugopi

What is the best multiplication algorithm which has lower time complexity than Strassen's multiplication algorithm??

Member Avatar for Labdabeta
0
125
Member Avatar for kuva

i want help to write an algorithm for a wireless sensor network for use in matlab

Member Avatar for firdousahmad
-1
124
Member Avatar for Olagsfark

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 …

Member Avatar for pritaeas
0
174
Member Avatar for coding101

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 */ \ …

0
117
Member Avatar for mcnickn

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. …

Member Avatar for Dewey1040
-3
168
Member Avatar for MrEARTHSHAcKER

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 …

Member Avatar for jwenting
0
249
Member Avatar for Dani

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, …

Member Avatar for omalchemical
1
263
Member Avatar for Dannjeru2013

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.

Member Avatar for JasonHippy
-1
470
Member Avatar for rofln

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 …

Member Avatar for rofln
0
199
Member Avatar for nitin1

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 ? …

Member Avatar for rubberman
-1
707
Member Avatar for nitin1

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 …

Member Avatar for Gonbe
0
196

The End.