3,815 Topics
![]() | |
The problem of scheduling unit-time tasks with deadlines and penalities for a single processor has following inputs S={a1,a2,...,an} of n unit-time task. A unit-time task requires exactly 1 unit of time to complete deadlines d1,d2,...,dn, 1<=di<=n penalities w1,w2,...,wn. A penality wi is incurred if task ai is not finished by … | |
I'm writing a code in Java where input is a user generated integer string and I have to reverse the integer and check for boolean true or not. I'm stuck at the math portion because I can't exactly figure out the mathematical process of trying to reverse an integer. [CODE]// … | |
Hi, Iam writing a algorithm that generates buildings using shaders and vertex buffers. Lets not go deep into it. What i need is. How to implement Field of Vision (FOV) in such a scenario ? How can i restrict the user's view ? Hope my question is clear enough.. Waiting … | |
Dear friends.. i have been assigned the project of designing source code for Booth's multiplication algorithm in C. We have reached 60% of success but are now stuck.. if anyone has the source code in C or may be in C++ or even in microprocessor 8086 pls send it here … | |
In On Page Optimization Keyword stuff is not much important in SEO. Because nowdays google not giving more weightage to keywords. User who having unique content with more backlink they can only get good ranks in google. In SEO 30 % is about on page optimization work. 70% is off … | |
I am trying to write an algorithm that finds the Lagrange polynomial given a set of points, in quadratic time. I don't necessarily want the code to do it, just an explanation on how to write this algorithm in java in quadratic time. I know the equation, its relatively simple, … | |
i have questions abou the algorithm that i have got here: [CODE] public class BTreeEx3 { public static void main(String[] args) { BTree tree=new BTree(); tree.add(5); tree.add(6); tree.add(1); tree.add(19); tree.add(3); tree.add(10); tree.add(2); tree.print(); } } class BTree{ private Node head; // why is the head private? public void add(int info){ … | |
I am writing a program to schedule midwives to 2 different wards and at 2 different shift times but i am having trouble with writing an algorithm to do this. this is written in vb.net. | |
Cn anybody give me a program about adding nodes at the end of the list in C? I just need a basis of a program that I will be creating. I also needed its algorithm. Thanks in advance. | |
{ int age; cout <<"Enter Age" << end1; cin >> age; cout <<"The age you entered is" << age return 0 } | |
I think there may be a math error in my program and I may not be seeing it. Is it possible for someone to go over it just to make sure it is ok. I have done everything I could think of to try to fix it, but it is … | |
Is there anything wrong with my program,or a better implementation of OPTIMAL. Error returned is as below: Error restoring the refrence stresm Error was: invalid urgment [code] #include "pager_OPTIMAL.h" /*#define DEBUG 1*/ /*define this and the next one for maximum debugging info*/ /*#define DEBUG2 1*/ /*difne only this one for … | |
I am stuck on my python lab from this week. The lab deals with strings and being able to search them, slice them, etc. The part I'm stuck on is as follows: "You will implement in Python a function matchPat. It will take two arguments, a pattern string and a … | |
Hi, I'm new to programming so please excuse any obvious questions. I have a text file with the following entries: mydescription, myword yellow, mango yellow, banana orange, orange green, pineapple green, mango pink, mango What's important is that there is no order, both the 'mydescription' field and 'myword' change randomly. … | |
I am working on a problem (re inventing the wheel for learning) I have a mxn matric (which is my simplified way of saying it is RAM with bytes on it) Some of the locations on this metric is filled with some data and some places are empty. The mxn … | |
Run faster than your competitor to reach number one spot in Google and all major search engines. SEO is the hottest task in any kind of business starting from local grocery shop to Fortune 500 companies. Reaching the first page of Google always benefit for better traffic and of course … | |
I wrote this program about four hours ago and everything but my if loop is working. I wrote a separate one in a test file and it works, for the life of me I can't get it to work in this program. When inputting anything other than a y or … | |
I just learned about heaps today. It looks like STL wants you to create a heap by first creating a vector, then using make_heap from <algorithm>: [code] std::vector<SimpleClass> Numbers(8); // ... populate ... // convert Numbers into a heap make_heap(Numbers.begin(), Numbers.end()) ; [/code] Why is there not a <heap> just … | |
I hope this is the right forum for this question. Although I'm working in PHP, I really just need the algorithm (in pseudocode preferably) for a complex (at least seems to me) scoring system. The algorithm should always place the highest number of correct answers at the top of the … | |
Assignment 1: Prompt the user to enter a number. After reading the user's input, print a 0 if the number is even or a 1 if the number is odd Assignment 2: Prompt the user to enter a number of seconds between 1 to 86,400. After reading the user's input … | |
hi im new her i want your help im computer student im very week in c++ i have an assingment i dont know how i can solve it this is : design and develop a program which simulates a cellular phone call processing center. The simulator has the following requirements … | |
Our professor decided to give us a really hard assignment in our 2nd week in the course. I really have no clue where to start. Requirements Writing reusable code to check a user name and password can be a challenging task. Three major things can change between one password checker … | |
I am trying to demonstrate to my class mates the run time difference in using bit-wise and logical operators. I chose to do this by writing a simple (I thought) program that reads 2 ints from the console, and multiplies them two separate times, one using the logical multiply (a … | |
Dear friends, I get a assigment and i very confused with this cases. How to write a function that computes the area of an arbitrary polygon – so not necessarily a triangle or rectangle, etc. The input of the function should be a list of points, where each point is … | |
hi all, i wanna ask some advice and suggestion from u guys about combination php and java application. i want to create a web base system.i wanna use php to communicate with database and my algorithm and calculation using java application.is it possible to do so?if yes,what should i have?such … | |
Hi guys! the following table i prepared was for a search algorithm where i was supposed to analyse the number of steps repeated for a number to be searched so . it has 8 elements and the k element and couple of questions i want to confirm . i need … | |
guys our professor wants us to make a program in C. a program that uses the implementations of algorithm. i dont have any idea what is it about, what program should i make, and what would i do. i need your help. please answer. :( | |
2 things that i dont understand: [CODE]class BTree{ private Node head; public void add(int info){ Node node=new Node(info); if(head==null){ head=node; return; } Node current=head; while (true) { // what does this mean? where is the true value derived from? if(info<current.info){// to what number does the current.info refers to? if (current.left==null) … | |
I have created a program that is based off the guess the number. But what ive added is a menu with four options 1 - 1 player 2 - 2 player 3 - high scores 4 - end game. Now I have the two combined at which im sure it … | |
Hello, I started c++, and I recently got an assignment, which is supposed to calculate the sum, variance, mean deviation, and mean in a set. The user can input any number positive or negative for the set. Because it is a set, the person may enter as many numbers as … | |
Hi guys, i need some ideas for my final project title. This is the area that I am given : Mobile Intelligent (Multi-)Agents, Distributed/Parallel Computing, Static/Dynamic Algorithm Analyser, Embedded Applications, Component-based Technology. Thanks | |
This code calculates and the average waiting time of the process given acc to their burst time..It is a famous scheduling algorithm for process scheduling in operating sysytem . After calculating waiting time it also generates the gantt chart for the process given . | |
Write a program that illustrates the growth of the world's population using as input: the start year the initial population size the annual percentage increase of the population the end year. You may assume that the input is valid. Output the year, the size of the population and the population … | |
I need to count out boxes in a warehouse by using image processing edge detection techniques (Sobel filter), images will be taken from a 3D model of a warehouse and the propose system will be used 3 images in 3 different angles to cover the whole area of a warehouse. … | |
Hello, I have been working on this program for the past four hours and was doing good till I got to this point. I am pretty sure that I probably can't do it this way, but I'm just learning and it isn't becoming apparent to me how to correct it. … | |
I want to understand what a search engine algorithm is and how does it works | |
Basically this is suppose to read zipcodes from a file and sorts them in ascending order then calculates the total amount processed. I am getting output, but I think my problem is somewhere in my sort function. The program pretty much runs down to the last zipcode in the file … | |
I'm trying to create a program to add two IEEE 754 floating point numbers, I'm pretty far into the program but I've come to a halt in the bit shift section of the algorithm. I have created a tmp variable to copy the mantissa(0's and 1's inside the char array … | |
Can't get the right output.. Trying to calculate mean, standard deviation, & variance through data structures. [B]Output:[/B][CODE]Mean: -9.25596e+061 Standard Deviation: 2.2836e+046 Variance: 5.21481e+092[/CODE] [B]Code:[/B][code] #include <iostream> #include <stdio.h> #include <math.h> using namespace std; struct StatData { double Data[10]; double mean; double stdDev; double variance; }; int main() { const int … | |
Hi guys, I need to find a fast algorithm to generate all possible sentences from a given words list, e.g: Words : word1 word2 word3 Output : word1 word2 word3 word1 word3 word2 word2 word1 word3 word2 word3 word1 word3 word1 word2 word3 word2 word1 This implementation needs to be … | |
What will the next string be when produced by the next subset algorithm? 110111 and also this one too 001001 I'm really confused and any explanation would be great. Thanks in advance! | |
Hi guys, Im working on a small console app to seek out all those pesky and disk consuming .ncb files and debug folders left from VS and destroy them so the space i need to backup the files is considerably reduced. I have got my recusrion algorithm to scan as … | |
Hello all dear friends : I want to ask u about the Shortest path for routing , I want to make a project to calculate the shortest path for send the packets , so what's your suggestion ?? and can I make an algorithm to calculate the shortest path depending … | |
Hello, I am trying to write a program that reverses an array with integers. Here is what I have so far: driver.asm [CODE] # Test driver for reverser.asm # .data tsize: .word 10 tdata: .word 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 .text main: la $a0, tdata … | |
Dear all, I am having a very frustrating problem with a project in Visual Studio 2008 C#. I have tried everything, I have searched everywhere, but it seems that nothing works. I would appreciate if someone gave me some directions or suggestions, as to where to look for the solution. … | |
Hi, I spent a lot of hours, why this code is wrong. This code compiles good, but execution causes errors (during sorting objects). Environment: (MinGW WinXP or VS 2008) [code] #include <iostream> #include <vector> #include <algorithm> using namespace std; class Edge1 { int v_,w_,weight_; public: Edge1(int v, int w, double … | |
We need an algorithm that search an element x in an array A[1..n] but with a O(1). this element neither maximum nor minimum ???? Could you explain that ? | |
i have this method , which returns true no matter what numbers i feed into it: [CODE] public boolean piecesCollision(ChessPiece[][]pieces,int rowStart,int columnStart ,int columnEnd,int rowEnd) { int j=columnStart; int i=rowStart; boolean valid5=false; boolean valid6=false; boolean valid7=false; boolean valid8=false; int b=0; int SpacesX=rowEnd-rowStart; int SpacesY=columnEnd-columnStart; if(SpacesY>0 & SpacesX==0){ // RIGHT SIDE … | |
I am required to generate "n" random numbers of which each random number ranges from -10,000,000 to 10,000,000. I tried using rand() and changing the range, but it only has a max range of 32,000 or so. What is a good function or algorithm that I could use to achieve … | |
[code]#include <stdlib.h> // include <stdlib.h> rather than <cstdlib> for mkstemp #include <fstream> #include <vector> #include <algorithm> #include <ios> #include <ostream> #include <cstring> #include <sys/stat.h> #include <sys/types.h> #include <signal.h> #include <sys/socket.h> #include <arpa/inet.h> #include <unistd.h> #include <netdb.h> #include <netinet/in.h> #include <errno.h> #include <pthread.h> #include "socket_server.h" #include <c++-gtk-utils/shared_handle.h> #include <c++-gtk-utils/callback.h> #ifdef HAVE_STREAM_IMBUE … |
The End.