3,815 Topics

Member Avatar for
Member Avatar for kumar2884

Hi I am engineering student, currently working in image processing. I have big issue in understanding few basic concepts in programming. To be frank I am beginner, so my question will look silly, so please tolerate with me and if anyone can help me it would be much use full …

Member Avatar for naveenture
0
546
Member Avatar for Coffee_Table

I am trying to run what i thought was a pretty basic program to solve a problem concerning strings (besides the point). It turns out that my algorithm works properly but i am stuck on a detail; the following segment of code is the problem: [CODE] int cases; string line; …

Member Avatar for Coffee_Table
0
600
Member Avatar for zxcvbnm,.

I am trying to create a program for the RSA algorithm. I have managed to get the public keys, but I hit a brick wall trying to figure out how to generate the secret key. I have tried, but the output is either incorrect or doesn't output at all. my …

Member Avatar for zxcvbnm,.
0
100
Member Avatar for Weragodalahiru

Does anyone have a idea about this programe, Assume that you are paid on the basis of one cent the first day, two cents the second day, four cents the third day, with the daily amount continuing to double in this way. Design an algorithm and use it to write a Python program …

Member Avatar for JoshuaBurleson
0
113
Member Avatar for thompsonSensibl

Hi there, I am [B]stuck[/B] with a problem, and don't know where to start. I am given a series of cities, and their locations in [B]longitude and latitude[/B]. The goal is to find the two cities with the shortest distance. I have an algorithm which, given the geographical locations (longitude …

Member Avatar for NormR1
0
306
Member Avatar for santhi1986

hey some one help me out in calculation O(n) int koodle (int n) { int j,k:int x; if(n%2==0) for(j=0;j<n;j++) x+=rand()%2; else for(k=0;k<n;k++) x+=rand()%2; return x; } I need to obtain the time complexity of the above matrix transpose algorithm using program step count method. Thanks for any help I can …

Member Avatar for srabasti
-2
179
Member Avatar for newsguy

Software from boffins who used to work at the [URL="http://spacetech.dundee.ac.uk/"]Space Technology Centre[/URL] at the University of Dundee promises to reveal secrets of legacy code. Founded in September 2009, [URL="http://www.rapidqualitysystems.com"]Rapid Quality Systems[/URL] is a software development outfit that was 'spun out' of the Dundee University Space Technology Centre, and is still …

Member Avatar for jbennet
0
367
Member Avatar for cppman

Hi, I have a .txt file containing information about 1000 events; each event lists 10-15 hit information. This number is not fixed. The format is given below: ================================================================= begin of event: 45 Hits(): X = 1.01101 Y = 1.01101 Z = 0.048 Hits(): X = 1.00502 Y = 1.02509 Z …

Member Avatar for cppman
0
179
Member Avatar for thompsonSensibl

Hi I am having trouble at finding a way to iterate through a string of alphabets until a digit is reached. e.g. iterating through [CODE] //Using a scanner, I can use scanner.getNext() to get the first word. //There may be more than one word; there is no way to tell; …

Member Avatar for NormR1
0
259
Member Avatar for thompsonSensibl

Hello folks. I am stuck in a problem where I must pair objects of an array with unique partners. I have one array. I must pair each element to each other. Incorrect pairing algorithm would result with repetitions, and pairing with itself. e.g. [CODE]String[] codesArray = {"A", "B", "C"};[/CODE] For …

Member Avatar for thompsonSensibl
0
133
Member Avatar for evilguyme

hey guys! i am trying to make an algorithm that generates random numbers within a given range ( this range may differ ) i have tried using rand() but i dont like it because the best seed is the time and it doesnt generate numbers random enough. thing is i …

Member Avatar for Narue
0
121
Member Avatar for Museless

I am trying to find out how to replicate the output of fwrite("andbe", 4, 1, output); an encryption algorithm I am using writes its output as this, but I am sending data across a network, and need to be able to write this to a string to send. The algorithm …

Member Avatar for thines01
0
169
Member Avatar for TrustyTony

Here is simple math program to list number whose all factors are in given set of factors. I have included my timing decorator, which uses my timestring function, so I included that and imports for decorator in the decorator function, bit against the rules. Of course I could have used …

