64,152 Solved Topics
Remove Filter ![]() | |
[B]Hello everyone!!![/B] I have the following pseudocode and I'm not exactly sure how/where to plug it into my code. I am still very lost concerning programing so please bear with my ignorance...:) /* pseudocode for Binomial Coefficients */ int binomial(int n, int k) { If (n < k) Then return … | |
im confused with [I]__call__() [/I] method defined within the class. [I]__init__() [/I] is used as constructor, and is called when we create an instance of the object. when does [I]__call__() [/I] method get called even though we not specify it explicitly... please help.......... | |
This is what I intended to do [CODE] class person: "class to represent a person" def _init_(self): self.name = "" self.age = 0.0 self.sqr_age = 0 class ageName: def listAgeName(x,y): # x is name # y is age x = 0 y = 0 listAgeName = [('John', 18)] p = … | |
im am trying out this code but it keeps giving an error msg but i cant see where the error is...please help [code] query = New OleDbCommand("INSERT INTO studenttable(sname,scourse,syear,ssemestor,sgrade)values('" & TextBox1.Text & " ',' " & TextBox2.Text & " ',' " & TextBox3.Text & " ',' " & TextBox4.Text & … | |
Could someone help me with this? [CODE] ifstream readfromfile("stats.txt"); readfromfile >> lvl >> xp >> str >> spd >> acc >> hp >> endl >> inventory[0] >> endl >> inventory[1] >> endl >> inventory[2] >> endl >> inventory[3] >> endl >> inventory[4] >> endl >> inventory[5] >> endl >>inventory[6] >> … | |
hi im not sure if this is a php issue, or a doctype thing - im using the 'strict' doctype... all of the apostrophes (') in my text are being swopped out for black diamonds with a question mark in them...? Huh? | |
I'm trying to make custom panels, but I can't even set the styles without getting errors [CODE]MainForm.SetStyle(System.Windows.Forms.ControlStyles.DoubleBuffer, true); MainForm.SetStyle(System.Windows.Forms.ControlStyles.AllPaintingInWmPaint, false); MainForm.SetStyle(System.Windows.Forms.ControlStyles.ResizeRedraw, true); MainForm.SetStyle(System.Windows.Forms.ControlStyles.UserPaint, true); MainForm.SetStyle(System.Windows.Forms.ControlStyles.SupportsTransparentBackColor, true); [/CODE] Throws errors saying [CODE] An object reference is required for the non-static field, method, or property 'System.Windows.Forms.Control.SetStyle(System.Windows.Forms.ControlStyles, bool)' (CS0120) [/CODE] | |
I can't get my select query correct. I have 4 tables and 2 foreign keys. Here are my table structures. [iCODE] movies movieid int unsigned not null auto_increment primary key moviename varchar directid int unsigned # foreign key to directors table date adddate genres genreid int unsigned not null auto_increment … ![]() | |
I have a vector filled with names such as John Doe Jane Doa etc. I need to write a function which deletes what is input via the user [CODE]void delete(vector<string>&name) { string FName, LName; cout<<"Enter first name and last name to be deleted"; cin>>FName>>LName; }[/CODE] ie input: John Doe and … | |
I'm sure I'm missing something simple, but would like to ask if someone could set me on the right path. We have to write a program that requests the hours worked in a week, and a pay-rate, and then prints the gross earnings, taxes and the net pay. [CODE] #include … | |
Hello daniweb, I am new to Java and to this forum! I am trying to put some objects into an array like this.. [code] MovingPlatform[] platforms; platforms = new MovingPlatform[1]; [/code] The problem is that I want to be able to access variables of objects within my array. I have … | |
i am new to c++ so please dont throw any crazy words around :D im using dev C++ form bloodshed as my editor / compiler what i am trying to do is when a user hits one of the special buttons all keyboard input after that will be reformated depending … | |
[code] Program to make snowflake! # Local graphics module. Must be in same folder as this # program (or both on Desktop) import ecs10graphics as gr # Math module that comes with Python import math def pointOnCircle(f, r): # f is fraction of the way around # r is radius … | |
Hi guys and girls I am writing a program to solve a linear system equations using gaussian elimination method by taking the factors and storing them in a NxN+1 matrix, this matrix can take integer numbers as well as floating point numbers i need help in translating this program to … | |
I thought I got the class path right?? lines 89 and 94 throwing the error [code=java] <%@ page language="java" %> <%@ page import="trader.webservices.util.Utils" %> <%@ page import="java.util.ArrayList" %> <%@ page import="java.util.Vector" %> <%@ page import="java.net.URLDecoder" %> <%@ page import="trader.webservices.util.AABAHeaderFooter" %> <%@ page import="trader.webservices.data.UserDataVO" %> <%@ page import="trader.webservices.data.UserInfoDAO" %> <% RequestDispatcher … | |
Hi, I am using VC++ 6.0. When i clear a vector using vector.clear() the capacity is not being reduced to zero. Hence the memory is not being deallocated. I have tried to reduce the reserved size by use of vector.clear() followed by vector.reserve(0). This however has no effect. I have … | |
in this program im tryin to keep the guests in a line and the numbers in another line ... but it always start from the middle of the list I dont know why take a look : [CODE]class Program { static void Main(string[] args) { string x = "Guest_TheDreamBoi Guest_XxEmoChickGirlxX … | |
Hi All, I am trying to create a 2D array of the [B]"CString" MFC class,[/B] however it needs to be declared dynamically for my application. I have read up on numerous forums but I just cant seem to find what I am looking for. From what I have read the … | |
To add check box to grid who s auto generate column property is true. I wish to select all the rows who s check box is checked .which can be checked by the user after generating the grid so at generating time all item template check box default values want … | |
Hello daniweb. I am currently involved in a project were we need to be able to generate confirmation mails, our original thought was to code an html mail, but we quickly deserted that idea. Therefor I need a powerful yet simple PDF class for PHP. I have no greater interest … | |
Dear All, I am opening a file called initialisation: [CODE]try: initFile = open("initialisation.dat", "r") except IOError: print ("Initialisation file cannot be openned for reading")[/CODE] I would like to read the contents of this file and then print them on several other files i.e. file1, file2, file3, file4, etc. i am … | |
Dear Php Experts I created few php file : [COLOR="Green"]Login Page - loginform.php[/COLOR] this page takes user id and password and fetch department from database then it post them to : [COLOR="green"]Checking File - userchek.php [/COLOR] where session is created if id password and every think goes fine other wise … | |
Hi all, I've been google'ing my backside off in search of a good example/tutorial for java gui's. Could anyone supply me with a link to a website that could supply a tutorial and/or some examples? Would be great, thanks. P.S. I use Eclipse, with no GUI editors, so I need … | |
I have a button, if I press the button, new picturebox will appear in my main form. How to add picturebox name in the listbox ? how to select picturebox name from a listbox for deleting the selected picturebox? thanks... | |
hey all, I'm using a form to throw info straight into a database. i know it isn't the best way but i'm new and all other implementations have confused me (i've been reading and watching tutorials for 2 weeks) but anyway i'm going to take the info straight from the … | |
Hello Every on i have wrote some scripts for my website and i am getting Undefined variable Notices on a couple Variables like exampled below [CODE] $i = 0; foreach($value as $row) { $content .= "<option value=\"".$i."\" ".$selected.">".$row."</option>\n"; $i++; } [/CODE] now every time i view the page with the … | |
hi, how do I create an array of pointers to a struct using malloc? using malloc like this- [CODE=c] abc * a = (* abc)malloc(sizeof(abc)*10); [/CODE] I get an array of struct objects. I can access member elements using the "." operator. eg a[2].xxxx what I want is an array … | |
Hello! I have this homework problem, that I thought I had figured out, but once I fixed all the syntax errors and debugged it again it gave me some weird numbers...something I totally didn't expect. Can anyone give me a clue as to where I went wrong? I suspect that … | |
the delete must be by copying the data and then deleting if their are 2 nodes from that one root. CODE IS AT VERY END FOR THAT. CALLED REMOVE. Thanks. main [CODE] #include <iostream> #include "my_bst.h" using namespace std; int main() { my_bst<int,int> ab; ab.insert(4,1); ab.insert(2,2); ab.insert(6,3); ab.insert(1,4); ab.insert(3,5); ab.insert(5,6); … | |
hi..pls help me with this ...when i run this c program i get in result segmentation fault message (i run in ubuntu terminal): [CODE=c]#include<stdio.h> #include<utmp.h> int main() { char *s,*c; struct utmp *u; int i; c=getlogin(); setutent(); u=getutent(); while(u!=NULL) { if(u->ut_type==7 && strcmp(u->ut_user,c)==0) { printf("%-12s",u->ut_user); printf("%-9s",u->ut_line); s=ctime(&u->ut_time); for(i=4;i<16;i++) printf("%c",s[i]); printf("(%s",u->ut_host); … | |
I am trying to create a timer that calls a function when the timer ends this is the timer class [code] class CreateTimer{ float OverallLapsed; float EndOfTimer; bool Running; public: CreateTimer::CreateTimer(float); void StartTimer(); void StopTimer(); void Lapsed(float); void SetEndOfTimer(float); bool CheckTimer(); void ResetOverallLapsed(); float GetOverallLapsed(); }; CreateTimer::CreateTimer(float EndTime){ EndOfTimer = … | |
So here is the problem. I have a file that starts with a number, this number says how many entries are in the file (5 means there are 5 names). Each entry takes up two lines in the txt file. First line is the name, the second is a group … | |
Hello, I want to store all ListView items of index (2) in a MultiLine TextBox, Please explain how can i transfer all listed text of specific index | |
I am stuck. I have a beginning php class and have run into a wall. Any help will be appreciated. here is the from that is submitted for paycheck calculation: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> … | |
i am a bit stuck on this, i need to call the first 2 functions for the output in the 3rd one. The user has to should be able to continue until they want to stop converting and they should be asked on which way the conversion is to be … | |
Hi, i just don't get why this isn't working. It is supposed to read from the end of a .txt and up, until it hits the first space but it just keeps repeating the last character in the text file ip.txt Any help is much appreciated. [code=c++]#include <iostream> #include <fstream> … | |
[CODE]def main1(f): return (f - 32) * 5.0 / 9.0 def main2(c): return 9.0 / 5.0 * c + 32[/CODE] the two function above convert fahrenheit and celsius I have to write a third function which calls the two functions above and allows the user to input to convert between … | |
I want to read two points in a picture. Most pixel values will be (0,0,0). I don't know how to take the flatted data and separate it into x,y coordinates. I use the Image library and VideoCaputre. | |
I have two processes where the First process sometimes is writing to a file and the second process is reading this file. For the second process I wonder if it is possible to only read the file if the First process does not use the file. How would it be … | |
Hi all! I want to make a subclass of dict and I have read about subclassing and the super method. The problem that I do not get is how I override the following method: [CODE]dict[key] = value[/CODE] This creates a new key with the specified value. I want to override … | |
I was trying to create a 3x3 list of lists, and came up with this surprising behaviour: [code]# creating a 2D list with an overloaded * operator mlist3 = [[0]*3]*3 print mlist3 # [[0, 0, 0], [0, 0, 0], [0, 0, 0]] mlist3[0][0] = 1 print mlist3 # [[1, 0, … | |
i have to write a program that simulates the flipping of a coin. 1. the function should ask the user how many times the coin should be flipped 2. the program should display the poportion of times that the head and tails appeared. (for example if the user enters 10 … | |
Okay, so I am writing a media player and I would like to be able to control the entire thing without the use of a GUI. So...are there any libraries or anything that would allow me to collect keystrokes on any OS (not just Windows)? Thanks in advance. | |
Hi, I'm trying to update an objects information within my linked list but for some reason after attempting to alter the data no changes appear to have taken place. As far as I am aware I'm not updating a copy of the object because I am finding the relevant object … | |
Hi.. I'm writing a code for the cash receipt program.... before this,i already make this kind of program.. but the program that i've made before is simply doing this task only : [B] //ask the user to enter the product information... Enter the product id : Enter the product name … | |
Hi Can anyone please check my code ? I'm trying to get today's date from database I tried many ways and I'm stuck now.. at my database access the transdate appears like this [CODE]11/29/2009 2:02:23 AM[/CODE] and this is my query code from VB.NET [CODE]"SELECT TransDate, Deposit, Withdrawal, TotalAmount FROM … | |
Hello Everyone. I am creating this Windows Forms Application using Visual Studio. Basically, in order to do what I want to do, I need to use an integer, and that integer needs to be converted into a string in order to change the label text, when pushing the button. However, … | |
Hey Everyone, I have written this Matrix Multiplication program. But The Program seems to crash when during the filling of the first matrix, exactly after the completion of the first row. Here is my implementation [code] #include <iostream> using namespace std; void generate (int ** ,int ,int); void fill (int … | |
Hello, What permissions should PHP files have on a unix/linux system? Is 655 appropriate? Many thanks in advance. ![]() | |
Hi *, I have some doubts about passing parameters to a method of a class. I am not sure if it is a problem of my design of the app or a problem of the implementation, I mean C++ knowledge. I have a class called MatrixHandler : The idea is … |
The End.