43,549 Solved Topics
Remove Filter ![]() | |
Hello I am new to this forum so be patient.. I am currently having an issue with a map iterator well the code i am talking about: [CODE] leafnode<LeafEntry<recno_t> ,blocknum,char*,recno_t>* descend(Object<dimensionality,Type>& ob,nonleafnode<NonLeafEntry<dimensionality,Type>,dimensionality,Type>* rt,blocknum* leafblocknum){ std::map< int,NonLeafEntry<dimensionality,Type>* >* entries; std::map< int,NonLeafEntry<dimensionality,Type>* >::iterator it; leafnode<LeafEntry<recno_t> ,blocknum,char*,recno_t>* L; int i,elements; if(rt == NULL) … Software Development c++ | |
If I have a file that has a content of this kind: a,b c,d e,f g,h I need to make a list of the letters in the first column, i.e., [a, c, e, g]. I wrote some code which prints these letters but I don't know how to put them … Software Development file-system python | |
Ok so what i want to be able to do is connect to a mysql database. Here's my code so far: [CODE] Connection connection = null; try { // Load the JDBC driver String driverName = "postgresql-8.4-701.jdbc4.jar"; // MySQL MM JDBC driver Class.forName(driverName); // Create a connection to the database … Software Development java mysql postgresql | |
Python beginner try to learn pygame. Here is a program I made for random color circles popping out. [CODE]import pygame, random pygame.init() X = 680 Y = 460 def main(): screen = pygame.display.set_mode((X,Y)) pygame.display.set_caption('circles') background = pygame.Surface(screen.get_size()) background = background.convert() background.fill(pygame.color.Color('white')) run = True clock = pygame.time.Clock() while run: clock.tick(30) … Software Development python | |
How can i sort this array pls.. [CODE]#include<iostream> #include<algorithm> using namespace std; int prompt(int x[]); void printreverse(int x[]); int main() { int x[5]; prompt(x); printreverse(x); system("pause"); return 0; } int prompt(int x[]) { for(int i=0;i<5;i++) { cout <<"Enter integers:"; cin >>x[i]; } } void printreverse(int x[]) { for(int i=0;i<5;i++) { … | |
I have my program working but, I need to cut out the repeated code. How do I change this part of my code to pass arguments to a user defined method? I'm lost. I really have no clue exactly where to start on this. Basically when a user clicks a … Software Development java | |
I need to create a triangle in C++ that will take the user inputted letter (capital) and then create a triangle that will look like. I can only use nested loops NO arrays or strings Enter a letter: F F FE FED FEDC FEDCB FEDCBA here is the code i … Software Development c++ | |
I'm trying to write a c++ program that first asks how may people are in a party, then it takes that number to calculate how many times to ask what the next person wants to order. This is what I have so far. I can get the program to recognize … Software Development c++ | |
How would I ask the user to input what type of engine they want and getting an output of $150 [CODE=vb.net]Console.WriteLine("Enter EngineChoice for your vehicle:") Response = Console.ReadLine() EngineChoice = Convert.ToString(Response) If EngineChoice = Sixcylinder Then Convert.ToInt32(Response) Console.WriteLine(150) ElseIf EngineChoice = Eightcylinder Then Console.WriteLine(475) ElseIf EngineChoice = Diesel Then Console.WriteLine(750) … Software Development vb.net | |
Hello I'm doing a program about UART in Borland C. And I have a few questions. This is the code: [code] #include <iostream.h> #include <dos.h> #include <conio.h> #include <stdio.h> #define COM1 0x3F8 int main(void) { clrscr(); // outportb( COM1 + 1, 0 ); outportb( COM1 + 3, 0x83); outportb( COM1, … Software Development c | |
hi...i'm making a game that uses the direction arrows and fires with space...the problem is that when i keep holding 2 keys it makes only the behavior of one....can any1 tell me what i shall do Software Development | |
In Design mode in NetBeans IDE, I had a palette with all of my AWT and Swing controls and some netbeans that I can drag and drop onto the Jframe I'm designing, I accidentally closed it. I am not seeing a menu option anywhere to add that palette back as … Software Development ide java java-swing | |
Hello, I have to write a program that merges 2 seperate files and then outputs to a single file. Each input file is to have numbers in ascending order and the output is supposed to compare these and then put them in ascending order. ex.: input1 = 1 3 5 … Software Development c++ | |
I'm reading in a file and sending the data (once encrypted) to a dictionary, with a hash of the data before and after encryption. I then pickle the dictionary but find the file size is massive compared to the source file size. If I write the encrypted data straight to … Software Development encryption file-system open-source python | |
I am trying to remove a specific substring from a string... Here are the doctests. I'm just absolutely stumped. Can someone point me in the right direction on where to start? def remove(sub, s): """ >>> remove('an', 'banana') 'bana' >>> remove('cyc', 'bicycle') 'bile' >>> remove('iss', 'Mississippi') 'Mippi' """ def remove_all(sub, … Software Development python | |
f = \ ''' Product: DECNET Node: ALETHA Address(es): 1.1 Product: TCP/IP Node: aletha.ind.hp.com Address(es): 15.146.239.174 ''' lines = f.split('\n') i = 1 ###### To get the IP Address(es) adapter_config = True for line in lines: if adapter_config: # print line import re if (re.match("^Product:\s+",line)): line1=re.split("\s+",line) print line1[5] I want … Software Development python ![]() | |
Hi All, I have just started learning how to write C++, I have written my very first very simple program using notepad and saved the file as simple.cpp. So my question is how do I compile or build my program into an executable file, I understand I have to use … Software Development c++ | |
Hi All, I am currently learning C++ and i have started to write some small programs that explain operators, integers and values, my question is this. How do I make my programs stay on screen, at the moment I run my program it displays the message on screen for about … Software Development c++ | |
I'm writing pseducode for a Java class. Obviously being pseudo the language shouldn't matter but thought I'd mention it as it would explain any 'bias' I have. BTW, this is my first programming class. I'm revising for my end of semester exam. Write a pseudo code algorithm which will input … | |
Hi all. Before you all scream "search the forum", i already have, this and many others. cant seem to find the problem with my code. Basically, i have a fairly large text file, each line consisting of 20 fields seperated by a `. i have got my program to split … Software Development c++ | |
Hi All the coders out there. I need a suggestion. I have windows xp installed on my computer and i need to develop application for windows vista. I would prefer to use .net framework 2.0 and visual studio 2005. Instead of .net framework 3.5 and visual studio 2008. Well, selection … Software Development visual-studio windows-vista windows-xp | |
Hi! I have a form with two dateTimePickers (first with date of one month ago, and the secod with current date), a dataGridView and a button. When i click the button i want to populate the dataGridView, but only between date1 and date2 [CODE] mySqlCommand = con.CreateCommand(); mySqlCommand.CommandText = "SELECT … Software Development | |
Could someone lend me their brain? :D I thought I had most of it done, until I got an error saying that my 'calcAverage' definition was not defined.. x.x here is the prompt for the program: Write a program that asks the user how many pumpkin weights they have, and … Software Development python ![]() | |
Hi to all, May I ask any help for a code in VB6 in saving images in either SQL server or MS Access databases? Please give me some idea thanks a lot in advance. Software Development sql visual-basic | |
Dear All I am new in ADO.Net and i am using C#. My problem is I want to execute one trigger in my program I am having name of student in my student table now from my C# program I will pass any name which is in table from textbox … Software Development c# | |
can anyone explain tranaction in .net ..when we go for it ? explain locking in .net along with example plz? Software Development asp.net | |
I have put an array list in a hash map, but the problem is the old values of the hash map are over written everytime. So the old values of the hashmap aren't stored. Could someone tell me what mistake I am making? [CODE] import java.util.*; public class Cain { … Software Development java | |
[code]# Reading the .csv file energyFile = open("EnergySources.csv","r") stateDict = {} for line in energyFile: line = line.strip() fields = line.split(",") if fields[0] == "State" or fields[0] == "": continue state = fields[0] total = fields[-1] float(''.join(total)) coal = fields[1] float(''.join(coal)) naturalgas = fields[2] float(''.join(naturalgas)) petroleum = fields[3] float(''.join(petroleum)) nuclear … Software Development open-source python | |
I have created form resembling a standard dialog box where some enters there name into a text box and then hits 'ok' taking them to the main form..On this form I need to get the name that is typed into the text box to be displayed on the main form. … Software Development visual-basic | |
Hello, I begin in Python, and I have the following problem: I retrieve an excerpt of a HTML webpage from the web, and then want the result to be hold in a variable (before being processed by a reg-exp). The function do get the HTML source, but when I assign … Software Development open-source python | |
After completing my code I got an error message at the second to last closing bracket that said I was missing a return statement, I looked in to it online and found that some said to put return 0; but that didn't work it just gave me a new error … Software Development java | |
Hello again DW. Tomorrow I have an interview and I'm trying to make a jar of my latest project. Using netbeans, I've created a jar and everything looks fine. I can see all the card IconImages in the Jlabels and it looks fine. But when I repaint the frame, the … Software Development java | |
I have this code, but instead of implementing class enumeration I want to create an anonymous class in the method getEnumeration that does the job right in the return, hwo do I do that? [code] // File: TestList.java (Module 10) // // Author: Rahul Simha // Created: Nov 2, 1998 … Software Development java | |
Hey all. I'm really new to programming and would like some help, if you all don't mind ;) I'm not actually having trouble with the programming, but rather, what I'm being asked to do. Here is what I'm supposed to do (and yes, it is an assignment, but I'm only … Software Development c++ | |
So, I was trying to re-create the CMD command "set /p", where it prompts the user to type text, and is ended by a carriage return. Upon trying this, however, I found that a word (dw) will only hold the last thing passed to it. You can type "abcdefg", but … Software Development assembly operating-system | |
[CODE]#include <iostream> using namespace std; int main() { int TESTS = 0; int testScore[TESTS]; int testNum = 0; int a; double total = 0; double average; testNum = 0; cout<<"How many scores are there? "; cin >> TESTS; cout<<"Enter a score: "; cin >> testScore[testNum]; while(testNum < TESTS && testScore[testNum]) … Software Development c++ | |
Write a C++ program that ask the user for the name of a file. The program must have a function that prompt the user to enter a file name and open the file. The program should display the last ten lines of the file on the screen. Each line of … | |
Hello it's me again i'm having problem with the database subtraction for my POS Project im using ado database and i know that you just have to change the value from the selected and voila it would update the database but mine doesnt work: ' txtqan is connect to the … Software Development visual-basic | |
hello my friends I need a little help over here : im workin on a calculator that should provide the user with these services: • Read a big integer number up to 300 ( use arrays ) . • Sum two big integer numbers (with using the carry). • Product … Software Development | |
Hi! I'm currently taking a computer programming course at Wagner college and I have a project due this week that I am completely stumped on. these are the guidelines: [I]This will be a something like a “compatibility program”. 1) You will ask the user their name, and store it. 2) … Software Development c++ | |
Hi All, Im attempting to make a simple java menu system. the psueo code is as follows 1. user is presented with menu 2. selection is made 3. that action is ran, i.e make a new user (i have this code seperate, which works) 4. the user is returned to … | |
I have got an example for cplusplus.com for converting a string into a char array so i can split in into tokens and adds to a vector and it works fine in the main method but if i try and create a separate function and pass a string as a … Software Development c++ ![]() | |
Hi, I want to create a line on a canvas ( similar to a visio connector but not as fancy) which will allow a mouseover event to be trapped ( this would trigger a property sheet to display the atributes of the line - a microwave link in my case … Software Development pascal | |
[CODE]import pygame pygame.init() def main(): screen = pygame.display.set_mode((640, 480)) pygame.display.set_caption('game') background = pygame.Surface(screen.get_size()) background = background.convert() background.fill(pygame.color.Color('yellow')) box = pygame.Surface((100,100)) box = box.convert() box.fill(pygame.color.Color('red')) t = True clock = pygame.time.Clock() while t: for event in pygame.event.get(): if event.type == pygame.QUIT: t = False elif event.type == pygame.MOUSEBUTTONDOWN: posi = pygame.mouse.get_pos() … Software Development python | |
Dear all, may be someone can help me to find a solution to the following problem: I have a list of patterns (len=5) that are presented as tuples in a list, e.g. patterns = [('w1','X1','w1','Y1','w1'), ('w2','w2','X2','w2','Y2'), ('w2','X2','w2','Y2','w2')] I want to go through all sentences in a text file (one sentence … Software Development python | |
Help! The only thing I seem to not get is the initials from the substring........... any ideas? public class Name { //Data Members private String firstName; private String middleName; private String lastName; private String initials; //Default constructor Name() { firstName = null; middleName = null; lastName = null; } //Constructors … Software Development java | |
I'm drawing a sphere and some ground. I used GL_POLYGON to draw a rectangle and colored it green. When I added a sphere, my ground just turned black. Is this because the sphere is a 3d object and the polygon is 2d or is there something else? Here is the … Software Development c++ | |
At the easy risk of asking something already asked a hundred times... Curses doesn't work for me. I use 2.6 on a Vista It gives an error saying it can't call up a part of the module that came with the program. ... Uhm... help.. T_T ~Pixel Software Development python | |
could you pls help me to select some project topics Software Development java |
The End.