3,815 Topics

Member Avatar for
Member Avatar for rahulraj9

matrix operation please help me coding this in c++: - Inverse matrices. - Calculate matrix determinant. - Set a row or a column of the matrix to a certain value. - Calculate performance (time and memory taken by each algorithm).

Member Avatar for nitinmbhanu
0
156
Member Avatar for greencode

Hello, I'm working on an assignment that requires me to do the following: "A file contains 6 numbers per line and contains several records. Another file contains 3 numbers per line and several records. Write a program to input each of the numbers, find the highest number, the lowest number, …

Member Avatar for WaltP
0
325
Member Avatar for lxXTaCoXxl

I'm trying to upgrade my class library to my current mathematical skill set and am having trouble with multi-term polynomials, especially those I where I don't know how many terms the user will be putting in. I know that the formula for the first derivative of a polynomial is ax^n …

Member Avatar for lxXTaCoXxl
0
301
Member Avatar for lxXTaCoXxl

I'm trying to upgrade my class library to my current mathematical skill set and am having trouble with multi-term polynomials, especially those I where I don't know how many terms the user will be putting in. I know that the formula for the first derivative of a polynomial is ax^n …

Member Avatar for lxXTaCoXxl
0
146
Member Avatar for csolutions

I have an access database from which i have to retrieve data from access database into c# showing tree view in my application. here is what i want to do. I have this access database with the following tables. [CODE] categoryid | Category Name | Parent Category =============================================== 1000 Food …

Member Avatar for sayantanbagchi
0
676
Member Avatar for stereomatching

#ifndef EXAMPLE_HPP #define EXAMPLE_HPP #include <memory> #include <boost/gil/gil_all.hpp> #include <QtGui/QApplication> #include <QtGui/QHBoxLayout> #include <QtGui/QImage> #include <QtGui/QLabel> #include <QtGui/QWidget> //#include "image_details.hpp" static void x_gradient(boost::gil::gray8c_view_t const &src, boost::gil::gray8s_view_t const &dst) { for (int y = 0; y != src.height(); ++y) for (int x = 1; x != src.width() - 1; ++x) dst(x, …

Member Avatar for stereomatching
0
304
Member Avatar for ftrzjocelyn

Hi, I'm a new java user, working on a brute-force knights tour algorithm in linkedlist. The move function worked perfectly (for a while), I mean, the pointer could move forward, or backward if a wrong path was chosen. But all of a sudden, it returned me a stackoverflow error. i'm …

Member Avatar for JamesCherrill
0
571
Member Avatar for dbsp

I am trying to sort an ArrayList of Strings using the Merge Sort algorithm. However, I am having an error where it occurs on line 67 **`result.set(i,right.get(r));`** Where I get the IndexOutOfBoundsException. I have tried printing out the index of the result, and it seems to be that I am …

Member Avatar for wen_cai
0
824
Member Avatar for vriend12345

When I am trying to design an algorithm , I had a programming problem in Java .. I want to write M nested "for" like that: for (I[0]=1; I[0]<=N; I[0]++) for (I[1]=1; I[1]<=N; I[1]++) ... for (I[M]=1; I[M]<=N; I[M]++) { Statements; } Where M is entered by the user during …

Member Avatar for vriend12345
0
119
Member Avatar for abhishekagrawal

Hi all, I have written a program to find the reciprocal of an input number by using newton rhapson iterative method. Below is the algorithm implementation in C: #include<stdio.h> #include<stdlib.h> #include<math.h> int main() { double guess,newguess,input,error=1.0; printf("Enter the input number"); scanf("%f",&input); printf("Enter the guess for the reciprocal of the input …

Member Avatar for TrustyTony
0
213
Member Avatar for goyal_2485

i have to decrypt a frame on my server. encrypted frame is coming from client device through GPRS on socket.encryption is done with "TripleDes" and with a given key.same algorithm and key i am using n server side. frame is a combination of Hex and Ascii String. problem is when …

Member Avatar for goyal_2485
0
605
Member Avatar for AccurateAG

