199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for sexyzebra19

I'm trying to implement the algorithm described here under 'definition', [url]http://en.wikipedia.org/wiki/Laguerre%27s_method[/url] To summarise it takes an initial guess 0, and then iterates to find the root. In lines 68 to 71 I was hoping this would exit the function, i.e. when the root is found...but it's still carrying on. Can …

Member Avatar for Clinton Portis
1
204
Member Avatar for icygalz

[CODE]void findMax(int arr[], int n, int* pToMax) { if (n <= 0) return; // no items, no maximum! int max = arr[0]; pToMax = &arr[0]; for (int i = 1; i < n; i++) { if (arr[i] > max) { max = arr[i]; pToMax = (arr+i); } } } int …

Member Avatar for Narue
1
4K
Member Avatar for Clinton Portis

A lot of people have questions about how to load a text file using file I/O. There seems to be 2 popular methods to loading a text file: Use fstream's >> extraction operator. Simple enough, load the file directly into individual containers, word at a time, but you lose your …

Member Avatar for mrnutty
1
195
Member Avatar for DdoubleD

[B]Overview:[/B] Oddly enough, MS never created a TreeViewDrowDown or equivalent. What I mean, is a control that looks and acts like a [icode]ComboBox[/icode], but contains a [icode]TreeView[/icode] instead of just a list when in the expanded drop-down mode. I've never understood why they haven't, but I always seem to want …

Member Avatar for Diamonddrake
1
1K
Member Avatar for HelpMeIT

I need a way of adding data to a database using my delphi form i can handle the sql to add data to a database on ms access but i just do not know how to do it through a delphi form. In other word i just need to know …

Member Avatar for fayyaz
1
211
Member Avatar for cmk2901

Hi, I have a char* buffer that is 1024 bytes in size, and am trying to write an int to a particular offset in the buffer, in this case 0, but all offsets have the same problem. I initialize the buffer to some values when I first start up. For …

Member Avatar for Ancient Dragon
1
170
Member Avatar for nccsbim071

Hi everybody I have been developing windows client application in .net framework 3.5. The system is supposed to copy the remote mysqldb and restore my local mysqldb with all the schema and data withing remote schema to my local mysqldb with the same database name. Well i found a solution …

1
115
Member Avatar for markeen

[code] #include<stdio.h> #include<conio.h> int main() { int x[5], y[5], z[5], i, d; for(i=0;i<5;i++) { printf("Enter int%d: ", i); scanf("%d", &x[i]); } if((x[0]>x[1]) && (x[0]>x[2]) && (x[0]>x[3]) && (x[0]>x[4])) { y[0]=x[0]; if((x[1]>x[2]) &&( x[1]>x[3]) &&(x[1]>x[4])) { y[1]=x[1]; if((x[2]>x[3])&&(x[2]>x[4])) { y[2]=x[2]; if((x[3]>x[4])) { y[3]=x[3]; y[4]=x[4]; } else if((x[4]>x[3])) { y[3]=x[4]; y[4]=x[3]; } …

Member Avatar for Ancient Dragon
1
120
Member Avatar for llemes4011

I'm working on an rpg game, and one of the big issues that I had (have), is having the players actions change around other objects. For example, normally the "a" key would attack, but when next to a person, it would trigger a dialog sequence, and when next to a …

Member Avatar for llemes4011
1
81
Member Avatar for cguan_77

hi guys, need your help on this..any ideas is greatly appreciated..i got this form mailer from this site: [url]http://www.dtheatre.com/scripts/sour...e/formmail.txt[/url] but how to configure in php the form mailer that if in my form got two options (like the code below) that if the user choose this particular option then it …

Member Avatar for cguan_77
1
173
Member Avatar for Bladtman242

Hi Guys, I am new to java and I need some help:) First of all: I admit, I did not write this, I re-wrote a bit of it for my needs, and therefore may not be able to fully understand parts of it. The thing is, the script accepts only …

1
82
Member Avatar for itsmekarthik

please help in writing to excel sheet using java program. Actually I know how to write to a text file but I don,t have any idea about this writing to an excel sheet. I would be grateful to you if you help me.

Member Avatar for masijade
1
38
Member Avatar for twomers

