199,113 Archived Topics
Remove Filter ![]() | |
So the following is where I think the problem lies in my code: [CODE]public void actionPerformed(ActionEvent i) { int temp; double newtemp = 0; String inputString; inputString = infield.getText();//pulls the number that was entered in the input field temp = Integer.parseInt(inputString);// makes a new variable to handle the input //tells … | |
I am having a problem copying data members from an inherited class to the base class. All of the data is copied except the container data. [CODE] #ifndef NPC_H #define NPC_H /* * Basic parent to all other NPC types. * NOTICE: player is considered an NPC type */ enum … | |
i want to write a program that prints the value in array which are at odd position, i've this for single dimensional array but confused about 2-D array. Single dimensional: [CODE] int main(void) { int num[10]; int i; for (i=0;i<10;i++) { printf ("Enter %d value: ",i); scanf ("%d",&num[i]); } for … | |
Hello. I have some troubles with a constructor, I can't figure out why a WHILE isn't working as I expected. The program stops there and it doesn't continue. Thanks in advance. [code]// reading a text file #include <iostream> #include <fstream> #include <string> #include <cstdlib> using namespace std; struct Cours { … | |
I have a program that adds controls on the fly to an auto-scroll panel. When the panel is scrolled (viewing the bottom of the panel for example) and a control is added, it looks like it is added assuming the top left corner of the panel is still at 0,0 … | |
Hello! I need your help again... thanks! I have a table where I need to insert the same value in all rows and dont know how to. Table: equipment, Column: available How can I enter a number 1 in column "available" in all rows? Thanks again! | |
Hello members, Well I am always facing trouble with operator overloading. I just have this Assignment in which when I reached operator overloading nothing worked. I tried to do it in many ways but couldnt. Could someone help with this issue please! the question asks to include d) An overloaded … | |
Hey everyone, This is my first time here just to let ya know. Hopefully you can help me. :D The language is C++. I am currently working on a file that consists of functions to manipulate doubly linked lists from the main program. After writing several function everything was fine. … | |
[CODE] #include<stdio.h> #include<string.h> #include<arpa/inet.h> #include<netdb.h> #include<sys/types.h> #include<sys/socket.h> #include<fcntl.h> #include<sys/stat.h> #include<stdlib.h> #include<time.h> int main() { FILE *logs; logs = fopen("/home/aniroot/logs/log.txt","a"); if(logs = NULL) { printf("fopen failed ... There would be no log for this session!!!"); } int sockfd,newfd; int err; struct addrinfo *res,*p,hints; struct sockaddr_storage their_addr; socklen_t addr_size; int yes=1; char … | |
Hi i am new bie to swings. if i have a JTable. And i want to add number of rows with different number of columns like Employee1, Software Developer, swings Employee2, software developer What is the way of adding rows having different number of columns to a JTable Thanks. | |
Many times [inlinecode]strtok[/inlinecode] is recommended for parsing a string; I don't care for [inlinecode]strtok[/inlinecode]. Why? [list][*]It modifies the incoming string, so it cannot be used with string literals or other constant strings. [*]The identity of the delimiting character is lost. [*]It uses a static buffer while parsing, so it's not … | |
if at the end of the code i write this o execute main, [code] if __name__ == '__main__': try: main() except KeyboardInterrupt: pass[/code] isnt thre anyyy other way to exit the interpretor except pressing ctrl -c ???? the interpretor halts even if code ends and then i have to press … | |
do you have an idea in how we can move and drag image for games proposes.? | |
Hi I am trying to make my homework about a command line calculator, and i am trying to divide the entered string into small parts and i am trying to use strtok for this. [CODE] #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> struct var { char name[10]; double value; … | |
Hi, I'm having some trouble with trouble with an If statement in my program. It's a series of wind speed brackets to select the category from the Saffir Simpson Scale of hurricane classification. The problem I'm having is that it won't select the correct category based on the wind speed … | |
[B]I've written a code but it doesn't run! I can't find the problem and the Error is : Declaration Syntax Error will anyone help me?! :)[/B] [CODE] #include<iostream.h> void hi(void); void name(void); int main() { int m; cout<<"Enter one of numbers below:\n"<<"1.Hi\n"<<"2.Name:"; cin>>m; switch (m) { case 1: hi(); break; … | |
I have created a class Vacancy which has some variables : public $salary; public $id; ... I am looping through the result of a query and creating a vacancy for each match Then I adding the vacancy to an array. [icode] $tempVacancy=new Vacancy(); $tempVacancy->salary = mysql_result($result,$i,"salary"); $tempVacancy->id =mysql_result($result, $i, "yid"); … | |
![]() | Hi again, I'm trying to load a text file into a variable and I know of the jquery load [CODE] $("div").load("file.txt"); [/CODE] but I want to be able to load it into a var, does anyone know how to do this? Thanks in advance. ![]() |
im a little on the weak side in loops.....n hearing that programs are solved by bright people here.....i am requesting help with a few programs in loops...i dont understand them...and am expecting you people to help me 1- ******* _***** __*** ___* __*** _***** ******* NOTE-(_) MEANS SPACES 2-Write a … | |
Hi everyone I'm really exhausted with this error I'm using visual studio and I'm trying to build a contact form And all the information should be saved in contact table in the database Would you please help me with this error? I tried a lot to figure what's wrong, but … | |
I need to generate a chart using MSchart in c#. Im using visual studio 2008. the values of an array of 16 bit signed intigers (Int16) needed to be plotted against the array index. Please can anyone reply with an example....... | |
What would be in registers ax, ah and al after these commands: MOV AX, 1010 MOV AH, 5 ADD AL, 5 I understand that ax contains ah and al but I don't know the answer of this question | |
hello every one, i have a problem to execute the second SQL query, its working fine on my local machine and when i uploaded it to the server but suddenly stoped functioning and keep showing error on the numRows after the query in line 213, any suggestion will be appreciated[code]<?php … | |
hi everyone am a beginner in jsp side. i am working on a project where the UI is designed in HTML, validation in servlet and i want to store the relevant information in SQL server. I have glass fish server. how can this be done. please guide me | |
I am using the Win32 API. How would I be able to check if the shift key is being held down when processing use input? I know that value is MOD_SHIFT but I don't know if it's lParam or wParam of WindowProc that will hold this, of if it's any … | |
Hi , i know one method of deleting a record from a binary file. that is : read the contents of the file and every time check for some criteria based on which we want to delete the record. if record does not match criteria then write to new file … | |
i have a project anc i need to do an interface to my c program , there is any functions to do it? | |
I have a code like [code] int a=10; a=(++a)+(a++)+(a++)+(a--)+(--a); printf("%d",a); [/code] this gives the output as 51. while [code] printf("%d",(++a)+(a++)+(a++)+(a--)+(--a)); [/code] gives 56 as ouput. can you please explain the flow in both the statements. | |
Having a problem that I can't seem to find a solution for. I am using a picture as a button for my site and when you click the picture it brings you to the main page of the website. My problem is that I want the button to make a … | |
I have a question about programin in matlab, whould you please help me? I have a template of a part of face , ex. an eye. I will determine that in which picture in a database, the above eye exists? | |
guys me trying to use switch statement in this program but cant get to end... i tryed to convert string into char but dont knw why it still not getting right... please help me [code]import javax.swing.*; import java.io.*; class HappyBirthday { public static void main(String[] args) throws IOException { String … | |
Hi everyone, I am having some trouble here... I am asking the user to enter a file, and that file will read the contents and determine if the student will pass or fail the class. That part I am having trouble with is when I have to decide if the … | |
[CODE] Dim Customer As DataSet1TableAdapters.Customer1TableAdapter = New DataSet1TableAdapters.Customer1TableAdapter Dim Dt1 As New DataSet1.Customer1DataTable Dim TA1 As New DataSet1TableAdapters.Customer1TableAdapter Dim DR1 As DataSet1.Customer1Row Try Customer.InsertQuery(TxtCust.Text, MaskedPhone.Text, TxtAddress.Text, MaskedIC.Text, MaskedDL.Text) MsgBox("data entered") DR1 = Dt1.NewRow Dt1.Rows.Add() Customer.Update(Dt1) Dt1.AcceptChanges() Catch ex As Exception MsgBox(ex.Message) End Try[/CODE] i need help in this, i've searched … | |
So I have a problem. On my site I have a Facebook Likebox the problem is when I run the Firefox extension Page Speed, I am told that the Facebook images that are loading with the Likebox (mostly 50x50 images of avatars of people that already like my company and … | |
![]() | I just downloaded visual studio c++ 2010 express and when I tried to debug my code it doesn't seem to create an executable file. Is there some setting that I have to change? ![]() |
Hi folks. I'm making a GUI. It contains multiple JPanels. I'm having trouble making contents of other JPanels (than the first/main JPanel; others are subclasses to the first one) visible... From the first JPanel, I call a draw method to a second JPanel. This second JPanel's draw method displays a … | |
hey everyone, im tryin to generate random strings and store them in an array. can anyone please show me? | |
Basically what I'm doing is an if.then.else and depending on a value in the DB it's supposed to load one page or another. Right now I have it kluged together with a submit button but I'd like it to load automatically. This PHP script sits alone with no HTML output, … | |
Hi all, can someone help me here - I ave a regisration script where I am uploading an image to mysql, The problem im having at the moment is this..... The script creates a new folder by using the mysql_last_id function as shown below - The problem im having is … | |
I have been using java for some time, and can code back end stuff with ease. GUI's on the other hand I Find hard to deal with. So anyway, I'm making a game (text based), and would like to implement a console type GUI. I have already made a jframe … | |
Hey guys, I'm writting a program that reads a list of names from a file called name.txt and instert these names directly into a linked list in alphabetical order of [B]last[/B] names. For example, if the text file has these names: Henry Johns III, Albert Einstein, Henry Johns II, Mary … | |
okay I have been looking all over the web trying certain pieces of code and I have had no luck. I am tired and I really am at a lost right now. I am trying to make it so that when the user mouses over a select set of cells … | |
Hi experts, i developed javascript code that connects to ms acess database 2003. Everything work fine as it can insert,update and delete information from database. But my problem is that when i try to validate all my input text so as to ensure that my user must fill all the … ![]() | |
Hey folks, I am trying to normalize a view on a given output. This is how it works, I need to print several characters but the maximum chars i can print have to be 40 per line. [QUOTE]aaaaaaaaaaaaaaaaaaaaaaaaaaaaa...till 40 aaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbb[/QUOTE] The algorithm works as follows: I have to find … | |
im a beginner of coding and using python. Im trying to code for a linear search but I don't know how to:( | |
I've been trying to match some incoming strings from a mud(text based rpg) and I'm having some trouble. I need a regex that will match the <mob> tag in these strings. You can have a separate regex per sentence to match the surrounding text. You would stomp <mob> into the … | |
I have to write a program that creates a text file that contains a power of two table in HTML format. Also the instruction are [COLOR="Red"]The file should start with something like: [/COLOR] <html><head> <title>Powers of Two</title> </head> <body> <table border cellpadding=5> <tr><th>Power of 2</th><th>Value</th></tr> [COLOR="red"]Each line of the table … | |
I need to code a program for my friend and it has been giving me some difficulties. This needs to have two classes, one called Tester and another called Game. And the data in the Game class needs to be pulled to the tester class after the calculations are finished. … | |
![]() | Given a coordinate string -- 'x, y' -- where x and y are 1-4 digits, separated by \D+: '34, 58' I want to able to get a tuple with each number as an integer: (34 , 58) [B]Method 1[/B]: I could find the numbers, convert the tuple groups() to a … |
The End.