199,114 Archived Topics
Remove Filter ![]() | |
Hi, I'm making something of an RSS reader-ish. I'm using the [URL="http://www.feedparser.org/"]Universal Feed Parser[/URL] to do this. The feed is just a list of TV shows, and the date they air. I'm successful at getting the feed, now what i'm trying to do is split it up into chunks that … | |
Hello, I'm having a bit of trouble with inheritance I was hoping one of you could help with. I have a base clase; BaseGameEntity. There are two classes which inherit from this, Drop and DropGuide. I have an entity manager that stores all of the instance of Drop/DropGuide in a … | |
![]() | Is there a way to, instead of duplicating code, to either print the desired number of rows from a list (from user input) or print all items in the list? [CODE]print_list( input ): f = open('pickle.dat', "r") L = cPickle.load(f) f.close() for i in range( input=len(L) ): print 'L[i] = … |
I have something to share with you guys if you can help me out.. Here is an algorithm to print out a pyramid of numbers: [I][B]define totalRows to be how many rows define columnWidth to be how many characters in each column for currentRow in range 0 up to (but … | |
Despite having recently been [URL="http://www.daniweb.com/news/story273853.html"]cast as the villain of the piece[/URL] by some high profile members of the Free and Open Source Software community, IBM has just revealed itself as actually being something of a crime-fighting superhero. The Florida State Department of Juvenile Justice is following in the footsteps of … | |
How could I add array values and populate the results in a specified text box?Then repeat for each line after. Then get a final total. Any help would be very appreciated. For example: 1 2 3 4 5 (15)-text box 1 2 3 4 5 (15)-text box 2 4 4 … | |
'''check addition''' from random import randint def checkAddition( a, b ): ans = int(raw_input("What is %d + %d ? " % (a,b))) if ans == a + b: return True else: return False def main(): x = randint(1,100) y = randint(1,100) if checkAddition(x,y): print "Correct" else: print "Incorrect" main()[B] [I]This … | |
![]() | In my previous post I asked the forum to help me make a race with an existing program I had made. I figured out a way to do this but now I got an error and I cannot solve it. If you need any additional information just ask ^_^ |
Hello there! I am pretty new to game developing but got a book and a library called CDX. The first chapter is about creating Pong as it is a very simple game. But I would like to make it a bit more complicated than just negating the X and Y … | |
i want to assign a integer of 100 digit length to a object. like class hugeint { /// }; void main() { hugeint a,b,c; a=10000000000000000000000000000000....100; b=20; c=a+b; } can any buddy suggest me any simple idea to achieve this.. | |
i have two Jsp's pages. on main.jsp have some list of schools. from there i can go home page of any school. home.jsp represents a school home page. in home.jsp have some links like message, vision, addmission etc. when i click on any of these link then i get some … | |
I was wondering if it was possible to use pygments with wxPython? I want to use it on the text_ctrl widget. If it is not possible on that widget but is possible on an other please tell me... | |
Hello, all! I have a (hopefully) quick question: I have an array of 128 ASCII characters called blockData[] that I am trying to convert into a string. [code] for (int i = 0; i < 128; i++){ blockStuff = inFile.read(); blockData[i] = blockStuff; if (blockData[i] != 0){ String aChar = … | |
Hi i have a user form, one part is a textarea where the user tpes in information. If they just enters spaces rather than text, i want a error to appear and not accept it, what code do i need?? | |
hi, i'm working on windows application and sql serverCE database i write this code: [CODE] private void enregistrerBtn_Click(object sender, EventArgs e) { if (!exist) { SqlCeConnection conn = new SqlCeConnection(); conn.ConnectionString = @" Data source= |DataDirectory|\Database1.sdf"; try { conn.Open(); } catch (Exception ex) { MessageBox.Show(" connexion failure"); } finally { … | |
Hi there Im getting this error message with a script im trying to use. Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/rideron1/public_html/join_form.php on line 67 No database selected The script im using works on my local server but as soon as I upload it to … | |
Hi, If I want to pass values of one array to another array, is this the proper code implementation. any alternative or suggestions Thanks. . . . for ( i=0; i<9; i++) for (j =0; j<9; j++){ receive[i][j]=transmit[i][j]; } . . . | |
Hey guys! I have my code wrote and when I run it, the code gets all the way to this point [code] //Delete Account 333411 cout << "Here you will delete the account 333411: \n\n"; AccountVector.erase (AccountVector.begin()+2); //Print the details of the vector for (int i = 0; i < … | |
i am new to Java and programming i just joined faculty of computer science and i am doing good but i think that all what i had until now isn't enough for my curiosity what should i do to master Java and become a Java expert and increase my programming … | |
ok so what i am trying to do is create a random int and save it into an arraylist and sum up the contents of the array list. then ask the user if they would like to roll again. any point in the right direction would be appreciated. so far … | |
public class MyDeque { private int maxsize; private int [] queArray; private int front; private int rear; private int nItems; public MyDeque (int s) { maxsize = s; queArray= new int[maxsize]; front=0; rear=-1; nItems=0; } public void insertRear(int j) { if (rear==maxsize-1) rear=-1; queArray[++rear]=j; nItems++; } public void inserFront (int … | |
hi. 2 all anyone can tell what is the wrong with this code? the result of this program is : cos(60)=-0.952413 sin(60)=-0.304811 [code]#include <iostream.h> #include <math.h> main() { float x,y,z; y=cos(60); z=sin(60); cout<<"cos(60)="<<y<<endl; cout<<"sin(60)="<<z<<endl; }[/code] cheers | |
i have to creat a program that verifes a valid user id before printing out the new email address. here are my errors: [CODE]c:\users\rena0514\documents\visual studio 2005\projects\user_id\user_id\verification.cpp(50) : error C2664: 'strncpy' : cannot convert parameter 2 from 'std::string' to 'const char *' 1> No user-defined-conversion operator available that can perform this … | |
Hi I've been told that for the next term i must do a programming project of my own choice. Any ideas on how I can impress? ![]() | |
[code]#include <iostream> using namespace std; #include <iomanip> #include <string> int main() { string name; string number; double bonusContributed; const int FW = 10; double const ticketPrice = 5; int ticketsSold; double revenuePercentage; double moneyDistributed; double revenueGenerated, adminDeduction, balanceRaised; cout << "How many tickets were sold? "; cin >> ticketsSold; cin.ignore(); … | |
[CODE]char **makeString ( const int numOfArrays, const int sizeOfEachArray ) { /* Function to create an array of strings: ( Array of pointers to strings ) */ /* Local variables */ int i, j; //int numOfArrays = 6; /*char stringsToCopy[6][12] = {"Hello", "Good-Bye!", "Greetings", "Pointers", "Arrays", "Programming"}; */ char **stringArray … | |
I wrote a simple echo program, which reads standard input character-by-character and then prints it to standard output character-by-character. [code] #include <stdio.h> int main() { int c; while ((c = getchar()) != EOF) { putchar(c); } return 0; } [/code] I was expecting it to break out of the while … | |
I'm very new to C++, my midterm is requiring me to read from a txt file I created line by line. Each line has different subject code that requires some calculations. My understanding was that you open your file and read in the first line in the file, thats the … | |
Here's the program I wrote not using a procedure: [CODE] .data target BYTE "aabccdeef", 0 freqTable BYTE 256 DUP(0) space BYTE " ", 0 .code main PROC mov edi, OFFSET target mov esi, OFFSET freqTable mov ecx, LENGTHOF target mov eax, 0 L1: mov al, [edi] movzx eax, al mov … | |
Hello, I am getting a linking error, and I'm not sure what its referring to. Here is the error 1>Main.obj : error LNK2019: unresolved external symbol "public: void __thiscall BinaryHeap,class std::allocator > >,class Comp,class std::allocator > > >::insert(class Item,class std::allocator > > const &)" (?insert@?$BinaryHeap@V?$Item@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@V?$Comp@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@@@QAEXABV?$Item@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@@Z) referenced in function "public: void … | |
Hi I'm very new into this website and to PHP. I want to make a drop down to display from my database. when i wrote the option value, a drop down is displaying in my html page however all the data comes together in one drop down. I want to … | |
I am trying to print out the number of occurences for each alphabetic chracter in a file that our instructor provided us with. The values range from 1 to 999. I'm trying to print out "count[...] : " followed by the character. So far my counts are correct. However, at … | |
![]() | I just started this program a few hours ago, and I am running into an error that I do not understand. I tried finding an answer on Google as well. First off, this is the bare bones of a code right now. I have not started any of the sub-functions … ![]() |
I've written a little method that returns the index of the maximum of 3 numbers (0, 1 or 2): [CODE] public static int Max3Index(float val1, float val2, float val3) { int index = val1 > val2 ? 0 : 1; if (index == 0) { index = val1 > val3 … | |
Hi guys, I have a weird issue here. I'm writing an automated backup program that, well, performs automated backups of set folders to a set location. It has a GUI and a Windows service. The service has a timer (system.timer) that checks every 10 seconds whether a backup needs to … | |
[CODE]#include <iostream.h> #include <fstream.h> #include <stdlib.h> #include <string> using namespace std; //const int MAX_SIZE = 10; //char determine_grade(int smarks); class student{ public: student(); //constructor ~student(); //destructor //char grade; //set values void set_mark(int); void set_id(string); void print_students_records(student, int); //get values int get_mark(); string get_id(); private: int mark; string id; }; //void … | |
Hi There, i am using the shell function to execute a program that will zip 10 big data files. so my code is something like this: for n = 1 to 10 t=shell(zip data(n)) 'not the real code ' somewhere here, i need a code to test if the data(n) … | |
I cannot figure this out. Can anyone see what is causing the problem? This is the error I get when I try to compile with the GNU compiler: sortQS.h: In function âvoid sort(UList<U>&) [with U = int]â: test.cpp:13: instantiated from here sortQS.h:16: error: ârecQSâ was not declared in this scope … | |
hello.. i am uploading excelsheet into database using php. but when i am uploading then characters are displaying ascii type. | |
does someone know a code in c that will send a complete ASCII file in 128 byte packets to another file? So The sender takes the ASCII file as input and sends a 128 byte packet on the data queue | |
i have been working on this code [code=syntax] '''Calculate the cost of fuel for a road trip''' def main(): distance = float(raw_input("Enter distance in kilometres: ")) litresPer100K = float(raw_input("Enter economy (ltr/100km): ")) pricePerLitre = float(raw_input("Enter fuel price per litre ($): ")) cost = distance / 100 * litresPer100K * pricePerLitre … | |
Problem with [url]http://www.javascriptkit.com/script/script2/ajaxtooltip.shtml[/url] If i have lots of links on a single page close to each other, and i hover each one a little fast then the divs opened stay open until i hover the link again of the opened div to close it. Can someone point me out to … | |
Hey!! I gotten the hang of C programming, logic design n all.. But am having real trouble understanding C++ concepts... My sems are up in a month! Any suggestions on how do i get it done before that??? | |
Hi Ijust started learning c# windows forms and when i set soe data open a new form and get the data into the label the label dissappears.can some one help me please [code] private string greeting; public string Greeting { get { return greeting; } set { greeting = value; … | |
Does the array fine but when it does the function it wont work, if anyone can help that would be great! [CODE]#include <iostream> using namespace std; void reverse(int a[10], int size) { for (int j=0; j<size/2; j++) { int temp = a[j]; a[j] = a[size-j-1]; a[size-j-1] = temp; } return; … | |
Okay so I have been trying to get this program to work for a long time. Basically it reads a text file then populates a structure that is designed to point to the four locations around that object: up, down, left and right. I believe I have the program figured … | |
Hey, I have a really big file on my computer, this file only got words in it. And because the file is really big, I sure there are repeted words in there. Is there a way of deleting every single repeated word, leaving at least one? Every single word is … | |
Hey guys I am trying to work on some linked list stuff and I have my code put together but I wanted to post it on here and just check to make sure I am going in the right direction. Here is what I am trying to do: Create a … | |
| |
How would one use Python as a PHP alternative? If there a hello world example somewhere? |
The End.