Hi all. First off this is my first interaction with jquery (and I hope this is the correct forum to put questions about this in, if not might a mod take the liberity of moving it to the correct forum?), so apologies if I'm overlooking an entire room made of …

Member Avatar for twomers
1
205
Member Avatar for denizen08

[CODE=C++]polynomial polynomial :: derivative(void) { polynomial outpoly; outpoly._coef = new double [_degree]; outpoly._degree = (_degree-1); for(int i=0; i<(_degree); i++) { outpoly._coef[i]=(i+1)*_coef[i+1]; } return outpoly; } //header: #pragma once #include <complex> #include <iostream> #include <string> #include <sstream> using namespace std; class polynomial { private: double * _coef; int _degree; public: // …

Member Avatar for Narue
1
170
Member Avatar for cmsc

I want to make a dynamic array. but when I view the array, I think there's something wrong with the index part. Please help. Thanks! here's my code: [CODE] #include<stdio.h> main(){ int* a; int number; int choice; int index = 0; int head; while(choice!=4){ printf("\tMENU\t\n"); printf("[1] add number to array\n"); …

Member Avatar for cmsc
1
90
Member Avatar for Ecliptical210

Hi guys, so I have this project where the requirements are as follows. Create a class called Car, which serves to represent a particular vehicle at a car dealership. Consider that each car has the following properties, entered by the user (all value ranges should be error checked): Sticker price …

Member Avatar for Ecliptical210
1
146
Member Avatar for turtlez

Hello, i need help with a basic code issue, i ave posted the code [URL="http://turt2live.zxq.net/cpp/hoomin.html"]here[/URL] because it is too long to post... The issue occurs in this section of code: ...(more before) void getInput(int num){ char = one[1]; char = two[1]; char = three[1]; char = four[1]; ...(more after) saying …

Member Avatar for turtlez
1
123
Member Avatar for Gerard I MUFC

Hello everyone, pleased to be on the forum. I'm currently undertaking some game development in Visual Studio, in my spare time. I've been programming for a few months, in Java, and now am having a go at C#. I have however run into a little snag with lists. I'm trying …

Member Avatar for Gerard I MUFC
1
354
Member Avatar for OrcaSoul

I have a site that I am working on, and I got tired of having to change the root path every time I uploaded the script from the local to on-line server. I tested the following code on both local (XAMPP under Windows) and web (shared Linux hosted on GoDaddy) …

Member Avatar for OrcaSoul
1
119
Member Avatar for MeBjess

I have been working on a basic accounting program, the accounts were supposed to be stored in a array, but I never got that part of the program working. Is there anyway I can get a sample of hash code that would help me understand what I need to do? …

Member Avatar for MeBjess
1
90
Member Avatar for Fajer91

Hello everyone i'm a new member , i need ur help with this code , i want to write a for loop that assigns the 3rd row of the array to 0,, and then print out the array after setting the 3rd row to 0.

Member Avatar for rahul8590
1
123
Member Avatar for confusedndazed

My question: What is the output of the code corresponding to the following pseudocode? [code=text] Set y = 0 For (i = 0; i<=6; i=i+3) For (j = 0; j<=15; j=j+5) Set y = y + 1; End For (j) End For (i) Output y [/code] This is what I …

Member Avatar for rafta
1
124
Member Avatar for ab_n00b

This is my first post on this forum and would like to say hi to everyone first. I know this sounds crazy but believe me it's been giving me creeps for such a long time. I've been studying software engineering for 2 years and done a bit of programming in …

Member Avatar for kenji
1
116
Member Avatar for sahasra

Hi, I am new to this site. Can you please help me with this. I have written a C program and i m getting the following errors 1) " 'puts' was not declared in scope " the same error for 'gets' and 'itoa' command...i have included stdio.h,string.h,stdlib.h,math.h as the header …

Member Avatar for kenji
1
140
Member Avatar for beatenbob

Hi all. Just a simple question but I SERIOUSLY need some help from you guys for my programming assignment. The assignment given was water jug problem. Now my question is, does C allow for the creation of dynamic array during a recursion? Suppose I have another function, which returns a …

