199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for jrcagle

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 …

Member Avatar for jrcagle
0
115
Member Avatar for Meglor

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 …

Member Avatar for Ancient Dragon
0
94
Member Avatar for mirakl

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 …

0
52
Member Avatar for jiggy_g

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

Member Avatar for sillyboy
0
78
Member Avatar for rogenie

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 …

Member Avatar for rogenie
0
112
Member Avatar for notathing

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 …

Member Avatar for twomers
0
87
Member Avatar for tangolik

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 …

Member Avatar for trudge
0
136
Member Avatar for sean25hun

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

Member Avatar for Narue
0
191
Member Avatar for JavaNewbie07

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

Member Avatar for JavaNewbie07
0
95
Member Avatar for restrooms

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]

Member Avatar for hopalongcassidy
0
100
Member Avatar for DemonFox

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

Member Avatar for eskelsen
0
114
Member Avatar for zandiago

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 …

Member Avatar for zandiago
0
162
Member Avatar for scottgreen

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 …

Member Avatar for scottgreen
0
107
Member Avatar for Ratte

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 …

Member Avatar for twomers
0
104
Member Avatar for padmaja_3

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 …

Member Avatar for trudge
0
174
Member Avatar for amt_muk
Member Avatar for vijayan121
0
2K
Member Avatar for locy
Member Avatar for Lardmeister
0
149
Member Avatar for daniweb2013

Hello, I'm trying to make SNAKE (Game) under C++ with using #include <graphics.h> Can anyone help me. Thanks

Member Avatar for PirateTUX
0
367
Member Avatar for sreejithps

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 …

Member Avatar for jice
0
1K
Member Avatar for raja.geek

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

Member Avatar for Salem
0
64
Member Avatar for aynn

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

Member Avatar for jbennet
0
133
Member Avatar for Koldsoul

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 …

Member Avatar for Ancient Dragon
0
97
Member Avatar for qinise4
Member Avatar for jglw

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 …

Member Avatar for somedude3488
0
118
Member Avatar for RJ83

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 …

Member Avatar for Lavendor
0
85
Member Avatar for GLT

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! :) …

Member Avatar for GLT
0
105
Member Avatar for eranga262154

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 …

Member Avatar for Ancient Dragon
0
242
Member Avatar for gallantmon1

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

Member Avatar for Evenbit
0
209
Member Avatar for straighttriipn

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 …

Member Avatar for straighttriipn
0
117
Member Avatar for andrax

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

Member Avatar for Salem
0
106
Member Avatar for mjsinpl

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 …

Member Avatar for paddy3118
0
80
Member Avatar for eranga262154

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 …

Member Avatar for eranga262154
0
180
Member Avatar for fogofogo

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 …

Member Avatar for vigin
0
104
Member Avatar for MakingMoney

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

Member Avatar for jrcagle
0
331
Member Avatar for muddpigeon

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 …

Member Avatar for jrcagle
0
532
Member Avatar for renochew

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 …

Member Avatar for jrcagle
0
123
Member Avatar for gil857

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 …

Member Avatar for gil857
0
532
Member Avatar for bluejay_1111

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!

Member Avatar for bluejay_1111
0
186
Member Avatar for remmoc

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 …

Member Avatar for Ene Uran
0
74
Member Avatar for Pro2000

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

Member Avatar for somedude3488
0
94
Member Avatar for jaepi

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!

Member Avatar for jaepi
0
1K
Member Avatar for Linda1

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

Member Avatar for Linda1
0
80
Member Avatar for Ratte

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 …

Member Avatar for vijayan121
0
130
Member Avatar for mCardos

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 …

Member Avatar for mCardos
0
71
Member Avatar for 4greatjustice

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

Member Avatar for 4greatjustice
0
186
Member Avatar for slyrexy

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 …

Member Avatar for slyrexy
0
85
Member Avatar for teppuus

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 …

Member Avatar for teppuus
0
91
Member Avatar for jamess_jack24

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

Member Avatar for jamess_jack24
0
129
Member Avatar for nhlagumbi

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

Member Avatar for nhlagumbi
0
445
Member Avatar for Llama

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

Member Avatar for Llama
0
241

The End.