64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for seasou
Member Avatar for seasou
0
2K
Member Avatar for Monsignor

OK, this is the problem: my original file has only one line and that line contains a sentence. I'm supposed to create a new file that will put each word from the sentence in its own line. For example, original file: [code=c]The quick fox jumped over the lazy dog[/code] output …

Member Avatar for Ancient Dragon
0
166
Member Avatar for andrax

I'm writing a win32 app that re-paints the client area everytime the user clicks inside of it. Unfortunately after about 25 or 26 clicks the window gets painted white, but the black grid lines still appear. The WM_PAINT case goes through a for loop and asks another class what should …

Member Avatar for andrax
0
219
Member Avatar for babutche

O.K. This is what I have changed in my [URL="http://www.daniweb.com/techtalkforums/thread65045.html#"]program[/URL]: import string import math class Student: def __init__(self, name, hours, qpoints): self.name = name self.hours = float(hours) self.qpoints = float(qpoints) def getName(self): return self.name def getHours(self): return self.hours def getQpoints(self): return self.qpoints def gpa(self): return self.qpoints/self.hours def addLetterGrade(self, LetterGrade, credits): …

Member Avatar for babutche
0
182
Member Avatar for Phaelax

For awhile now, I've been using Mac to code java. Though my programs compile and run fine, I always get these errors. Using the same project to compile on windows with the same IDE(netbeans), I dont get them. I was hoping someone would be able to shed some light on …

0
80
Member Avatar for jrcagle

Hi all, In the never-ending quest to master Tkinter, I wrote a small version of Notepad. Here is my "SaveAs" function: [php] def save_as(): if not mainw.filename: mainw.filename = tkFileDialog.asksaveasfilename(title="Save As...", filetypes=[("All Files","*.*"),("Text Files","*.txt")]) if not mainw.filename: return f = open(mainw.filename, "w") s = mainw.frame.edit.get("1.0",END) f.write(s) f.close() [/php] As you …

Member Avatar for Ene Uran
0
91
Member Avatar for JoBe

Hi guys, This exercise goes as follows: - Write a function that counts the number of occurences of a pair of letters in a string and another that does the same in a zero-terminated array of char(a C-style string). For example, the pair "ab" appears twice in "xabaacbaxabb". Now, I …

Member Avatar for Dave Sinkula
0
374
Member Avatar for Colin Mac

Here's an example of two programs that do the same thing, I have been taught how to do them like the first way. Now, I'm reading an ebook and it explains to do them like the second way. Which way do you think is more proper? thanks [code]#include <stdio.h> int …

Member Avatar for Colin Mac
0
102
Member Avatar for Matt Tacular

[php] import random availableCountries = [0, 1, 2, 3, 4, 5, 6, 7] firstTurnsCountries = [] secondTurnsCountries = [] def countryDivider(countryNum): counter = 0 while True: if counter == 8: break num = 7 if num > 0: countryToAdd = random.randint(0,num) if num == 0: countryToAdd = 0 if counter …

Member Avatar for Matt Tacular
0
113
Member Avatar for assgar

Hello First sorry if there is to much code in this example. I am new to working with multi page forms. I have a search form that gets preloaded info from the database. There are 3 scripts (a html page, a preload script and a process script). There is a …

0
85
Member Avatar for sneekula

I like to create a database of common chemicals with Python. How would I go about that? Any help welcome!

Member Avatar for Ene Uran
0
119
Member Avatar for sdillinger

