199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for askylitcity

Hi, I'm having an issue with the following directions: public static int aPower(int a) Given a number a > 1, Returns a number n such that for some m > 1 we have a = n ^ m. If no such n exists it returns 0 public static int aPowerOf2(int …

Member Avatar for Zaad
0
105
Member Avatar for virtuali

Hi All, I am trying to create a form using sessions so that the submit button is only submitted once in a two minute duration. I need the form to still complete the onclick action so that a calculation happens, but I only want the mail() function to send an …

Member Avatar for Stefano Mtangoo
0
302
Member Avatar for truetexan

Background: I learned old-school c++ programming techniques, being able to declare global variables before the main() routine. However, in Vis C++, I am having trouble, especially with global arrays. I am programming a Windows Forms application. In it, I declare a global integer array just after all my includes in …

Member Avatar for truetexan
0
234
Member Avatar for bangla

[CODE]<?php $con = mysql_connect("bangla123.db.8390659.hostedresource.com","bangla123","Algnab123%"); if (!$con) { die('Could not connect: ' . mysql_error()); } if (mysql_query("CREATE DATABASE tryDB",$con)) { echo "Database created"; } else { echo "Error creating database: " . mysql_error(); } mysql_close($con); ?> [/CODE] ------------ When I run the code, i get error -"Error creating database:.... Pls advise. …

Member Avatar for divyakrishnan
0
75
Member Avatar for Groovemix

