64,152 Solved Topics
Remove Filter ![]() | |
I've parsed an XML and now I'm trying to write into some elements that are text nodes. What is the best way to go about writing into these text nodes? Ex. <tag>insert texty text here </tag> | |
I have this program that will ask user to put in the day, it compiles but every time i set the day to Saturday this program won't display Saturday, instead it shows Sunday. It also won't correctly generate the output for yesterday if the current day is Sunday and tomorrow … | |
I have a panel on form and i'm drawing a graph on it with a pen.When i open something on top of that form or i minimize the form and maximize it, the panel goes white until i draw something on it again.So i think i could call an event … | |
Hello all, I'm starting C++ and wan't to learn for loop. I want the Loop to count down the rotate and print its value until when it equals to value where it terminates. Here is code [CODE=C++] int value; int rotate = 4; for (value = 0; rotate>value; rotate--; ){ … | |
I know of ww.portablepython.com/ Can anyone know how to do a combination of IDE and this python in stick. Also if anyone have ever tried to add other python modules to it like Vpython, wxpython, etc Thanks alot | |
i've got this code it compiles but it when I try to run it it says segmenatation fault [CODE]/* #include <stdio.h> #include <iostream> using namespace std; int rite(); int a,b; char g,f; int main () { size_t count; FILE * pFile; pFile = fopen ("in.h","r"); count = fscanf (pFile, "%d%d",&a,&b); … | |
I want it to skip any lines read that throw an exception so I store the lines with errors in an ArrayList. But when it goes through when it gets an error, it will not skip the line and give same error and keep repeating. [code=java]/** * */ /** * … | |
Hi! First, I want to say that this is not any type of school assignment. I'm in the IT field and looking to work on learning C++. I've been following the book from: [url]http://msdn.microsoft.com/en-us/beginner/cc305129.aspx[/url] and I'm now trying things on my own. The program which the code below compiles will … | |
Attempting to scroll a simple background using pygame. This is proving to be near-impossible. It seems that once a surface is blitted anywhere, it WILL NOT blit into a new location. My two problem functions: [CODE] def loadMap(self): vid = _video._Video() self._bg = self._map.get_background().get_pyImage() self._fg = self._map.get_foreground().get_pyImage() vid.paint(self._bg,0,0) vid.paint(self._fg,0,0) def … | |
i wonder if i create an object from a class using new operator, and if i dont delete that object when i am finished using it, does it still remain in the memory after the program reaches the and of the main function? Thanks | |
Visual C (2008) is acting as if I never included a header file (wave.h) that I am using, but the #include statement is definitely there. Here's my main (BPM analyze.c): [CODE=C]#include "stdafx.h" #include "common.h" #include "sound.h" #include "wave.h" int main(int argc, char* argv[]) { SAMPLE samples[2]; unsigned int i, j; … | |
Hey guys, [CODE]import sgmllib class MyParser(sgmllib.SGMLParser): def parse(self, s): "Parse the given string 's'." self.feed(s) self.close() def __init__(self, verbose=0): sgmllib.SGMLParser.__init__(self, verbose) self.hyperlinks = [] def start_a(self, attributes): for name, value in attributes: if name == "href": self.hyperlinks.append(value) self.newhyperlinks.append(name) def get_hyperlinks(self): return self.hyperlinks import urllib, sgmllib f = urllib.urlopen("http://www.python.org") s = … | |
Can someone explain how to add a file to a dictionary. The file is simple. Maybe a word or a number on each line. Here is the code I have. Didn't know if i should use this post or the List and Dictionaries post so kind of posted twice... sorry … | |
I have written and application to search through a text file and find the following data and pull out the 5th varible and place in a text box. P_SPEED 0 10 1100 0 .01 23 0 The next issue I am having to input, into a text box, a integer … | |
I need help with my program. The program reads water temperatures and when they were recorded from an input file called " biodata2.txt." Then the output is displayed in a file called "results.txt" So the input file looks like this: 2 // number of readings taken 200707211245 // date recorded … | |
Hi All, I have a question regarding on how to manage a child form with a datagrid inherited from a parent form. In most cases, changing the control modifier from private to protected will make the control editable in the child form, but with a datagrid, these seems not to … | |
Hi members... I have made a simple chat bot in Visual Studio with C#.. Its very basic and basically talks to you, saying a few lines.. I need help urgently sexing this chat bot up, making it say more stuff, etc,... I'm wondering if anyone out their can help me … | |
if the object is created on the stack, the destructor is called automatically when the object is out of its scope. if the object is created on the heap using new operator, the destructor is fired explicity by using delete keyword. i created an example to demonstrate both cases: [CODE]#include … | |
Which is the best language for creating windows applications? What is .NET framework? Is there any software with which I can use to create win apps with using minimal code and drawing windows and menus and buttons etc without creating them using code. Something like Microsoft Visual Basic. | |
Hi there, I am trying to write a queue ADT using a linked list in C and have hit a snag initialising my queue... [code=c]typedef struct qNode{ int element; struct qNode *next; } qNode; typedef struct Queue{ struct qNode *front; int len; } Queue; Queue create_queue() { Queue q = … | |
I am trying to keep formatting between cell references. For instance, I have a date in once cell (J9) and would like to add this date to a text field so e.g.: ="This will take effect on " & J9 & "." However, when I do this, I end up … | |
Please somebody help me! I`m a beginner and want to learn web designing. I want to khow taht is there any diffrences between Java & JavaScript if yes which one of them is better for me I have learned just C programming language. | |
Unfortunately, I don't think this question is solved with a simple vlookup, or etc. I have a spreadsheet that has several tables of data with the following format on one sheet: gxxxx gxxxx gxxxx zzzzz gxxxx gxxxx gxxxx zzzzz The "g"s above would indicate an item for lookup. The "z"s … | |
when i run my application i got "Memory fault(coredump)" run-time error, what might be the possible cause for this? Thanks | |
Hi I'm getting the error TypeError: argument of type 'int' is not iterable when i run my program and don't know where I'm going wrong. My code is: [ICODE] class loan: global loanlist loanlist = [] def loanbook(self, name, ISBN, author, title): self.name = name self.ISBN = ISBN self.author = … | |
Hi there I'm a newbie to asp.net and trying to learning it doing small forum application. In the application I've a page which lists the available threads in a given topic and I used a gridview. In the gridview the thread's title is hyperlinked and when clicked it will redirect … | |
I am trying to set a cookie but when i check my browser cookies nothing is set. What am doing wrong [CODE] #!/usr/bin/python # e begoli, python connector for mysql # import MySQL module import MySQLdb import cgi import Cookie import time cookie = Cookie.SimpleCookie() cookie["ID"] = "" print "Content-type: … | |
Im not sure if this is how the process would work, but if i am to say create a header file named myheader and in that header wrote [code=c++] #define functionName { code... } [/code] and then wrote a .cpp file and in the source code I would #include <myheader> … | |
I'm programming this RPG, and I can't get past the first battle. I can't figure out how to get the computer to break the loop when then enemy's health (enhp) is less than 1. I tried using an if statement, but then it didn't loop at all. Could you guys … | |
Hi. I'm David a newbie. I have just started Classes in C++ and I'm doing a GPA Calculator program. I have most of the program working but the average calculator seems to be giving me trouble. Please help. This is open to constructive criticism. All inputs will be gladly appreciated. … | |
Hi, I'm working on learning OpenGL using Visual Studio 2005 and I ran into these errors: [code]1>circle.obj : error LNK2019: unresolved external symbol __imp__wglDeleteContext@4 referenced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) 1>circle.obj : error LNK2019: unresolved external symbol __imp__wglMakeCurrent@8 referenced in function "long __stdcall WndProc(struct HWND__ … | |
Hello, if you have seen any of my other posts you will know I am working on a script to make a "vocabulary test". I currently having it functioning nearly perfectly, except I get an error if I enter the wrong word. Code: [code=python]def vocabtest(): for r in words.values(): count … | |
I have declared kbSize as an integer earlier in my code as a global variable, so there's no confusion from replies with it being local, and have a formula that process's its value, but for some reason when my program hits this if statement, it always calls timeStamp(); even when … | |
I'm working on an assignment that I need to move a sphere around the screen with the keyboard arrows. I got the movements working and all that. But I'm drawing a blank on an "if" statement to prevent the image from going off the screen when the edges are reached. … | |
Hi all. I am trying figure out why the compiler is giving me this error message: error LNK2001: unresolved external symbol "double __cdecl calcWindChill(double,double)" (?calcWindChill@@YANNN@Z) HomeWork3.obj I've declared, defined , and called the calcWindChill() function. I've obtained the values needed to feed into the function. They're not getting put into … | |
I'm currently developing a program to scrape my university's online timetable system and then convert the resulting data to iCalendar data. It's a learning exercise for me(I'm teaching myself C++) and there's a few things that still get me. I've been using XCode as my IDE for a while and … | |
I'm getting a compile error with this bit: [code]int valid(const char str[]){ int i, total = 0, multiplier = 10; for(i=0; i < 11; i++){ str[i] * multiplier += total; //this line is an invalid lvalue multiplier--; } if(total % 11 != 0) return 0; else return 1; [/code] I … | |
I have an assignment for class and I am having a bit of trouble. I need to do a few things to improve the efficiency of this program. The first thing I am having trouble with is that we are supposed to modify the shuffle function to loop row by … | |
how do i read character by character from a text file?I need to check for "\n" and split the file on it. for eg: I am a girl.I livein acd. My name is sdljnl. usoihuid. So finally i want to delete the 1st msg(line) from thefile so that the file … | |
is there a way to contain the text in a normal format when writing out to a text file? By this i mean, if i have cout output a million a's, instead of one long line if u open and view the txt file, it is many rows. Thanks | |
I have made a Form application that contains of 2 Forms. In these 2 Forms I have added controls and a lot of code behind. How will I "Close the code" to this project so no one can open it and see all my code that I have done. I … | |
Hi I have certain number of books which each have an author, title and ISBN number. How is the best way I can store this so that when I want a list of the books I will be able to list the books with the title, author and ISBN number? … | |
Hi Dears! I am a Beginner, Please Help Me. If you Can Help me to find out how to sort a 2d arrays of characters with [U]recursive bubble[/U] sort algorithm. I have got something but it doesn't work. what is my mistake? I Did codes below So far, but it … | |
Hi. Ive made this program using if statements i see no errors in it but i dont know my program isnt working on my if statements i mean the if statements are not used in the output. Can u plzz figure out the problem? It works only till scanf statement. … | |
I can't find the error and also C2182 error: illegal else without matching if. [code=c] #include <stdio.h> int main (void) { int count=0; //counter int hours; //hours char choice; //users choice for continuing float total=0; //total charge //print display printf ("%-15s %-10s %-10s","Customer","Hours","Total Charge"); //assinging customer number count++; //ask for … | |
Hello every one, I have a confusion regarding arrays and pointers, My question is: "Is array name a pointer (rather a constant pointer)"?? I feel the answer is 'yes' because we can use the de-referencing operator(*) with the array name, Also, because array name is a constant pointer so we … | |
Hi, i'm making my own game engine on sdl + opengl i also know that i can manage file for my setting and save game that way (i am on windows) [code] #include <windows.h> void ini::setfile(std::string name) { name += ".ini"; std::string directory; char path[1024]; GetModuleFileName(NULL, path, 1024); directory = … | |
[B]Hi i've been assigned with doing a torn square, and i've kinda got it working with the code below.[/B] [code] import turtle turtle.reset() length=100 degree=60 i=0 while i < 4: turtle.forward(length/length*40) turtle.right(degree) turtle.forward(length/2) turtle.left(degree+degree) turtle.forward(length/2) turtle.right(degree) turtle.forward(length/length*40) i+=1 turtle.right(90) else: raw_input("there's hopefully a square, all torn like!") [/code] as you … | |
Hi there, Can C# code , execute commands we write in the cmd window ? i.e: is there a way to let a C# application interact in somehow the command prompt? example : we use the command prompt line: ipconfig to see info about the IP address of the machine, … | |
Hey guys im making a simple program. I have a while loop that continues while the bool quit ! = true. I am trying to test that in a statement like this: [CODE] String userdecision = ""; while (quit!=true){ //start while System.out.print("Would you like to continue with another transaction?"); [B]userdecision=in.next();[/B] … |
The End.