64,152 Solved Topics
Remove Filter ![]() | |
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 { … | |
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, … | |
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>"); … | |
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 … | |
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] … | |
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] … | |
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 … | |
![]() | 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 … ![]() |
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 … | |
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 … | |
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, … | |
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 … | |
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 = … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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; … | |
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); … | |
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 … | |
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); ... … | |
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! | |
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++) … | |
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 … | |
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 … | |
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. … | |
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 … | |
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? | |
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) … | |
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... | |
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 … | |
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 ?? | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 = … | |
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 … | |
[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 … | |
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. | |
Can all for statements be written as while statement. Vice Versa? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.