Member Avatar for gerard4143
1
411
Member Avatar for dena

hi please can any one help me in my shell project like this : Develop a c program which serve as s shell interface that accepts user command and then executes each command in separate process. The shell interface provides a command prompt ( sh> ) after which next command …

Member Avatar for dena
1
725
Member Avatar for v_rod

hi! i am making a prototype of an online stock trading application in python using tkinter module for Gui and a csv file for all the stock market data. i wish to know if there is an api using which stock prices can be changed if i keep all the …

Member Avatar for v_rod
1
117
Member Avatar for Kusno

Dear all, before using AJAX.Net, when I wanted to find control in form, I used this code [CODE] Dim SQL As String = "SELECT CurrencyID, CurrencyID FROM MasterCurrency ORDER BY CurrencyID" Dim ctl As Object For Each ctl In Me.FindControl("form1").Controls If LCase(Left(ctl.id, 6)) = "cmbccy" Then FillControl(ctl, SQL) Next [/CODE] …

Member Avatar for Kusno
1
521
Member Avatar for kolosick.m188

I am having a slight problem implementing this code. What I need to do is take a list of 16 unsigned characters and permute the bits according to IPTable. 0 in IPTable refers to bit 0, 1 refers to bit 1, etc. Here is my code which isn't working. [code=c] …

Member Avatar for Dave Sinkula
1
107
Member Avatar for c.pentasuglia

Okay so i am started a project for a java class of mine, i would like to make the game simon, you know where there are four different colored buttons and it plays random sequences and you have to repeat them. I was thinking of using the random function, but …

Member Avatar for donaldw
1
186
Member Avatar for d0pe

