43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for burcin erek

i made a class test program with telephone directory. it writes name and telephone number but not surname i have used return name,surname which does not carry both string. is it possible to do them without writing another function script. thanks in advance [CODE]#include <cstdlib> #include <iostream> using namespace std; …

Software Development c++
Member Avatar for jonsca
0
102
Member Avatar for Sunshineserene

Hi all, I am trying to call a 2D array from another class, and equate the 2D array to a 2D array in the class its at. However, I'm having some problems. I can call the 2D array from the class that I want to, but it seems like my …

Software Development java java-swing
Member Avatar for Sunshineserene
0
2K
Member Avatar for wrhurst

Hello all, I want to change the following code to have the user enter ANY NAME to see if the person is present in the array. I'v been trying for a couple hours now but keep getting errors. There's more to this problem but I have to get past this …

Software Development c++
Member Avatar for wrhurst
0
170
Member Avatar for fahadyousaf

i have made this little program in GUI, Please help in these following error. 1st time when we save the data second time it comes to 2nd field name not on cnic field, it should ask cnic field first then other ask for other fields. Please any one guide me …

Software Development file-system gui java java-swing
Member Avatar for kramerd
0
239
Member Avatar for Jonil

Hello! I'm suppose to code a word counter for my Java class. The user is suppose to keep entering a sentence until they type "xxx" then at the end, it'd count how many words entered. It's only counting the "xxx" for me, so at the end, it says I only …

Software Development java
Member Avatar for kramerd
0
158
Member Avatar for wdearth

I'm supposed to create a bill for a catering group utilizing at least two functions, which functions could I use for this and how will I use them? I've done it with mainly if and else statements and simple calculations, any functions I can use? #include<iostream> #include<iomanip> #include<string> using namespace …

Software Development c++
Member Avatar for mtbs1826
0
228
Member Avatar for bibiki

