132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for subith86

Hi all, Here is a short summary of my piece of code. [code] double availableUnits = calculateAvailableUnits(some arguments); int minimumRequiredUnits = getMinimumRequiredUnits(some arguments); std::cout<<"minimumRequiredUnits = "<<minimumRequiredUnits<<std::endl; //prints 30 std::cout<<"availableUnits = "<<availableUnits<<std::endl; //prints 30 if (availableUnits < minimumRequiredUnits) { //throw exception; } //rest of the code [/code] Even though both variables …

Software Development c++
Member Avatar for Tumlee
0
205
Member Avatar for Zssffssz

I want to get unix time in my program, google just brought up how to get time on a unix system (I'm on a dos/windows system). Is there an easy (can fit in less than 20 lines of non-system dependent functions and without any API or WIN32 [unless simple] functions) …

Software Development api c++ google-api unix windows-api
Member Avatar for vijayan121
0
886
Member Avatar for vincezed

Hi all, I am trying to write a code that could show multiply values in a single cell of listview with comma separator... i am using C# with windows application... I have a attachment that show what i am asking for... Thanks in advance vince

Software Development display listview
Member Avatar for vincezed
0
203
Member Avatar for evanescence

Hi, there :). I have a form named 'Form1' in which I've added a custom control called 'first'. Inside 'first' there's another custom control called 'second'. I want to access and change the properties of 'second' using a function, declared in 'Form1'. Can you, please, tell me how to do …

Software Development vb.net
0
87
Member Avatar for Tellalca

Hey, I am developing a game in C#. I have some question marks in my mind about properties. -Should I return reference in a get, or should I clone the reference and return a clone? If I return a reference then in another part of the program, it will be …

Software Development
Member Avatar for Narue
0
173
Member Avatar for pingpongplaya

I have this assignment for adding two polynomials using operator overloading. I am new to C++ and am having trouble putting the pieces together for the operator overloading portion of the code. I understand how to add two poylnomials together, I just don't know where to begin to put down …

Software Development c++
Member Avatar for pingpongplaya
0
4K
Member Avatar for Liuhh00

hey everyone on Daniweb, I'm liuhh00 in need of some dire suggestions for my program. I can't seem to solve why my program is not working right after i select my choice for case. The program is suppose to accept any 20 random integers, store them and allow the user …

Software Development c
Member Avatar for D33wakar
0
128
Member Avatar for alaa sam

hi everyone I have been programing in c++ for a while now, but I'm asked to write project in c#, so is hard to learn it ?? also I have never wrote a program with interface , so is it possible to write console application then build the interface ? …

Software Development c# c++
Member Avatar for alaa sam
0
123
Member Avatar for giancan

Dear all, I wrote 2 scripts and at a certain point of the first I would like to run the second, and when the second is done, to go back to the first and continue with it. How can I do it? I put at the desired point of the …

Software Development python
Member Avatar for giancan
0
190
Member Avatar for newbie-java

I have the user enter a string e.g. subject of book using a scanner then a for loop, to print out all the books with the same subject to what the user entered. But I'm having a problem in that it will only print out the first occurrence. For example …

Software Development java
Member Avatar for stultuske
0
249
Member Avatar for Joey_Brown

Hello Lets say I have these two classes; [CODE] public class BFF{ private String name; private String surname; private Object friendships; }[/CODE] [CODE] public class BFFG<T>{ private String name; private String surname; private T friendships; }[/CODE] Is it possible to create a generic method that could create a Set of …

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

i'm so frustrated about my coding :( now i cant even get it right :( assignment gonna due this coming week T^T and i really need help i hope you guys can really solve my problem for me T^T so here is what i did so far >< [code] import …

Software Development java
Member Avatar for jwenting
0
213
Member Avatar for Limiter

Okay, I am still trying to get used to C++ since I mostly write in Java. I am also new with the two constructor thing mentioned in detail below. Here, I am investigating on writing a class with two constructor. That is, I have heard that you are allowed to …

Software Development c c# c++
Member Avatar for Limiter
0
207
Member Avatar for RM@Bowdoin

I'm trying to find degrees of separation between any two actors in a movie database. I succeed when I reach my base case, which is 1 degree of separation (i.e. actor is in same movie as another actor) but I use recursion to find all other degrees of separation, and …

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

