132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for CPT

As the title suggests I need to write the class of a graph object. It is required that I write a function that prints the graph determine if the graph has conex components,what are the cinex components, if the graph has cycles, and to determine the shortest and longest road …

Software Development c++ queue
Member Avatar for Tellalca
0
133
Member Avatar for Tellalca

Hey; I'm practicing with template classes. When I declare a user-typed destructor for this template class, the program freezes and needs to be closed explicitly. Obviously, in the destructor, I am trying to release the memory allocated to hold the coordinates[3] array. What is the problem with declaring a user-typed …

Software Development c++
Member Avatar for Tellalca
0
1K
Member Avatar for natha_peepli

[CODE] #include <iostream> using namespace std; class vector1 { float vector[]; int y; public : vector1(int x) { y=x; cout<<"enter the elements of the array"; for(int i=0; i<=y; i++) { cin>>vector[y]; } cout<<"elements of vectors are"; cout<<"{"; for(int i=0; i<y; i++) { cout<<"\n"<<vector[i]; } cout<<"}"; } void modify(int z) { …

Software Development c++
Member Avatar for natha_peepli
0
171
Member Avatar for Arbolito

Hey guys. I'm working on a simple hangman program. I got the core engine down working in a command prompt, and now I'm making it using classes and a GUI. I'm using tkinter. Anyway, everything works with no error, but the image is not displaying at all. Here is the …

Software Development gui image python tkinter
Member Avatar for KWL
0
1K
Member Avatar for daudiam

FileInputStream inherits from InputStream which has a mark() method which does nothing. FileInputStream itself doesn't define any mark() method. Even then, if I wrap a FileInputStream object inside a BufferedInputStream object and call markSupported() on it, it returns true. In the docs, it says that the mark() method of any …

Software Development java
Member Avatar for daudiam
0
635
Member Avatar for spades0001

Is there any program that can help me customize my GUI? Like add some color and pictures? Adding color into my Jpanel, JBotton, etc?

Software Development gui java
Member Avatar for JamesCherrill
0
91
Member Avatar for vavazoom

