43,549 Solved Topics
Remove Filter ![]() | |
Hi there, if I call a double function like [CODE]double MyPrice( ) { return cost; }[/CODE] (value "cost" assumed to be set to 7.00 why this function returns 7 and not 7.00? thank you Software Development c++ | |
[CODE]else if(choice == 3){ System.out.println("what is your name? "); String name = kb.nextLine(); boolean x = Member.checkMember(name); System.out.println(x); } [/CODE] when i run this, it prints "what is your name?" and instead of waiting for me type in something, it just skips that part and go ahead and prints x. … Software Development java | |
Hi All, I am using a msflexgrid to display my access database (not editing it in run time). But, I have one column which is a boolean. When I display it, that boolean column doesn't show as "True/ False" or "Yes/ No". It is shown as " -1 / 0 … Software Development visual-basic | |
Hello. I'm relatively new to Visual Basic 6, but I've been getting around pretty good. But there's one thing I need help with. You know how when your texting someone on your phone and you have to press the same button multiple times to get the letter(s) you want? Well … Software Development visual-basic | |
hello can you help me please, how can i remove lots of spaces in a string for example: The space space space space quick space space space brown fox. the output should like this. Thequickbrownfox can you help on this...thank you in advance and I'm hoping for your positive response... Software Development visual-basic | |
Hi I am creating an program for my degree, it’s a program that logs call times, days, gives total cost and discounts depending on days of the week, at the end of the program it out puts all results then give an option to start over again or exit. So … | |
The error i get is: 'user:input' undeclared[first use this function] [CODE]#include <iostream> #include <cmath> using namespace std; int main() { // declaring variables \\ string user_input; // end of declaring variables \\ cout <<"Hello and welcome to Mr. Nightwish's lab of crazy!" <<endl <<endl <<"Please choose one of the following … | |
i am trying to draw a line between two points like this: [CODE=syntax]private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { Graphics MyGraphics = e.Graphics; Pen NewPen = new Pen(Color.Red,5); MyGraphics.DrawLine(NewPen,StartDraw,EndDraw); }[/CODE] it gives me an error: Object reference not set to an instance of an object. what have i done wrong … Software Development | |
i need some help see i have to write code for an array of 20 strings and i have to modify the binary search function im using to accomodate for strings instead of ints i know i still have to sort it so that binary search will work but my … Software Development c++ | |
Hi i found this site and this guy tries to teach you how to make a chat program. Well i just copied his code in and... th program worked. I can send a message to the server and it sends it back just fine. But i can only send a … Software Development vb.net | |
I am trying to compile a program using make on Mac OS X with gcc4.2. But I'm getting this error: fpu_control.h: No such file or directory I have never had a problem with an include file before and I'm rather confused! I have googled fpu_control.h, but I can't find anywhere … | |
(defun pCount (number) (let (ans 0) (do ((iterator 1 (+ iterator 2))) ((equal iterator number)) (if (equal (0) (rem iterator 3))) (+ ans iterator) (if (equal (0) (rem iterator 5))) (+ ans iterator) (+ ans 0)))) The object is to find the sum of all numbers divisible by 3 or … Software Development | |
Could anyone please show me how to display data in a datagrid when I log in as a user into my application?? The after a successful login a form opens. That form displays data and then there's an option where the user can open a form called "Time Management". In … Software Development | |
Hi All I have just one question.. I have an application, at the login screen I have a check box where the user can select if he/she is the default user on the computer he/she is using. What I would like to do is create a text file with the … Software Development | |
I've been driving myself crazy with something I originally thought would be incredibly simple. Here's a really simple example of what I'm trying to accomplish: I have a picture sized 800x530, all I need to do is center this picture in a new image that is 800x800 with a black … | |
I am trying to save a form location to a database whenever the LocationChanged event is triggered on that form. [code] private void DisplayForm_LocationChanged(object sender, EventArgs e) { DSLocation = this.Location; ((Form1)this.MdiParent).NotifyChanges(this); // notify parent form that there are changes on this child } childForm.Location = StringToPoint((string)row["location"]); [/code] DSLocation is … Software Development | |
Hi, [CODE]string[] SplitEquationText = EquationBox.Text.Split('');[/CODE] in that line of code, it will not let me split nothing? am i allowed to split nothing? thank you. Software Development | |
Hello. I have a problem with one part of my homework. I'm not exactly sure how to say this in English. I want the constructor to build an object and assign string values to attribute1 and attribute2. I'm only posting the relevant part of my code. My class can be … | |
Hey. I need to click this button in vb.net. [CODE]<button id="login" class="fblogin"></button>[/CODE] How would I go about it? Thanks. | |
I have to design a relatively simple game-type programm on pascal It has to generate a way, which the player will have to guess. They way can only go horizontaly or verticaly. Im usign 10x10 array for this. The problems start, when im making the way for player and checking … Software Development pascal | |
I have written a program to create a 4x4 grid Sudoku style. The numbers for the puzzle are read from a file and placed in the puzzle. As you can see, i have assigned the first numbers 'a' and the second 'b' etc However, i can not access the a,b,c,d … | |
Hello, How do I send a class (that extends from JFrame) back and forth between Client and Server? I would grateful for any pseudocode. Thank you! Software Development client-server java | |
Hi can anyone tell me how to remove empty keys in the following dictionary d={'a':[],'b':['1','2'],'c':[]} I want it to be d={'b':['1','2']} I tried this. But its showing error. I know its wrong to change the size of a dictionary during iteration. But is there any other way? [CODE]>>> for x … Software Development python | |
as part of a game I'm making I decided to make an importable/executable file to shorten the code and I was wondering... [CODE]def view(N,W,E,S): if info_dict["direction"] == "north": if N != 1: pic = fwall wall = "yes" if N == 1: if W != 1 and E != 1: … Software Development python | |
Hello, I am using OpenGL in C++ to create graphics in a program of mine. In the window, there is the main section and a sidebar. My problem is that I do not know how to relocate the vanishing point in my window. Currently, it is at (0, 0), which … | |
Hello, I'm trying to create a Button Class that will be used to create buttons on a form. This is the class I've created: [CODE] public class CreateButton : Button { public Button newButton; private string _buttonName; private Point _buttonLocation; private Size _buttonSize; public string ButtonName { get { return … Software Development | |
Hello world of DaniWeb, what's up? I have the following problem; I've created a text editing application in VB.NET that actually works pretty well with opening, saving files etc. But when it comes to opening a file, modifying it, and then trying to save it, the save dialog will pop … Software Development vb.net | |
hey guys, i am working on coordinates in one program and there is a line such as this one: [CODE]int xx =Math.round((int) getWidth() * 100 / 768);[/CODE] can somebody tell me what calculation is actually taken before the value is set to int xx thanks a lot for any suggestions Software Development java | |
can someone tell me how to put a picture on a msgbox? or even just an icon? Software Development visual-basic | |
hai! every body. please correct this coding. vb.net with access table name : Sample.mdb My Error mistake is : [COLOR="Red"]"The Microsoft Jet database engine cannot find the input table or query 'sample'. Make sure it exists and that its name is spelled correctly."[/COLOR] my coding: Private Sub btnsearch_Click(ByVal sender As … Software Development microsoft-access vb.net | |
Edit: Oh, nvm. I just redid the code and figured out how to write the tester class. Sorry guys for the trouble:( This thread can be deleted. So I have this code (not all was written by me). But I don't know how to start writing a tester class for … Software Development java | |
hi, ahm. well can someone help me in my project, it is a reservation system in a church, the problem is, I have to reserve the date that my client wants. I don't know what application I should use. At first, I use the calendar contol 6.0 but I don't … Software Development visual-basic | |
Ok here's what i want to do. I woul like to disable the toolbar and menubar in my main form depending on the usertype that was logged in. My dbase field is UserType and record type can only be User and Admin (Depends on the registration). When a user log … Software Development microsoft-access open-source visual-basic | |
Hi I am using vb.net 2008 and sql server 2005 in that one form contains the richtextbox from that richtextbox i am saving the questions in database now i want to change each questions font and size. can anybody help me! | |
[CODE]#include<iostream> #include<string> using namespace std; class string { char *a; int b; public: string() {a=0; b=0;} string(char *c) { b= strlen(c); a= new char[b+1]; //b+1 because one char extra for space strcpy(a,c); } friend void show(string s); friend string operator+(string &s1, string &s2); }; string operator+( string &s1, string &s2) … Software Development c++ | |
[COLOR="Red"][U]PYTHON:[/U][/COLOR] I have no idea where to start this, but i need to write code that takes a list of real numbers as input and returns the average of the numbers in the list. any input as to how i would go about starting this code would be much appreciated. Software Development python | |
How would I write a code to read in this book.txt [CODE]title*Programming PHP author*Lerdorf, Tatroe and MacIntyre publisher*O'Reilly Media description*3 This book covers the PHP programming language. It assumes the reader has some programming experience. It covers connecting to Oracle and MySQL databases. title*Core PHP Programming author*Atkinson publisher*Pearson Education description*3 … | |
here's my code: [CODE=C++] #include <iostream> using namespace std; void func(int num) { num = num + 1; cout << num; } int main() { int num2 = 5; cout << num2; func(num2); cout << num2; func(num2); cout << endl << endl; system("PAUSE"); }[/CODE] when the program runs, it yields … Software Development c++ | |
OK, this one has me baffled. I'm trying to teach myself more about recursive functions, so I'm making a prgoram to figure out the Knights Tour ([url]http://en.wikipedia.org/wiki/Knight's_tour[/url]). It went well until I tried to run it. It stops randomly between 2,000 and 3,000 iterations with a Stack Overflow Error, yet … Software Development vb.net | |
I'm making a little game and I can't get button bindings to work. Here is what I have so far [CODE]def forward(event): print "up" frame.bind("<Up>",forward)[/CODE] but pressing the up arrow does nothing...is there something I missed? | |
ok i can easily make a server and client sockets in python because of the very easy library it comes with but is there a easy library as easy for c++ as the library that c++ comes with seems very confusing to me thanks in advance Software Development c++ client-server | |
Hi everyone, I'd like to write a small application to basically read in some text from a file, display it in a GUI (I've done this using a textpane), and then change the font color of certain words if they exist in the text (say from the default color to … | |
I'm having a bit of trouble understanding DataAdapters and I was hoping for a quick bit of help. At runtime, I'd like Form1 to open a DisplayForm for each row in the database and have each of those DisplayForms be bound to the database and fully editable (there are 3 … Software Development | |
Hi, I read the Python/C-API and they say I should not use PyArg_Parse() anymore but use PyArg_ParseTuple(). My problem is that I retrieve an PyObject * out of PyDict_GetItem(...) so this is a single object and not a tuple. PyArgs_Parse() is the only API-Function to get a C-"string" out of … | |
sub class [CODE] public class Exer2 { public void setLength(int x) { this.listLength=x; } public int getLength() { return this.listLength; } int listLength=getLength(); int list[]=new int[listLength]; public void display() { System.out.println("The array length is: "+list.length+" "); } } [/CODE] main class [CODE] import java.util.*; public class Output { static Exer2 … Software Development java | |
Hello all, I keep getting a segmentation fault when I run this compiled program. [CODE] #include <string.h> #include <stdio.h> #include <stdlib.h> #include "person.h" /* write a struct to the file */ void WritePersonFixedLength(struct person * input, FILE * target) { //use fprintf to write input->firstname '%-20s' fprintf(target, "%-20s", input->firstname); //use … Software Development c | |
Can anyone tell me if it is possible to set a value in an array to infinity and if so how to go about it? Thanks. Software Development c++ | |
Hello All, Newbie C/C++ programmer (veteran VB) here with a problem I cannot get past: I am attempting to run/modify code created in Borland C++ v.6. When I try to run the code in the IDE I consistently get an EAccessViolaton with the line of code in the title highlighted. … | |
Hi All, I am getting the following error below when running my CGI script. I have went through the code but can't seem to sift where exactly it is saying on each of the respective lines. For the error on line 65 is it because I have a localized variable … Software Development perl | |
Hello! I've written a class called Date: [CODE] class Date { private: int day, month, year; public: Date(); Date(const char *d); //other methods... }; [/CODE] I want to write a constructor that'll take as a parameter (as you can see) a c-string. That string will look like: "12022010". The first … Software Development c++ |
The End.