43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for mandoza671

Hi, I'm new to programming so please excuse any obvious questions. I have a text file with the following entries: mydescription, myword yellow, mango yellow, banana orange, orange green, pineapple green, mango pink, mango What's important is that there is no order, both the 'mydescription' field and 'myword' change randomly. …

Software Development algorithm python
Member Avatar for mandoza671
0
160
Member Avatar for arjen

hello guys, I need help regarding with my listview how will you make in listview if the name is already exist in the listview it will no longer accept or there is a msgbox("name already in listview") and the name is in the first column of the listview. Or what …

Software Development listview vb.net
Member Avatar for arjen
0
208
Member Avatar for jigglymig1

the problem stats" [B]copy instructor:[/B] initializes a copy of an IntSet given another IntSet as a parameter. The new IntSet is a copy of the IntSet parameter. i need to copy my class using a constructor. IntSet is the class which is a class for setting up arrays as true …

Software Development
Member Avatar for jigglymig1
0
118
Member Avatar for ashishchoure

Hi, I am just trying to do some down casting. here is the code. [CODE] class Base { public: void virtual test() { cout << "Base Test"; } }; class Derived : public Base { int i; int j; public: void testD() { i = 8; j = 9; cout …

Software Development c++
Member Avatar for Fbody
0
123
Member Avatar for zachattack05

Stupid question I know. But I have looked for HOURS on examples of how to do this. Every single example I can find uses streamwriter or streamreader which reads and writes text, not byte arrays. Is it possible to get a byte array from a CryptoStream? The closest I can …

Software Development
Member Avatar for zachattack05
0
894
Member Avatar for PerplexedB

VB2008 won't let me drag my lblBase class from the toolbox onto a form in design mode. Why? Is there a way around this? [CODE]Public Class lblBase Inherits System.Windows.Forms.Label 'Public Sub New() 'MyBase.new() ' Me.BackColor = Me.Parent.BackColor 'End Sub End Clas[/CODE]

Software Development oop vb.net
Member Avatar for JJCollins
0
131
Member Avatar for timb89

One aspect of comp science that really lets me down is loop invariants. A question from a past paper that i cant get is to find the loop invariant of the following segment of code: [CODE]bool linearSearchIter(int a[], int n, int target) { int i = 0; bool found = …

Software Development c++
Member Avatar for Narue
0
152
Member Avatar for fourty

Hey pals anyone know : I need a code under a cmdhelp that 1. opens the windows help 2. Opens a file in the database containing help msg on the project. I also need to know how i could link a folder with my project or lets say a text …

Software Development visual-basic
Member Avatar for AndreRet
0
73
Member Avatar for Vagelis44

Hi, I'm trying to find a way to make some kind of monitor in C. I found this but i get : error: config.h: No such file or directory error: glibtop.h: No such file or directory error: glibtop/error.h: No such file or directory error: glibtop/cpu.h: No such file or directory …

Software Development c ubuntu
Member Avatar for harshil_shah007
0
548
Member Avatar for arjen

print a list of integers from 1 to N that are both divisible by 2 and 3.and after producing the list, count the numbers of integers found.

Software Development c c# c++
Member Avatar for LevyDee
0
286
Member Avatar for arjen

hey guys can u help me with this the problem of this code should delete only the selected item from the listview in a report.txt but this code delete all the data in the txt file whether i selected only one data from the listview.... [CODE]Dim myFile As String = …

Software Development file-stream listview vb.net
Member Avatar for arjen
0
719
Member Avatar for keeda

Hi, I have to pass a void pointer in a function and at the other end I have to read some values from this void pointer. I planned of creating a class and setting up required variables into an object and then I set this [CODE] void* ptr = obj …

Software Development c++
Member Avatar for keeda
0
99
Member Avatar for jems5

I would like to check user input value against a declared final variable to make sure it does not exceed the final int variable for the purpose of using in a try-catch-finally. [CODE] final int variable = 20; // Variable declared for max allowable int userInput = 0; // Used …

Software Development gui java user-interface
Member Avatar for jems5
0
106
Member Avatar for cortez716

This function should take as it's arguments two integer values. The function should return the smaller of the two values. From main ask the user for two integer values. Pass the two values to your smallest function, then print out the returned value. I am new to c++ and struggling …

Software Development c++
Member Avatar for cortez716
0
154
Member Avatar for Duece_68

Hi I was just wondering if I create a pointer using the new operator and then I call the new operator on that same pointer later on would that overwrite the existing pointer so that I do not waste memory on the heap or do I have to delete it …

Software Development c++
Member Avatar for Duece_68
0
133
Member Avatar for plasticfood

[CODE]import java.util.Scanner; public class Highest{ public static void main (String [] args){ Scanner kb = new Scanner(System.in); int scores [] = new int[3]; String names [] = new String [3]; int highest = scores [0]; String names1 = names [0]; for (int i = 0; i<3; i++){ System.out.println("enter name and …

Software Development java
Member Avatar for NormR1
0
120
Member Avatar for daviddoria

I just learned about heaps today. It looks like STL wants you to create a heap by first creating a vector, then using make_heap from <algorithm>: [code] std::vector<SimpleClass> Numbers(8); // ... populate ... // convert Numbers into a heap make_heap(Numbers.begin(), Numbers.end()) ; [/code] Why is there not a <heap> just …

Software Development algorithm c++
Member Avatar for Narue
0
107
Member Avatar for jigglymig1

[B]constructor with array parameter.[/B] Internal array is assigned values as indicated by the parameter. An example of the use of this contructor is: - int values[] = {2,5,7}; - IntSet a = new IntSet(values); // create a set with elements{2,5,7} im very very confused on his wording, i dont know …

Software Development
Member Avatar for Momerath
0
91
Member Avatar for tehmarto

So I have a file I wanna put its content in an array and that needs malloc or new. I do that on a large project, it was working fine but i guess some changes were made to this project and now that malloc causes a crash and "char* array …

Software Development c++
Member Avatar for tehmarto
0
145
Member Avatar for jems5

My program requires that the user input values for an array do not exceed a declared final int variable. To control this I wrote this code to catch and throw exceptions in order to prevent computer from crashing the program. There are two conditions to be handled. (1) Exceeding array …

Software Development java
Member Avatar for dangari
0
146
Member Avatar for codingNewB

Hello everybody, really need some help getting this code to add up even and odd numbers from a set of integers. But it also needs to default or continue through if input is incorrect (i.e.- $,@,#,3.4) and so on. Here is what I have so far. Thank you. [CODE]#include <iostream> …

Software Development c c# c++
Member Avatar for ironmancpp
0
2K
Member Avatar for PerplexedB

Hi.... I have a datepicker that contains an alternate key of an Access Table with a autokey primary key. [code] Private Sub DateTimePicker1_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles DateTimePicker1.Validating Dim d As Date = DateTimePicker1.Value If d < Today Then MsgBox("Gelieve een datum in de toekomst te …

Software Development dataset vb.net
Member Avatar for PerplexedB
0
141
Member Avatar for ftl25

Hi, I am writing a program in VB6 where I'm adding an "Import/Export" option to the file menu. Starting with export, I basically need to find all files matching a particular filename and zip and export them to a folder. Currently I am simply finding all the files (with different …

Software Development visual-basic
Member Avatar for AndreRet
0
1K
Member Avatar for timb89

Im trying to insert items into a BST from a txt file. For arguments sake the data file is just the integers 1 2 3 4 5 6 7 8 9. When i try to do a inorder traversal, all that is outputting is the first and last number. I …

Software Development c++
Member Avatar for timb89
0
175
Member Avatar for noydoy

[CODE]import javax.swing.*; import java.text.*; public class Postage3{ public static void main(String args[]){ double weight, cost, count; int choice, choice2; DecimalFormat df = new DecimalFormat ("0.00"); choice2 = 1; while(choice2 == 1){ weight = Double.parseDouble(JOptionPane.showInputDialog("Enter weight of postage according to ounces")); if(weight <= 1){ cost = weight * 0.30; } else{ …

Software Development java java-swing
Member Avatar for noydoy
0
2K
Member Avatar for frogboy77

Sorry if this is repetative but still struggling with this. i wish to multiply 2 long integers together. if the result is outside of int64 range i want the loop to break otherwise i want to keep the result and increment the second number. have tested this, but when the …

Software Development c++
Member Avatar for frogboy77
0
119
Member Avatar for ziggystarman

Hello I'm looking for the correct method/way for reading & writing raw JPEG image binary data. I am obtaining the raw data via TCP stream, the official JPEG specs say that the raw JPEG image data starts at HEX value 0xffd8 & ends at HEX value 0xffd9 as below... [CODE]Start …

Software Development c++ file-stream ios
0
109
Member Avatar for ziggystarman

Hi I'm looking for good tutorial/s about using boost::regex with c++ code examples any links would be really helpful... Many Thanks Steve PS not tuts about setting up boost, done that already.

Software Development c++ regex
Member Avatar for ziggystarman
1
236
Member Avatar for Dean_Grobler

Hi there, I've just switched to Eclipse. I've been using TextPad so Eclipse is pretty cool.. But I've been getting weird error messages that I don't understand/not used to. Here they are: [CODE]JButton btnEnter = new JButton("Enter"); btnEnter.addActionListener(this);[/CODE] Here the Error says: Multiple markers at this line. -Syntax on token …

Software Development java
Member Avatar for Dean_Grobler
0
200
Member Avatar for islam-morad

Hello guys, i'm studying the Java programming language. every thins were going very well, but once i have encountered RECURSION i started to feel so bad. there is a recursive method that is blowing my mind. I can't figure out how does it print that the sum of a set …

Software Development java
Member Avatar for islam-morad
0
132
Member Avatar for VBNew

Hi, I would like to create a table as attachement below is VB6, may I know what component name of this table? is this DBGrid? Thanks!

Software Development visual-basic
Member Avatar for AndreRet
0
84
Member Avatar for KrazyKitsune

Is there a way to hide functions and such when they happen? Example: [code=syntax]print func(x, y)[/code] from showing up when you run it? I want it still printing, just not visible. I want it to print.

Software Development python
Member Avatar for griswolf
0
107
Member Avatar for crodriguez08

Hey there, I'm having trouble getting my program to read the last instruction of the file, and so far, I haven't been able to figure out why. Any help would be appreciated. [CODE]/* The Simpletron Machine Language Program. The purpose of this program is to simulate a primitive computer. This …

Software Development c++ file-system operating-system
Member Avatar for crodriguez08
0
193
Member Avatar for Diamonddrake

I am working on a couple projects where I need to upload files from a client using my software to my webserver and then do some other things. But I would like the software to handles this automatically so the user doesn't have to worry with it. I am currently …

Software Development asp asp.net client-server
Member Avatar for Diamonddrake
0
162
Member Avatar for jemz

Hello can you help me,i have problem of this if i will use scanf("%c",&repz); my porgram will exit it will not loop to menu..but if i will change to %s this will loop to menu...but i declare variable repz as char...can you help me or explain on this why it …

Software Development c
Member Avatar for jemz
0
118
Member Avatar for jcfans

wen i write the data to notepad,i get the result below: <SRT>,160,[COLOR="Red"]161,[/COLOR] NEW,1001,1001,CAAB IMS,OTHER,31-12-07,MYR,28-09-10,1111,A,4127288.4600,0.0000,31-12-07,0,AGF,MYR,100101 NEW,1001,1001,CAAB IMS,OTHER,31-12-07,MYR,28-09-10,1111,A,175000.0000,0.0000,31-12-07,0,AGF,MYR,102101 <END>,[COLOR="Red"]4302288,[/COLOR] wat i wan is like below: <SRT>,160,[COLOR="Green"]161[/COLOR] NEW,1001,1001,CAAB IMS,OTHER,31-12-07,MYR,28-09-10,1111,A,4127288.4600,0.0000,31-12-07,0,AGF,MYR,100101 NEW,1001,1001,CAAB IMS,OTHER,31-12-07,MYR,28-09-10,1111,A,175000.0000,0.0000,31-12-07,0,AGF,MYR,102101 <END>,[COLOR="Green"]4302288[/COLOR] i don't wan [COLOR="Red"](,)[/COLOR] behind 161 and 4302288 Hope hav sum1 can answer my question.Thanks... [CODE] For Each row In dt.Rows …

Software Development vb.net
Member Avatar for jcfans
0
149
Member Avatar for nkinar

I have a string in Python that is comprised of code in C/C++ syntax. I would like to use regular expressions to search through this string and replace an expression of the form 'pow(a,b)' with 'a^b' I've attempted to do this, but my code does not seem to be working. …

Software Development python regex
Member Avatar for ptmcg
0
561
Member Avatar for jems5

I would like some help to index through an empty array and fill it with 10 entries one at a time. The objective of the task is to create a GUI with two buttons, one (Store) to save the value into array position and second (Quit) to run statistics calculations …

Software Development gui java java-swing
Member Avatar for jems5
0
157
Member Avatar for zachattack05

I've got a question about navigating memory streams. Memory stream properties aside (like making sure the stream can use seek etc...) if someone is storing variable or dynamic data in a stream, how can you retrieve that data? Like, for example if a user could store an image from their …

Software Development hard-drive
Member Avatar for zachattack05
0
118
Member Avatar for hq1

I have an assignment that i need to do and i have no idea how to do this, I was hoping someone would be nice enough to help me out, its a begginner program that needs to be done in visual stdio c++: Heres the assignment: Try to write a …

Software Development c++
Member Avatar for Fbody
0
461
Member Avatar for Sucrose

I have 6 rows of items in a ListView within 2 columns that are listed like so: [CODE]1 Milk 2 Pepsi 3 Juice 4 Water 5 Coffee 6 Tea[/CODE] I'm trying to make it so when you modify the number in the first column, it will sort the list based …

Software Development delphi listview pascal
Member Avatar for Ionelul
0
219
Member Avatar for aaronmk2

I am trying add two polynomials by overloading the + operator. When I run the program it only adds the first coeficients. I cannot figure out why it is only returning the first coeficient. [CODE] //header file #include <iostream> using namespace std; #ifndef _POLY_H #define _POLY_H const int CAPACITY =100; …

Software Development c++
Member Avatar for gerard4143
0
124
Member Avatar for toferdagofer

This is probably an easy one that i know but its not coming to me. Im supposed to be hardcoding the 6 instances of a movie class into the array that i have set up. I am unsure where i would do that in my actuall code. [CODE] public class …

Software Development java
Member Avatar for Ezzaral
0
3K
Member Avatar for unclepauly

hi, i have this code: [inlinecode] HINSTANCE hComponent = ::LoadLibrary("Component1.dll"); [/inlinecode] i get this compile error: Error 1 error C2664: 'LoadLibraryW' : cannot convert parameter 1 from 'const char [15]' to 'LPCWSTR' c:\Documents and Settings\Administrator\Desktop\Component1\Client1\Client1.cpp 9 so i changed the code: [inlinecode] HINSTANCE hComponent = ::LoadLibrary((LPCWSTR)"Component1.dll"); [/inlinecode] however GetLastError returns …

Software Development c++
Member Avatar for memphis.ray
0
992
Member Avatar for Sirovica

Hello everyone this is my first post on the daniweb community. Currently I am home sick with a nasty cold so I was trying to solve a programming problem on a wonderfull sight called Project Euler. The problem is as follows: If we list all the natural numbers below 10 …

Software Development c++ robotics
Member Avatar for frogboy77
0
149
Member Avatar for mrickert

Hi- Trying to rename a file using the rename() function. It works, but it appends an '@' to the end of the renamed file. Here's my code: [code=c] char oldname[] ="file1.csv"; char newname[26]; newname[0] = '3'; newname[1] = '1'; newname[2] = '1'; newname[3] = '3'; newname[4] = '3'; newname[5] = …

Software Development c++ file-system
Member Avatar for Fbody
0
126
Member Avatar for SpiritualMadMan

I am getting the following error when I try to access my Resource Files in Visual C++ v6 "The file is already open in an editor." I've tried closing all windows in the IDE and closing the project, even tried logging out and back in. All to no avail. A …

Software Development c++ ide
Member Avatar for SpiritualMadMan
0
425
Member Avatar for MikeThras

Hello to everyone, Well I'm a noob to C++, I just started two weeks ago, I'm trying to get a good head start before I start college next semester. I've done simple programs, but now I'm trying to create a body fat percentage calculator I guess you could say. but …

Software Development c++
Member Avatar for MikeThras
0
329
Member Avatar for SgtMe

Hi just a simple n00b question. I need to split a string (from a .obj 3D model format) into a list of three doubles (the vertices). example string: v 0.200006 -0.093641 0.584690 I want to make it into an array of (for example): {0.200006, -0.093641, 0.584690} I can get rid …

Software Development c++
Member Avatar for SgtMe
0
171
Member Avatar for Christ1m

Create a Person class to represent a person's contact information. Your Person class must consist of the following: PRIVATE members: string firstName,lastName; birthDate //you get to choose the data type, but the type you choose must be able to maintain a // 1 day resolution PUBLIC members: 1. Default constructor …

Software Development c c# c++
Member Avatar for Christ1m
1
1K

The End.