I'm trying to create a random float generator. The float must be 2 decimal places and between the values 0.50 and 999.99. I tried casting rand() to a float below, which didn't work. I'd still like to know the reason this didn't work. [CODE] saleAmount = ((float)rand() % 99950.00 + …

Software Development c++
Member Avatar for vavazoom
0
276
Member Avatar for johnt68

Hello, I have made a web application program that takes one string and outputs it through an array into three seperate textboxes using comma seperated values. This works fine - BUT I want data 0 to only allow entry of strings (it's a name), data 2 to only allow entry …

Software Development
Member Avatar for johnt68
0
117
Member Avatar for n3red

Hi, I need two functions one that checks if the inputed number is a prime number and second one that splits the given number in to prafactors. I have the first function done but the second one is a bit annoying. The function has to take the given number and …

Software Development python
Member Avatar for TrustyTony
0
493
Member Avatar for samsons17

I am in my way of studying the linked list chapter of C++.. So i go through this code below intended of understand it. [CODE] #include <iostream> using namespace std; struct nodeType { int info; nodeType *link; }; void printList (nodeType *first) { nodeType *current; current=first; while (current != NULL) …

Software Development c++ linked-list
Member Avatar for fmadsen
0
117
Member Avatar for BDev338

Hi there developers! I'm trying to develop my own online multiplayer game, using the DarkGDK. But I don't want everyone to have access to the media of the game, so I'm working on my own cache archive format. This is how it works: .idx0 = textures .idx1 = sprites .idx2 …

Software Development api java oracle
Member Avatar for BDev338
0
120
Member Avatar for vehement66

Here's my problem. I need to add only the first and last elements of each row, and display them separately. Ex. Row 0=11 Row 1=11 Row 2=8 [CODE]int arr[][]={{5,9,6},{3,2,8},{7,0,1}}; int sum=0; for(int row=0;row<arr.length;row++){ for(int col=0;col<arr[row].length;col++) sum=arr[row][col]+ arr[row][col]; System.out.println(sum+" ");[/CODE] this is my code, and i think i just need some …

Software Development java
Member Avatar for quuba
0
168
Member Avatar for LianaN

How could I empty my JTable (AbstractTableModel)? If I run [ICODE]tableModel.deleteData();[/ICODE], then the message "0 >= 0" appears. Thanks! [CODE]class QueryTableModel extends AbstractTableModel { Vector cache; // will hold String[] objects int colCount; String[] headers; String url; String databasename; String login; String pass; Connection db; static Statement statement; public QueryTableModel(String …

Software Development java
Member Avatar for LianaN
0
1K
Member Avatar for araib

hey guys...!! i really want ur help in this program..!! its a Hospital management system program..!! it take input from the use..it can save input in a file..display all input on to screen, but i cant find a way to delete a record/patient details from the file PLZ help me..!! …

Software Development c++ file-stream ios visual-studio
Member Avatar for araib
0
365
Member Avatar for vvvvvv89

Hi all! I have been given the task to modify the code below so that it can do subtraction, multiplaction and division, not just addition. Could someone help me with this and explain what the strncpy does? I'm so confused!! // C Parsing Adder program #include <stdio.h> #include <string.h> // …

Software Development c
Member Avatar for Ancient Dragon
0
146
Member Avatar for LianaN

Hi! How could I open a file saved on FTP Server? I'm using org.apache.commons.net.ftp.FTPClient to save/delete files. There are only 5 types of files: doc, docx, xls, xlsx, pdf. If I select a pdf file, then it must be opened in Adobe Acrobat, etc. So, what is the best approach …

Software Development apache java pdf
Member Avatar for LianaN
0
1K
Member Avatar for shinsengumi

Hi everyone! Does anyone here know how to create a C program that will open a web browser depending on the user input? For example if the user inputs the integer 1, the web browser will be opened and will go to 'http://www.daniweb.com', when the input is 2, 'http://www.google.com' will …

Software Development c open-source web-browser
Member Avatar for decypher
0
4K
Member Avatar for musikluver4

How do I allow the display to show numbers with the commas, but then when it does the calculations, have the commas go away for the math since obviously java can't read commas in calculations? example [CODE] DecimalFormat df0 = new DecimalFormat("###,###.00"); JFormattedTextField loanText = new JFormattedTextField(df0);[/CODE] the user puts …

Software Development java
Member Avatar for JamesCherrill
0
175
Member Avatar for lee.j.baxter

Hi everyone, I'm creating my own OS from scratch, and I'm first producing an installation CD so that I can easily install my kernel on a hard drive. So far, I've written a CD-based bootstrap loader in NASM that finds a program within the root directory of the CD, loads …

Software Development assembly hard-drive operating-system
Member Avatar for lee.j.baxter
0
287
Member Avatar for wolvo

Hi everyone I have been given a python code to add some functionality in it. The problem am facing is that the original developer has hard coded 3 variables a,b,c in the code and these variables are before class definition in files: hers is the code snippet: [code] a = …

Software Development python
Member Avatar for Gribouillis
0
139
Member Avatar for intes77

below is my code about a method regarding arrays. The purpose of my program is to let the user input the length of the array. and then insert numbers into the array, sort the numbers, and let the user search the contents of the array. my problem is i dont …

Software Development java
Member Avatar for intes77
0
110
Member Avatar for WildBamaBoy

I know this is probably overly simple but I am terrible with math. This is a section from a game I'm attempting with PyGame. Instead of using pixels for coordinates I have my own render function that uses blocks(actually just cnverts block value to pixels), which are 32x32 pixels, so …

Software Development python
Member Avatar for Gribouillis
0
2K
Member Avatar for epicasian

Well, I've been Googling for at least 30 minutes, and looking through past posts about this, but just can't seem to find an answer that works. Basically, I've got a component class that has a single method I'm trying to test out. The entity class has a private array of …

Software Development c++
Member Avatar for epicasian
0
220
Member Avatar for deviliq

Hi, ^^ I'll be competing for a java programming contest next week and one of the instructions is to "Receive input from the console window (of JCreator)." Thus, programs shouldn't involve any GUI. I've found this very useful tool called Scanner in the java.util package. My self-training was going smoothly …

Software Development gui java
Member Avatar for deviliq
0
500
Member Avatar for jemes bond

Hi, I am a computer Science Student having knowledge of basics in C++. I have to make a C++ project (Online airline reservation project). Please guide me how to make such an online project in C++. What all tools i need to use and how much time they will take. …

Software Development c++
Member Avatar for geojia
0
373
Member Avatar for DallasFan3

Ok, well Iam just about done with one of my assignments, but Iam having a problem at the end of it. Iam suppose to find a maximum income of the families income that the user inputs and I have to find the families that make less than 10% of the …

Software Development java
Member Avatar for jon.kiparsky
0
649
Member Avatar for DocBreen

[CODE] bif="bg.jpg" mif="ball.png" import pygame, sys from pygame import * pygame.init() screen=pygame.display.set_mode((420,300),0,32) background=pygame.image.load(bif).convert() mouse_c=pygame.image.load(mif).convert_alpha() while True: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() screen.blit(background, (0,0))[/CODE] [quote=error] Traceback (most recent call last): File "C:/Documents and Settings//Desktop/Programming/PYGAME TEST/pygame.py", line 4, in <module> import pygame, sys File "C:/Documents and Settings//Desktop/Programming/PYGAME …

Software Development python
Member Avatar for IceLee
0
114
Member Avatar for Jay-10

Hey Guys i was wondering if i could get a bit of help I'm creating a program that contains a number of different sorting methods (insertion, quick, merge) that sort an array of bikes. [CODE] Bike[] bikes = new Bike[13]; bikes[0] = new Bike("Mountain", 160, "Diamond", 6, 18, "Standard", "Hardtail", …

Software Development java
Member Avatar for troothHertz
0
532
Member Avatar for ceyesuma

Hello. I going to write fames.xml with my app. I need to know the best way to handle adding a block of XML but not at the end because I need to have the root element at the end. Any ideas. 1.never end it but when I use it add …

Software Development java xml
Member Avatar for ceyesuma
0
105
Member Avatar for Andrew Davis 64

I have no idea how C++ works, but I'd like to learn... Is it possible to create java files/programs using C++?

Software Development c++ java
Member Avatar for geojia
0
211
Member Avatar for .:Pudge:.

What is the greatest possible range of rand()? I want to make it that of a long signed integer, but my program crashes. Is there another way to get that range?

Software Development c++
Member Avatar for Tellalca
0
105
Member Avatar for noname1810

Hello, everybody! I'm writing a code, which should be able to insert a node to a binary tree where specified. Commands are being loaded from a .txt file. The contents of the .txt file are the following: 1 L 1 2 R 1 3 L 2 6 R 2 4 …

Software Development c++
Member Avatar for Tellalca
0
158
Member Avatar for MellyMel1984

Hey guys I have a method that is calculating a time based two JComboBox selections. I am returning the time as a Date object but it prints the date and time, when I say 'cal.getTime()'. The date is always the same, the format is Thu Jan 01 (time i calculated) …

Software Development java
Member Avatar for jon.kiparsky
0
979
Member Avatar for tKc

I am trying to write a program that dynamically increase the size of an array. essentially creating an array inside of an array with array [b]a[/b] storing 100 int pointers. my code is initially having problems on line [code] a[count] = new int [n]; [/code] any tips or pointers as …

Software Development c++
Member Avatar for Tellalca
0
155
Member Avatar for tegaelam

Hi! I saw a post on this site that exhibited the same exact problem that I have for a homework assignment and while it was solved, my issue with the homework assignment is different. The C++ program that I wrote asked the user to input information but once you enter …

Software Development c++
Member Avatar for tegaelam
0
630
Member Avatar for LianaN

Hi! My code worked correctly, but now it produces the error message. It seems that the command [ICODE]treeModel.reload();[/ICODE] doesn't work anymore. Please explain me what happens? [CODE] private void addOrgFolder() { String[] data = new String[2]; data[0] = text2.getText(); data[1] = text1.getText(); DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)SystClasses.TreeEditTest.tree1.getLastSelectedPathComponent(); tableModel.setQueryDontChangeTable("insert ..."); DefaultMutableTreeNode nNode …

Software Development java java-swing
Member Avatar for LianaN
0
336
Member Avatar for bkempert

Hello everyone, I've used this website many times to help myself based off of others' questions, but now I have a problem of my own that I can not solve. I was assigned the task of creating a stack program in C++ using a linked list. Seems simple enough, but …

Software Development c++ linked-list
Member Avatar for bkempert
0
135
Member Avatar for gizmo7008

I'm making a student database using array based lists. I'm having trouble with making the list size created by the user. I have a for loop there now but once I put it there, I get an error saying aStudent is an undeclared variable and I don't understand why. There …

Software Development c++
Member Avatar for gizmo7008
0
442
Member Avatar for haxtor21

Hello people. I am writing a program that helps users see if they can afoord monthly costs (tuition and rent). here is the main method: [CODE]import java.io.*; public class UserClass { /** * @param args */ public static void main(String[] args) throws IOException{ Finance fin=new Finance(); fin.liveWithParents(); fin.amountRent(); fin.collegeTuition(); fin.getMonthlyCost(); …

Software Development finance java
Member Avatar for haxtor21
0
118
Member Avatar for minimi

Here is my code: [url]http://pastebin.com/KTR86nzD[/url] This is input.csv: name,age Fred,88 Stella,11 Nellie,99 George,22 Violet,33 Rose,77 Bob,66 Lena,55 Billy,44 It should print the above in this format - Fred is 88 years old Stella is 11 years old Nellie is 99 years old ... Billy is 44 years old. Afterwards, it …

Software Development java
Member Avatar for apines
0
244
Member Avatar for Peach2010

[CODE]public class ReverseArray { //declare an array variable //do not call new yet! int[] array = new int[100]; int a; int[] getCopy = new int[array.length]; /** * Constructor * * Reads in int values and stores them in an array. * The first int in the input is the number …

Software Development java
Member Avatar for apines
0
213
Member Avatar for amoony

Hi every body I have about while loops and I just answered Q: a & b plz help me [QUOTE] **Write a program that user while loops to perform the following steps: a)Prompt the user to input two integers: firstNum and secondNum. (firstNum must be less than secondNum.) . b)Output …

Software Development c++
Member Avatar for amoony
0
872
Member Avatar for LianaN

Hi! If I run the code shown below from my local machine, where the FTP server is installed, then everything works correctly. However, if I try to run it from some other machine, then the message "Cannot connect to the FTP server!" appears. Settings of my FTP Server are shown …

Software Development client-server java
Member Avatar for LianaN
0
124
Member Avatar for KellieD

I'm trying to write a progam that; Contains a function called sumN() which takes an int n as an argument and returns an int which is the sum of all integers between 1 and n. In the main() asks the user: How many values (s)he wants to enter (maximum 50); …

Software Development c++
Member Avatar for SgtMe
0
153
Member Avatar for tooqt4u_777

Hi guys, My group is having a software development project for our academics at a university. The software we want to develop is an inventory system which will be installed in a Local Area Network. We have decided to use Visual Studio C# (2005 or higher) as the front-end while …

Software Development c# multithreading sql
Member Avatar for dValue
0
596
Member Avatar for shinsengumi

Can anyone help me improve my source code below? I tried fixing it but apparently, there's not much success. [CODE] #define NUM_THREADS1 1 void *go_to_website2(void *program); void *go_to_website1(void *program) { char* str[3]; str[0] = (char *)program; str[1] = "http://www.google.com"; //supposedly 2nd website to go to str[2] = '\0'; char* new_prog …

Software Development c multithreading open-source
Member Avatar for shinsengumi
0
200
Member Avatar for Batric

Hi everyone, I am trying to get Python working on XAMPP. I'm running Windows Vista, XAMPP version 1.7.1., PHP is working without any problems. I followed the instructions from here: [url]http://www.macouno.com/2010/03/17/getti[/url] ... -on-xampp/ I did everything the same, restarted Apache service, rebooted the PC but still I get the following …

Software Development apache python windows-vista
Member Avatar for Batric
0
634
Member Avatar for Joey_Brown

Hello. I have a question regarding a task I was given. It goes : Fill the array with random numbers and then print out how many times theyve appeared like so : [CODE] /* ARRAY : 0 0 0 0 1 1 1 2 2 2 2 2 6 6 …

Software Development c c# c++
Member Avatar for Joey_Brown
0
109
Member Avatar for ceyesuma

Hello. Can anyone bring me up to speed to use XML to manage adding and removing tabs from a JTabbedPane? I am adding tabs and I Would like some code or links that could show me how to serialize any changes I make to a JTabbedPane. Thanks

Software Development xml
Member Avatar for ceyesuma
0
138
Member Avatar for NewOrder

i am trying to build an interface array for my checker class. i have 3 classes: main class, checker class and king class. my interface: [CODE] interface IchecherMove{ bool isMoveValid(IchecherMove[,] checker, int columnStart, int rowStart, int columnEnd, int rowEnd); string FindPiece(); string print(); bool pieceDevour(IchecherMove[,] checker, int columnStart, int rowStart, …

Software Development
Member Avatar for NewOrder
0
1K

The End.