199,114 Archived Topics
Remove Filter ![]() | |
Hi all, I see a lot of books teaching beginning Python students to code like this: [code="Python"] def func1(): ... def func2(): ... class Blah(object): ... def main(): ... main() [/code] It strikes me that having people "def main():" and then call main() is a bit silly. In fact, it … | |
If i type a simply code with an output of "hello world" on the screen, printf ... u know the code, the programm isn`t able to do the .exe programm. I don`t know why. GRrrr. If i try to write difficult programms, it is the same probleme with the exe … | |
hi, I am finishing up a program and in the program I need to add numbers after a certain number example for every ten numbers 30, 40, 50 i need to add .125 i have this so far if ( age > 30 % 10 == 0 ) // Formula … | |
Hello List! I'm having a little problem w/ getting my select box populated... I'm passing in a 'LocationID' to this page and need to write a function to take that LocationID and populate the select box when the page is loaded. Here's my onload: [code] <body topmargin="0" leftmargin="0" onunload="Javascript:closeWindows();" onload="loadTopSVGVariables(document.forms[0].LocationID);loadBottomLocationID(document.forms[0].LocationID);"> … | |
This is a very simple app I am trying to do. How else would sum up the total of the number the user entered? Example if the user enters 10, the loop will find the sum of 1,2,3,4,5.....10. Here is my code and I spent few hours on to come … | |
1) Class creation Create a class called Song. It will contain the following private attributes: The song title. The artist who performs the song The duration of the song in terms of seconds. A song that lasts 3 minutes and 30 seconds will hold a value of 210. Create a … | |
Hi all, in my website there are ftp-uploaded images (about 3000) in a folder called IMAGE. What I want to do is somehow get the image file names inserted in to my database so, I can see image file names in a pull down menu selection when I insert records … | |
Can anyone help me with pascals triangle . I got it to do a factorial number , now it want to display the results in a pyramid. #include <iostream> using std::cout ; #include <iomanip> using std::setw ; long int factorial(const int); int main() { long int k = factorial (5) … | |
I am trying to add the integer elements of two Linked Lists. How do I add the contents of two elements of a linked list. For example: public void main { ........ LinkList newList = new LinkList(); ......... Link link1, link2, linkAns; ...... ...... link2 = newList.deleteFirst(); link1 = newList.deleteFirst(); … | |
can someone tell me if the code is right. cuz my T.C doesnt work. [code=c] #include<stdio.h> #include<conio.h> int num1,num2,num3; int num4,num5; int main() { clrscr(); printf("ENTER NUMBER"); scanf("%d",&num2); num1=1;num2=1;num3=1; printf("%i",num1); printf("\t%i",num2); for(num1=1;num1<=num2;num1++) { num3=num1+num2; printf(\t%i",num3); num1=num2; num2=num3; } getch(); return (0); } [/code] | |
i have started my midterm exersize than is on binary treescan anyone help me on the basics i have started and i have made the following on my tree.h file: [code] struct treenode { int data; struct treenode *left; struct treenode *right; };typedef struct treenode *PTR; class tree { private: … | |
Write a c++ program that will read in an unknown number of employee records from a text file call “PAYDATA3.TXT”. Each employees record is a string of 47 characters (with spaces), set up as follows: Positions Data Description 0 – 14 Last Name (15 characters) 15 -24 First name (10 … | |
Hello, I am trying to write a single query to run a report. I have it working for a single farm, but I need it to work for a list of farms. I am having trouble linking the farm number for the inner query to the farm number for the … | |
I have a template singly linked list function that has a node class: [code] template <class T> class Node { T Data; Node <T> *Next; public: Node(); Node (const T&); T getData() const; Node <T>* getNext() const; void setData(T); void setNext(Node<T>*); }; [/code] and SLL: [code] class SinglyLinkedList { Node … | |
Hi all, I'm stuck with how to pass the return value to asterisk. That is, a value has to be passed from perl script to asterisk. The variable returned in Perl has to be passed to asterisk, where if the return value is 1 from perl , i have to … | |
Hi friends, How can I get the time stamp of a file from C++ program. Amit | |
| |
Hello, I'm trying to make SNAKE (Game) under C++ with using #include <graphics.h> Can anyone help me. Thanks | |
Hello, I am new to python. I have been trying to connect to telnet and feed some data from a server. Its working properly. I used the connectionObj.read_until() method to read the data from the server and made the connection as [code] self.conn = telnetlib.Telnet(so.telnetHost, so.telnetPort)[/code] thats too fine. But … | |
hi all, i would like to know the all possible command line options of GGCOV tool in Linux... ex:1. ggcov program name 2.ggcov -o dir if anyone of you know this,plz give me the details... Thanks in advance..... RajasekharReddy.B | |
hello. my problem is, after login username and password in one form, then a new form will be appear. how to create coding to insert username in a label at new form after login. i have tried this coding but still not appear. please help me. thanks..... Public Sub loadInfo() … | |
I am writing this program to use user defined functions, must be return value functions as well. It is a modification to a program already written, and am having a couple errors that I just cannot figure out. Here is the code, the errors I am getting when I compile … | |
I am currently trying to delete lines of a file in java? | |
I'm trying to get some post data formatted for output on a browser and I can't use pre tags becuase the width attribute isn't supported anymore and it doesn't really work. I also need to break up a word if it's over 80 characters long, if someone's been a pillock … | |
I've recently wrote some code to update an inventory table within a database. The program works great; the problem is that many machines access this database at any given time, and I'm concerned that at one point my program will not be able to update the table because of too … | |
Hi guys! I am developing a web based database for a company for my year work placement for university. As I'm still a student I am still learning so I am not 100% on what i am doing. I was wondering if someone could provide me with some help?...please! :) … | |
Hi all, I want to read a stream of bites/bytes as a String. Here's what I have done up to now. Using a buffer I found that number of bytes, which include a text message from a binary file. Now what I want is to read those bytes stream as … | |
I have this kernel with the shell, and I'm trying to put the time and date commands in it but can't seem to make it work. It shows no error while compiling but it doesn't do anything when I test it. Can anyone tell me what I'm doing wrong here? … | |
ok so i just started a cs5 class and im am completely lost can someone please help me figure out this problem The figure below shows the data file for the blood pressures for the patients __________________________ | 4538 120 150 200 149 -10| | 1278 100 170 165 -5 … | |
I know this is probably an unbelievably simple error somewhere, but I can't see it. I keep getting "undefined reference to Machine::Machine()" and all of Machine's other functions. main.cpp [code] #include "machine.h" using namespace std; int main(int argc, char** argv) { Machine* m = new Machine(); m->reset(); m->run(); delete m; … | |
Hey. any help wud be greatly appreciated. I have just tranferred into the second year of a multimedia course in which they have been doing python programmes. Problem is i have never programmed anything before and have been asked to complete this assignment.:( i dont even know what it is … | |
Hi all, I want to write some text(simply a string of characters) to the edit control on a click event. How can I do that. I know it is able to write something to the control using member function, [CODE]GetDlgItemText()[/CODE] by passing two arguments, control ID and string variable. Is … | |
Hello All, I have a page that passes a session variable to another page which is then used in an if/else statement. For some reason itsa giving me error messages, and I'm not sure whats up with it. Heres the page that creates the variable [CODE]<?php session_start(); // start session … | |
I'm trying to give python a list of numbers like this (5 6 7) and I want it to square each number (or as many numbers as I input). I'm trying out a list comprehension on this. I'm not sure where I'm going wrong. Any help would be great. [code="Python"] … | |
ok so heres the thing, ive got to to do this program for college but the lecturer is a numpty and wont help anyone. so im stuck. ive only got so far into the program and cant get the most important bit to work where it is supposed to. its … | |
Hi, this is my first post here. And I am new to python. I have script which supposed to read in a series of files in the format "myfile.*.obj" where "*" is a sequential no. (001,002...) but when I run the script, it seems that it have difficulty recognizing the … | |
Howdy all, I'm making an authentication script using sessions variables, but the varible seems to disappear when trying to access it from another page. A simple form on the home page takes a user name and password, it then goes to an authentication page. The authenticate page is making a … | |
New to the site, just need some help on this... Most of it is done, I just need to turn the wordInfo struct into a full-blown .h class. Any thoughts? It's attached... Appreciate it! | |
hey ive been working on a txt game... btw im using python 2.3. i am trying to have a requirement for each 'room' or function, i want it so the user has to pick up an object into their inventory before they can go on to the next room. here … | |
[COLOR=red]Hello everybody;[/COLOR] [COLOR=red]I want to color a text gradually by PHP[/COLOR] [COLOR=red][/COLOR] [COLOR=red]Explain: I want to color each letter with a color, like:[/COLOR] [COLOR=red][/COLOR] [COLOR=red]Hello: H=green e=red l=blue (And repeat) l=green o=red[/COLOR] | |
Hello there, do you have any idea where to get a good reference for the function fseek64? Or does anyone of you here knows this function or is there really a fseek64 function? lol. Thanks! | |
Another project on arrays. I need to get the smallest number in an array. Enclosed is code. Your input highly needed! [code] #include<iostream> using namespace std; int smallestnumberindex(const int number[int index]) int main() { int number[10]; int index; int smallestnumber; //initialize the array for (index = 0; index < 10; … | |
I need to read a text file that contains data of the following type: [code] John Doe 333222333 01/01/80 M PHY301 2005 Fall A PHY401 2005 Fall B PHY531 2006 Spring A John Doe 333222333 01/01/80 M PHY501 2005 Fall A PHY301 2005 Fall B PHY431 2006 Spring A John … | |
The assignment ask for a looping statement and should print out a table of values for example N 10*n 100*n 1000*n 1 10 100 1000 2 2 200 2000 my code just prints the N 10*n 100*n 1000*n I am a noob at this but really trying! Can anyone help … | |
[code]#include <iostream> // for CableBills #include <iomanip> // for formatting manipulators #include <string> // for string variables #include <fstream> // for file streams using namespace std; // Prototype Functions void PrintHeading(ofstream& CableBills) ; // Inout void CustomerData(ofstream& CableBills, ifstream& CableRecs) ; // Inout int OutletCharge(int) ; int ServiceCharge(char) ; // … | |
Hey, i am a complete newbie to C++ and have a task to do. i have looked all though my textbook and all over the net and have not found any examples similar. my problem is i am trying to read from a text file and store the data as … | |
Hello, I am trying to write data to a binary file. The function runs (the cout << "TEST" shows me that my loop is running the correct amount of times), but after the program comes to the end, it crashes and doesn't save the data to the binary file. Can … | |
[code=cplusplus] /*-------------------------------------------------------------------------- This is dllist.h file for defination of funcations -------------------------------------------------------------------------*/ #ifndef DLL #define DLL class DLLElement { public: DLLElement( void *itemPtr, int sortKey ); // initialize a list element DLLElement *next; // next element on list // NULL if this is the last DLLElement *prev; // previous element on … | |
Hi guys!!! i really need your help, i have an assignment due very soon. Its a java application and java applet, it should display the cpu ver, cpu speed, ram size and hard disk size of the lacal machine. PLZ help guyz | |
ok so i made a code that makes something compatible with a never version ( it is not important). This is my code: [CODE]#include <iostream> #include <fstream> #include <string> using namespace std; int main () { char File[150], re[4]; string line[5000]; string response; int counter=0; size_t found; string strtofind[]={"oolean1", "oolean2", … |
The End.