I need to create a function that returns a number with the amount of characters in common among one string and a vector of them. [CODE]public int sameChars (Vector<String> otherStrs){ int result = 0; String original = "aab"; for (int i=0; i< original.length(); i++) { char aux = original.charAt(i); String …

Member Avatar for d0pe
1
105
Member Avatar for bufospro

Hi, I want to make a program that reads a string. But I would like to read only characters, neither numbers nor special characters(@,#$%^&*()!). Also, no spaces between characters. [CODE] #include <stdio.h> #include <string.h> char *enter_a_string(int maxcharacters) { char *ptr; int len; printf("Enter string : "); char array[50]; do{ scanf("%s",array); …

Member Avatar for bufospro
1
107
Member Avatar for eskaflowne

now I have never posted before so I hope this is in the right spot/format.. this problem is driving me insane. I need prove the Goldbach conjecture that is, "every even integer n > 2 is equal to the sum of 2 prime numbers." Then with a starting point and …

Member Avatar for flipjoebanana
1
111
Member Avatar for Silvershaft

Hey all! I started to code php yesterday in need to create good dynamic websites to our server project for one game. I got c++ expirience of like 7 months soon, so the syntax is known to me excluding some differences. I've wondered how do I make a page like …

Member Avatar for almostbob
1
197
Member Avatar for maverick405

This program runs perfect just want to know if I have to do this arithmetic operations using functions how can I do that? [code] // Arithmetic.cpp - This program performs arithmetic, ( +. -, *. / ) on two numbers. // Input: Interactive // Output: Result of arithmetic operation #include …

Member Avatar for mrnutty
1
121
Member Avatar for wyett

So, I'm asking a user to input a fraction in the form of this: +3 3/4 I know I can use a search to find where the first instance of something happens, but how do I actually take whats before it? Example: I can tell it to search for white …

Member Avatar for wyett
1
115
Member Avatar for jmangu

Hello, I'm trying to compile a program related with serial communication via RS232. I've found this program at microsoft page [url]http://support.microsoft.com/?scid=kb%3Ben-us%3B39501&x=9&y=11#top[/url]. When I try to compile this same program in Dev C++ editor the following message appears: bios.h: No such file or directory. Please, help me about what can I …

Member Avatar for Ancient Dragon
1
3K
Member Avatar for Trogan

Hi, I am trying to get the max number from an array, but I'm not sure how to tackle it. This is what I have so far. [CODE]import javax.swing.*; public class InitArray { public static void main( String args[] ) { int array[] = { 69, 23, 47, 81, 92, …

Member Avatar for Ezzaral
1
985
Member Avatar for whitestream6

I've just been learning arrays, and so far it's going well :) This is my current PHP code: [CODE]<?php $states = array ('MD' => 'Maryland', 'IL' => 'Illinois', 'MI' => 'Michigan'); $provinces = array ('QC' => 'Quebec', 'AB' => 'Alberta'); $abbr = array ('US' => $states, 'Canada' => $provinces); $japanesemotors …

Member Avatar for nav33n
1
192
Member Avatar for 21KristianN

Dear everybody I really need your help!! I have made a small application in Visual Basic 2008 Express. It's a small form application with a Database connected to the project. (made from the wizard in VB express) My problem is that when I deploy my application i can't find the …

Member Avatar for 21KristianN
1
204
Member Avatar for restrictment

Hello, I just finished my text-based RPG called Helsmich, however I need a few testers to find bugs/errors and tell me. There are quite a few variables that can be changed in the games such as your name, money, armor, weapon, kills, deaths, strength, speed, defense, accuracy, health, attributes, level, …

Member Avatar for restrictment
1
360
Member Avatar for scott6480

Can anyone tell me why line 140-144 of this program does not do what it is supposed to do. Here is the output and you can see it is all blank? What am I missing? hit any letter keys to add items to the order and then = to stop …

Member Avatar for pecet
1
143
Member Avatar for dmitriylm

Hey guys (and girls), I'm trying to write a program that will read a simple text file and output a file with the same contents with the addition of line numbers. This is what I have so far: [code] #include<iostream> #include<iomanip> #include<fstream> using namespace std; int main() { char filename1[20],filename2[20], …

Member Avatar for vmanes
1
104
Member Avatar for complexTime

Hey, I'm new to the site and also newbie in time complexity subject. I've read plenty of theoretical approaches and also some examples but I'm still having quite some troubles with determining time complexity of some of my algorhytms, especially recursion. It is quite a delicate thing so I would …

Member Avatar for complexTime
1
154
Member Avatar for dmkc

Hi everyone, I've been a reader for a long time, now I've joined up, as I'm fairly stumped on this one!! I'm currently teaching myself mysql and php at work, and have a problem. I am using php to produce a listing of restaurants on a page, and I would …

Member Avatar for dmkc
1
735
Member Avatar for julie_kaz

I need help understanding julian dates. I am trying to create a program using julian dates where user enters month & year and show the calendar of that month. I especially don't understand the "int toJulian()"... here is what I have so far: [CODE] #include <stdio.h> #define START 1900 //fixed …

Member Avatar for Ancient Dragon
1
2K
Member Avatar for Soileau

[CODE]#include <stdio.h> struct poly { int len; int arr[]; char *name; }; int main() { int i; struct poly p; p.len = 45; p.arr[3] = {1,1,1}; p.name = "Josh"; printf("%d",p.len); for(i = 0; p.arr[i] != NULL ; i++) printf("%d",p.arr[i]); printf("%s",p.name); return 0; } [/CODE] I tried to make a simple …

Member Avatar for Mathura
1
169
Member Avatar for kenny1989

Hi all, For my project I'm doing a comparison between solving ODE's in MATLAB and using the GPU to solve them. Anyone know of an accurate way of timing how long the program takes to run on the gpu (same kind of accuracy provided by matlabs tic toc command)? I …

Member Avatar for VernonDozier
1
189
Member Avatar for cwarn23

Hi and I have been working on a simple problem but can't seem to find any solution and have tried browsing the net. My question is how do I append to an array. Below is the code I tried but still doesn't work. [CODE]String[] names={""}; if (charcheck1==true) { String[] chartmp={"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}; …

Member Avatar for cwarn23
1
353
Member Avatar for hussamo

[code=c++] #include <iostream> #include <string> #include <cmath> #include <cstring> #include <cctype> using namespace std; class link { struct employee { int x; employee *next; } void insert() { employee *temp; temp=new employee; employee *first; first=new employee; if(first=NULL) { employee *tmep; temp=new employee; temp=first; cin>>first->x; first->next=NULL; } else { temp=first; first=temp; …

Member Avatar for mrnutty
1
72

The End.