199,114 Archived Topics
Remove Filter ![]() | |
![]() | hey... I wasn't able to find much information on these class methods other than __init__ ... could you explain what these (and maybe some others) do or perhaps just give me a link to a page that explains them: def __repr__ def __str__ def __cmp__ ![]() |
Can anyone help me with this project, I cannot figure it out. Enter characters one by one until a predetermined “sentinel” or the maximum number of characters is entered. The maximum [B]MUST[/B] be less than 96. The sentinel character can be any character other than an italic alpha or, space … | |
Hi All, This is my first posting :) I urgently need some help!! I am trying to call a perl script from another and capture the exit status (whether successful or not). How should I go about it? Please help.... Thanks in advance, Bucchi | |
Hi, I am doing a part time degree and need some help to finish off some code for my first assignment in C++. I have written a program which checks some inputted int's and strings, validates them and outputs the result. The last thing I need to do to finish … | |
[B]Hey i have been working C, But i need to do a Convolution progrm in C, So pls advice on this matter How to initialize..[/B] | |
does anyone know how I can write to a xls that puts each number in different cells? for example, [CODE]vector<int> nums; nums.push_back(1); nums.push_back(2); nums.push_back(3); ofstream myfile; myfile.open("C:/example.xls") myfile << nums[1] << " " << nums[2] << " " nums[3] << endl; myfile.close()[/CODE] how do i put three numbers in different … | |
i need to write a program that- allow the user to enter the number of students-allow the user to enter each mark-calculate the frequency for each mark-the interval that exists between identical marksthis is what i have donei want to know if there is a different way of doing it#include#define … | |
[code]/* a program to find all the permutations of an input string pointers are not allowed*/ #include <stdio.h> #include <string.h> #include <conio.h> void main() { clrscr(); int num =0; char buff[20] ; printf("Enter the string\n"); scanf("%s",buff); int len = strlen(buff); printf("%s\n",buff); for(int i=0;i<len;i++) { for(int j=1;j<len;j++) { for(int k=j+1;k<len;k++) { … | |
Hi there, im a c++ noobie. I have a class called node. Node has a data member id. When i try and access id in the obect named f outside of main visual studio 2003 gives me the errors: : error C2065: 'f' : undeclared identifier error C2228: left of … | |
Hi all, I am having trouble working out how to pull up shipping options from a table based on two parameters, countryID and productCode. I have the following 2 tables: [B]ECOMMERCE_shipping[/B] shippingID countryID productCode cost1to2 [B]SYSTEM_countries[/B] countryID countryName What I want to do is feed it say, 3 product codes … | |
i need to write a program that- allow the user to enter the number of students-allow the user to enter each mark-calculate the frequency for each mark-the interval that exists between identical marksthis is what i have donei want to know if there is a different way of doing it … | |
the function first search a word from the linked list. if found it then increment the numWords (number of words in listfor that word) and if not found it shoud create a new node for the word. the code is: [CODE]void AddWords( char text[30]) { check=head; while (check!=NULL) { if … | |
Hello I am attempting to upload a backup (gzipped SQL), to my server via phpmyadmin but it is just over the max upload limit therefore I cant upload it! How can I get around this.. is there another way of uploading the phpmyadmin gzipped backup, or changing that limit? I … | |
Hi, I am new in shell script and I road this script, but it does not give the output I want. The output show look like this: Instance on [COLOR=Red]fac1[/COLOR] [COLOR=Red]inst1 [/COLOR]instance Instance on [COLOR=Red]fac2 inst2[/COLOR] instance Instance on [COLOR=Red]fac3[/COLOR] [COLOR=Red]inst3[/COLOR] instance Here is the script: [code]INSTID="inst1 inst2 inst3" FANCID="fac1 … | |
Alright, I cannot get the getline function to work. I have iostream included, using namespace std, and here is the syntax I have down: [inlinecode]cin.getline(playerOne, 21);[/inlinecode] with playerOne declared previously as a string, and I want its max input to be 20 characters. What's going on here? It's not working … | |
Ok our teacher gave us a .h and .cpp file for a class called "JarType" and our assignment is to overload some of the math operators. Now I know how to overload operators if I'm adding two JarTypes together. What I'm having a problem with is overloading when I have … | |
How would you change the same member of many objects of the same class (or structure if possible)? [CODE]struct point { float x, y, z; } point a, b, c; a.x += 20; // b.x += 20; // now how would i do this in one statement? c.x += 20; … | |
Hey guys. Ive been working with fstream for about 2 hours and i give up. My problem is I have a text file with an unknown number of rows. Each row has a known number of items. i cant figure out how to read the elements in each row. after … | |
[B]This is the error message I get and I know next to nothing about what this means: Parse error[/B]: parse error, unexpected T_STRING in [B]/hsphere/local/home/oldsoppl/preserveourcorpsmemories.com/ecommerce/os/catalog/includes/languages/english/privacy.php[/B] on line [B]39 Here is the script: <?php /* $Id: privacy.php,v 1.1 2004/08/25 23:11:33 akhan Exp $ osCommerce, Open Source E-Commerce Solutions [url]http://www.oscommerce.com[/url] Copyright (c) … | |
There are 2 columns in 1 database for [I]Id[/I] and [I]name[/I] but the serial number is random. I want to update those serial number in serial order, how to? Like id Name ------------ 1 Shouvik 5 Joe 6 Mathew 3 John 4 James 2 Jack I want to update it … | |
Write a conditional that decreases the variable [B]shelfLife[/B] by [B]4[/B] if the variable [B]outsideTemperature[/B] is greater than [B]90[/B] . if(outsdieTemperature > 90){ shelfLife-4; } something is wrong..can you help..? | |
I've knocked up this rubiks cube, its not fully complete. If you click and drag on the space, you can rotate the cube in any axis. If you click any of the 12 rotation buttons, you can rotate the cube, note that you can still rotate the cube with mouse, … | |
![]() | I searched the forum and couldn't find anything on this, so I guses I'll give this tiny topic its own thread. What's the point of creating a main() function and calling it at the end of your program? Are there advantages to this method in comparison to just writing the … |
![]() | say you have a list: [php] list = [1,a,2,b,3,c,4,d,5,e,6,f,7,g,8,h,9,i,10,j,11,k,12,l,13] [/php] What's the easiest loop set up if I want to store each number (every other slot) into another list? The above list is actually text from a file read and then split with "1 a" and such on each line … |
Hi When i place this in my script import time.sleep (2) i would like my script to wait for 2 seconds then continue. But when i run it the left bracket is highlighted in red then when iremove the left bracket as i assume that is not supposed to be … | |
Write a program that accepts a number and produces a pattern as shown in the following sample outputs. Line = 3 *.* .* * Line = 8 .*.*.*.* *.*.*.* .*.*.* *.*.* .*.* *.* .* i've just learnt to use the setw() command..... but how do you fill up the alternate … | |
![]() | ok, well i know sql well but i am new to MySQL, learned that(mysql) few months back. however i have installed a new software called Altova DatabaseSpy to make my work much easier. Its working with all other databases Oracle, MSACCESS and all but not running or connecting with MySQL. … ![]() |
I installed Ubuntu Linux this morning and got java jdk 1.5.0_09 installed, along with Eclipse, and then I imported a project I've been working on into the Eclipse workbench. All configuration is fine, as far as I can say. My problem: The program I am working on uses the Enum. … | |
hi, i need to write a c++ program that takes input of a expression like say y = 5 + 2b; and gives out the output y = 5 + 2b it uses linked lists and the expression can be composed of integers, variables and operators. the encoding of tokens … ![]() | |
Hello, I need to write a program that runs along with an emulator. The goal of my program is to intercept certain keystrokes before the emulator gets them, and then send the emulator back some different keystrokes. I want the program to use as few CPU resources as possible, as … ![]() | |
We cannot have static friend function............ because 1.since static member functions can access only static data members...where as friend function can access all the members. 2.Friend function also require an object to access the members...where as static member functions can not. 3. Another thing ....since friend functions are non-member functions....and … | |
Hello, i'm trying to write in the main program a linked list of namesfractions, and integres. i don't know if anyone can help me in this. i attached the fraction class and the implementationUsing the linked list class we derived in class, and the following functionality:[LIST] [*]A print function (you … ![]() | |
Hi Im looking for a time delay code so my script runs to certain line waits for the time specified then continues.Ive found some but they seem to long and complicated. any ideas or links, books ect... Many Thanks HlA91 STAY COOL AND DONT GET STRESSED!:cool: ![]() | |
Hi, I have the following code: import string def main(): rank=[] suit=[] fname=string.split(open('H:\card.txt').read()) for line in fname: rank.append(line) print rank The file (card.txt) is: 2 h 3 h ... How's the easiest was to get the 2 into rank and the h equal hearts Ultimately i need it to print: … | |
So a kid in my class wanted more of a challenge...the professor gave us one...and I have no idea on this problem. Here's the instructions: Darts scorer. Write a program that draws a darts target and allows the user to click on the target to represent darts hitting the target. … | |
I recently downloaded Py2exe to make my python2.4 programs executable in motive of possible distribution. I looked online, and most of them tell me I need to use my ms-dos prompt, or command prompt. If these are two different things on my Windows 98 O.S., i cannot find command prompt. … | |
[FONT=Verdana]Hi, Fairly new to java and programming. Could anyone explain the difference between a for loop and a do while loop in relation to writing a program and typing in numbers and displaying the total. Thanks[/FONT] | |
Hi, If the following def shows if a deck is empty, how do I change it to show the number of cards left??? def isEmpty(self): return (len(self.cards) == 0) I was thinking just taking the ==0 should work, by returning number of cards. macca1111 | |
ok i just started loops in my java class and im stuck on getting this loop working i dunno what all math to do to get these numbers for the output [I][B]97, 84, 72, 61, 51, ... 1[/B][/I] | |
Howdy, I have attempted to install PHP 5.1.4 on a Windows NT system with Netscape Enterprise Server (3.6? not my choice). It seems like it is [I]partially[/I] installed. I mean, when you run phpinfo you get: [url]http://128.194.109.84/users/wong/php_info.php[/url] [code] <html> <head> <title>PHP info</title> </head> <body> <?php phpinfo(); ?> </body> </html> [/code] … | |
Hi I was goinf through the GTK code and saw that GTK code uses pointer for structs and not normal instances of the same structs... why could this be so? My take is that they wanted to use just one variable name and they can easily initialise the pointer to … | |
[code] #include <cmath> #include <iostream> using namespace std; //Function prototypes void getPrice (float&); void getInterestRate (float&, float&, float&); void getDownPayment ( float&); void gettradeIn (float&); void calcmonPayment (float, float, float, float, float, float&); int main() { // Input variables float price; float downPayment; float tradeIn; float loanAmt; float annualIntRate; float … | |
i have this line of code and want to compare the word from the linked list with the one supplied by user. the code is: [CODE] if (strcmp(p->word,word)==0)[/CODE] and i am having this error: [COLOR="Red"]passing `char' to argument 2 of `strcmp(const char *, const char *)' lacks a cast[/COLOR] | |
Hi Everybody: I've attempted at getting Java Sun certified twice (failing both times). My first score was a 22% and my second score was a 44% (big improvement :D ). I was wondering if anybody had any help or tips for taking the exam. I really want to pass next … | |
Hi Folks, I am Doug Malsbury, a B.S. degree Chemist and PC compatible Systems Analyst. I am 58 yrs old and getting started learning PHP and MySQL on my own. I will be browsing around here looking for hints and suggestions I can use in my efforts to learn creation … | |
Hello. Can anyone recommend any good Java IDE software(preferable freeware) that support latest jdk packages with user friendly environment for java development? Thank you. | |
I am supposed to use get the user input of a filename and then open that file and print to the screen (the first line-- that I will do later), and I can't figure out what I am doing wrong. Thank you. [code] #include <stdio.h> main() { char s[1000]; printf("Enter … | |
Hai friends I have listed the combo box va;ues useing ajax function foe example when user select the region related country displaying the next combo box , Its working for fier fox breowser but iits not working in IE I am getting the java script error. (Object required) Please help … | |
![]() | Hello there. I want to learn PHP. I have not even started yet. I have downloaded PHP Server files + Apache. But its giving me total headache to install that. I am still not able to install that thing. I would like to know how to install that thing in … |
im just doing a little exercise on the bubble sort algorithim, i included two ways of incresing its speed. 1. Breaking out of the loop if no swaps are made 2. Decreasing the inner loops lenght each pass I think there is two ways of doing it. This way i … |
The End.