3,815 Topics
![]() | |
Representing the list may or may not matter for a specific algorithm, but what does a list has to do with a stack/queue? | |
hello there let me explain my work i have a file i read from it the data after that i try to get the best vertex that it's max(degree/weight) when i find it i put it's neighbors into the glist and i put it into blist and delete both of … | |
I have a code that can be compiled fine on the server but not on my mac machines. The following code is designed to split the reading text according to the string delimiter. But when trying to compile this on my mac, I have issues. void split_is(const std::string &s, string … | |
Hi all, i have been working on the Dijkstra's code for a couple of weeks and i am now puzzled on how to do it this is my code for it so far void d_run(Table T, Graph G){ Vertex V, W; V = 0; W = 0; for (int i … | |
Another month, another flaw related to the historical US export restrictions on cryptography; this time in the form of LogJam. It hits SSL 3.0 and TLS 1.0 which supported reduced-strength DHE_EXPORT ciphersuites, restricted to primes no longer than 512 bits, meaning that a man-in-the-middle attack is possible to force the … | |
Hello!!! I am a beginner to C++ and linked list and searching algorithm really made me confused. There are 26 errors (which caused by pointer ofc). Can anyone give me idea how to fix these errors??? #include<string> #include<cstdlib> #include<iostream> #include<malloc.h> #include<fstream> #include<time.h> #include<conio.h> using namespace std; #define SIZE 10 class … | |
I'm trying to make a program that solvas a linear system Ax =b with a n x n symmetric matriz and a n x 1 vector by gaussian elimination with partial pivotization. The program must search for the pivot element in each column. If the pivot isn't placed in the … | |
I have seen many website owners are commenting in my blog posts on my blog and asking about new update ? I have not seen any news about new update want to confirm from my friends about it ? | |
How to write a Java program to implement it. The program should be simple. It may ask for the sentence and returns the count of all parts of speech found in the sentence. Can any one idea to solve this type problem | |
Hi It's been a while i'm learing C++ but still i have some issue with `Move semantics` and some other stuff. I wrote this class but i don't know why the `Copy constructor` is getting called and the output is a little strange to me, shouldn't the `Move Constructor` gets … | |
i made c++ algorithm code. But i don't know how to connect this output which shows in console to windows form application program. please tell me about detail... | |
i have a website that i have configured to send me an email every time an error occurs, i keep getting the following error: Message: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation … | |
i need to create a deck of cards and shuffle it as well and display and sort 4 cards as a hand ahich i have done already please i need to include straight, full house, pair, 3 of a kind and 4 of a kind i have no clue how … | |
Is there anybody having a code snippet for using the Bresenham circle algo and modifiying it in a way so that it actually draws arcs with specified start and end angle instead of complete circles? A Bresenham algo for a complete circle in Python would be like this: [CODE]import PIL.Image, … | |
I want to get all the vertices from an ARC. I have all the data (for ex : start point, end point, start angle, end angle, radius) which will used to draw an arc but my need is I have to generate all the vertices from the arc data. I … | |
I am trying to implement meeting scheduling algorithm. I want to randomly generate meetings and store it in a file. Then read this file in another code, create different agents who will try to schedule these meetings. My input meeting file is as follows: 1 20 25 [1 2 3 … | |
I want to calculate user steps(like pedometer).I know that with iPhone 5s, 6 and 6+ we can use `CMStepcount` or `CMPedometer` or class(which use M7 chip of devices) but iPhone 5 and lower versions does not support M7 chip, so we can't use `CoreMotion`. By searching all over internet i … | |
Hey guys, It's not exactly trouble with coding that I am facing more like trouble with understanding what I have to implement .. Quick background .. I am trying to implement statistical-saturation attack on block ciphers. The piper that describes the attack has the following algorithm that is used against … | |
Hi all, What is the best sorting algorithm for a doubly linked list? Insertion sort and merge sort appears to the best due to the less overhead compared to the bubble/selection sort. Would like to know your insights on this. Thanks. | |
I'm trying to implement a MiniMax algorithm with alpha/beta pruning. Totally stuck and can't see where I'm wrong. The class MiniMax contains a State and an Action. The method getAction returns an Action (supposedly the best action to take). The Game object has two methods, isTerminal returns true if the … | |
Write a Java application that computes and prints the grade of a student according to the following algorithm: 1) It should read from the user TMA score and MTA score. 2) If their sum is less than 15, the grade "FC" should be printed and the program will stop. 2b) … | |
Hello Everybody, I was wondering if anyone would be generous to spend some few minutes to work on a silly algorithm about files and structures ; a file named G containing a series of telegrams, each telegram constitute of series of words seperated by one or several spaces. the telegram … | |
As we all know, Google is going to start factoring in mobile usability into their algorithm later this month. Over the past few days, out of no where, Google Webmaster Tools started showing an increasing number of mobile usability issues (first 124 earlier this week, and now 268 pages with … | |
I am using codeigniter 3 And i am trying to build stay signing functionality In hash_hmac() i am passing an array , but i want to convert it into a string , Can any one tell me how to convert it? /* | --------------------------------------------------------------------------- | REMEMBER ME TOKEN | --------------------------------------------------------------------------- … ![]() | |
I am in my first semester of computer program and this my third project. I am taking this class online so I do not have the in-class benefit of working with others. I have completed all of the code and the program works the way I believe it should. I … | |
Hi....below is my .csh file. In this foreach n, i have runned my algorithm 10 times. But now i want it to run(iterate) 1000 times. i.e. foreach seed(1 2 3 4 5 6 7 8 9 10 11 12......1000). I tried using awk'BEGIN{for(....);}'.But still its not working...please help. foreach n( … | |
write a Bash script file that implement the RSA algorithm. The user has to enter on the command line some parameters and options, which will determine the behaviors of the script. The syntax of the shell command is $ your-shell-file-name –p<file> –q<file> –e|-d [-i <filename>] [-o <filename>] OR $ your-shell-file-name … | |
I'm writing a program tha calculates linear regression, one of the values that are generated is the r (linear correlation coefficient) value. However, my algorithm doesnt work. I implemented the r value from the formula located at [Click Here](http://mathbits.com/MathBits/TISection/Statistics2/correlation.htm) Here is my code: long double LinearRegression::calculate_r() { long double r; … | |
Title: The core of the core of the big data solutions -- Map Author: pengwenwei Email: pww71@sina.com Language: c++ Platform: Windows, linux Technology: Perfect hash algorithm Level: Advanced Title: The core of the core of the big data solutions -- Map Author: pengwenwei Email: pww71@sina.com Language: c++ Platform: Windows, linux … | |
I realized that I haven't released any snippets in a while so I figured while I was working on some interesting projects of my own that I would release one that I recently decided to write because I don't see the algorithm out there in C# very often. This snippet … | |
When reading any beginning manual on C++ an array is introduced as follows: float A[10]; That format is valid, in that it compiles and seems to work just fine -- for a while. Later on in the manual we learn to allocate/release memory using the new and delete keywords. So, … | |
Hello. I am was doing research on cryptography and found a simple algorithm (One time pad algorithm) that interests me. I was able to create a simple version of this that only works with capital letters. The problem however is that the encrypted contents doesn't only contain capital letters. It … | |
This is my last question over my current running project. For some reason, when i call my object in my main program it gives me errors. If I try to call it as: Checkout_Simulation sim_obj; Then I get errors: Checkout_Simulation.cpp:16: error: missing template arguments before ‘sim_obj’ Checkout_Simulation.cpp:16: error: expected `;' … | |
I have to sort the 5 elements in a, the Days and the Vowels. How do I use the template <class T> with the way I put this?? #include <iostream> #include <algorithm> #include <iomanip> using namespace std; // Function prototypes void DisplayA(int[], int); void showArray(int[], int); void DisplayB(string[], int); void … | |
hi i need the code of dagsvm for my program if any one have this , please will send to me | |
hi.I need 8 search engine for my school.can you give me just the name of those algorithm (except binary search and linear search). | |
this is my code for 16 - bit multiplier with booth algorithm .what is the problem ?? module booth (prod , busy , mc , mp ,clk ); output [15:0] prod ; input [7:0] mc , mp ; input clk ; reg [7:0] A , Q , M ; reg … | |
I wan to implement booth multiplier algorithm (16-bit) this my code .but it does not work.what is the problem ? | |
Please I need a java expert to help me with the code and algorithm that deletes duplicate element from an array. I have written a programm to do this as shown below using my own algpritm. Though it is working but I think my code is too long for this … | |
I have being trying to implement GA in java. please ccan anyone guid me on how to go about implementing it for a school that offer 13 subjects with 8 periods per day for 5days. They have 7 staffs of which some of them teach morethan one (1) subjects and … | |
Given a unicode string or file, what is the best way to find a short unicode string that is **not** a substring of the first one ? I want a working algorithm that avoids transforming the first string into a list of characters. My first idea is to choose a … | |
Hi programmers, i need to have a code to produce a round robin algorithm. Can you help me?? The requirements are that it must have: A menu system with the options (1 input data manually-if option 1 is selected a)to read data from file, b)to enter data by hand, 2-automatic … | |
Write a program that reads a word and prints the number of syllables in the word. For this exercise, assume that the syllables are determined as follows: Each sequence of adjacent vowels a, e, i, o, u, y, except for the last e in a word, is a syllable. However, … ![]() | |
I need to output the smallest number that is entered. I can't seem to figure out how to do it though. Thanks in advance. small.cpp #include <iostream> #include <algorithm> #include "arrayListType.h" using namespace std; int main() { arrayListType<int> intList(100); // int min(int first, int last); int counter; int number; cout<< … | |
if i were asked a secret question between 1 and 1 billion by asking yes/no question of the form "is the number less than X? " what algo should i use to efficiently find the secret number? using the algo what will be the minimum number of questions if asked … | |
![]() | I need to write a Java program that uses a Monte Carlo algorithm to calculate the probability that next week’s lottery draw won’t have any consecutive pairs of numbers (e.g. 8 and 9 or 22 and 23). 6 numbers are drawn from 1 to 45. ![]() |
I am new to Java language. I have been taken some personal tutorials, reading on my own and practicing by writing and solving exercise in the book I am using. Below is an exercise I am trying to solve. Question. (Find the Smallest Value) Write an application that finds the … | |
Algorithm 1 Distributed Algorithm (at each node Si, i E N) Input: the neighbor set N(Si), the neighboring schedules, the critical location set Pi that Si covers, the importance factor of each location Pi, i E Pi, network lifetime L, battery life Bi, Si is initially unlabeled Output: the state … | |
Hello, Thank you for your time! I am trying to understand the Quick Sort algorithm. I have some questions about the partition method. I found the following implementation online: import java.util.Scanner; public class QuickSorts { public static int partition(int a[], int left, int right, int size) { int pivot = … |
The End.