64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for big_B

I've created simple WindowsApplication project with one additional windwos form named Form2. On default form I added button named button1. And added this code [CODE]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Threading; namespace WindowsApplication1 { public partial class Form1 : Form { …

Member Avatar for big_B
0
387
Member Avatar for a_iyer20

Hello, After having a list created from objects of a certain Class. I wish to sort the contents. How do I do this? This is my case: _bkgList = new ArrayList(); for(int i = 0; i<10; i++){ BookingResponse bkngRes = new BookingResponse(); bkngRes.setAwbNum(awbNum); bkngRes.setOrigin(origin); _bkgList.add(bkngRes); } As you can see, …

Member Avatar for a_iyer20
0
129
Member Avatar for null_guy

Elo guys, i have trying to develop a client/server application! i'm new with sockets, so i'm trying to learn from existing source codes. I have come accros a piece of code: public static void main(String args[]) { // validate parameters: if (args.length != 2) { System.err.println("Usage: java GameClient <host> <friend_port>"); …

Member Avatar for null_guy
0
115
Member Avatar for allialli

I have another assignment for class that I am having some difficulties with. I seem to be able to write the program, except for the fact that it keeps looping over and over and I'm not quite sure how to stop this. Could anyone please help?? Thanks! This is the …

Member Avatar for WonderWomen204
0
117
Member Avatar for Sh13

I am trying to add values that I read from input file using fscanf. There are 15 float values that were read from .txt file. Im copying some of the code here [code=c] #define MAX 15 for (i = 0; i < MAX; i++) { fscanf(ifp, "%f", array[i].miles); } [/code] …

Member Avatar for Sh13
0
119
Member Avatar for Shakis

im writing a personal program thats storing scores. The layout is done using Tkinter using labels buttons and entry widgets, however, because there are a lot of entry widgets needing created i just stuck their creation in a loop, [code] for m in range(1,10): self.input_score = Entry(frame,width=6) self.input_score.grid(column=5, row=m) [/code] …

Member Avatar for Shakis
0
80
Member Avatar for aran87

Hello ive got a form where the users enter there details on a form then click on submit which then should update there telephone number, where is says where Email= $_Post[Email]") thats one of the fields that automatically appear the email cant be updated, this code below luks correct and …

Member Avatar for sukhy_1
0
62
Member Avatar for lianaconda

I'm a little confused about empty arrays. I'm supposed to write code for a function of type boolean that returns whether an array is empty or not. This function is a part of a class called Sequence, and takes no parameters. Earlier in the code, I included a typedef so …

Member Avatar for lianaconda
0
145
Member Avatar for sicantik03

hey guys I need you help, I'm new comer in here but I hope this can help me. I'm writing a code that can read the file (such a story or newspaper) then the identifythe story if that story has a itemY in it the it will print +1 otherwise …

Member Avatar for woooee
0
141
Member Avatar for Moporho

I am trying to write a function that will read one value of an array. I must prompt the user for an index and then read the its value. I am having a horrible time and need help. [code] // read_one_value(A, n) prompts the user for an index i and …

Member Avatar for Moporho
0
153
Member Avatar for leroi green

Hey all, I am trying to display a message asking if the user is sure that they want to close just before closing. Here's what I've got...and it's only telling me that there's something wrong with the word "Message" after the MessageBox.Show part [code] Private Sub xExitButton_Click(ByVal sender As System.Object, …

Member Avatar for Jx_Man
0
79
Member Avatar for anso_pro

can anyone tell me how to use a variable table name in select syntax?? like..select * from tablename here tablename is a variable name ..i read tht it can be done using dynamic sql..but i am not able to do it..can anyone tell me the code for it...i tried writin …

Member Avatar for mwasif
0
182
Member Avatar for valorien

Hi everyone, Just started programming in Python and iI'm already starting to like this language very much. I have a problem with a program I wrote last night - I'm trying to ping a certain host using [CODE]os.popen("ping xxx.xxx.xxx.xxx"[/CODE] and then read the %errorlevel% from my system using [CODE]result = …

Member Avatar for Ene Uran
0
1K
Member Avatar for ChrisRiv91

Hi, I'm new to these forums. I've been working with java in school, but I can't stand the language. So I've been working with python and find it's very easy to understand, and I actually enjoy working with it. So just for fun I've been working on a pretty basic …

Member Avatar for Ene Uran
0
864
Member Avatar for Drezta

i'm practicing my use of functions at the moment by writing a program to convert pounds to euros and vise versa but when i try calling the functions that do the converting i get a load of 'expected primary-expression' errors. what dose that actually mean because i'm not really sure …

Member Avatar for Drezta
0
196
Member Avatar for Fenerbahce

Hi, This code works fine but, when i choose "Female" from selectbox, it sets "Male" in the selectbox again. What is the problem? Thanks [code] <?php if (!isset($_POST["sex"])) { print "Please start!"; } else if ("Male" == $_POST["sex"]) { print "Male !"; } else if ("Female" == $_POST["sex"]) { print …

Member Avatar for kevindougans
0
90
Member Avatar for kartouss

Hello, I am using a code to generate random numbers upto 32 char... The problem is that i want to display the 32 characters each randomly because the code is displaying the same char 32 times and i want to get the 32 chars generated randomly... The code is:- [code=c++]#include …

Member Avatar for kartouss
0
159
Member Avatar for roby4eldiablo

Hi all, i must create new Cookie key into an existent cookie but i must create them dynamically. I need that the name of new key are generated from a "for" or simply from a variable. This is the piece of code interested. I want to know what i can …

0
83
Member Avatar for Lensva

works, allows entering a user selected amount of strings, however when i try to display, it displays only the last string, not the whole 'database', whatever you'd call it :) the main question is what is wrong and also, is there any way to not to ask a user to …

Member Avatar for Lensva
0
109
Member Avatar for jcato77

Hello, The following is background on my assignment "Modify payroll program so that it uses a class to store and retrive the employee's name, hourly rate and the number of hours worked. Use a constructor to initialize the employee information, and a method within that class to calculate the weekly …

Member Avatar for K504K
0
1K
Member Avatar for rikkie

Hi guys, I'm trying to use a nested for loop to change the first 'o' it finds while testing to an 's' and then exit the loop immediately after that. This is what I have, but it currently changes every second 'o' to 's' [code] for (int i = 0; …

Member Avatar for vmanes
-1
151
Member Avatar for BBustos

My code requires the validation of a string that starts with two letters and ends with six numbers. So, an example would be [B]br474897.[/B] This is what I got so far: [code] bool GetNID(char buf[]) { int i= 0; int length; bool valid = false; cin.getline(buf, 30); length = strlen(buf); …

Member Avatar for vmanes
0
128
Member Avatar for maddogsprofiles

OK so i bought a Myspace clone for my web site, [URL="http://www.maddogsprofiles.com"]http://www.maddogsprofiles.com[/URL], but it doesn't work. Why you ask, because the functions.php file is all screwed up! My admin panel doesn't work and the site is a basic demo site. I got like 4 different error codes from it! And …

Member Avatar for maddogsprofiles
0
232
Member Avatar for alexhkleung

I can't identify the problem can somebody help me? [B][COLOR="Green"] objects.h (abstract base)[/COLOR][/B] [CODE=C++]#ifndef objects_h #define objects_h #include "colorScreen.h" #include "maincontrol.h" #include <ctime> #include <string> using namespace std; class objects { public: virtual ~objects(); virtual void print(const MainControl &inMain)const =0; protected: objects(); objects(const int& inX, const int& inY,const int&inScore); ... …

Member Avatar for alexhkleung
0
307
Member Avatar for alexhkleung

hi all I'm trying to read a document char by char my question is how do I read the spaces as well? Thank you!

Member Avatar for alexhkleung
0
121
Member Avatar for BBustos

I cannot figure out how to validate a string so that it accepts both uppercase and lowercase letters as in a name. Here is the code: [code] bool GetString(char buf[]) { int i; int length; bool valid; cin.getline(buf, 30); length = strlen(buf); for (i = 0; i < length; i++) …

Member Avatar for BBustos
0
124
Member Avatar for shadwickman

Hi, I was wondering if it's possible to call a function using a string that is the exact same as the name of the function. Here's an example in which I wanted to make 4 bitmap buttons using a for loop, and the event bound to each one would be …

Member Avatar for shadwickman
0
160
Member Avatar for samush

I have a problem with unsigned long long int's. I'll tried to do a function wich calculates the factors of an integer. It worked fine with int, but when an tried with unsigned long long int the % and <= operation failed... here is the surce code for the function …

Member Avatar for samush
0
150
Member Avatar for code12

I'm having problem with this code. Here's what I'm trying to do. I want the user to enter the firstname, last name of the person whom he wants to delete from the phonebook. then I try to compare the data entered by user with the names already stored on phonebook. …

Member Avatar for code12
0
135
Member Avatar for aran87

Hello ive got a while loop and when the user selects one result from the loop it displays the chosen result and inserts it into the database table but i want the selected row to go to a table depending on one field from the while loop. there are three …

Member Avatar for sukhy_1
0
116
Member Avatar for scru

Any script with an error in it shows up blank on firefox. In IE, however, I get html 500 (internal error). I figure PHP isn't echoing its errors back to the client. Is there a way to set this behavior?

Member Avatar for scru
0
83
Member Avatar for edek

I have (in main()) something like: [CODE=C]int toChild[2], fromChild[2]; pid_t pid; //Creating pipes: if(pipe(toChild) != 0){ return 1; } if(pipe(fromChild) != 0){ return 1; } //Forking: if((pid = fork()) == -1) return 1; if(pid == 0) {/* CHILD */ close(toChild[1]); close(fromChild[0]); //create streams: (they are not used in this example) …

Member Avatar for edek
0
109
Member Avatar for shadow_shooter

Hi, I want to scan a word from the user and store it in a char pointer. But I couldn't do it. The thing I just want as the following: char *word; scanf("%s",word); but, it doesn't work... please help for this simple problem. it sounds a bit noob, i know...

Member Avatar for Salem
0
2K
Member Avatar for Ben10

Hello everyone! I need a C++ program that stores the results of product table from 1 to 10 in two-dimensional array... what i did : [code=c++]#include<iostream.h> void main() { int a[5][2],result; const int k=1; for(int f=1;f<=10;f++) result=k*f; for(int i=0;i<5;i++) { for(int j=0;j<2;j++) { a[i][j]=result; cout<<"a["<<i<<"]["<<j<<"]="<<a[i][j]<<endl; } } }[/code] BUT the …

Member Avatar for Ben10
0
88
Member Avatar for sonia sardana

To Create a toolbar we drag the pricturebox & then the image. Suppose I want that the text is there in place of image ,Is it possible ??

Member Avatar for sonia sardana
0
196
Member Avatar for it2051229

I'm creating a simple C# program that deals with pressing the DELETE key button in the keyboard. so what I created a key press event, but seems like the delete key doesn't work.. i tried it with other keys and it's working fine... why?? and is 46 the keycode for …

Member Avatar for Jx_Man
0
2K
Member Avatar for aminit

Hello : I 'd created a simple form , it consist of 2 set of checkboxs 1-6 checkboxes 2-6 checkboxes I want to make a simple function determine if the first checkbox in set1 is checked it must test the checkboxes in set2 if the first is checked too or …

Member Avatar for aminit
-1
175
Member Avatar for scaraffe

I was learning about structures in C++. I had a question: [code] 1.struct integer 2.{ 3. int i; 4. integer (int j = 0) : i (j) {}; 5. integer operator* (const integer &k) const 6. { 7. return integer (i + k.i); 8. } 9.}; [/code] In the above …

Member Avatar for Salem
0
104
Member Avatar for vishwajit

Hi, I want to configure php 4.3.2 on windows 2003 server. I installed binary but I am not able to view php pages on iis 6. Can anyone help please? Thanks in Advance Vishwajit

Member Avatar for vishwajit
0
77
Member Avatar for jennyebrooke

I need to know how to have the user answer a question using yes or no and the program translating it into 1 or 0. I know this process involves a string... but anymore than that and I'm kinda lost. **Fixed second problem with the if else statement but still …

Member Avatar for jennyebrooke
0
182
Member Avatar for nickyspace

Hi I have issue regarding the mail, which is not sending to my mail account. 1. <html> 2. <body> 3. <?php 4. if (isset($_POST['email'])) 5. //if "email" is filled out, send email 6. { 7. //send email 8. $email = $_POST['email'] ; 9. $subject = $_POST['subject'] ; 10. $message = …

Member Avatar for nickyspace
0
110
Member Avatar for xRuP7uR3x

Greetings everyone. I have been working on a script to convert a number from any base to any base up to base62. The user supplies the original number, the starting base, and the end base. My problem arises when converting the fractional part from base10 to the end base; the …

Member Avatar for jrcagle
0
156
Member Avatar for mnv29brt

[COLOR="Red"]Poly.h[/COLOR] [code=cplusplus] #include <iostream> using namespace std; #ifndef POLY101 #define POLY101 class Poly { [B]private:[/B] int order; double *a; // Coefficient vector -- a[0], a[1], a[2], ..., a[order] // to represent a[0] + a[1]*x + a[2]*x^2 + ... public: Poly(int = 0); // Default constructor Poly(const Poly &p); // Copy …

Member Avatar for dougy83
0
4K
Member Avatar for NycNessyness

Hello guys. I needed some help with my calculations. I'm having a problem with having my output display the total amount. I believe the problem is coming from trying the float calculation.

Member Avatar for NycNessyness
0
104
Member Avatar for tformed
Member Avatar for dougy83
0
89
Member Avatar for clueless101

I need to design an Ages class with fields to hold 3 ages and includes a constructor, accessor and mutator method. Also needed is a method that returns the average of the ages. I also need to write a demo class that creates an instance of Ages class. The demo …

Member Avatar for clueless101
0
148
Member Avatar for ITKnight

Please see my code : [CODE] using System; using System.Collection.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace WindowsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void cmdtam_Klik(object sender, EventArgs e) { string cstr; cstr = "data source=knight;initial …

Member Avatar for Jx_Man
0
404
Member Avatar for aran87

hello people i basically i need some information ive got a booking website which allows users to book a hotel room but once they book the room i dont want that room available to anybody else, im using Mysql databse linked to php, in the database i got a colum …

Member Avatar for phper
0
122
Member Avatar for Mr.Wobbles

I am writing a program that will take input from the user in the form of a tree-view and create a form and a database based on the tree-view. I have everything working except the group-box control for the boolean expression. I will give a sample code of the text …

Member Avatar for Mr.Wobbles
0
144
Member Avatar for mrcniceguy

Can anyone show me how i can view the images which i sent to msql database, i open the msql console, and type the folowing but nothing displayed: >SHOW DATABASES; >USE photos; >DESCRIBE image; >SELECT id,image FROM image; then the id displayed № 1,2,4,5,6,7,8,9 numbers of images i sent to …

Member Avatar for mrcniceguy
0
115

The End.