3,815 Topics
![]() | |
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 … | |
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 … | |
![]() | 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 … ![]() |
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 … | |
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; } … | |
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 … | |
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 = … | |
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 … | |
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[]); … | |
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) | |
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 … | |
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 … | |
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 … ![]() | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
I need to write an algorithm for finding the maximum weighted independent set of a graph, G. Any idea of where I should start? | |
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 … | |
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 … | |
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> … | |
![]() | 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 … |
#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 … | |
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. | |
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? | |
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 … | |
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) … | |
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 | |
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 … | |
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 … | |
![]() | 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 … ![]() |
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 … | |
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, … | |
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.  … ![]() | |
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 … | |
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; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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)) … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
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. | |
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 … |
The End.