132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for a.muqeet khan

hello guys ! i have created a program just to understand how to return a value from using a recursive program what it does it thati have have two variable i.e first and last the value of first is zero and last is 10 not i want the function to …

Software Development c++ visual-studio
Member Avatar for Tumlee
0
165
Member Avatar for cali_kid

[code] #include <stdio.h> int max(int x, int y); int min(int x, int y); int main() { int grade, total, counter, avg; total = 0; counter = 0; printf("Enter grades: (-1 to end list)\n"); do { scanf("%d", &grade); if(grade != -1) { total = total + grade; counter = counter + …

Software Development c
Member Avatar for Tumlee
0
203
Member Avatar for CodeNinjaMike

Ok, I've been trying to wrap my head around this code for the longest time today, and I've tried to look up multiple web pages on how to solve my issue in a different way, but it's no use. There's something that Im not seeing that separates a regular array, …

Software Development c++
Member Avatar for mrnutty
0
4K
Member Avatar for jonnyboy12

Hello i am finishing up a pop3 program and now am looking for a way to view the html i receive form the pop3 server that comes along with some messages. People have told me to use a web browser but that seem over kill. Could i dissect a web …

Software Development c++ html-css web-browser
Member Avatar for thines01
0
174
Member Avatar for svatstika

Hello everyone! My idea is like this: Class MainWindow is a JFrame object, on which there is a JButton object (named button1). When I hit that button, the second window (this window is a JFrame object that is instance of class SecondWindow) will appear with a JTextField object (named textField) …

Software Development java java-swing
Member Avatar for NormR1
0
279
Member Avatar for jjsmithy

Hi everyone; I have a folder with images in, all JPG, and when the application starts up I want a listbox to display all of the image names, automated from the folder; Just wondering how to do that and if anyone can help? Thanks :)

Software Development
Member Avatar for jjsmithy
0
111
Member Avatar for Om Alooi

Hi I have several things I need help in it 1- how I can put picture in tool strip and put it convert to split button without the picture go invisible when i click on it 2- how can I make tabs in the forms 3- I want to put …

Software Development vb.net
Member Avatar for Begginnerdev
0
183
Member Avatar for dennysimon

hi all is there an installer for jar file ? (hopefully free ware) so client run setup.exe to install jar file ? thank you denny

Software Development java
Member Avatar for dennysimon
0
161
Member Avatar for niyasc

Following is the one of code written by me for shared memory. Problem is that program donot come outside from marked loop and read numbers infinitely. "common.h" [CODE] struct common { int a[10],b[10],c[10],flag; }; [/CODE] p1.c [CODE] #include<stdio.h> #include<unistd.h> #include<stdlib.h> #include<sys/shm.h> #include"common.h" int main() { int running=1; void *shm=(void *)0; …

Software Development c motherboards-cpu-ram
Member Avatar for niyasc
0
211
Member Avatar for dellat

I have a question on a very basic operation of modulo operator. [B]Why does 1 % 9 produce 1?[/B] If 10 % 9 then remainder is 1. I am very poor in math but have had to use modulo operator many times before but always become confused and couldn't understand …

Software Development c++
Member Avatar for dellat
0
120
Member Avatar for zukazen

Greetings, I'm making a program that draws a certain mathematics function. Here's the problem,my x and y axis aren't defined as the picturebox's. What I mean is that my axis are not located in the top left corner of the picturebox. So normally, the function would start from the top …

Software Development mathematics
Member Avatar for zukazen
0
168
Member Avatar for greatman05

So, I'm a bit confused with how inheritance works in relation to variables. Let's say that I had the following class: class Test { private: int var1; float var2; public: void getInfo(int,float); void setStuff(int,float); }; Now, let's suppose that I wanted to derive a class from that base class; I …

Software Development c++ oop
Member Avatar for Ancient Dragon
0
208
Member Avatar for kris222

what are the other types of variables in tasm ex: bh,bl,cx what else is there that i can use?

Software Development assembly
Member Avatar for kris222
0
99
Member Avatar for gunnerone

Hi I am working on Linux and I am trying to create a GUI app to go with my executable I have made. For some reason it unexpectedly ends. There is no error message, it just says in the Qt console window it unexpectedly ended with exit code 0. Can …

