64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for confusedndazed

[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 …

Member Avatar for confusedndazed
0
97
Member Avatar for katharnakh

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..........

Member Avatar for snippsat
0
17K
Member Avatar for checker

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 = …

Member Avatar for fallopiano
0
125
Member Avatar for hmmmm

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 & …

Member Avatar for SadOldMisterHam
0
165
Member Avatar for DawnOfIkaros

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] >> …

Member Avatar for programmersbook
0
245
Member Avatar for lifeworks

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?

Member Avatar for Airshow
0
97
Member Avatar for NargalaX

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]

Member Avatar for DdoubleD
0
147
Member Avatar for Webbg

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 …

Member Avatar for diafol
0
62
Member Avatar for solitaryy

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 …

Member Avatar for solitaryy
0
278
Member Avatar for guccitan88

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 …

Member Avatar for guccitan88
0
167
Member Avatar for RichardCrickets

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 …

Member Avatar for RichardCrickets
0
103
Member Avatar for HITMANOF44th

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 …

Member Avatar for HITMANOF44th
0
114
Member Avatar for vnproduktionz

[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 …

Member Avatar for vegaseat
0
94
Member Avatar for yasser87

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 …

Member Avatar for Nick Evan
0
158
Member Avatar for mimsc

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 …

Member Avatar for mimsc
0
579
Member Avatar for gehring

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 …

Member Avatar for gehring
0
331
Member Avatar for Alicito

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 …

Member Avatar for Alicito
0
172
Member Avatar for gehring

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 …

Member Avatar for Narue
0
819
Member Avatar for shine_jose

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 …

Member Avatar for chandru7
0
136
Member Avatar for K0ns3rv

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 …

Member Avatar for venkat0904
0
91
Member Avatar for NicholasE

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 …

Member Avatar for Gribouillis
0
123
Member Avatar for vishalonne

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 …

Member Avatar for vishalonne
0
7K
Member Avatar for P00dle

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 …

Member Avatar for jbennet
0
379
Member Avatar for murid

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...

Member Avatar for GeekByChoiCe
0
108
Member Avatar for leroi green

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 …

Member Avatar for leroi green
0
120
Member Avatar for jcanaway

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 …

Member Avatar for ko ko
0
225
Member Avatar for bhas_purk

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 …

Member Avatar for bhas_purk
0
146
Member Avatar for Viralguardian

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 …

Member Avatar for Viralguardian
0
206
Member Avatar for lotrsimp12345

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); …

Member Avatar for lotrsimp12345
0
85
Member Avatar for dark1806

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); …

Member Avatar for dark1806
0
133
Member Avatar for noey699

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 = …

Member Avatar for noey699
0
96
Member Avatar for hit25

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 …

Member Avatar for hit25
0
246
Member Avatar for Geek_Cyborg

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

Member Avatar for vb5prgrmr
0
92
Member Avatar for newbie37

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> …

Member Avatar for FlashCreations
0
487
Member Avatar for gangster88

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 …

Member Avatar for sneekula
0
597
Member Avatar for Bladtman242

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> …

Member Avatar for Bladtman242
0
631
Member Avatar for Musafir

[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 …

Member Avatar for sneekula
0
393
Member Avatar for Tech B

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.

Member Avatar for fallopiano
0
527
Member Avatar for Darth Vader

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 …

Member Avatar for Darth Vader
0
147
Member Avatar for marcux

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 …

Member Avatar for Gribouillis
0
195
Member Avatar for sneekula

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, …

Member Avatar for Mathhax0r
0
1K
Member Avatar for Musafir

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 …

Member Avatar for vegaseat
0
141
Member Avatar for SoulMazer

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.

Member Avatar for Tech B
0
235
Member Avatar for Valaraukar

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 …

Member Avatar for Valaraukar
0
183
Member Avatar for samsons17

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 …

Member Avatar for samsons17
0
100
Member Avatar for Dorayaki

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 …

Member Avatar for Dorayaki
0
263
Member Avatar for hajiakhundov

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, …

Member Avatar for hajiakhundov
0
2K
Member Avatar for Sky Diploma

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 …

Member Avatar for Sky Diploma
0
155
Member Avatar for ryy705

Hello, What permissions should PHP files have on a unix/linux system? Is 655 appropriate? Many thanks in advance.

Member Avatar for diafol
0
84
Member Avatar for fjrivash

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 …

Member Avatar for fjrivash
0
131

The End.