I do not under stand how to get NODE to work. Worked fine with typedef struct but when I changed to template stopped working??? [CODE]template<typename T> struct Node { struct Node(T data) { this->data = data; previous = NULL; next = NULL; } T data; struct Node *previous; struct Node …

Member Avatar for Groovemix
0
138
Member Avatar for kei01040

[CODE]import static java.lang.System.*; public class ShipTester { public static void main (String []args) { Ship s1 = new Ship(); s1.setX(3); s1.setY(10); s1.setSPeed(22); out.println(s1.getX()); out.println(s1.getY()); out.println(s1.getSpeed()); out.println(s1);//calls the ToString method Ship s2 = new Ship (3,10, 22); ship s3 = new Ship(5,7 ); s3.setSpeed(19); out.println(s1.equals(s2));//s2 becomes rhs out.println(s1.equals(s3));//s3 becomes rhs } …

Member Avatar for Zaad
0
109
Member Avatar for noobprogrammerr

Hi, i would like to know to retrieve out the date and time from my database to show on the wcf test client and for eg, after choosing a certain date, how to do the coding in order for the events to show that's happening on the date i choose …

Member Avatar for noobprogrammerr
0
173
Member Avatar for Lindsie

[B]I am a newbie so please be kind.[/B] I have put together a form using multiple queries which pulls information from MySQL tables that are joined by ID number. It displays the info in a form so updates can be made. I cannot get it to update more than one …

0
104
Member Avatar for pendo826

I want to place an object into an array so that when i call the array my stats, inventory objects will show up is it possible ? here is my code: [CODE] void displayStats() { const int SIZE = 11; string stats[SIZE]; status Status = {100,20}; cout << "******Stats******\n"; stats[0] …

Member Avatar for raptr_dflo
0
234
Member Avatar for fsefsef23

Please bear with me as I am awful with pointers. My instructor gave us an assignment whose main focus is inheritance. We have an 'item' class that has 2 classes derived from it, discountItem and taxableItem, the main difference being that they add a tax and a discount to their …

Member Avatar for raptr_dflo
0
101
Member Avatar for jackly94

My Struct was looping and working well, Till i Added in a New Struct and add that to the Loop, Now its not Working that well plus not outputting the Details only the hours. could some one help me with this.. [CODE] struct Trains { int Train_Id; //train ID string …

Member Avatar for raptr_dflo
0
132
Member Avatar for stevo7624

I need help getting through a class I have to take. I know basics but need help with some of the more complictaed issues. For me that is arrays, classes, stacks, and so on. If someone is willing to help I would appreciate it. I could use some more personalized …

Member Avatar for raptr_dflo
0
133
Member Avatar for thecoolman5

hi, I already know how to use setprecision but the function wont let the round go up past 16. [CODE]#include<iostream> #include<stdio.h> #include<math.h> #include<iomanip> using namespace std; int main () { double pi = 3.14159265358979323846264338327950288419716939937510; cout << setprecision(50) << pi << endl; system("pause"); } [/CODE] the output is just 3.1415926535897931 the …

Member Avatar for raptr_dflo
0
3K
Member Avatar for XodoX

I'm talking about Flow of Control, Functions, Parameters, overloading, arrays, classes, Pointers and dynamic data structures,exception handling, operator overloading and perhaps including linked data structures. I am not liking the programming exercises the book has at the end of each chapter. But I will have to program something to really …

Member Avatar for raptr_dflo
0
155
Member Avatar for TheFearful

Hey guys, I am having trouble in writing this code. I don't know where to start other than the beginning basic things. I just need to know how to start this thing because I know it is a loop, but loops are my weakest things as of right now. Here …

Member Avatar for raptr_dflo
0
337
Member Avatar for james6754

Hi everyone, just learning c++ cannot for the life of me work out what is wrong with this code..? All I am getting is cout , undeclared identifier. Anyone help?

Member Avatar for WaltP
0
338
Member Avatar for geneh23

Hey everyone, I am fairly new to the programming world, but I am a quick learner. I am trying to make my "membership area" register.php work properly, but there seems to be a parsing error as follows here: "[B]Parse error: syntax error, unexpected T_VARIABLE in C:\Program Files (x86)\EasyPHP-5.3.8.1\www\register.php on line …

Member Avatar for momo219
0
723
Member Avatar for Raim

So basically, I'm making a Windows Form Application CLR which calculates a worker's wage. Problem is, when I select the schedule (day,night,afternoon,mixed), I use a button for each schedule respectively, which, upon click, calculates everything on the data you've input. While this is effective, I am being asked to use …

Member Avatar for Ancient Dragon
0
399
Member Avatar for n0de

Hi, there is that thing that i need to handle atoi () function error.. Now for explanation atoi ( some const char * which is int (like '1') ) gives me that int, but if i write like this atoi ( 'n' ) then shit happens and it return's a …

Member Avatar for MeduZaPaT
0
715
Member Avatar for myrongainz

I can reverse it but can't figure out how to reverse it in pairs. example - hello output - ol le h [CODE]#include <iostream> #include <string> using namespace std; int main() { string user; cout<<"Enter a random text"<<endl; getline(cin,user); for(int i = user.length();i>=0;i--) { cout<<user[i]; } return 0; } [/CODE]

Member Avatar for mrnutty
0
175
Member Avatar for diamondw

hey im trying to create a program where the user will type in a number then choose the units its in and units it will be converted to from 2 comboboxes. The output should be changing as different units are clicked without a button.Please tell me how to fix my …

Member Avatar for diamondw
0
118
Member Avatar for acepeda

Hey Guys! I'm about done with a personal application im making for my small furniture factory. I'm having a little problem retrieving the total sum of my employee's loans discounts.It comes up perfectly using the statement: "SELECT sum(TotalDiscount)as TotalDiscount FROM EmployeeDiscounts WHERE EmployeeID=val(" + Me.txtEmployeeID.Text + ")and PayRollID=val(" + Me.TxtPayrollID.Text …

Member Avatar for jireh
0
122
Member Avatar for spowel4

Is it possible to create a stored procedure to delete all records from a table (i.e. DELETE FROM <tablename>), but pass the table name to the procedure as a parameter? My desire is to have only one procedure for deleting multiple tables' records; I would simply pass in the table …

Member Avatar for adam_k
0
188
Member Avatar for RedexProGamma

Hi, I am NOW doing a short application that installs a program, without the program being embedded into the application. I have found myself at a loss for code, now that I cannont figure out how I can COPY the entire contents of a folder to a new folder, WITHOUT …

Member Avatar for codeorder
0
445
Member Avatar for abhishekkp

how do i delete all the data which is stored in the sql table???? i want to delete only the data present in one table without dropping the table when i click on the command button in vb6 plz help :(:(:(:( its really urgent

Member Avatar for jireh
0
2K
Member Avatar for maria536

[CODE]#include <iostream> // required to perform C++ stream I/O #include <iomanip> // required for parameterized stream manipulators using namespace std; // for accessing C++ Standard Library members // function main begins program execution int main(){ double wage = 0, raise = 0, raiseMoney = 0; int years = 0; // …

Member Avatar for maria536
0
1K
Member Avatar for Interista

Hello, i need to create a binary tree menu such as, Sports Clothing Menu: 1 Soccer 2 Rugby 3 Swimming [I]4 Add a new category 5 Add a Selling item[/I] 6 Quit to main menu Could somebody please steer me in the right direction of how i can implement this …

Member Avatar for Interista
0
701
Member Avatar for scarlettmoon

Hi ~ Before posting my code, can someone tell me if it is possible to do a dual sort on an array of chars and an array of int, double or float? Would you have to use two separate sorts? Really confused here. I am trying to sort an array …

Member Avatar for phfilly
0
529
Member Avatar for tran21

it's my homework and i have no clue what i'm doing. i pay attention in class but i still don't know what's going on! it's a 2 part project, with a cointoss class and histogram class. this is my cointoss class [CODE]import java.util.Scanner; public class CoinToss { private static final …

Member Avatar for tran21
0
644
Member Avatar for Liuhh00

hey guys lol i spent 5 hrs thinking about building this asterick pattern and i am still getting troubled by the spacing for the 3rd pattern , anyone can help me to reduce 1 spacing so the 3rd pattern isn't out of place?XD [CODE]#include <stdio.h> int main() { int c,c_2,c_3,c_4,c_5,c_6,c_7,c_8; …

Member Avatar for Liuhh00
0
134
Member Avatar for moonL!ght

hellow, i wondering will be able to draw a pi chart with diffrent scetions colored diffrently with out using Graphics2d class....in addition that i want to make it rotating 360 degree.:icon_neutral:

Member Avatar for hfx642
0
185
Member Avatar for ITHope

so we have a big project and i already did the cartesianproduct portion now i'm stuck on creating a venn diagram application that should ask for the user to enter specifications like labels dancing singing , etc. and then how many for each 23 students like dancing, 10 like singing …

Member Avatar for ITHope
0
539
Member Avatar for jpd5066

Here is my code for the same exact program. I have everything working except for displaying the calculated monthly interest. I could use some help. #include <iostream> #include <iomanip> using namespace std; int main() { double mortgage, interest, payment, years, monthlyInterest, monthlyBalance, numPayments; int counter; cout << "Please enter a …

Member Avatar for jpd5066
0
102
Member Avatar for DarkFeather

I just recently started using Python and I was wondering if there was a way to increase a value in a list.

Member Avatar for DarkFeather
0
46
Member Avatar for asif49

Below is how the database is searched. [CODE] $query = "SELECT * FROM $tbl WHERE content LIKE \"%$var%\""; [/CODE] $var includes the term or phrase searched for. But using the "LIKE" in the query doesn't seem to ignore whitespace or hyphens or commas (like i want it to) E.g. if …

Member Avatar for asif49
0
118
Member Avatar for Behseini

Hi guys I tried to Google this but unfortunately I couldn't find any thing, Can you please let me know how I can populate a drop-down list from a csv file using php? For example let say I have a csv file(league.csv) like this: Man City,9,25 Man Utd,9,20 Chelsea,9,19 Newcastle,9,19 …

Member Avatar for pritaeas
0
805
Member Avatar for Sprewell184

Hi there. For some reason I am struggling with this problem. The purpose of this problem is to take an existing .py file and change it so instead of writing to a screen, it has to be written to an output file. The output file will be a csv file. …

Member Avatar for snippsat
0
283
Member Avatar for felix001

What is the best way to print columns within python. Each of the values that I will be printing will be anything from 1 to 8 characters long. I had found this but wondered if there was any other methods... [url]http://www.daniweb.com/software-development/python/threads/202023[/url] Thanks,

Member Avatar for felix001
0
326
Member Avatar for felix001

Does anyone know how I can base my re condition based on it not finding a match. I have the following at the moment ..... [CODE]if re.search(r'123', os.uname()[1]):[/CODE]

Member Avatar for felix001
0
90
Member Avatar for Shane08003

I just can't seem to understand when i am suppose to put Accept outside the LOOP and when i'm suppose to Accept inside the LOOP at the beginning. Can anyone please make me understand??

Member Avatar for adam_k
0
156
Member Avatar for mkab

Hello everyone. I'm trying to code the cd shell command in c. I used chdir function to code it but the problem is that when I execute the program on the terminal it doesn't change the directory. I kept a series printfs and conditions to test if it changes, though …

Member Avatar for mkab
0
6K
Member Avatar for sahilk50

hi guys, iam a beginner in c and i have got a project to make a program to keep the track of stock and cash of a shop i had done my work but i want to add purchase and iam unable to keep the work in history as a …

Member Avatar for WaltP
0
363
Member Avatar for Sprewell184

Hey everyone, I need help to figure out how to input while loop in here. I have this program where it converts from Fahrenheit to Celsius or Celsius to Fahrenheit. The purpose is to convert this program so that it repeats the calculation as long as the user wants. After …

Member Avatar for Sprewell184
0
263
Member Avatar for asif49

At work, I was given a file with which to connect to the proxy which I can do from there but I have no idea how to do it from home. I tried going "under the hood" and setting up a proxy with a random www address but that didn't …

Member Avatar for asif49
0
214
Member Avatar for BenzZz

I'm designing and implementing a PHP web application as part of final year university project and i was wondering if any of you could suggest any development methodologies that i could follow and your reasons for them, as i haven't ever created a full web application. I also need to …

Member Avatar for BenzZz
0
283
Member Avatar for knjava2011

I am a very new java student.I need to write a program ask the users to enter the series numbers separated by commas, with the valid input is : 23,45,90,4,5 The program should calculate and display the sume of all the numbers. I had written the code. I knew it …

Member Avatar for Taywin
0
337
Member Avatar for compulove

I am getting an error when it is determining whether the username is is false or not. I am using asp.net in code-behind. It is highlighted below. If someone can tell me what the error is that would be amazing! Thank you! [ICODE]using System; using System.Data; using System.Configuration; using System.Collections; …

Member Avatar for compulove
0
175
Member Avatar for tgr0ss83

I get the following Error from the code below: Warning: require_once(JS/Extractor.php) [function.require-once]: failed to open stream: No such file or directory in C:\Users\gross.t\Desktop\choicegrid\jsextractor.php on line 12 Fatal error: require_once() [function.require]: Failed opening required 'JS/Extractor.php' (include_path='.;C:\Users\gross.t\Downloads\pear\;/library/') in C:\Users\gross.t\Desktop\choicegrid\jsextractor.php on line 12 [code]<?php $path = '/library/'; set_include_path(get_include_path() . PATH_SEPARATOR . $path); require_once …

0
120
Member Avatar for newbie14

Dear All, I have data coming into my db at quite a high frequency. Once I recieve the data I have many different db operation (select, update)checking and one final insert. Before inserting I will check it exist before or not? The problem at times the similar data comes apart …

Member Avatar for newbie14
0
264
Member Avatar for algrandjean1

Hello all, I am a beginning python user and I am a bit perplexed by something that I am writing up. What I have to do is assign buttons to colors (Traffic lightesque). There is a red, a green and an auto. The tricky part is that the "auto" button …

Member Avatar for woooee
0
282

The End.