In the following snippet of code the compiler (g++ on RH 4) does not see my overloaded operator. I cannot figure out why. Error: parse_opra.cpp: In function `void parseFile(std::istream&)': parse_opra.cpp:19: error: no match for 'operator>>' in 'in >> rec' note: candidates are: std::basic_istream<_CharT,...... ..... opra_record.h:35: note: std::istream& operator>>(std::istream&, Opra_record&) I …

Member Avatar for sdillinger
0
151
Member Avatar for sneekula

This came up on Chris99's bus ticket program thread. Would like to see any simple examples on how to pass variables between classes without using global variables.

Member Avatar for vegaseat
0
19K
Member Avatar for jobra

Hi I am new to c++. I tried to get current date but when I compile the program, it gives me an error. This is my program [code=cplusplus] #include <iostream> #include <ctime> #include <stdio.h> int main () { char sdate [10]; _strdate(sdate); std::cout<<"Current Date:"<<sdate; return 0; } [/code] when I …

Member Avatar for jobra
0
189
Member Avatar for chupacabra

python 2.4.1 mySQLdb 1.2.0 kernel 2.6.12 Hi, How can I make the following statement so I can search for any string? Right now I need to input at runtime %whatever I'm looking for% between % signs to get all records matching that query. I want to have this statement set …

Member Avatar for locosway
0
138
Member Avatar for mattyd

I have been working on a GUI-based program using Tkinter; it is coming along nicely and I am very pleased with the results. I am at a point where I am trying to attempt a graphic manipulation of the GUI canvas. I have researched this but I am unsure what …

Member Avatar for jrcagle
0
2K
Member Avatar for snedan

Im usind Dev-C++ and it allows to return more than 1 value :eek:. ok, so here's my code : [code=c] #include <iostream> using namespace std; int intFirst, intSecond, intThird; int BreakUp(int intNumb) { intFirst = intNumb / 100; intSecond = (intNumb - (intFirst * 100)) / 10; intThird = intNumb …

Member Avatar for ~s.o.s~
0
129
Member Avatar for DynamitMsk

Hello, I have a quick question: How do I declare array of strings with a static size entered by user during run time in C++? In C# i'd do [code] // Get user unput (int, # of strings); string[] stringArray = new string[numOfStrings]; //tell user to start imputing the string …

Member Avatar for Ancient Dragon
0
191
Member Avatar for sneekula

As you can see, I am playing around with the Tkinter GUI toolkit. How can I keep a number of widgets fixed in a location even when the user expands the window?

Member Avatar for sneekula
0
195
Member Avatar for sneekula

I am writing a small Python program for the use in our departments stockroom. This is what I have come up with (just starting): [php]# table of chemicals in stockroom # order --> stock number, chemical name, quantity (grams) # short version of the table table = [ ['ud-99137', 'm-chlorobenzoic …

Member Avatar for sneekula
0
155
Member Avatar for paramedic233

I've installed wamp and everything runs good. However, when I try to edit one of the .php files and debug it, I get a parse error of unexpected T_STRING. I am so completely lost trying to do this. Please help a gamer out! Lets see, WAMP Windows 2000 Pro sp4

Member Avatar for paramedic233
0
94
Member Avatar for whitemoss

Hi guys, need ur help regarding the above matter. I've write a code for if statement but it didnt work as expected when I run the program. Below is my code: [code] // Get ChannelID strcpy(src, row[11]); if (strcmp (src, "1") == 0) { if (sprintf(query2, "select * from Register …

Member Avatar for whitemoss
0
119
Member Avatar for rwagnes

Hi. I have a Java Applet with an assortment of buttons that is loaded onto an html web page. I would like any given button to run my ASP code which returns a web page containing results from a database query. But I can't figure out how to link the …

Member Avatar for rwagnes
0
101
Member Avatar for JS1988

Ok so I got this to compile but now all it prints out to the screen is the "*" in my createHistogram function why doesnt it print the mean,median and mode with a histogram of the data? [CODE] #include <iostream> #include <iomanip> #include <fstream> #include <cmath> using namespace std; // …

Member Avatar for JS1988
0
250
Member Avatar for ashneet

I am new at c# so i am not even sure if this is possible. This application i am making is a win app and its purpose is to make xor encrypted file. when i try to encrypt large file it takes long time so i am trying to make …

Member Avatar for Killer_Typo
0
106
Member Avatar for Jamaican Beauty

Hello, I'm a begginer at this asm code stuff and I've had to write a couple of simple and basic begginers programs. Well the one that I have to do now has to have an output that looks like this: * ** *** **** ***** and it must be a …

Member Avatar for Jamaican Beauty
0
158
Member Avatar for linux

Hello! In Visual Basic, there is a piece of code that can be used to see if a command starts with a certain text. For example, if I had a textbox, and I wanted to see if the user had started it with an "A" then I would use (not …

Member Avatar for vegaseat
0
209
Member Avatar for sneekula
Member Avatar for sneekula
0
163
Member Avatar for whitemoss

Hi All, Need our expertise out there regarding the above mention error and below are the codes: [code] /* send SQL query */ bzero(query1, sizeof(query1)); sprintf(query1, "select a.CreateDate, a.MobileNumber, b.BillName, b.CorrName, b.ICNew, b.ICOld, b.Passport," "b.Addr, b.Addr2, b.Addr3, b.Addr4, b.Postcode, b.CountryCode from Register as a, Profile as b" " where a.MasterNumber …

Member Avatar for whitemoss
0
469
Member Avatar for sparkid

I need immediate help in writing a function program. I have to write a program in functions and use array to store them. I am not familiar with functions and i tried to create it but i fails to run, However, i simply created this program in arrays and it …

Member Avatar for sparkid
0
86
Member Avatar for bala24

Hi all, I got this problem after reviewing aznballerlee's problem posted some time back and the replies to it. I need to design the same function but with only one parameter i.e remove_S(char *p) I cannot take any local variables within the function. main looks like this ... [code] int …

Member Avatar for JRM
0
153
Member Avatar for Haze

when i say basic i mean basic it doesnt store the encrypted string in a file or anything it just prints out what it would be and all i intend it to do is swap a for b, b for c and so on then turn the string round backwards …

Member Avatar for jrcagle
0
2K
Member Avatar for JoBe

Hello ladies and gents, I'm trying to copy two words, for instance test and word into an array of characters and have this: [CODE]#include <iostream> int main() { char word[10]= ""; char *wordArr[10]; for(size_t i = 0; i < 2; i++) { std::cin >> word; *(wordArr + i) = word; …

Member Avatar for WaltP
0
349
Member Avatar for sweety0

dear all i am sending a code i want a code which will multiple three numbers given in three text boxes without using multiplication operator. and show the answer in the fourth text box Private Sub cmdbutton_Click() Dim BOX1 As Integer 'Declaring variables Dim BOX2 As Integer Dim BOX3 As …

Member Avatar for aparnesh
0
126
Member Avatar for mattyd

Concerning Python Indentation Syntax: I have researched this and read some reasoning behind indentation-level enforcement. My question is: does this exist simply to ensure consistency when dealing with nested statements, a precaution against sloppy composition of code? I am not complaining about this, and actually I somewhat like this, but …

Member Avatar for jrcagle
0
244
Member Avatar for mattyd

I have been working on a somewhat small Python GUI for a few weeks now primarily focusing on the GUI and not giving much in-depth thought to the logic of what is to be a simple card game. I assumed the logic to be in my head and in general …

Member Avatar for jrcagle
0
322
Member Avatar for millanskie

Hi, do anybody knows how to connect in sql mdb2 in Visual Basic 6 I only know how to connect in php... this is my sample connection in php.... #======================================# $mdb2 = connectdb(); $sql = "SELECT <fieldname> FROM <tablename>" $results = selquery($sql,$mdb2); closedb($mdb2); #======================================# do anyone knows how to do …

Member Avatar for millanskie
0
188
Member Avatar for JS1988

Could somebody please me get this to compile and run [code] #include <iostream> #include <iomanip> #include <fstream> #include <cmath> using namespace std; // global constant declaration const int MAX_SIZE = 50; const int NUM_RANGE = 25; void getNumbers( int numbers[ ], int& size, int MAX_SIZE ); void printResults( float mean, …

Member Avatar for JS1988
0
127
Member Avatar for sheetaljagwani

Hi, I am trying to make a simple jsp program which eneters data eneterd by user in an html form called main.html. This is the code for main.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> Benthic_query </TITLE> </HEAD> <BODY> <form METHOD = POST ACTION="dataConnection.jsp"> Enter the name …

Member Avatar for jwenting
0
156
Member Avatar for amithasija

i know this is not a question u'll enjoy,but i am new to asp.net but i need a connectio string to start my project ,so can anybody plz tell me how to get connection string while using sql server 2005.plzz

Member Avatar for Paladine
0
124
Member Avatar for Tkassis

[B]I am working on an exercise given in class. I have managed to do most of it but I a a bit stuck on the permutation part. Here is what is required of me:[/B] Subject: Transformers An ideal electrical transformer has an input voltage and current, Vin, Iin and an …

0
66
Member Avatar for s88

So I need to do a program, that goes throgh an html file and prints all the tags, but not closing tags. I tried the following code but when I run it several arrows appear. Can someone help please? [code = c] [COLOR=#000000]Program one;[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]Uses crt;[/COLOR] [COLOR=#000000] [/COLOR] …

0
91
Member Avatar for Hello!

Hi everyone, hope your all well....i was just wondering if someone could pleassseee tell me why this doesnt compile and if they could please correct ti for me??? thank you very much: public class BankAccount { private static int accountCounter = 0; private String ownerName; private String accountNumber; private double …

Member Avatar for Hello!
0
87
Member Avatar for assgar

Hi I thought I had resolved this problem but I am intermittently the receving the warnings below. This code consist of a 1) HTML form, 2) a display function on the HTML form and 3) a process to manage the form input. Can you show me what I am doing …

Member Avatar for assgar
0
264
Member Avatar for assgar

Hi I need to allow the form user to fill out the form using alpha numeric characters only. After reading what I could find this my first attempt to use preg_replace. This works but I need to make sure I am validating the user form input. Have I missed any …

Member Avatar for Puckdropper
0
115
Member Avatar for chris99

So the Text Adventure is lost. ;-;. I am working on a GUI to take a starting point and a destination input by the user, and scan a file to find a match for both. If it finds a match for Variable A + B then it will assign variable …

Member Avatar for Ene Uran
0
140
Member Avatar for millanskie

I had moved my question on VB 4/5/6 category... sorry i made a mistake...

0
48
Member Avatar for Shailesh33

Hi, I am having trouble to find the specific information about Dijkstra agorithm and Shortest Path techniques for my following two problems. Please help me by providing either specific answer or URL for my questions. I appreciate your help. ============================== [1] [COLOR=#000000]What is the running time of Dijkstra’s algorithm if …

Member Avatar for stymiee
0
160
Member Avatar for shr2408

I am writing a small tkinter-app involving user keyboard-input, and want to control the range of acceptable input-characters. I'm currently using an Entry-widget, but haven't been able to access the individual characters AS THEY ARE ENTERED. What I (think I:confused:) need is somthing like the 'command=' option (as in the …

Member Avatar for shr2408
0
1K
Member Avatar for mattyd

I am trying code a single button that will fire two commands, that is, it will open two image files with one button selection. I have researched this and have not found much directly related to this question; what I found was to use a def within a def, thus …

Member Avatar for Mouche
0
4K

The End.