3,815 Topics
![]() | |
I need to extract an integer value from the end of a string, and I'm a little bit lost on algorithm functions/classes in C#. Is there any sort of convenient class/function to help with this? Here is a sample string: "omaha nebraska weather 2400" | |
Good day, I am climbing a wall trying to figure out why I can not retrieve the results of a mysql query to a php array. My query polls the database and it is retrieved but all the data is encrypted. I need to take the results and put them … ![]() | |
[B]Beginner's Guide to C++0x: The Big Five - Implementing a Resource-holding RAII Class[/B] This tutorial will show how to implement a [I]resource-holding class[/I] showing practical use of [I]C++0x features[/I]. A resource-holding class is any class which holds, with its data members, a resource which could include: [LIST] [*]dynamically allocated memory … | |
I apologise in advance i know this has been done to death but i cant find an answer. im currently getting this error: [QUOTE] Warning: Cannot modify header information - headers already sent by (output started at /home/sites/test.com/public_html/index.php:9) in /home/sites/test.com/public_html/login.php on line 5[/QUOTE] my index file is as so: [CODE]<?php … | |
Whenever I try to compile my code for this function my compiler keeps throwing projectB.c:31:15: error: conflicting types for ‘returnDegree’ projectB.c:19:17: note: previous implicit declaration of ‘returnDegree’ was here [CODE] #include <stdio.h> #include<math.h> int main(){ double sanantonioLat; sanantonioLat = returnDegree(29.0,25.0,51.0); printf("blah %f\n" , sanantonioLat); return 0; } static double returnDegree(double … | |
Hello, I've got a problem that I can't seem to figure out. I'm writing a program to simulate a process manager, and I'm doing four different algorithms: First come first serve, shortest job next, shortest remaining time, and round robin. I've got the first two down perfect, but I'm having … | |
Dear friends: I use the find algorithm in STL to find a term in the vector<string>, but the find only return the iterator, how to return the index number of the term. Regards | |
I am finding the recursion very difficult on this one. Could someone explain this to me. If this is a famous algorithm, a link containing the explanation would also do. I thought probably a couple of magic lines from you would change the way i am looking at this. I … | |
communication with human being establish standard database understanding structure interducing 3d memory 3d adressing caculation difference rate class movement class mark elements association in specie class pattern recognition first-level index two-grade content define new things by self independent creativity find problem solve problem vague algorithm testing consideration save experiment appendix: … | |
thus iterators predefined functions? I am confuse between function and predefined functions. | |
anybody know how to explain this??? set_difference(a.begin(), a.end(), b.begin(), b.end(), result.begin()); std::=is this algorithm??? how thus this code work??? vector<char>=how vectors work??? cassert=how thus this work??? back_inserter(setDifference)->i don't know how this code work??? | |
We all know what Web 1.0 was about. Essentially that's when the web was born and we were able to retrieve information from various sites. Web 2.0 changed the whole dynamic of how we use the internet as end users allowing us to store data, software applications within the browser, … | |
Hey guys. I am having problems with this code. I am somewhat new to java so this may be a simple mistake on my part. Any help or direction would be greatly appreciated. I am trying to convert this code to use double instead of int. It is a insertion … | |
I simulated a load balancing concept using java code. It works well when two services access the display method concurrently. However if there are more than two request then this algorithm is likely to fail. Therefore how could I solve this problem? Your help is kindly appreciated. Thank You. [CODE] … | |
[CODE]//====================================================== //this is the grading sorting program for part one //====================================================== #include <stdio.h> #include <stdlib.h> #include <string.h> #define SIZE 10 int main() { FILE *ifp; // file pointer, points to the file char filename[32]; // store file name int ID [SIZE],grade[SIZE]; int i; int sum_grades = 0; //opening file by … | |
hi friends... i am doing my project and the title is "IMPROVEMENT OF ABC ALGORITHM FOR CLUSTERING".... I am not getting how to start the coding... can any one please help me out how to start the coding... thanks in advance | |
[CODE] #include <conio.h> #include <iostream> #include <cstring> #include <ctype.h> using namespace System; using namespace System::String; enum CardType{ MasterCard, BankCard, Visa, AmericanExpress, Discover, DinersClub, JCB }; bool Validate(CardType cardType, String cardNumber){ int number[16], len=0; for(int i=0; i<strlen(cardNumber); ++i){ cardNumber[i] = atoi(cardNumber[i]); if(isdigit(cardNumber[i])){ if(len == 16) return false; number[len++] = cardNumber[i]; } … | |
[code]#include <iostream> #include <cassert>//what is the use of this??? #include <algorithm>//how to convert in turbo c++ and what is the use this??? #include <vector>//is this array in turbo c++??? using namespace std; int main() { bool result;// what is the use of this?? string s("abcde"); string s2("aeiou"); vector<char> vector1(s.begin(), s.end());// … | |
Hello everyone, I have some code to sort a random array of integers, although im getting an error whenever I try to run the method. It prints the input and then I get an error. The code is below and the error is below that. If anyone could help me … | |
Hi everybody! I am implementing my undergraduate thesis with subject "object extraction in a video shot". I haven't studying signal processing topic when i majored in computer science, so this subject is very strange to me. I knew this problem associates with image segmentation issue,thats all, maybe having else one … | |
Hey, this one is agaain from File-handling How do you replace a word in a file with another word. The algorithm should be somewhat like this 1)Read (fgets) the entire line into a buffer. Locate the word/ position of the word. 2)From that point onwards, OVERWRITE the contents in the … | |
This is code generated for my Algorithm Implementation's class. I was to create my own RSA public and private keys using modPow and modInverse and use that to implement a digital signature. That works great, not the problem here. For extra credit I am implementing a digital envelope that will … | |
Hello, For some work I have to implement the selection sort algorithm on an array list, I dont really know how to do this. I have started off the code but I just need to actually implement the selection sort! This is proving to be the stumbling block. Here is … | |
What is Google updated algorithm for SEO? Recent days Search engine doesn't give important to meta tags and back links.Share your idea Plz? | |
Hi All, I am new to XML,XSLT. I have been assigned to task of Generating HTML pages based on the XML file & the condition is No Hardcoding of Nodes and other details. My XML file is of the below struct: Node inside Nodes , and those nodes would contain … | |
Hi I found this piece in another "solved" threat. The person that wrote this however had a different problem with it. I changed the bar size value from 12 to 6500. For me this works but has a major flaw : When : lengths to cut < size of a … | |
Hi everyone, I'm trying develop a code to read a file containing records of INDIVIDUAL ID, FATHER ID and MOTHER ID, and re-code the file using multiple trees. At this point I'm not concerning to re-code the IDs and I would like to build the multiple tree. The idea is: … | |
Hello everyone, this is my very first post in this webpage so here we go. I've got this problem with my hw assignment, it's almost finished except for one part. The hw is as follows: - Create an address book, creating 4 text files in the computer memory. Each text … | |
Hi to all, I am new to this forum..If i did any thing wrong in this thread please correct me... Let me tell you something about my project .... I am working on ARM7-LPC2148 processor with Graphical LCD. Now i am making a calculator which should be like as our … | |
One of the bigger pieces of news — certainly for webmasters and SEOs — from our SMX Advanced conference this week is that Google will soon be releasing version 2.2 of the Panda algorithm update. This also means that making changes to a site hit by Panda won’t produce any … | |
Hey guys, I am interested into making a 3D tic tac toe game, but right now I am stuck. I created a 3D string... like board[3][3][3]. and each time the user type in numbers between 0 to 2...and the computer does the same too. I played a few 3dTTT game … | |
Hi to all. It's my first post here. I want to ask about 2D Gabor filter implementation. I have some code but it is not working. So let me present my work first: [code=c]signed int sumX, sumY; long int SUM = 0; int I = 0, J = 0; double … | |
Hi, I have the structure and the insertion method of a btree, but I need to do the traversal method. I have this so far: [CODE]void inorden(btree r){ //inorder for (int i=0; i<=r->peso; i++){ //n+1 branches if (r->rama[i]) inorden(r->rama[i]); if (i<=r->peso-1 && (r)->clave[i]) printf(" %i", r->clave[i]); } }[/CODE] The problem … | |
Hi Guys, I am working on converting a console application into a user friendly GUI. The actual application is written in visual C++ and person has no information none what so ever on how to run it. So to understand the technique I am trying to experiment with the application. … | |
I have this code which do some matrix operation. It can be run on Microsoft Visual c++ 6.0 but i got problem when run it using Dev C++ 4.9.9.2.. it says, [COLOR="Red"]main must return and int[/COLOR] Can somebody help me? [CODE]// FDduct.cpp , finite difference. method. for duct #include <stdlib.h> … | |
Hello, this is my first post on DaniWeb so I hope you'll go easy on me ,and my english.I'm working on a implementation of the AES algorithm in python;my app is supposed to encrypt the contents of files, and it does, yet it is kind of slow.I've optimized the code … | |
Hy! I'm trying to make a new game and i have some problems... First it chooses how many player it'll be, then the whole deck is slit, and it gives each player aprox the same amount of cards. It works pretty well at 3,4,5,6 but it blocks at 2. I … | |
Can anyone help me with external direct merge sorting? Here is my code [code=cpp] #include<iostream> #include<conio.h> #include<stdio.h> using namespace std; int GetKey(char infoLine[30]) //Getting sorting key { char temps[30]; strcpy(temps,infoLine); return atoi(strtok(temps," ")); //returns first number in a line } void DirectMerge(char fileName[20]) { FILE* FTS; //file wich will be … | |
I wrote this: [CODE] #include <stdlib.h> // system pause //#inlcude <ctype.h> // for toupper() #include <iostream> // input output #include <iomanip> // setw() #include <string> //#include <algorithm> //#include <iomanip> // for setw() and right-aligned //#include <math.h> // for pow() using namespace std; int main() { /* char alpha [26]; char … | |
How can I detect a palindrome as complicated as "A man, a plan, a canal, Panama!" without using erase() and just ignore the spaces and punctuations? The current version is: [CODE] #include <stdlib.h> // system pause //#inlcude <ctype.h> // for toupper() #include <iostream> // input output #include <string> //#include <algorithm> … | |
Hello,software comrades! I have a task to do, and I have figured some part of it,but I have troubles with it.So i am writing and asking for some advice. The task is as it follows: You are to create a program (C++ language) in which u enter a number (preferably … | |
Part-A 1. Define Production system? 2. What are the different components of AI? Discuss. 3. What are the steps required to solve a particular problem in AI? 4. A problem solving search can proceed either forward or backward. What factors determine the choice of direction for particular problem? 5. Represent … | |
Hello guys as i see this is a little error and i don't know how i can't fix it so the following are the main and the header file from the book i learn from: main: [CODE]#include "../std_lib_facilities.h" int main() try { vector<int>numbers; int number; cout << "Enter the numbers … | |
Hello guys as i see this is a little error and i don't know how i can't fix it so the following are the main and the header file from the book i learn from: main: [CODE]#include "../std_lib_facilities.h" int main() try { vector<int>numbers; int number; cout << "Enter the numbers … | |
Hi I am implementing a "Star Craft" game and I have troubles on my A* algorithm. I followed the steps in [URL="http://www.policyalmanac.org/games/aStarTutorial.htm"]here[/URL] and created my own implementation using object oriented c++. Now when I have say 32 x 32 grid, and I need to move 1 unit, it takes for … | |
this is my project its hard who can write it for me please Write a C++ program to read, save, sort, search and display the students’ ids, student names and marks of N students.fficeffice" />>> N=7 should be declared as a constant in your program. You must use arrays to … | |
im a newbie and im learning java just week ago. I wonder how i cant make the ball bounce in one axis only (the X axis) im not good in logic:( and i want that logic to be in one event. [code]if(x<0){ ++x;//go right }else if(x>500) {--x;//go left } [/code] … | |
hello, i ask for help if you can : i have to write algorithm detect all cycles in undirected graph , I don't know , can any one help. Thanks . | |
SA : I ask if anyone can help me in this algorithm , it is suppose that this algorithm find all the cycles in given graph . but there exist a bug it return only one cycle not all : [CODE]public class Main { public boolean funcs(boolean Graph[][]){ ArrayList<ArrayList<Integer>>l=new ArrayList<ArrayList<Integer>>(); … | |
I'm sure many of you who use Pandora wonder why it hasn't been sucked up by Microsoft, Google or Apple. For those of you who don't even know what Pandora is, it is a internet radio station that uses algorithms to fit your music tastes. How does it fit your … |
The End.