0
274
Member Avatar for Emma Johns

Now members as you know that Panda is sucking the traffic from sites and destroying page ranks. now please tell me what measures should be taken to cope well with the Panda Algorithm.

Member Avatar for amitmax
0
137
Member Avatar for mike_2000_17

[B]Beginner's guide to C++0x: Avoiding Memory Problems by Design of Ownership[/B] If you ever read any resources on C++ programming or object-oriented programming, you must have heard some rethorics like "inheritance is for the [I]is a[/I] relation, composition is for the [I]has a[/I] relation". Is that all? Is that the …

Member Avatar for sergent
8
2K
Member Avatar for keshvari

Hello I write program that can solve linear equations with LUP decomposition method.I know that my algorithm is true and every part of my program do what I want. when I call function lupDecomposition() inside the lupSolve() the program crash.This is my related code: [CODE] int makeUpperDiagonal(Matrix * src){ int …

Member Avatar for keshvari
0
131
Member Avatar for SWORDfreak1

*Feel free to read only parts of the post and reply concerning only specific algorithms* Hello there, I have recently started making a simple web browser game (Coded in VB) in order to make time go by. I have moderate development finished (details shortly) and need some help with my …

Member Avatar for SWORDfreak1
0
199
Member Avatar for bangor_boy

Hi I have been given a homework question asking to compare a made up Cipher along with know Ciphers, the cipher i have been given is called name cipher it takes the last letter of your first and second name and gives them a value and then adds them together …

Member Avatar for Momerath
0
134
Member Avatar for booksty

Hello, Please I need an efficient algorithm for ranking records in a database. I know sorting and grouping can produce record ranks, but I want a means of inserting the ranks beside each record as arranged in the table. For example: [CODE=text]This figures will rank 10 - 3 5 5 …

0
65
Member Avatar for baby_c

Hello Friends.. need a help with Merge Sort I tried to implement Merge Sort using Java language..I followed Introduction to Algorithm book for the algorithm.. but the code generates errors.. please can anyone explain this to me.. why these errors pop-up ?? [CODE] package test; import java.util.Random; public class mergeSort …

Member Avatar for JamesCherrill
0
382
Member Avatar for venktech

I m developing a java app that will have a GUI to draw the graph and implements the graph coloring algorithm to colour the nodes. I started with JFrame and Canvas and could draw lines and circles with paint() and repaint methods.. The problem is repaint method erases the previous …

Member Avatar for venktech
0
371
Member Avatar for thompsonSensibl

Hi, could someone give me some idea of [B]how I can be more EFFICIENT.[/B] Basically, it is some[B] kind of a Knapsack problem[/B]. But the number of items can be in the 100000s, and my solution caters to only around 5, I think. ------- [U]The story / circumstance:[/U] A thief …

Member Avatar for NormR1
0
97
Member Avatar for Ahmed Sarwat

Hi All, Kindly I need help as I would like to develop a software using C for sound processing.The main purpose of the project is texture recognition using sound. I don't know where to start. In theory I would like to import to the the programme a sound file (e.g. …

0
52
Member Avatar for Zvjezdan23

I have only 2 errors in my code. Both of them are on Line 123. The errors are: 1>c:\users\zvjezdan\documents\visual studio 2010\projects\week5_math\week5_math\program.cpp(124): error C2804: binary 'operator *' has too many parameters 1>c:\users\zvjezdan\documents\visual studio 2010\projects\week5_math\week5_math\program.cpp(124): error C2333: 'main::Vector3::operator *' : error in function declaration; skipping function body This is code for finding …

Member Avatar for sfuo
0
187
Member Avatar for mridontknow

[CODE]#include <iostream> #include <algorithm> #include <vector> #include <string> #include <ctime> #include <cstdlib> using namespace std; vector<string> function1(vector<string>v) { for(int i=0;i<4;i++) {cin>>v[i];} return v; } int main () {vector<string>v; vector<string>guess; vector<string>guess=function1(vector<string>v); cout<<"size:"<<guess.size()<<endl; cout<<"contents:"; for (int i=0; i<guess.size(); i++) {cout<<guess[i]<<"";} cout<<endl; return 0; }[/CODE] i need to build vector<string>guess(4) in function function1 …

Member Avatar for sfuo
0
133
Member Avatar for Zvjezdan23

This is a class that uses a vector to store 3 points (x,y,z) so i can find the distance from each of the points. Can anyone help me?? [CODE]#include <iostream> #include <string> #include <algorithm> #include <cmath> #include <vector> #define inline using namespace std; int main() { class Vector3 { public: …

Member Avatar for Zvjezdan23
0
161
Member Avatar for watery87

Hi guys, i currently want to replace all spaces into another(or 2) special character, and vice versa. e.g (replacing spaces with 'xx' character and vice versa). Another way would be removing all spaces completely. Is there any method i can use to accomplish that? [code] #include <iostream> #include <vector> #include …

Member Avatar for WaltP
0
123
Member Avatar for menonnik

How can we find a sub array in a 1-D array? Is there any other method other than brute force method? It is not for maximum sum so we can't use kadane's algorithm.

Member Avatar for menonnik
0
240
Member Avatar for mexabet

My company is planning to develop a web search engine with a crawler, and we're considering using three languages, namely C++, Java and Python. Now we're a bit not sure which language is best suitable for features like web crawling, extracting keywords & indexing, ranking of indexed pages and searching. …

Member Avatar for JeffGrigg
0
297
Member Avatar for floatingDivs

Hi guys, I just finished doing my homework assignment on spanning trees and I wanted some reassurance that I've done it correctly. I'm not looking for someone to state a correction, but rather let me know I've made a mistake (if I have). Here are my edges for [B]Prim's Algorithm[/B] …

Member Avatar for cherry4life
0
199
Member Avatar for goluman

I am a beginner in openCV and C++ as well.I am stuck in a particular place while trying to implement face recognition in open cv. I have the stored training images in a folder called data the images of first person is stored like 1_john1.pgm 2nd image of first person …

Member Avatar for goluman
0
1K
Member Avatar for anjoz

Hi im trying to design a program that matches wildcards example the * , ?, [], {} etc but ive read that java has its own regex support I want to manually code the matching idont know where to start or how to do the program/ design it. Can you …

Member Avatar for Ezzaral
0
79
Member Avatar for TrustyTony

Inspired by Computer Science forum post, I did this code. I prepared it Shedskin compatible, and it runs quite nicely indeed. Even interpreted the algorithm is faster than full sort. Here interpreted test for the module, shedskinning this test would show better time for sort solution. Python version has benefit …

Member Avatar for TrustyTony
0
372
Member Avatar for sherinpoulose

In my web application, i am taking an excel sheet with 8200 rows.it is getting uploaded and i am displaying it in a grid view. After that it is going to next page(say page2) where all column names will come in a drop down list and there i will check …

0
57
Member Avatar for nostalgia

Recently I have been trying to get my head around the PackBits compression algorithm and I'm having problems. I understand that the packets consist of a one byte header followed by the given data and if the value of the header byte is positive, it is followed by the same …

Member Avatar for nostalgia
0
548
Member Avatar for pro_learner

Guys,i have to develop a simulator for Merge sort algo in java.I'm familiar with Java.But i have no idea how to do that.Java applet is easy? or it can be done as a Desktop app.My idea is to do as a desktop application.The programme should allow user to input a …

Member Avatar for pro_learner
0
167
Member Avatar for tedman102

I have tried to get this program to work with no luck. How do you properly use the nested selection structure? (sorry for the lack of braces, I tried getting rid of some for less confusion. Didn't think it would work but thought I might as well try :D). I'm …

Member Avatar for tedman102
0
430
Member Avatar for afi@alvi

Any ONE who can solve this problem.... "Permutations: The challenge is to find the algorithm used to create all possible permutations of a given string"

Member Avatar for arkoenig
0
108
Member Avatar for fsefsef23

Sorry for the confusing title. Basically I have a line which I read from a file that gets stored as an array stack of characters that reads as follows: Nn<-<-<-<-No <-w iz<-sthe<-<-<- the time. Where the top of the stack is the '.', and the bottom is the 'N' respectively. …

Member Avatar for WaltP
0
425
Member Avatar for Jsplinter

I am following this [URL="http://www.boost.org/doc/libs/1_37_0/libs/serialization/doc/index.html"]example [/URL]to serialize an object with boost. However, I keep getting the same compile error: error C2248: 'boost::scoped_ptr<T>::scoped_ptr' : cannot access private member declared in class 'boost::scoped_ptr<T>' Any idea why? [CODE]// Console2.cpp : Defines the entry point for the console application. #pragma once #include "stdafx.h" #include …

Member Avatar for mitrmkar
0
378
Member Avatar for mwenyenia07

i wan't to develop as a high school time-tabling system. the school has streams ranging from 4 to 7(maximum) streams and teaches more than 20 subjects. can somebody give me the required logic/or algorithm to enable me develop it. Thanks

Member Avatar for Netcode
0
102
Member Avatar for milan2011

Hi, I am trying to use a hash table to sort the two string words from an input file ,display words and again put them back to an output file. so if this is my input in input.txt: thank Merci yes oui hello bonjour the sorted output in output.txt will …

Member Avatar for m4ster_r0shi
0
682
Member Avatar for fsefsef23

I have set of lines which I read from a file that gets stored as an array stack of characters. A function called procssline gets called with the stored stack as a parameter. One of the lines reads as follows: Nn<-<-<-<-No <-w iz<-sthe<-<-<- the time. Where the top of the …

Member Avatar for WaltP
0
690
Member Avatar for radiata

Hello so basically my project goes like this: Write a C++ program that reads in two positive integers that are 20 or fewer digits in length and outputs the sum of the two numbers. Your program will read the digits as values of type char so that the number 1234 …

Member Avatar for Caligulaminus
0
1K
Member Avatar for tubby123

guys, i am having trouble printing the LCS. This is the algorithm i am following to get the count of the LCS. [CODE]int main(void) { printf("\nThe LCS is %d",LCS(0,0)); } int LCS(int m, int n) { if(m==l1 || n==l2) return 0; if(X[m] == Y[n]) return 1 + LCS(X[m+1],Y[n+1]); else return …

Member Avatar for Momerath
0
177
Member Avatar for mrnutty

Meant mostly for windows, uses system("cls") although you can simply set USE_NON_STANDARD_CLS to false and it will use newlines to clear screen. Test it out. [code] /** * Note: Use at own risk, this is just for fun */ #include <algorithm> #include <iostream> #include <vector> #include <string> #include <windows.h> #include …

Member Avatar for mrnutty
0
157
Member Avatar for badguy

hey guys I'm new in assembly programming and i need to calculate the determinant of an N*N matrix in 80X86 processor i know the algorithm but i have a problem i don't know how can i sum these SIGNED numbers [ICODE]VAR1+VAR2 [/ICODE] & [ICODE]VAR1-VAR2[/ICODE] which VAR1 and VAR2 are: [CODE]VAR1 …

Member Avatar for Donald Njila
0
103
Member Avatar for Mavericks

I have a question regarding Dijkstra's algorithm (priority-first search) To be precise: In [url]http://flylib.com/books/en/3.56.1.58/1/[/url] The statement to reassign the weight of tree vertices to 0 is needed for a general PFS implementation but not for Dijkstra's algorithm, since the priorities of the vertices added to the SPT are nondecreasing Note …

Member Avatar for Mavericks
0
502
Member Avatar for logan_231_2009

Hello everyone, congratulations for the good job. The last 5 days i search for a comprehensible and simple, CPM algorithm and i can't find one. I want to make a program (in C++) that it will calculate the critical path of a given number of nodes..Any ideas? thanks for reading, …

Member Avatar for user786
0
3K
Member Avatar for Zvjezdan23

I need help with my distance formula. pow is apparently not in cmath or math.h. Since I am a beginner in C++, I need some help with the distance. I did the floaters and everything, well I used a book. Beginning Math and Physics for Game Programmers by Wendy Stahler. …

Member Avatar for mrnutty
0
163

The End.