Software Development c++ gui qt
Member Avatar for gerard4143
0
199
Member Avatar for choosechrist

In my project all, my forms are accessed through my MDI form, [CODE]Private Sub DocumentCollectionToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DocumentCollectionToolStripMenuItem.Click Dim capture1 As Boolean = False capture1 = noduplicatemdi("DOCUMENT_COLLECTION") If capture1 = False Then Dim mdiForm As New DOCUMENT_COLLECTION mdiForm.MdiParent = Me mdiForm.Show() End If End …

Software Development vb.net
Member Avatar for choosechrist
0
175
Member Avatar for bernardz26

Good day!. I want to save my textbox to my sql database. this is my code: Dim con As New SqlConnection Dim cmd As New SqlCommand Try con.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\dbEvaluation.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" con.Open() cmd.Connection = con cmd.CommandText = "INSERT INTO Comment([Comment]) VALUES ('" & TextBox1.Text & "')" cmd.ExecuteNonQuery() …

Software Development open-source vb.net
Member Avatar for M.Waqas Aslam
0
89
Member Avatar for mpathma

Hi, I need to change size parameter of OvalShape, I have about 100 of them, named like OvalShape1, OvalShape1...... OvalShape100 Search the froum I noted this [url]http://www.daniweb.com/software-development/csharp/threads/367949[/url] This example works for Label, but throws error for OvalShape, following is my modified code that giving error; [CODE] For Count As Integer …

Software Development vb.net
Member Avatar for Reverend Jim
0
355
Member Avatar for BeeKeeper18

Right guys, I'm really new to this but I'm getting along ok, but I've hit a block. I need to be able to know how to search a text file in VB for a particular line and then display it. the files I'm trying to use are set up as: …

Software Development visual-basic
Member Avatar for kaozci
0
361
Member Avatar for jayadan

hey guys i did a program for converting number into words and i almost got through but my folks want it even possible for decimal numbers too buti couldnt make that possible and can anyone help me in this and i also attach the codes i did and if something …

Software Development java
Member Avatar for jayadan
0
161
Member Avatar for maxinville

I'm a having a serious problem creating variable. I am creating an application that gets its datas from a database, and before you can access the application you must login first. My problem now is my Login class can do all the validations but I don't know how to set …

Software Development java
Member Avatar for maxinville
0
205
Member Avatar for DEAD TERMINATOR

I'm working on a music player and I want to make it so that if I'm playing a song and I click on another song in the list the first song stops before I hit play on the second one, without having to manually stop the first. So just the …

Software Development audio file-stream gui java
Member Avatar for DEAD TERMINATOR
0
2K
Member Avatar for user543820

Hello! I am trying to implement search algorithms in a 2D grid. The problem I am facing is that let's say that I make a 2D grid in c++ through some array and also block some cells. Now how will I convert this grid into a binary tree to run …

Software Development algorithm c++
Member Avatar for L7Sqr
0
124
Member Avatar for a.muqeet khan

hello guys ! i have created a program just to understand how to return a value from using a recursive program what it does it thati have have two variable i.e first and last the value of first is zero and last is 10 not i want the function to …

Software Development c++ visual-studio
Member Avatar for a.muqeet khan
0
168
Member Avatar for <mono>

