132,726 Archived Topics
Remove Filter ![]() | |
Hey all. I don't have any experience with vectors so I'm looking for a little guidance. I don't want the answer, just a direction to take. I've looked up vectors on cplusplus.com but I couldn't understand exactly how they work in order to code them into my program. Here's my … Software Development c++ | |
i'm having a few problem with my phone book program: 1. If the any of the buttons have empty fields, I need to display an error message. How would I do that? Some sort of try/catch statement or if/else statement? 2. I'm a bit clueless as how I would go … Software Development java java-swing legal | |
Hi all. I'm taking a beginner python course and have an assignment to write code using a 'for loop' + 'named variable' + 'branching logic' Trouble is, I have no idea what 'branching logic' is - if anyone has the time to respond, I'd really appreciate it! Software Development python | |
Hey guys, I'm looking to add on to a recent program of mine that uses classes. My next step is to add in a working overloaded equality function in order to compare the gross pay of two Employees within the class. Now, I've read up on this quite a bit … Software Development c++ | |
Hi well I am facing some problem while trying to concatenate contents of several files, present inside a folder. My code gives an error: ./test.sh: line 17: [: =: unary operator expected and in similar lines Attached is the code: [CODE] #!/bin/bash str1="test_concatenated_RAxML_outputs.txt" str2="r_test_concatenated_RAxML_outputs.txt" str3="m_test_concatenated_RAxML_outputs.txt" str4="n_test_concatenated_RAxML_outputs.txt" str5="h_test_concatenated_RAxML_outputs.txt" for line in … Software Development shell-scripting | |
Hi, i am currently developing a standalone aplication in python, i am very new in this language so i don't know much of it... I need your help, i need to know a way to communicate python and AS3 so i can move the animations with some data that comes … | |
hello everyone, i need to modify these code: [code=c]#include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { int numOfStars = 0; int count, counter; do { printf("N="); scanf ("%d",&numOfStars); for( ; counter<=numOfStars; counter++) { for( ;numOfStars>0; numOfStars--) { if (numOfStars != 9999) { for (count = 0;count < numOfStars; … Software Development c | |
Writing a function to search an array for a value and return the index if found. in finding what the size of the array is for use in the while loop condition i found that here inside the templated function sizeof(data) comes back as 4(it should be 40) but when … | |
Hi I am trying to compute the modulus of two numbers in assembly code. As I am more fluent in C++ it is hard for me to understand the concept of modulus as all I use is the symbol % to compute. The problem I am doing is computing the … Software Development assembly | |
Can anyone tell me why setprecision is causing this error at runtime: terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted The program ran fine; after I added << setprecision(2) << to a series of output, I received the error when trying to run the program. I have … | |
Is it possible to create a piece of code that can learn? like a robot? e.g if it see's a picture of me, the code will learn and understand that the picture is me every time it see's it?? Software Development c++ | |
I'm having a bit of a problem using enum variables. The program below compiles just fine, but the output program at the end is blank. Any hints? [CODE]// Program Reformat reads characters from file DataIn and // writes them to DataOut with the following changes: // all letters are converted … Software Development c++ | |
How do I load an older version of 'xerces-j 1.4.3' and 'xerces-j-docs' into eclipse so I can use the api's? I've looked at the Eclipse doc, and I'm not finding a direct reference to this which makes me think I'm not grasping some important concepts conerning plugins, and features. Below … Software Development api java mac-software os-x | |
Can someone tell me if this is write? Rewrite the following if/else/if structure as nested if elses. [code] if (status == ‘P’ && amount >= 10000) due_flag = true; else if (status == ‘P’) time_remaining - = 1; else if (status == ‘O’) { time_remaining = 0; warning_flag = true; … Software Development c++ | |
full function: [CODE] void finalScoreMessage(bool prematureExit) { if (finalPoints_ > highestScore_) { cout << "You've beaten your previous high score! The new high score is: " << finalPoints_ << endl; saveScore(); } else if (finalPoints_ <= highestScore_){ cout << "Your score is: " + finalPoints_ << endl; cout << "Your … Software Development c++ | |
Hello ive been working on this real number program for a couple of days and i still cant get it working it always prints out the same two numbers 1 2 1 2. Please help. [CODE] public class perfectnums { public static void main(String[] args) { int n = 1; … Software Development java | |
hey all. I've been banging my head on this for hours. I'm trying to get only whole numbers from a user and if they input anything different, I want it to display a validation error and restart the function. Here's what I have: I'm either getting an infinite loop of … Software Development c++ | |
Hello everyone, I am starting to run completely out of time on an assignment that is due tomorrow. No I'm not asking for free code here, because I already have it 99% complete. My assignment is to read a text file into an array and bubble sort them from highest … | |
ive heard people using somthing like[CODE]#include <windows.h>[/CODE] so that its not in the command prompt and its in a window the size the person making it selects Software Development c++ | |
hi, can anybody please help me understand the difference between java runtime and java virtual machine? Software Development java | |
I have no error or warning when compling this code but as you can see it keeps changing one of my inputs (int ID) into a random number. This same number is still the output when i change the imput. code: [CODE]#include<iostream> #include<string> #include<sstream> using namespace std; class student { … Software Development c++ | |
![]() | Hello everyone! For the last week I've been trying to convert an EXE file into a DLL. I read about 1000 Google pages on the way and now know much more than in the beginning :) I have nearly succeeded in getting the "DLL" to run but there is one … Software Development assembly ![]() |
Hello friends, if someone wants to help me with one task. (I want example) The task is: One calculator can make two operations (multiply and subtract). Return the minimum number of operations needed to get to target (or -1). Example: Your multiply number is 5 Your subtract number is 7 … Software Development c++ | |
I need to know what the command is for setting a specific set of decimal places in an answer, somewhat like the PHP number_format command. Here is what I got coming up in my answer.... 0.7893948 I need it so it says: .789 Anyone have an idea of what the … Software Development python | |
I am using Python 3.1.2 What is the best way to get numeric (float or int) user input? Software Development python | |
Hi, i have a project to do in VB and its been a while i done anything in it. My problem is taxation and decimal places. How can I round 2.19 to 2.20 ? the actuall number was 2.194 and vb6 rounds it at 2.19, is this as it should … Software Development visual-basic | |
I have this piece of code: [CODE]<xsl:value-of select="format-number(/object/data/row/EGL_1244 - /object/data/row/EGL_1886,'0.00')"/>[/CODE] The idea is it subtracts EGL_1886 from EGL_1244 and displays the result as a number. However, on occasion each value can have a comma in it. So the value "1,234.56" would make the result show NaN. How can I rework … Software Development xml | |
I have tried resizing the taskbar with all the normal Windows APIs SetWindowPos MoveWindow SetWindowPlacement But to no avail. The taskbar does not even flinch, what would be a good way to adjust it in its width, height, pos. Software Development c++ | |
[B]Connect4View[/B] [CODE]import java.awt.*; import java.awt.geom.*; import javax.swing.*; import java.awt.event.MouseListener; import java.awt.event.MouseEvent; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import javax.swing.JButton; public class Connect4View extends JFrame { DrawPanel canvas; Connect4Model model; ControlPanel myControlPanel, JRadioButton; public static void main(String[] args) { Connect4View w = new Connect4View(); w.setVisible(true); } public Connect4View() { setTitle("Connect4 solution"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setSize(500,220); … Software Development java java-swing | |
hi, in the database i have a value as True, when it is true i need to write a code for the check box to be ticked when the form is loading i ma using VS 2008 standard C# language? does anyone know the solution for this????? Software Development | |
Hi, I searched for few days, and even if I see that there are people getting this error, I can't find a solution. I have an application communicating over the serial port. The application is written in VB6 and 2 PCs, one with XP, the other one with Vista. If … Software Development delphi visual-basic | |
Make a project, consisting of 3 modules: student.cpp, course.cpp and register.cpp. Write source and header file for a program that registers students for courses. Design a class student that stores the name of the student, the id number and array (vector) of all course numbers for which the student is … Software Development c++ | |
Hi Guys (and gals), Thanks for taking the time to read this, hope someone can help. I've been tasked with developing an anti-virus scanner as part of a university assignment. I've written all the signature matching code, which works fine, and the software can scan through a directory and find … | |
Hi, What is the code to write in txtCaps text box event which can change the whole text entered in as capital letters? Thanks. Software Development vb.net | |
My assignment is to make a recursive bubble sort, but I'm not allowed to use any loops.... In fact, the only loop I can use is in the main when I call the function. I'm totally clueless as to what to do. This was an example of a bubble sort … Software Development c++ | |
Hello, Could anybody please help me soon: In C++, a number x= 367.1234444444444444444. I only want to get x=367.123 or x=367.1234 (some digits after the sign ".") Which function to get it? Thank you in advance. Pedro Software Development c++ | |
How can i connect other machine DSN with my pc without sharing using Visual Basic..... Software Development visual-basic | |
ok so i need a code that can read a list of random numbers from a note pad and then sort them, i have it set that it reads the notepad that it is supposed to but how do i make it sort // this is what the notepad file … Software Development java | |
Hello Everyone, I have an MDI form which works fine. At startup the childform opens and its windowstate is maximized. In the childform I have a textbox but does not have a windowstate to maximize. How can I maximize the textbox with the childform? This is my formload: [code] private … Software Development | |
[B][I][COLOR="Green"]Hi,[/COLOR][/I][/B] i am currently doing a project that will be used to add employees to a database. I have already designed the form and have gone ahead to do some coding. Though am stuck a bit, i can not be able to detect whether the employee does exists in the … Software Development visual-basic | |
I am trying to search data in database at runtime.... when a user put the license no in the text box and press button this is my query but it is not working, for every search it is showing first record of the database...... Set rd = New Recordset rd.Open … Software Development seo visual-basic | |
What I want to do is: change the array a[] = {1,2,3,4,5} to a[] = {5,4,3,2,1} by recursion [CODE]void reverse(int *a, int size){ if ( size == 0) return; int t = a[size-1]; a[size - 1] = *a; *a = t; reverse(a, size/2); }[/CODE] However, the above coding did not … Software Development c++ | |
Hi guys, just looking for a bit of help. I've fallen victim to a particularly bad teacher with concurrency and now i have an exam in 2 weeks. I've been relying on online tutorials but the vast majority of it still escapes me. Can i ask what mutex is ? … Software Development java | |
please help me.. i want know the coding searching.. how can find search coding in vb 6.0? Software Development visual-basic | |
hello. i m using a datagridview in c#. i wana calculate total cost value from multiple rows of a single column in a data grid. i m actually sending the rows of the grid to the datatable and then counts the value throw foreach(datarow in dt.rows.count) { } but it … Software Development | |
Hello when Im trying to learn strncpy function, I copied a part of string to another char array, but it gave me different results when I used puts and printf functions. Can anyone tell me why such difference occurs? I guess its about the last terminating NULL character, but Im … Software Development c | |
[code] public List<DateTime> GetDates(DateTime startDate, DateTime endDate, int valuationDay) { TimeSpan span; span = endDate - startDate; List<DateTime> result = new List<DateTime>(); DateTime dateToParse = DateTime.MinValue + span; int yearMonths = 0; if (dateToParse.Year > 0) { yearMonths = (dateToParse.Year - 1) * 12; } int monthCount = (yearMonths + … Software Development | |
i have a program that requires that I load info from a text file and in the end, make an arena out of it. The text file is in the following format: <number of rows in body> <number of cols in body> <body that is rows*cols big> ex: 15 15 … Software Development java | |
I have this section of code that keeps giving a vector subscript out of range error, but I cant figure out why. the vector is defined as [CODE]vector< vector<double> > distance;[/code] for the test I am doing, point->size() = 3, and through the debugger I have verified that the matrix … Software Development c++ |
The End.