Today, I went to check my web site's SERP rankings. Yahoo and Bing, no problem; they are firmly on page 1, where they have been for more than a year. Google, big problem. My site is now on Page 3 for one keyword, and not even in the first 10 …

Member Avatar for JorgeM
0
225
Member Avatar for caltech

Here's my code. (Lines of interest: 49, 138, and 162; rest of the code works fine.) #include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <algorithm> #include <cstdlib> #include <conio.h> using namespace std; class Records { public: string name; int hours; double rate; int age; double pay; double tax; double …

Member Avatar for mike_2000_17
0
362
Member Avatar for lamba89

Hi everyone, I'm trying to parallelise a Gram-Schmidt algorithm. Here's the serial code: for( k = 0; k < m; k++ ) { for( i = 0; i < k; i++ ) { s = 0.0; for( j = 0; j < n; j++ ) { s += q[ i …

0
126
Member Avatar for jimjones371

Need help from daniweb community. I suck at programming. It doesn't make sense to me. I'm not going to be programming in my career but it's part of my major. I'm desperately trying to get an c- just to pass. Would love some help. I would appreciate some explanation but …

Member Avatar for gusano79
0
286
Member Avatar for sweets

import java.io.*; import java.nio.ByteBuffer; import java.util.zip.*; import javax.crypto.*; import javax.crypto.spec.*; import javax.swing.*; import javax.swing.event.*; import java.awt.*; import java.awt.event.*; public class Steganograph { public static final byte[] VERSION_BYTE= {'2','0','0'}; public static final int OFFSET_JPG= 3; public static final int OFFSET_PNG= 42; public static final int OFFSET_GIF_BMP_TIF= 32; public static final short …

0
127
Member Avatar for chinee

i have to create a graph for my project i found an example that was working and followed it first time with graph. i wrote my code got no errors but when i run the code this is what i am getting i don't understand it can some one help …

Member Avatar for emilo35
0
218
Member Avatar for whtewa

The hash table stores phone numbers and names, uses the names as the keys. The problem I have is when I use the terminal window to enter the names and numbers. The strange problem that occurs then is that all the names get the same phone number. But when i …

Member Avatar for WaltP
0
214
Member Avatar for jwill222

The language i'm trying to do this in is c++ let's say i have a number 123456 , i want to divide this up into partitions of two so i would have: 12,34,and 56. I want to add the partitions up and it would equal 102. How can this be …

Member Avatar for raptr_dflo
0
2K
Member Avatar for jwill222

#include<iostream> using namespace std; int main() { int Partnumber[15] = {112,130,156,173,197,150,166,113,123,143,167,189,193,117,176}; int Quantitynumber[15] = {12,30,56,17,19,50,66,13,12,14,16,18,19,11,76}; int hashTable[19][2]; int collisions = 0; int index = 0; for(int i = 0; i<15;i++) { index = (Partnumber[i] % 19); hashTable[index] = Partnumber[i]; if (hashTable[index] != 0) { do{ index++ }while(hashTable[index]!=0) } if(index >= …

Member Avatar for jwill222
0
613
Member Avatar for coderKid

Hi everyone i am new here and i have problem with this code, i need algorithm all code. please help me all master of Assembly :) program has a bug. not change AM to PM in the right time. please help me to change. thank you so much. :) especially …

0
107
Member Avatar for phorce

Hello, I'm trying to determine where a small matrix would fit inside a big matrix.. But, the small matrix is not in the big matrix so I need to see how simular they are.. The one with the lowest value, is the best fit.. So my difference function is this: …

Member Avatar for Lerner
0
160
Member Avatar for phorce

This may sound really noobish, and I'm probably missing something really stupid.. But, I'm trying to calculate the differences between matrices, and the one with the smallest value (result) is the matching number.. But, for some reason my algorithm seems to be missing the smallest number and I can't figure …

Member Avatar for rubberman
0
115
Member Avatar for getanshub4u

I am trying to parallelize the [Guibas Stolfi delaunay triangulation](http://goanna.cs.rmit.edu.au/~gl/research/comp_geom/delaunay/delaunay.html) using openmp. There are two things to parallelize here- the mergesort(),which i did and the divide() where I am stuck. I have tried all possible approaches but in vain. The approach followed(divide n conquer) in divide() is same as that …

0
116
Member Avatar for apanimesh061

I am trying to implement ROCK algorithm in JAVA. It is used to cluster categorical data. I have like N statements that are to be clustered. This is a good example of this algorithm: faculty.ksu.edu.sa/ykhlef/mscThesis/clustering-P1.ppt I have coded till number of links for each cluster. But I cannot understand how …

Member Avatar for NormR1
0
103
Member Avatar for caltech

In my code below you will see at the bottom my very lame attempt at sorting the vector array of employee records by name, alphabetically. My friend tried to tell me how I'm supposed to do it, but I can't make any sense of it really, so if someone could …

Member Avatar for caltech
0
277
Member Avatar for abhimanipal

Hi Folks, Here is another noob question. I am trying to write a simple predicate for the find_if function in STL. Here is my code #include<iostream> #include<vector> #include<algorithm> #include<iterator> using namespace std; class InRange{ const int& low; const int& high; public: InRange(const int& l, const int& h): low(l), high(h){} bool …

Member Avatar for Saith
0
412
Member Avatar for phorce

Hello, I have 2 vectors, and I'm trying to search/scan the first vector for the second vector. Let's say I have this vector/Matrix: M1 = 0 1 1 0 0 1 1 1 1 0 1 1 0 0 0 1 M2 = 0 1 0 1 Then I will …

Member Avatar for histrungalot
0
178
Member Avatar for janet@123

I am trying to use the glib HashTable implementation for my code and facing some issues in memory allocations. The code I've written is: GHashTable *g_hash_table; g_hash_table = g_hash_table_new (g_direct_hash, g_direct_equal); gint *port, *src_value, *value; guint32 *dst_key, *key; . . . while(1) { key = g_malloc (sizeof *key); dst_key = …

0
133
Member Avatar for Alicito

Hello, I just need some help with linkedlists in C#, linked-list in C++ is kinda easy with pointers but im facing some problems in C# I read the examples provided on http://msdn.microsoft.com but I couldn't figure out how to link two different linked lists the efficitent way seems to be …

Member Avatar for Momerath
0
261
Member Avatar for bo0ga

I'm trying to look for some ways to increase the SEO of my company's website. My boss spoke to some guy who said he could embed the company's name into the "back pages" of NY news (I'm from NY). Can someone please explain to me what he means by this …

Member Avatar for jovy_WOG
0
209
Member Avatar for caltech

My whole code is below. I need to print an alphabetically sorted list towards the end right now, that's where I'm at... you can see my measly attempt, but I clearly don't really know what I'm doing with this sorting algorithm... Do I need to make a new vector comprised …

Member Avatar for Lerner
0
613
Member Avatar for shean1488

Hi everybody, I'm trying to figure out how much memory was used for merge sort algorithm. I believe it is just one or two expressions, but can't come up with them by my own. public void mergeSort (T[] data, int min, int max) { T[] temp; int index1, left, right; …

Member Avatar for shean1488
0
334
Member Avatar for weeziefoo

I am a CS1 student and have had no issues until this point in the class really. I have been working on this for awhile now and cannot figure out how to get this to work! I am supposed to use this code and modify it to #1 - open …

Member Avatar for weeziefoo
0
608
Member Avatar for swissknife007

I am designing my own algorithm to check if 2 codes are similar or identical? How do pre-exsting softwares do this? What logic do they use? Are there different levels of testing for this? please give detailed answers

Member Avatar for ravenous
0
246
Member Avatar for swissknife007

I am designing my own algorithm to check if 2 codes are similar or identical? How do pre-exsting softwares do this? What logic do they use? Are there different levels of testing for this? please give detailed answers **CLOSED DUE TO DOUBLE POST, SEE** http://www.daniweb.com/software-development/cpp/threads/420816/how-to-check-2-codes-are-similar-or-identical

Member Avatar for L7Sqr
0
241
Member Avatar for hawkeyeviewonu

Sorry for my english.. Im trying to make a program that show the shortest route of this nodes using BFS algorithm.. ![115](/attachments/large/3/115.JPG "115") i tried to print the prev array which shows the shortest route but somehow it doesnt appear on console when running.. how to fix it? btw, is …

Member Avatar for histrungalot
0
985
Member Avatar for coroll

Hi all, I have given a assignment to implement patterm matching algorithms and to do a experimental analysis on number of comparisons, real time taken and CPU time taken for each algorithm. I have done all except CPU time calculation. Plz can anyone guide me how to do this...

Member Avatar for coroll
0
5K
Member Avatar for sinnebril

Hi there! I have run into a new problem, this time with the re.findall() module. The objective of this code is to iterate over rows in a Excel sheet and print them in a other Excel sheet with a separation of column between the species name and the gene name. …

Member Avatar for sinnebril
0
204
Member Avatar for _Nemesis_

Hi guys, I have been trying to implement the A* algorithm in C++ and would like to make use of the priority_queue structure to hold the open and closed lists of nodes. The problem is, all of the algorithms that I have found use the equivalent of a "search/contains" function …

Member Avatar for _Nemesis_
0
1K
Member Avatar for Anonymous123

I have an assignment to write a program in Java to implement the Natural Correspondence Algorithm for converting a linear list into a binary tree. The program should process its inputs in two steps: (a) It first builds a tree for a given input list (b) It then traverses the …

Member Avatar for Anonymous123
0
280
Member Avatar for Freedom*

Hello guys, can you help me with this? i want to have a username and a password saved in the args arrow and then the user will give a username and a password. I want to compare the two usernames and the two passwords. How can i achieve that? Also, …

Member Avatar for Mitja Bonca
0
79
Member Avatar for MunkyCheez

Hi, I'm new to programming in Python, & I need help. I am trying to read from a text file, which contains: 1 4 5 3 1 0 2 4 18 5 2 0 0 9 I am suppose to implement a Simplex algorithm that can hopefully solve these numbers. …

Member Avatar for woooee
0
4K
Member Avatar for TheWind147

Below is a merge sort function provided by my instructor, my task is to create a program that asks the user to input numbers in random and choose which type of sorting algorithm he wants to use to be able to sort the numbers, I managed to finish quick sort …

Member Avatar for TheWind147
0
333
Member Avatar for xtinab

Hello all, I'm having trouble writing a recursive algorithm to traverse a Huffman tree to encode a message. I'm sure you all know what they are. Here's my algorithm: string HuffmanCode(const char& symbol, const TreeNode<SymbolPriority>* huffman, string &code) { //Base case: you are in a leaf; if the leaf contains …

Member Avatar for histrungalot
0
1K
Member Avatar for cali_kid

**I am trying to write a program that will pring a list of random numbers from 1-100 and store them in an array. and then bubblesort them into ascending order. This is what i have so far but it is giving me a whole different set of ascending numbers after …

Member Avatar for zeroliken
0
183
Member Avatar for kalcio

Hi, I want to use a compression alogorithm to compress files and implemented in my interface,I have browsed the net and I have found many like Huffman,is it the best choice and thanks

Member Avatar for JamesCherrill
0
136
Member Avatar for Dmiller071

Hi all, I need to write an algorithm that can find intersections, dead-ends, and turns within a maze. Below is the code I currently have. You're welcome to read through it, though I'm not sure if it will help in any way. The basic information: - Maze image file is …

Member Avatar for Dmiller071
0
174
Member Avatar for java_sabin

im doing remote desktop project. i need to connect two sockets (each from single client) through the hashtable in the separate application server, so that client1 can see the desktop of the client2. can u suggest me solution for this? how can i achieve this? so far i can connect …

Member Avatar for bambam2174
0
258
Member Avatar for mkerala

A program to solve the following problem. You can use C, C++, C#, Java or Haskell to code your solution. **The problem** You have a block of platinum that can be exchanged in your bank either for cash or for smaller blocks of platinum. If you exchange a block of …

Member Avatar for thines01
0
1K

The End.