3,815 Topics

Member Avatar for
Member Avatar for welshly_2010

I am trying to find the max flow of a flow network and the final pattern of the network. But the program is giving me 1 answer and when i try and do it on paper i get a different answer, not sure if one is right or both is …

0
133
Member Avatar for nathan.pavlovsky

Hello, I am making a "High Scores" Program from Chapter 4 of Michael Dawson's *Introduction To C++ Through Game Programming Book (3rd Edition)*. In it, a vector consisting of 3 numbers is made and multiple manipulations are made to it through Standard Library Algorithms. There is a situation where the …

Member Avatar for JasonHippy
0
584
Member Avatar for Griff0527

Hello everyone. I am working on creating a stub that would allow me to swap out various sorting algorithms so that I can "plug in" the algorithms and run the various sorts. The below code is for Insertion Sort (yes, I know it is the slowest possible sort), but once …

Member Avatar for Griff0527
0
534
Member Avatar for L7Sqr

Hello. This code snippet is a basic calculator. The general concept is that the calculator accepts infix expressions as strings, converts them to reverse polish notation by way of the shunting-yard algorithm and then evaluates the resulting expression. I tried to encapsulate the functionality of each piece so that, in …

Member Avatar for happyuk
2
6K
Member Avatar for Kirielson

Hello everyone, I'm trying to implement qsort on a struct with the double as a pivot: typedef struct{ char sequence[9]; int occurance; double prob; }tuple; ...... int compare (const void *x, const void *y){ if (x < y) return -1; if (x > y) return 1; else return 0; } …

Member Avatar for deceptikon
0
703
Member Avatar for sudipta.mml

Hi All, I am looking for an algorithm/program that separates all of the data chunk i,e how many chunks are there. Moreover, that program will also be giving information of the size of the chunks and which are the elements. I am explained my problem by this following example suppose …

Member Avatar for rubberman
0
201
Member Avatar for ihatehippies

I'm soliciting advice for performace improvements for creating a weak checksum for file segments (used in the rSync algorithm) Here's what I have so far: def blockchecksums(instream, blocksize=4096): from hashlib import md5 weakhashes = [] stronghashes = [] for chunk in iter(lambda: instream.read(blocksize),""): a = b = 0 l = …

Member Avatar for ihatehippies
0
249
Member Avatar for PrimePackster

Hi guys, I have been working on a sudoku solver, that finds solution by brute forcing during my school days.... But due to the huge number of loops i couldn't do it at then.... SO decided to complete it now.... So here the algorithm: 1. Get the number of fixed …

Member Avatar for Gonbe
0
326
Member Avatar for sadben.khan

Hi, Im having this problem in which the program freezes, the the code in the function called doesn't execute. Help would be much appreciated. // spellchecker2.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include<cmath> #include<iostream> #include<fstream> #include<string> using namespace std; bool inDictionary(string word, string dictionary[]); …

Member Avatar for sadben.khan
0
227
Member Avatar for octarock

1.write an algorithm to count the no of items in a queue 2.write an algorithm that searches a given item of information in a simple linked list (using algol or fortran)

Member Avatar for Schol-R-LEA
-2
171
Member Avatar for 9540252887

I need to develop a multi level marketing application in C# ,i am not able to calculate commission dynamically for all member's from database.mainly i want to calculate total child's or left and right child's for parent retrieved from database. i have used two loop kind of recursion for getting …

Member Avatar for Ketsuekiame
0
502
Member Avatar for bsimms86

I currently have a Ubuntu 12.04 LTS box serving as a network repository for daily workstation backups for our HQ office. Throughout the day the Win7 workstations use Cobian Backup 11 to backup their user folders to their respective samaba shares on this server. At night this server rsyncs all …

Member Avatar for bsimms86
0
1K
Member Avatar for davidm23

Hello guys, There are many *hot* discussions are going on at the Google support forum regarding the scraped (duplicate) content and articles. The last update with google's algorithm seems destroyed the rankings of many websites. Really? Have you experienced this google slap? While searching for a solution to avoid get …

Member Avatar for LastMitch
0
242
Member Avatar for waqas.zafar.125

hey guys ! i have a problem relating to linked lists .. Make a class called Card. Each card is represented by a suit and a rank. You can keep both as strings. Implement getters and setters for the Card class as well as a print function. A 7 of …

Member Avatar for tinstaafl
0
201
Member Avatar for triumphost

I'm trying to write a cout formatter that uses the comma operator and insertion operator. I wasn't able to get that to work so I decided to write it similar to std::boolalpha. when you use `std::boolalpha`, it is able to change 0 values to true and false and you can …

0
190
Member Avatar for vindy1099

I've been working on functions which can perform arithmetic on arbitrarily large unsigned integers for sometime now. I've got add, subtract, multiply, and division with remainder all working but the division function is too slow. I would like to implement Newton-Raphson division but am having a hard time finding example …

Member Avatar for rubberman
0
307
Member Avatar for kevin.bryant.3701