I have the following code as taken from the book I read from: [CODE] import java.awt.*; import javax.swing.*; /** Frame1 is a frame with a label and a button */ public class Frame1 extends JFrame { /** Constructor Frame1 creates a frame with a label and button */ public Frame1() …

Software Development java java-swing
Member Avatar for kramerd
0
202
Member Avatar for Jaydenn

My program requires users to be able to right click a tab and then close it, but I can't do this when the right clicked tab doesn't select. Any help would be nice, thanks.

Software Development
Member Avatar for Jaydenn
0
102
Member Avatar for samarudge

Hey, So I have a *NIX box (CentOS 5.5) which runs a number of background processes, I leave it on 24/7 with just a terminal up on the screen (I don't have Gnome, KDE or any similar graphical frontend, just a prompt). Is there any way to get my background …

Software Development shell-scripting
Member Avatar for shibblez
0
166
Member Avatar for tylerjgarland

I have an implementation question. I am trying to have a rectangle change color based on the position of four sliders. (Alpha, Red, Green, Blue) I am attempting to use a dependency property to combine all four values, convert them to a brush, and apply the brush to a rectangle. …

Software Development c#
Member Avatar for tylerjgarland
0
377
Member Avatar for Jaily

Can I somehow use the following code to remove all the elements of a binary tree? [CODE] void BinarySearchTree::remove(int d) { //Locate the element bool found = false; if(isEmpty()) { cout<<" This Tree is empty! "<<endl; return; } tree_node* curr; tree_node* parent; curr = root; while(curr != NULL) { if(curr->data …

Software Development c++
Member Avatar for nbaztec
0
2K
Member Avatar for knifty09

I haven't needed to use fscanf before, so I'm not very familiar with it... Everything is working fine except that the numbers it inputs are not what's in the file and they are all the same number (-9.255959e+061 to be specific) I know exactly how the files are formatted they …

Software Development c++
Member Avatar for jonsca
0
106
Member Avatar for edriso

I am new to vb. I am trying to get a value for a textbox from a database according to the selected item in combobox. but i had this ex.message Operator '&' in not defined for string "select*from ......" and type 'dtarowview' Could anyone please tell me what is wrong …

Software Development dataset open-source vb.net
Member Avatar for Netcode
0
147
Member Avatar for singlem1905

today, I want to transform "c:\*\``"(it is a rout) to "c:/*/''" yes, just from "\" to "/" but it is always missed ,for example "\n" to "enter" and how can "c:\*''" just be "c:\*''" without changing ? thanks a lot!

Software Development python
Member Avatar for TrustyTony
0
78
Member Avatar for ds2000

Hi all, Hopefully a quick one. I have some weblogic build scripts that configure a WebLogic Server environment. Previously DB connection credentials have been allowed to be stored in build property files. However new security regulations mean that this is no longer possible. I am trying to write a prompt …

Software Development file-stream gui python
Member Avatar for ds2000
0
2K
Member Avatar for hazeeel

Hey guys, I seriously need some help here. I have no idea why but after undergoing the Rotation phase I lost coordinatesRotZ[a][0],coordinatesRotZ[a][1]. The value appears to be 0.0 However coordinatesRotZ[a][2] has values stored in it. so the output looks something like that after printing: coordinatesRotZ[a][0] coordinatesRotZ[a][1] coordinatesRotZ[a][2]: 0.0 0.0 13.44 …

Software Development java
Member Avatar for hazeeel
0
119
Member Avatar for ceyesuma

I would like to learn how to save a JInternalFrame. Currently reading through Serialize info. I have never ran the app outside of Netbeans. I have had no success with creating the jar for the app (JDesktopPane). Now Serialization is adding to the confusion. Do I have to have the …

Software Development java
Member Avatar for JamesCherrill
0
108
Member Avatar for computerbear

Hello, I am at the end of my first C# programming class. I am working on some extra credit. Having problems with my loops. I am supposed to get output looking exactly like this: Bark Bark Meow Bark Meow Bark Bark Meow Bark Meow Bark Meow Bark Meow Bark Bark …

Software Development
Member Avatar for apines
0
332
Member Avatar for qdiscoverer

Here's what I made to test how python works.... test.py: [CODE=python] class ECollector: #error msg collector #this class should be used as 'global' msgs = [] def addmsg(self,msg): self.msgs.append(msg) def clear(self): self.msgs = [] class test(ECollector): dcodes = [] ECollector def new(self): ECollector.addmsg("test!") [/CODE] And I typed the following on …

Software Development python
Member Avatar for Gribouillis
0
337
Member Avatar for choover12

can someone tell me how to convert a string to a float. [CODE](Float)"1";[/CODE] does not work.

Software Development
Member Avatar for Dolly.Oswal
0
118
Member Avatar for .:Pudge:.

My code works fine for smaller integers, but when it gets over 1 million or so the number changes or goes negative. I am sure this has to do with the range of int, but I tried float and double and all the numbers came out the same...... What is …

Software Development c++
Member Avatar for .:Pudge:.
0
142
Member Avatar for MarounMaroun

Hey all, I'm trying to implement a function InitMatrix which suppose to return a pointer to a new created 3d array of the size determined by x,y and z. I have a struct which represents a matrix and should be able to deal with some functions required, like setting the …

Software Development c
Member Avatar for Ancient Dragon
0
299
Member Avatar for Tankadin

Ok here is my problem thus far. My program I have created is horrible lol...I am adult enough to admit it. My issue is the output I am getting that I will post after my code. It has weird characters at the top and I am not sure why. The …

Software Development java
Member Avatar for Tankadin
0
264
Member Avatar for koduruabhinav

Hi,i was a beginner in perl .please try to help m ein these areas. If i use [CODE]du -sh[/CODE] in my perl script i was getting output as 54M /home/abhinav/compare or 569M /home/abhinav/debug But i want only the size that is either like 54m or 569m and i dont want …

Software Development perl
Member Avatar for koduruabhinav
0
163
Member Avatar for killerbeat

Hi, Daniweb members i have an listview containing an normal listviewitem plus one subitem What i want to do is save the info in the listview in a textfile and load when i start my program. So that all the info will be saved, but how do i do this? …

Software Development listview vb.net
Member Avatar for codeorder
0
2K
Member Avatar for volkang

Hi i ve been dealing with a program and encountred a weird problem. the problem is that my array variable por[27][1]'s value changes for no reason. please take a look at the pictures in the attachment. the pictures belong to debugging.

Software Development c
Member Avatar for volkang
0
163
Member Avatar for ccandillo

I am doing the O'reilly School of Technology course and the current topic deals with Tkinter. It gave me the idea to write this application. The idea is to transfer files to various ftp sites. If I set a default master password, then the password should be used for all …

Software Development python tkinter
Member Avatar for ccandillo
0
288
Member Avatar for Phil++

Hello, Right, basically I'm trying to write some HTML to a file, now the problem is that I do not want to write the whole of the HTML in the C# program, incase I ever need to change the HTML file. All I want to do is change a few …

Software Development
Member Avatar for Unhnd_Exception
0
132
Member Avatar for c2q

Hi Okay so i have a text file and i have it converted to a bunch of lists with strings as the words. Now i need to find words that occur only once in the entire text file, how can i do this using a loop? A hint says that …

Software Development python
Member Avatar for cghtkh
0
133
Member Avatar for Alec0905

Hey guys, i'm working on a recursive problem that invlolves getting from a place "s" (start) to a part "e" (end) in as few moves as possible. There are road blocks "x" and the grid is a size up to 15x15. My problem is that when I try to write …

Software Development c++ file-stream
Member Avatar for Alec0905
0
167
Member Avatar for thisischris

So I have a data file that looks like this [CODE] Movie1 Year Salary Actor1, Actor2 Movie2 Year Salary Actor3, Actor4, Actor5 ... etc [/CODE] The part that's throwing me off is the actors line. It can have from 1 to 5 actors on it, separated by commas. I have …

Software Development c++
Member Avatar for Duoas
0
133
Member Avatar for kafro

I'm working with sets and notice when I do: [CODE]s1 = set( ['a', 'b', 'c']) s2 = set([1,2,3]) print s1.symmetric_difference(s2)[/CODE] It prints it off as: [CODE] set(['a', 1, 2, 3, 'c', 'b'])[/CODE] Is there any reason to why it displays it in the order of 'a', 1, 2, 3, 'c', …

Software Development python
Member Avatar for TrustyTony
0
112
Member Avatar for ereruh

Hey. As the topic states i want to use a streamwriter to write the listbox from form1, but the streamwriter is in form2. How do i get the data from form1 to form2? I have the code to write everything out etc, all I need is help to get the …

Software Development
Member Avatar for can-inlife
0
136
Member Avatar for 3FLryan

Hello, I am just starting learning Python and I am having some trouble properly importing a function from a module. I wrote the short script: [CODE]def print_twice(param): print(param, param) [/CODE] When I try to import the function print_twice, the shell tells me it cannot import the name print_twice. When I …

Software Development apple python
Member Avatar for TrustyTony
0
453
Member Avatar for gizmo7008

I'm trying to create a print void function, however I'm not understanding how to call the database in the print function. I've tried to do something similar to what is in my textbook but all I'm getting is errors. This is what I've done so far. [CODE] #include <iomanip> #include …

Software Development c++
Member Avatar for gizmo7008
0
6K
Member Avatar for LianaN

Hi! Is it possible to dynamically update a text of items in JList? Let's say there is JList defined as follows: [CODE] list1.setModel(new AbstractListModel() { Object[] values = listOfTasks.toArray(); public int getSize() { return values.length; } public Object getElementAt(int i) { return "Task " + i; } }); [/CODE] As …

Software Development java
Member Avatar for JamesCherrill
0
2K
Member Avatar for etftw

Hello, I am looking for a means of database interaction in which the database will be stored on a user's machine but with no actual server software running. I have read there is some way to create databases in SQL express and then take the files for use in your …

Software Development sql
Member Avatar for etftw
0
323
Member Avatar for Sunshineserene

Hi all, I want to parse the elements in my arraylist to double. May I know how to implement that? [CODE]import java.io.*; import java.util.*; public class Array2 { static ArrayList myDouble = new ArrayList(); static String[] temp; static String[][] finalTemp; static String[] arr; static int rows; public static void main(String …

Software Development java
Member Avatar for BestJewSinceJC
0
6K
Member Avatar for hatux

Hello gentlemen. I have a question over here. with the following piece of code i want to extract data from a document. The question is how can i assign the values [B]Sentences, Words[/B] in the Array. [CODE] String data[][]; //[files][sentences][words] public void ScanSearch() { for (int i = 0; i …

Software Development java
Member Avatar for JamesCherrill
0
103
Member Avatar for timdog345

I need t o make these paterns [code] * * ********** ********** ** ** ********* ********* *** *** ******** ******** **** **** ******* ******* ***** ***** ****** ****** ****** ****** ***** ***** ******* ******* **** **** ******** ******** *** *** ********* ********* ** ** ********** ********** * * [/code] I …

Software Development c++
Member Avatar for coldzero_82
1
119
Member Avatar for problemmaker

[CODE]java.lang.NoClassDefFoundError: Main Caused by: java.lang.ClassNotFoundException: Main at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) Could not find the main class: Main. Program will exit. Exception in thread "main" Java Result: 1[/CODE] after i had done my system. this error message pop up and restricted me …

Software Development java
Member Avatar for hanvyj
0
8K
Member Avatar for phfilly

Hi Everyone I'm busy preparing for my programming examination and I would really appreciate it if someone could just give me some references(websites) to some c++ programming exercises. I believe the best way to prepare for this kind of examination is to practice writing code and understanding it. Thanks!

Software Development c++
Member Avatar for phfilly
0
183
Member Avatar for z_a

While reading Stroustrup's "The C++ programming language", I was puzzled at 'declaring a pointer to an array of character strings and declaring a reference to an array of 10 integers', and I had to clear my mind on pointers to arrays. I am posting here the notes I made to …

Software Development c c# c++
Member Avatar for z_a
0
456
Member Avatar for ronny22

Hi all I made this animation app and I think its all correct however i get a error message which is: Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 at java.util.ArrayList.RangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at Animation.getScene(Animation.java:56) at Animation.getImage(Animation.java:49) at MainAnimation.draw(MainAnimation.java:64) at MainAnimation.movieLoop(MainAnimation.java:53) at MainAnimation.run(MainAnimation.java:34) at MainAnimation.main(MainAnimation.java:10) I cant …

Software Development app-store java java-swing
Member Avatar for ronny22
0
169
Member Avatar for Anupama G

Hi, I have a textbox(placed inside a ItemTemplate) inside a gridview.I want to validate the text entered in the textbox for date(mmddyyyy format) values,without using any validation controls. Could anyone help me out with the C# code. Thanks in advance.

Software Development
Member Avatar for devi.....
0
934
Member Avatar for TheMightySpud

Hi all, Hopefully someone can help me out with this one. I have a form which gets populated by 15 buttons dynamically at runtime (these need to be dynamic as there will be a user config file at some point) What I need these buttons to do is to open …

Software Development gui vb.net
Member Avatar for GeekByChoiCe
0
142
Member Avatar for kchadek

First off, yeah I know there are many codes out there for this, but how can one learn without doing. Ok So we need to write a code to see whether two words are anagrams of one another. Here is what I have, it compiles but does not work. The …

Software Development java
Member Avatar for apines
0
162
Member Avatar for gizmo7008

I'm trying to get what I put in the value for the database to output, however whenever I use a cout statement with the a.name I get an error on line 21 which is the line with the cout statement. I've done it the way it is in the examples …

Software Development c++
Member Avatar for gizmo7008
0
85
Member Avatar for .:Pudge:.

I get the error " no match for 'operator=' in '* n->node::child = root' in the "insert" method and I don't know how to fix it. I know it has something to do with pointers and the way I initialized the array. What I want to do is is put …

Software Development c++
Member Avatar for Ancient Dragon
0
183
Member Avatar for jwill222

HEY GUYS I'M WORKING ON A CALCULATOR USING THE SCANNER CLASS. HOWEVER THERE IS A CATCH TO IT I CAN ONLY USE ADDITION AND SUBTRACTION TO CALCULATE ANSWERS. I HAVE TO MAKE IT INTERACTIVE AND ASK THE USER WHAT FUNCTION THEY WOULD LIKE TO DO(1.ADDITION,2.SUBTRACTION,3.DIVISION,4,MULTIPLICATION) I'M GOING TO USE A …

Software Development java
Member Avatar for jwill222
0
163

The End.