64,152 Solved Topics
Remove Filter ![]() | |
I want to write a flash player by using python,can someone help me . Thanks a lot. | |
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 … | |
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 … | |
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): … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
I like to create a database of common chemicals with Python. How would I go about that? Any help welcome! | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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 | |
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 … | |
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 … | |
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; // … | |
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 … | |
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 … | |
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 … | |
Is there a way to make a Tkinter GUI window that the user can not change the size of? | |
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 … | |
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 … | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 | |
[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 … | |
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] … | |
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 … | |
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 … | |
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 … | |
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 … | |
I had moved my question on VB 4/5/6 category... sorry i made a mistake... | |
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 … | |
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 … | |
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 … ![]() |
The End.