3,815 Topics
![]() | |
Hi friends, i got one query and would like to share with you, working on a tower defense type game. A while ago I posted asking about maze logic and was kindly directed towards A-star pathfinding. It is perfect. I understand the concept and it makes sense. Now the problem … | |
![]() | I would really like for this thread to discuss all aspects of "RPG math" i.e.(Attack, Magic, Defense, Magic Defense, Agility, etc...) So lets start off with Attacking. I am going to dismiss what the targets defense stats are and just think about raw attack power. So what are the elements … |
Hello, I wonder what I need to do to use find() from <algorithm> to search in a vector containing some Struct, with two string vars. I'm not asking for codes now, I just want the principles. I written this, and got compilation error. [CODE=cpp] #include <iostream> #include <algorithm> #include <string> … | |
Hi there, can anyone help me with this problem?. To improve the speed of operations we wish to replace an open hash table with B1 buckets by another one with B2 buckets. Write a procedure to construct the new hash table | |
Hi I have to create a program that takes in 2 arrays (each array containing 5 values). The program will check whether the 5 values of array one contains the same values of array 2. I have done everything to make this program work [B][I]except[/I][/B] ....[B]how write an algorithm that … | |
Hello, I am new both to here and to Python. This is my first attempt at writing an actual code in Python 3; I've run into a problem with my class declaration, however. It may be a glaringly obvious problem, but it's not to me, so hopefully someone might spot … | |
help pls, i input 2 numbers then it will add if i enter.. i use mov ah,01 code and etc.. can u give me Codes for that example of output: 1 2=3 i input 2 numbers then if i press enter it automatically add, can you help me?? how does … | |
I am fairly new to Python, but trying to make a poker game. How do I determine the winner? I have 'scored' the hands 1-8, and given sub-scores for the high card, but how do I compare the scores of 4 players and then in the event of a tie, … | |
In this work you will materialise a algorithm that solves the problem of Stable Marriage. In this problem we aim at "n" men and "n" women and our goal is the contracting of constant marriages between men and women. Obviously each man can be wedded only one woman and one … | |
Hi, would someone please help me with the following quotions (the required is to implement a simulator for processes scheduling that takes a file contains N of processes each with required details,and then after reading these information from the input file ,the scheduler should schedule the processes for execution. input:N … | |
Good day. I have a problem with matrices / arrays, i cannot resolve. I have no idea how to start... I have two 2D matrices and i want to overlap (mix?) one over the other, no matter what dimensions they have. For example : a = [ (1,2,3,4,5), (9,7), (0,0,0,0,0), … | |
Hi, would someone please help me with the following quotions (the required is to implement a simulator for processes scheduling that takes a file contains N of processes each with required details,and then after reading these information from the input file ,the scheduler should schedule the processes for execution. input:N … | |
I started thread in php but not get any solution so i put here. [B]problem definition:- [/B] I have 100 items and 10 vendors. Vendors bid on that items like Vendor1 Bid [B]Item quantity price Total Min-require[/B] Item1 10 10 100 200 Item2 15 20 300 Item3 17 17 289 … | |
hi, i want to search the data's from database.eg:-i want to search data based on key skills,so how can i write code in c# that i'm able to search information based on keyskills.If we put Asp.net in text box it shows all profile related to it please revert back to … | |
Hi, can you help me just write an algorithm (not coding) to solve to this task. I have to write a program that takes in 3 points on a graph & determines if they form a [B]right-angled triangle[/B]. More detail below. [B]Can you give me some advice on how to … | |
Hi, I got homework about tree data structure professor wrote his own tree stuff which are: binnode.h and bintree.h the actual file is tree.cpp binnode.h [code=c++] #ifndef BINNODE_H #define BINNODE_H #include <math.h> #include <iostream> /*******************************************************\ template node class for binary tree \********************************************************/ template <typename dataType> class binNode { private: dataType … | |
Hello to all, i try to code the binary exponentiation algorithm but unfortunately it is not working as desire. I decided to switch back to You could try using std::numeric_limits<int>::digits to determine the values and sizes or using CHAR_BIT. My logic is define at below. Look at most significant set … | |
Hi, I need to decode DICOM image compressed with JPEG Lossless compression to native DICOM. Can any one help me with the algorithm?.Need an idea to decompress the compressed image. Thank You, | |
Lately, I've been looking into cryptography, and I'm seeing if I can make a fun, maybe half-decent symetrical encryption alorithm. I am no professional, I've just seen a few algorithms online. I've came up with a few ideas: Version 1) I started of with simple xor encryption. I've learned that … | |
what exactly is mean by paper to pencil algorithm and what is it? I am doing a program where two numbers are stored in an array, and are reversed in the array, and I need to add them together, how do I go about doing it with paper to pencil … | |
Hi, I have no1 to no30 product prices. I want to calculate combination for 30 product prices Suppose I have 30 different numbers.. I want to calculate their sum by using combination. But combination [COLOR="Red"]should not repleted[/COLOR] i.e. E.g for 4 numbers... [ 10 20 30 40] I want to … | |
Hi all, I implement Gabor filter in my c++ function (put it in Visual c++) . when I compiled it there was no error but when I clicked on a button for excution this function there was a failure report. I can't find out the mistake so I hope some … | |
Hi, I have no1 to no30 product prices. I want to calculate combination for 30 product prices Suppose I have 30 different numbers.. I want to calculate their sum by using combination. But combination should not repleted i.e. E.g for 4 numbers... [ 10 20 30 40] I want to … | |
Design a class called BubbleSort that is similar to the class SelectionSort. The class BubbleSort will be used in the same way as the class SelectionSort, but it will use the bubble sort algorithm, which is [CODE=syntax] for(int i = 0; i < a.length-1; i++) if(a[i]>a[i+1]) interchange the values of … | |
Hello to all, i have code karatsuba but it is not compute correctly after 6 decimal digits. [CODE] #include <iostream> #include <vector> #include <algorithm> #include <limits> #include <cmath> #include <cctype> // ================================================ using namespace std; typedef unsigned long ulong; void userInput(ulong&, ulong&); int numberLength(ulong); ulong leftSplit(ulong, int); ulong rightSplit(ulong, int); … | |
Just wanted to get a definition for round robin algorithm. Thank you. | |
Hi All, I've got a VC++ dll with Boost 1_34_1 regular expressions in it. I am a programmer but not VC++ or Regex. The program worked fine until the target HTML format (sPage) was changed and I need to get the regexs updated. I got them updated OK. I checked … | |
A company handles international messages. Currently, the messages are printed onto a continuous strip of paper which is cut up and pasted onto sheets of paper for delivery. The owner of the company has decided to automate this process, printing the messages directly onto sheets of paper. Your task is … | |
Does RSVP determine what incremental delay to specify for each router so a total end to end delay is not exceeded? Or as an example, if the RSVP protocol determined there are 5 routers in a path and its end to end (Sender to Receiver) delay requirement is 500ms would … | |
Hello, I'm trying to get the STL equal_range function to work on a data structure I've designed, but I may be trying to use the equal_range function in a non-standard way. Is there a way to get this to work? Basically, I have a vector of vectors of structures (elements) … | |
hi. I am trying to simulate the PGP algorithm. I am trying to encrypt the symmetric key using a public key. My code: [CODE] . . KeyGenerator kgen = KeyGenerator.getInstance("DESede"); kgen.init(168);//**IMP Key symmetric_key = kgen.generateKey(); Cipher c = Cipher.getInstance("DESede"); c.init(Cipher.ENCRYPT_MODE, [B]symmetric_key[/B]); byte[] encrypted_packing = c.doFinal(packing); //Is the following right thing … | |
Good day. I have a problem with matrices / arrays, i cannot resolve. I have no idea how to start... I have two 2D matrices and i want to overlap (mix?) one over the other, no matter what dimensions they have. For example : a = [ (1,2,3,4,5), (9,7), (0,0,0,0,0), … | |
Hello! I want to find the position of objects on my sensor field. I have uploaded the diagram of sensor field attached In the figure S1-S8 are the laser sensor pointing into the field. While red and yellow are the balls [B] Case 1:[/B] if there is only one ball, … | |
Basically i'm creating a software to calculate the shorting distance between two graphs. I use dictionarys to organize this information I sort the path's as keys , each key has different paths according to the given inputs through the command: PrintByDistance. The inputs are made through the command: `insert:company:City1:City2:Distance` Company … | |
Hi, I want to Creation a algorithm?? I have customer 1 customer 2 customer 3 order of customer 1 Item quantity item1 10 item2 2 item3 3 Vendor1 Amount on order Item quantity cost total home-deliver item1 10 50 500 100 item2 2 40 80 item3 3 40 120 Vendor2 … | |
Is the best quantum time determined by whichever produces the shortest average waiting time? | |
How do I have the algorithm below to sort my list in opposite direction (right to left) instead of left to right. Also, how do I make it sort simultaneously or alternatively in both directions? Thanks. [code=python] def bubblesort(l): for passes in range(len(l)-1, 0, -1): for index in range(passes): if … | |
Problem Description My pi is an irrational number, i.e. it cannot be written as a fraction. It's approximate value of p is 3:141592653589793. Below are 5 di erent series which can be used to approximate p: 1. P= 4(1-(1/3)+(1/5)-(1/7)+(1/9)-... 2. P= sqrt(12(1- (1/4)+(1/9)-(1/16)+(1/25)-...)) 3. P= sqrt(6 (1+ (1/4)+(1/9)+(1/16)+(1/25)+...)) 4. P= … | |
Hey everybody, I need a bit of help please. I need to create an 8086 application that will draw a line between two points on the screen that you click on. It's using Bresenham's line algorithm to do the calculations between the two points. I'm using Tasm and Tlink to … | |
I'm implementing dijkstra's algorithm, and I'm implementing it using a priority queue so that the shortest distance is on top for fast access. The priority queue uses a vector for its operations. Each node has the following properties: int id int dist Node *path Here is the issue: when I … | |
hi .,...this is maliha here guys i need ur help m doing my final year project realtedto machine vision m doing image processing of ball n using vb6 for image processing m stucked at hough transform to detect the circular shapre of ball plz help me n guide me in … | |
If you look at the end, i try to store some values in a few arrays. When i try to print these out, I receive complete junk. any thoughts? [CODE=C++] #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #define MAX 122 #define MIN 48 char GetRand(); void RC4(char *realpw, char … | |
Hello, It's been ages since i've coded in c and i'm assuming im having a problem with the syntax. I am sure this is stupid and very in my face but i cant seem to work out my errors at compile time. disk.c: In function `update_rw_requests': disk.c:531: error: `rw' undeclared … | |
If you run this code, you will see that the first two lists values do not show up. I'm pretty sure this is because I am trying to print chars as numbers. I'm just wondering how to do this. Thank you. [CODE=C++] #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> … | |
So here is my program: [code=python]#!/usr/local/bin/python #Scott Landau #CS 380 #Assignment 1 Programming Portion in Python #Created - 4/6/09 #Last Edited - 4/22/09 import pdb #n is going to be equal to 4 for this queens problem. n = 4 #Assigning the empty list to initialState. initialState = [] #Making … | |
hi everyone.. i have a face recognition project to do in any language.. i have no clues on how to begin this.. can anyone plz send me an algorithm on face recognition using neural networks?? thanks | |
I want to construct a bipartite Graph for matchmaking of web services. First step of my project is graph construction. I need help in Bipartite graph construction | |
[code]backTrack ( stateList ) ====================== state = first element of stateList if state is a member of the rest of stateList, return 'FAILED-l if deadEnd?(state) return 'FAILED-2 if goal(state), return NULL if length(stateList) > depthBound, return 'FAILED-3 ruleSet = applicableRules(state) if ruleSet == NULL, return 'FAILED-4 for each rule r … | |
My goal is to create a program that plays Mahjong. I figured the algo would be a bit like this: [code] While there are blocks left { Fetch new board Recognize blocks //find 2 of the same images within the image. Find free blocks //not *really* necessary: computer versions don't … |
The End.