void ADD_QUOTE(){ do{ printf("\nPlease enter Length:\n"); scanf(" %d ", &length); }while(scanf(" %d ", &length)<200 || scanf(" %d ",&length)>4000); { while ((length[count] = getchar()) != '\n') putchar(length[count]); } return; do { printf("\nPlease enter Size:\n"); scanf(" %d ", &size); }while (size[count]<200 || size[count]>4000); do { printf("\nEnter which Board type you want: 'A'-4mm …

Software Development c
Member Avatar for zeroliken
0
226
Member Avatar for life4menu

I have a text file that has two columns one with time in milliseconds and the other with (x,y) coordinates. I created a JFrame in a class that extends JPanel. It shows a model of constructed ladder that we use in our experiments. Now I want to print some small …

Software Development java
Member Avatar for dennysimon
0
215
Member Avatar for Yarra

[B]I have a bank class below. What is the best way to add amounts to any instance variable in any of the constructors to make it o when i add different amounts from 2 or more different classes it will update in a way that when i call the method …

Software Development data-structure java
Member Avatar for stultuske
0
99
Member Avatar for Tygawr

Hello everyone, I've attempted to use ifstream to open and read a 20GB file but failed to do so (it takes a very very very long period of time...). So, I need find a fast way to open and read a 20GB .txt file in C++. Thank you!

Software Development c++
Member Avatar for Tygawr
0
255
Member Avatar for lanario

I'm lost based on the code provided, how to reduce a fraction down. I've looked on the internet and yes most are using global variables; I however, can not for my class. It must be within the function. And there needs to be two calls outside of each of the …

Software Development c++
Member Avatar for LUDACHRl5
0
603
Member Avatar for Tygawr

Hello everyone, I am having a hard time reading and writing a UTF-8 file in visual c++ 2010. [CODE] void ReadUTF8File() { ifstream UTF8File("C:\\DaniWeb\\Desktop\\UTF8File.txt"); /* UTF8File.txt: ☺☻♥♦♣♠•◘○ */ string UTF8FileStr; if(UTF8File.is_open()) { while(!UTF8File.eof()) { UTF8File >> UTF8FileStr; cout << UTF8FileStr << endl; /* cout: ∩╗┐Γÿ║Γÿ╗ΓÖÑΓÖªΓÖúΓÖáΓÇóΓùÿΓùï */ } } UTF8File.close(); } …

Software Development c++
Member Avatar for thines01
0
7K
Member Avatar for swissknife007

I am making a program to store all the powers of 2(1,2,4,8...) till 2 ^50000. Although I am getting the answer,I am not getting my answer in the required time limit. Any suggestions? How should I store the numbers? Here is my stupid code as of now [CODE] #include<stdio.h> #include<math.h> …

Software Development c
Member Avatar for histrungalot
0
206
Member Avatar for userct

I need to Compute 2x4 +7x3 -15x2 +3x+2 Using Horners Method. When I run this in QTSpim it doesn't give me any errors but I'm just wondering if everything is running completely right. For instance did I call "x" correctly? I'm trying to load the value for x from memory …

Software Development assembly mathematics
0
148
Member Avatar for FraidaL

I'm receiving this error when I'm trying to run my program: Program received signal: “EXC_BAD_ACCESS”. Does anyone know what this means?

Software Development c++ ide
Member Avatar for thines01
0
250
Member Avatar for shean1488

Hi everybody. I'm trying to split a string such that every array element would have characters between open and close prentesis. mmm let me just show: myString = "(2*((3-2)+(5-3)))" So my array should have values like that: myArray[0] = 2*((3-2)+(5-3)); myArray[1] = (3-2)+(5-3); myArray[2] = (3-2); myArray[3] = (5-3); I …

Software Development java
Member Avatar for J_A_L
0
20K
Member Avatar for zingwing

I need help figuring out how to count sentences from a .txt file. The following guild lines are what is considered to be a sentence: 1. A TERMINATOR followed by two spaces 2. A TERMINATOR followed by one space and end-of-line 3. A TERMINATOR followed by end-of-line 4. A TERMINATOR …

Software Development c file-system operating-system unix
Member Avatar for zingwing
0
283
Member Avatar for Raymond Pua

hello! how to make a program that replaces words in a file and replaces it with another word and saves it to another file. Using command line arguments.?

Software Development c
Member Avatar for WaltP
0
195
Member Avatar for Jorox03

I'm doing an assignment for school which is to simulate the grep command in C++. We are to take in a word to search, an input file to search through, and output file to output the results. The only text that should be in the output file is the contents …

Software Development c++ file-system
Member Avatar for WaltP
0
214
Member Avatar for rbran74

when using setprecision(2) when i try to display the number .90 it olny outputs .9 is there anyway to make it so that it display .90 instead of .9.

Software Development c++
Member Avatar for pattmorter
0
136
Member Avatar for FraidaL

I'm writing this program to calculate the best fit line. It's not finished. I'm doing it step to step to make sure it runs so I don't get lots of errors and totally freak out at the end. Right now it runs fine, but something is really off with the …

Software Development c++ mathematics
Member Avatar for FraidaL
0
238
Member Avatar for triumphost

I'm trying to help someone with homework.. So you do not have to give me direct answers if you don't want to.. it is not my homework. [CODE] class Types { //No default constructor.. Types(int Param1, int Param2); }; class Objects { public: Types* Original; Objects(); ~Objects(); }; //The problem …

Software Development c++
Member Avatar for triumphost
0
150
Member Avatar for Prisms

I am trying to compare a string from my text file to a user input i was wondering how I would do this I have tried the == operator but that seems to be getting me no where. I am currently trying to use the .compare() but it doesn't seem …

Software Development c++
Member Avatar for Prisms
0
213
Member Avatar for Quinncunx

I have a project for school where I am to create some form of security for an application, our brief was to basically to create and hide a text file in the applications program files (not all that secure really, but heh I don't write the briefs) So I have …

Software Development vb.net
Member Avatar for Quinncunx
0
161
Member Avatar for leiger

This code works perfectly fine when I run it as a class file (the font is located in the same directory) - however when I package it into a JAR file it can't find the font and the program crashes. The font is definitely being included in the JAR archive, …

Software Development file-system java
Member Avatar for karlmeier
0
4K
Member Avatar for Niner710

Hi, I created a numpy matrix(1 row, 3 cols) with the following values [4 6 8]. What I want to do is to concatenate all these values into a single entry of binary values. So instead of [4 6 8] I would want to have a numpy matrix of just …

Software Development python
Member Avatar for TrustyTony
0
135
Member Avatar for Bennys

Hello, I have a linked list with the following data in it reflecting a title (name), int (# copies) and float (price). I'm supposed to sort this linked list by prices (highest to low) and then print the titles. From what I've seen, the best method is using selection sort, …

Software Development c++ linked-list
Member Avatar for mazzica1
0
99
Member Avatar for james6754

I have a pointer to an array of integers... [CODE] double* three = new double[10]; for(int i = 0; i< 12;i++) { three[i] = i+1; } [/CODE] I assign i+1 to each place in 'three'...when I debug the code, I cannot see the values inside 'three' like in C#..it just …

Software Development c++
Member Avatar for jbennet
0
116
Member Avatar for triumphost

I need help changing my return type from int to vector<string>.. I don't want to have to pass the vector as a pointer to the function but rather I just want to return the vector itself as I no longer need to check the return type. If it fails, it'd …

Software Development c++ pascal
Member Avatar for mazzica1
0
181
Member Avatar for Mr.UNOwen

Hello, I'm using pause() to suspend threads until I need them and pthread_kill(thread, SIGCONT) to resume. It works the first time over with the thread unpausing the first time I send SIGCONT, but not the second time around. Does sending the signal cause it to be ignored and if so, …

Software Development c
Member Avatar for histrungalot
0
200
Member Avatar for gujinni

hi there. I am just new in java 3d why my program always says Exception in thread "main" java.lang.NullPointerException: Canvas3D: null GraphicsConfiguration at javax.media.j3d.Canvas3D.checkForValidGraphicsConfig(Canvas3D.java:963) at javax.media.j3d.Canvas3D.<init>(Canvas3D.java:1006) at pkgnew.New.<init>(New.java:39) at pkgnew.New.main(New.java:51) Java Result: 1 however, I already installed j3d and jre. I cannot run and compile my program. Nothing appears when …

Software Development java
Member Avatar for gujinni
0
120
Member Avatar for scott_liddle

Firstly, this is homework for my computing science class, but we are allowed to get help on the internet or using any other way we want. I'm trying to write a program to read in a file with user responses to questions (I.E. an automated handset vote) and then to …

Software Development data-science python
Member Avatar for hughesadam_87
0
116
Member Avatar for DAWNIE

Hi, Currently I'm trying to make multi selection (draw shape) on the picturebox but no matter how i edit my code, it jus dn draw any square or circle when I click on my button (either circle or square). Can some1 pls guide me on how I can get it …

Software Development vb.net
Member Avatar for polas5
0
2K

The End.