I am trying to create hashing function the algorithm requires me to take each letter of the string and converting it to ascii, multiply it by a number based on its position in the string (for example Input is STACK; ascii for S would be 344 multiply that value by …

Member Avatar for tinstaafl
0
194
Member Avatar for nerdygirl118

The assignment is to implement the Banker's Algorithm using pthreads and mutex locks. We implemented the Banker's Algorithm and it works fine. When we began implementing the pthreads and mutex locks we ran into problems. We know that each process is a thread, and that the mutex lock is acquired …

Member Avatar for deceptikon
0
155
Member Avatar for jborden

I need to write an algorithm for finding the maximum weighted independent set of a graph, G. Any idea of where I should start?

Member Avatar for deceptikon
0
146
Member Avatar for Nagarajan M

Hi Friends, I have PSKC XML file.. That contains my Salt/Key,IV(Initialization Vector),Encrpted Data,password also. Now, I am trying to Do Password Based Encyption and Decryption Using PBEWITHSHA1AND128BITAES-CBC-BC Algorithm. It works,If i generate salt and IV randomly. But,it fails to work,if i dont generate it randomly... Instead of generating Salt and …

Member Avatar for JamesCherrill
0
2K
Member Avatar for nithyananthanaiker

Hello guys, I am currently doing my final year project on OCR. I will have to come up with chain-code algorithm as the recognizer. Any of you guys have sources or links that will lead me to the solution? I have googled much but I could not find a Java-based …

Member Avatar for <M/>
0
215
Member Avatar for dreday92

I am having a few compiling errors due to the syntax confusion on some the functions, Im confused to what im doing wrong, I know its a simple solution I've just been looking at this for hours and cant figure it out. //Header File #ifndef BST_H #define BST_H #include <iostream> …

Member Avatar for rubberman
0
268
Member Avatar for Kristjon

1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 0 T 0 1 S 0 0 1 1 1 0 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 …

Member Avatar for Moschops
0
123
Member Avatar for opawix

#include <string> #include <iostream> #include <algorithm> int main() { using std::string; using std::cout; using std::endl; using std::replace; string s("name"); replace(s.begin(), s.end(), 'n', 'x'); replace(s.begin(), s.end(), 'a','x'); cout << s << endl; system("pause"); return 0; } Here is my code. this code output= xxame. my desired output is that their is …

Member Avatar for Lucaci Andrew
0
142
Member Avatar for tubzz

impliment the selection sort algorithm to sort the elements in a two dimentional array of order 3*4 in descending order. the program should prompt the user to input 12 element, sort and display the elements in the matrix format.

Member Avatar for tubzz
0
423
Member Avatar for silvercats

What is the best encryption system now?un crackable of course. And why do many people use SHA-2 ,MD5? also what is the most pipular one too?

Member Avatar for DoRight
0
143
Member Avatar for tubzz

write a binary search algorithm to look for the presence of a search key in a single dimensional array of 10 elements. prompt the user to input 10 elements and the search key. display meaningful messages after the search operation. #include<iostream.h> #include<conio.h> void main() { int p[10]; int search_key; cout<<"\n …

Member Avatar for tubzz
0
165
Member Avatar for blindislands

I need to write a right turn code for a micromouse using sensors but I don't know where to start. Can you help me please? This is the algorithm we developed. > // Right turn while sensor 1 is OFF // initialize RTcounter = 0; if (sensor 6 == 0) …

Member Avatar for Adak
0
246
Member Avatar for petrarobert002

Matt Cutts, Google’s head of search spam, announced at SMX West today that their Panda algorithm will soon be more integrated into their overall continuous algorithm updates. If you want to know more about this news go thorough on the following link: http://searchengineland.com/google-panda-to-be-integrated-into-the-search-algorithm-panda-everflux-151528

Member Avatar for dreamcyberdci
0
67
Member Avatar for HankReardon

Hello, What is the best way to count the number of swaps required to sort an array that is sorted using the Quicksort algorithm? I put a counter in what I believe is in the correct position and the tests that I have run seem to be correct however Quicksort …

Member Avatar for JamesCherrill
0
4K
Member Avatar for Labdabeta

Hello, I am working on an arbitrary precision arithmetic library. I already created a version that just stored numbers as "before decimal point [unsigned array]" and "after decimal point [unsigned array]". The issue is that it is both inefficient and incomplete. I would like to incorporate complex numbers into the …

Member Avatar for deceptikon
0
236
Member Avatar for ahmzy

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Xml; using System.IO; namespace Enrolement { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { /* This part of my code imports the …

Member Avatar for ahmzy
0
1K
Member Avatar for SeePlusPlus2

What exactly does it mean when an algorithm has a run time of Omega(nlgn) or Theta(n^2), etc. From what I can tell, Big O is used to show the worst case(?) while Omega is best(?) and Theta is either(in between O and Omega?. I'm having a hard time understanding this …

Member Avatar for sepp2k
0
234
Member Avatar for smellysocks

Write in pseudocode the algorithm for determining the average value of an UNSORTED array of numbers, given an array of "a" with number of elements that have a value "length". Additionally, what is its order in Big-O? If the array of numbers were ordered, can the algorithm change? If so, …

Member Avatar for stultuske
0
68
Member Avatar for happygeek

Microsoft Security Advisory notices do not, as a rule, make the media sit up and take much notice. Not least as they have become relatively commonplace over the years, but every now and then one comes along which may grab some press attention. Take [MSA 2718704](http://technet.microsoft.com/en-us/security/advisory/2718704) for example. ![dweb-microsoftflamed](/attachments/large/0/dweb-microsoftflamed.jpg "dweb-microsoftflamed") …

Member Avatar for LastMitch
2
339
Member Avatar for Akshay nand

a. Write a C program to open and close a file given its name. Your program must check whether or not the file exists. b. Add a function for reading an opened file into an array of characters. You may assume the array is large enough to hold an entire …

Member Avatar for bumsfeld
0
211
Member Avatar for csss

I have to perform the encryption and decryption of the file based on des algorithm. The encryption performed well but the decryption having the error as *`Bad Data`* when perform the readtoend function. The coding is given below: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; …

Member Avatar for JOSheaIV
0
553
Member Avatar for dreday92

I am having an issue implementing the Breadth First Search, Im trying to find the shortest distance between the source city and the destination city. Here is what I have so far, Im stuck and dont know what to do about this issue. #include <iostream> #include <string> #include <fstream> #include …

Member Avatar for dreday92
0
219
Member Avatar for Akshay nand

Assignment 1: Simple Text Editor using C programming in Linux Environment The goal of this assignment is to help you practice c programming. A tutorial on Linux commands and c programming is given at the end of this assignment. Resources/examples of c programming is given in Moodle and further help …

Member Avatar for L7Sqr
-1
1K
Member Avatar for DevilDog22

So we are working on loops right now, I got the first portino of my program up and running how I want, took some messing around with but I finally got it. Here is my assignment: > Credit Card Number Check. The last digit of a credit card number is …

Member Avatar for stultuske
0
810
Member Avatar for needhelp88

Hi everyone, I have created an implementation of the game Tic Tac Toe using a board array that is 3 x 3. It reads in a turn from the user via the keyboard, and then the computer returns a move. I have written the computer AI to basically do the …

Member Avatar for needhelp88
0
372
Member Avatar for emaellie

Hi guy, I have been teaching myself how to write C programming code, right now am learning the Round Robin Sheduling algorithm, below is the code that i have managed to write, its the basic but i could do with your help or your direction with how to do the …

Member Avatar for emaellie
0
249
Member Avatar for scottfreevideos

I transferred my website from one server to another and copyied the website with the database and tried to put it all back together without luck. Now if you go to www.paramontelegal.com.au there is this error: Fatal error: Class 'CmsRegularTaskHandler' not found in C:\HostingSpaces\admin1\paramontelegal.com.au\wwwroot\include.php on line 272 if (! isset($CMS_INSTALL_PAGE)) …

Member Avatar for Squidge
0
595
Member Avatar for somjit{}

code for : Percolation using Weighted Quick Union Find Algorithm. this is a homework assignment. iv made the code do what its supposed to do, and it works perfectly. The only problem im facing now is to model the code structure according to the given API. when i try to …

Member Avatar for somjit{}
0
299
Member Avatar for hwoarang69

need help with big o notion. wht i understant you can tell how fast algorithm is running by using big O. so my question is can any one tell me if i have the anwser right or wrong. if right or wrong can you plz explain as much as you …

0
70
Member Avatar for meetjatin88

Hello Everyone , Can some one please tell me what is wrong in my program. This is basically a program to insert a new node in a binary search tree. The thing is that my insert function is working correctly and the node is getting inserted which i am verifying …

0
98
Member Avatar for abacus_x

Hi there! Ive been looking to get some help on a small script im writing to recover an encrypted word for homework. Its a 5 character word of random capital letters encrypted with the RSA algorithm. I undesrtand that Rsa is not a block cipher. Its been encrypted in two …

Member Avatar for blj.davidson
0
165
Member Avatar for wabuain

Hi everybody, I am kind of new to vb.net and have some problems with images. Problem: I want apply an algorithm into 7500 images I need auto way if there any suggestion. after apply the algorith, each image should be saved back into same folder or any place else automatically. …

Member Avatar for Lethugs
0
283
Member Avatar for vegaseat

This snippet allows you to find the number of ordered permutations of items taken from a population of known size. It uses the well know algorithm with factorials. For very large populations you may want to use an approximation of factorials.

3
3K
Member Avatar for DevilDog22

First I want to say hey, new here, hopefully this places is welcoming! Second, I am in a java class and it is my first class and my only experience with programming. So the questions I will be asking will be based off of my assignments. What I want to …

Member Avatar for DevilDog22
0
116

The End.