hey all,, I have this picture to be more clear: [URL="http://img846.imageshack.us/img846/5996/95028490.png"]http://img846.imageshack.us/img846/5996/95028490.png[/URL] My idea is when I paste (ctrl+v) for example this number : 4111111111111111 it would automatically paste them in textboxes one by one in order! so txtBox1 will contain : 4111 txtBox2 : 1111 txtBox3 : 1111 txtBox4 : …

Software Development vb.net
Member Avatar for GeekByChoiCe
0
584
Member Avatar for mole116

hi, i have a question in XPATH. i am reading from XML file and i would like to know how can i extract a name from this line: <Name><![CDATAEdi></Name> lets say i want to get Dani? my c# query is like this: strExpression = "A/B/C/D"; and i also would like …

Software Development xml
Member Avatar for mrame
0
157
Member Avatar for kothaisaravan

Am using VB.NET with Ms Access. It worked fine before changing the field name in access database. After changing the field name i got an syntax error in catch block. And also there is no reserved words. [B]"Syntax Error in INSERT INTO Statement"[/B] Here is my coding str = "Insert …

Software Development database-design vb.net
Member Avatar for kothaisaravan
0
178
Member Avatar for Unethikal

So I have three files all in the same folder: dtime.h, dtime.cpp, and testapp.cpp dtime.h: [CODE] //This is the header file dtime.h. This is the interface for the class DigitalTime. //Values of this type are times of day. The values are input and output in //24 hour notation as in …

Software Development c++ visual-studio
Member Avatar for WaltP
0
285
Member Avatar for anand01

Hi all, When I run use to add second element in the tree set it shows java.lang.ClassCastException: could any one explain me why [CODE] import java.util.TreeSet; public class Venus { public String str; public static void main(String[] args) { Venus a =new Venus(); Venus b= new Venus(); a.str="obj1"; b.str="obj2"; TreeSet<Venus> …

Software Development java
Member Avatar for ~s.o.s~
0
141
Member Avatar for Dakot

hello , let me know , what is the best way to learn c++ efficiently , reading c++ books and doing exercises based on the each capter , or read a book , then to solve exercises?. I'm waiting a reply from those experienced people . Thanks.

Software Development c++
Member Avatar for Panathinaikos22
0
185
Member Avatar for sigridish

[B]here is my code[/B] [CODE] Dim lvitem Dim iCount As Integer Dim iLoop As Integer Dim query3 = New SqlCommand query3.Connection = New SqlConnection("SERVER=localhost;UID=root;DATABASE=test") iCount = lvLogs.Items.Count() If Not lvLogs.Items.Count = 0 Then Do Until iLoop = lvLogs.Items.Count LvItem = lvLogs.Items.Item(iLoop) With LvItem query3.CommandText = "insert into wer(CustomerName,SalesGroup,CustomerType,TypeOfIndustry,RM,SeniorRM) values('" & …

Software Development listview mysql vb.net
Member Avatar for Reverend Jim
0
395
Member Avatar for ThatGuywithCode

So basically I need to find a way to evaluate an infix that's been converted into a postfix. The code below takes an entered infix and converts it into a postfix but I don't know how to take that postfix and evaluate it. Every single tutorial I've seen evaluates a …

Software Development c++
Member Avatar for WaltP
0
231
Member Avatar for mc3330418

I am slowly understanding functions, but I can't completely wrap my head around it yet. What is the purpose of function with nothing in the parentheses? Like this something(). Also, is there a way to write a function and then have it output what is going on in that function? …

Software Development c++
Member Avatar for WaltP
0
156
Member Avatar for SmokeyCannon71

[COLOR="red"]I'm making a program like Notepad but better! But i don't know the code for the Open and Save buttons! Can someone please tell me the code? (I'm using VB6)[/COLOR]

Software Development visual-basic
Member Avatar for SmokeyCannon71
0
149
Member Avatar for coolbeanbob

Hello, I am getting the following error from line 108. I'm trying to find information on the error. The elapsed_time function returns a double, so I'm not sure where there is a problem. error C3867: 'Timer::elapsed_time': function call missing argument list; use '&Timer::elapsed_time' to create a pointer to member [CODE]#include …

Software Development c++ queue
Member Avatar for coolbeanbob
0
149
Member Avatar for mary786

The Question is : Three stacks can be used to sort a list of numbers. Assuming stack in holds the input list of numbers, stack out is to hold the output list after sorting the numbers and temp is used during the sorting process. The sorting algorithm follows. 1 set …

Software Development algorithm java linked-list
Member Avatar for NormR1
0
205
Member Avatar for stereomatching

I have some question about boost::promise After studying the website of boost and "C++ concurrency in action" I still can't get the idea of boost::promise According to the book(if I have no make any mistake) boost::future is designed for one off event you could wrap the task by packaged_task and …

Software Development c++
Member Avatar for stereomatching
0
548
Member Avatar for my_py

I have written almost all of my program, except I am stuck on this certain part. I need to write an averege out to figure all students final grades out as a statistic of the course. Students name and final grade have been appended to an external file(keep in mind …

Software Development python
Member Avatar for my_py
0
175
Member Avatar for morganJohnson

I'm working on a small concept demo for a friend and I'm stuck on the UI. I'm trying to build something akin to an FPS interface (using mouse-look and the iconic WASD). I'm working in a Windows environment (Win7 to be precise), so I figured I'd use the standard Windows …

Software Development c++ gaming
Member Avatar for morganJohnson
0
196
Member Avatar for serenaL

[B]Perfect number cousins[/B] 6 is a perfect number. but 220 and 284 are perfect number cousins. because the sum of the divisors of 220 is 284 and the sum of the divisors of 28 is 220. so they are called perfect number cousins. write a program that finds and writes …

Software Development c++
Member Avatar for mlesniak
0
146
Member Avatar for greatcornholio

Hi all, im doing a program using java and sql, and im trying to set a textbox with a value stored in a database. thing is: i have a combo with airlines, and each airline has a cost for each seat. so what im trying to do is get this …

Software Development java sql
Member Avatar for stevanity
0
171
Member Avatar for deliezer

Hi, I would like to write a member function with a default argument, but the value of the default argument I would like to use is the value of the classes data member [CODE] class testdf {// testdf private: const int _defaultVal; public: testdf() : _defaultVal(1) {} int testMF(int arg …

Software Development c++
Member Avatar for deliezer
0
137
Member Avatar for programing

program enter element and if num is already exist give message enter other number no duplicate my code give me alwayes else condition [CODE]/** * @(#)Enter.java * * * @author * @version 1.00 2011/11/18 */ import java.util.Scanner; public class Enter { public static void main(String []args){ Scanner input=new Scanner(System.in); int …

Software Development java
Member Avatar for stevanity
0
93
Member Avatar for softDeveloper

Hi all, I'm reading to a jtextpane a word document. Everything is fine except for this character \u0169 ( a tilde over an u).. Any suggestions? Thanks

Software Development java
Member Avatar for stevanity
0
76
Member Avatar for jefgreen

I'm trying to isolate a first name, space, middle initial, space, and last name. The full name is given by the user. The only problem I'm having is isolating the middle initial. Current code: [CODE]#include <cstdlib> #include <iostream> #include <string> using namespace std; int main(int argc, char *argv[]) { string …

Software Development c++
Member Avatar for WaltP
0
99
Member Avatar for SSight3

I've tried searching for articles that relate to this issue, but all I keep finding are articles about people who don't know how to define constructors/can't call the parent constructor/etc and I think this will cut straight to the chase. The problem code is as follows: [CODE] #include <stdio.h> class …

Software Development c c# c++ oop
Member Avatar for SSight3
0
301
Member Avatar for rayden150

Im using netbeans gui editor and im trying to add a Jfreechart that is itself in a internal frame, and this internal frame I am wanting to add it to a panel, as you can see in this image: [url]http://www.flickr.com/photos/63259070@N06/6370734167/[/url] The internal frame doesn't even show up on the panel …

Software Development gui java java-swing
Member Avatar for mKorbel
0
357
Member Avatar for autorunman22

Hello guys! Ive finished my last project lately about a program that has a trial version. Now, i want to update it, im thinking of creating a database from a website, then my program reads it (say, [url]www.serials.com/getserial.php?id=[/url][user id inputted]),then my program checks if the serial inputted is original, if …

Software Development java
Member Avatar for autorunman22
0
124
Member Avatar for vaironl

I have a recipe class which has a constructor, the constructor takes in 7 parameters = RecipeName,AuthorName,Ingredients,Ingredientamounts,rating,servingSize,Instructions I'm trying to set those values using the scanner, but I don't know how to make it work since I have the scanner method inside of the Recipe class. So it looks kind …

Software Development java
Member Avatar for vaironl
0
126
Member Avatar for tKc

Hey y'all, so I've created a 2D billiard program that basically just collides 2 balls together and determines their new direction and velocity however I now want to be able to change the colors of the balls after collision by using [CODE]Color.FromArgb(int r, int g, int b)[/CODE]. I would use …

Software Development
Member Avatar for tKc
0
429
Member Avatar for pratik sagar

I am developing a desktop application like address book etc. I want to generate a serial key(setup key) using serial number of hard disk, ram, motherboard. So please help me How can i get serial number of hard disk, motherboard, ram.

Software Development visual-basic
Member Avatar for hkdani
0
193
Member Avatar for C@un5el@r

Hi - I know that this has been somewhat discussed in a couple of threads, but I haven't seen anything with an actual answer. What would the design or pseudocode look like? Write a program that checks HTML files to determine whether the embedded XHTML tags are balanced. The program …

Software Development html-css python queue
Member Avatar for TrustyTony
0
480
Member Avatar for Kayano

Hey guys just wanna tell you now that I chose to do a minesweeper game or attempt to do one for a class project in VB. Now I'm not that experienced of a programmer so this is fairly difficult and I can tell you that I'm in way over my …

Software Development vb.net visual-basic
Member Avatar for helix777
0
665
Member Avatar for neveragn

[CODE]#include<stdio.h> #include<string.h> #define SIZE 100 int main(void) { int array[SIZE], i, n, j, sum=0; printf("Enter some integers:"); for (n=0;n<100;++n) { scanf("%d", &array[n]); if(array[n] == -1) { j=n; break; } j=100; } for(j<=100;i>j;++i){ printf("%d", array[n]); } for(j=0;j<n;++j){ sum=sum+array[n]; printf("The sum is %d\n", sum); } return (0); }[/CODE] [I]Im trying to output …

Software Development c mathematics
Member Avatar for neveragn
0
287
Member Avatar for yazz110

Hi, I have a problem and forgive me if this sounds like a stupid question but I'm not really a good programmer. Ok, this is my problem. Say you have a string and you would like to pull out integers from the string what do you do? Example: String question …

Software Development java
Member Avatar for stultuske
0
163
Member Avatar for javausers

Hi, I want to Map a single key to array of values. Is that possible?

Software Development java
Member Avatar for javausers
0
139
Member Avatar for ooops.789

Hello....i am trying to send a file from server to the client using socket programming in C, how do i do this?? basically the client is trying to download a file from the server....

Software Development c client-server socket-programming
Member Avatar for L7Sqr
0
559
Member Avatar for rohan121212

hey i just switched from turbo c++ to dev c++ i cant run the following program please help #include<iostream> using namespace std; int main() { int n; int k; cout<<"Enter the values\n"; cin>>n; cin>>k; if (n>k) {cout<<"The value entered first is greater ";} else {cout<<"The value entered 2nd is greater";} …

Software Development c++
Member Avatar for Schol-R-LEA
0
100
Member Avatar for Gen.Asura

Hi basically I need help java and my program is an calculator which must be able to calculate arbitrary expressions like for example (5.0+8.1)*(2.0). My program works fine it does basic things like calling upon classes etc it's just I don't know how to do the arbitrary expressions. My calculator …

Software Development java
Member Avatar for Gen.Asura
0
836
Member Avatar for Ashenvale

Hi! I'm trying to create a program that will allow the user to input 5 numbers and will print the largest and smallest number. I tried doing it and this is what I came up.. The thing is, after the program executes its purpose i want to add a statement …

Software Development java
Member Avatar for Ashenvale
0
173

The End.