132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for FraidaL

I'm writing some while loops but I feel like there is a better way to write them. [CODE]int i=3; while (i<31) { cout << i << " "; i+=3; } //this one is for the first 10 terms of a sequence starting with 3 and adding 3 each time. int …

Software Development c++
Member Avatar for zeroliken
0
211
Member Avatar for lassy85

The program has no errors and when ran will show the logo, buttons but not the inventory data. I have been working on figuring out why it will not display the cd information with no luck. Could use some fresh eyes to look at this and help me figure out …

Software Development display gui java java-swing
Member Avatar for lassy85
0
191
Member Avatar for sfurlow72

What's the difference between having a const function and declaring const after the function? For example, if I had a class Myclass with some private data members and I set up a public function called int getMyValue(), what would the difference be between declaring that function as: [CODE]const int getMyValue();[/CODE] …

Software Development c++
Member Avatar for L7Sqr
0
181
Member Avatar for O_mini

Program created in BlueJ: For this Assignment I am to create a magic square from odd numbers >= 3 input by the user. I want to test my code to see if it works, but I can't figure out how to actually print the square from the number input by …

Software Development java
0
439
Member Avatar for BIGGDRE10

Ok im writing a program in java thats suppose to Use a while loop, to print the lower case alphabeth and its corresponding ascii values of the upper case alphabeth from Z to A So far i came up with while (counter +32) (char) (counter +32) if (counter < ?) …

Software Development java
Member Avatar for zeroliken
0
109
Member Avatar for nivek10

class class1 { //variable declaration }; class class2 { public: int func(void *msg); // others func... }; int class2::func(void *msg) { class1 *pointer = (class1 *)msg; //others declaration. } I would like to ask reagrding on this line of code : class1 *pointer = (class1 *)msg; the class declaring a …

Software Development c++
Member Avatar for nivek10
0
380
Member Avatar for triumphost

When do I really need to use Delete in Destructors? if I do Point P = new Point(); I've been told every time I use new, it stays in memory even when out of scope and that I should use delete to remove it.. so do i need to do …

Software Development c++
Member Avatar for triumphost
0
762
Member Avatar for iraj.jelo

Hi friends, I want create a image Button by hovering mouse event as a pushbutton,how i to do?

Software Development image python
Member Avatar for iraj.jelo
0
124
Member Avatar for james6754

I have put my code in to separate classes instead of having it just inside one class. Here is my constructor, I have also included my file which defines the class (#include "Matrix.h") [CODE] Matrix::Matrix(int* m,int* n)//constructor takes two ints { M = (*m); N = (*n); this->ptr = new …

Software Development c++
Member Avatar for thines01
0
108
Member Avatar for Skraight

For some reason my output is not showing right when I run it. I am showing the code and providing a screen shot of what it's doing. It's bunching lines together. [CODE]public void requestData() { System.out.print("What is the model number?"); modelNumber = scan.nextLine(); System.out.print("What is the camera brand?"); brand = …

Software Development java
Member Avatar for NormR1
0
158
Member Avatar for LFCFan_07

Hello, I need assistance with this java program I am writing, Im trying to make two buttons and when you click the button, it has a counter, and everytime you click it it prints a message saying I was clicked n times. This is what I have so far and …

Software Development gui java java-swing
Member Avatar for mKorbel
0
2K
Member Avatar for RafasLad

Hi all, first of all thank you to everyone who helped me out last night with my problems, now I need some help again. I have a menu and submenu system, this submenu contains information about locating a driver's location, I want to be able to do a search within …

Software Development c c# c++
Member Avatar for skatamatic
0
189
Member Avatar for emreozpalamutcu

Currently I have this code: [CODE]public static class SizeUnit { public static string FileSizeToString(long size) { double FileSize = size; string[] format = new string[] { "{0} bytes", "{0} KB", "{0} MB", "{0} GB", "{0} TB" }; int i = 0; while (i < format.Length && FileSize >= 1024) { …

Software Development microsoft
Member Avatar for emreozpalamutcu
0
167
Member Avatar for ThomsonGB

I am trying to parse main(argc, argv[]); and i need to look at individual characters with in the strings pointed to by *argv[]. I though of a string as an array of chars. This builds fine but causes an error in execution. So what is a simple and straight forward …

Software Development c++
Member Avatar for ThomsonGB
0
1K
Member Avatar for boiishuvo

I am trying to make a python that can remove any occurences of any word in stopwords from the wordlist, but I don't know what is exactly wrong with this program. Any suggestions? [code]STOPWORDS = ['a','able','about','across','after','all','almost','also','am','among', 'an','and','any','are','as','at','be','because','been','but','by','can', 'cannot','could','dear','did','do','does','either','else','ever','every', 'for','from','get','got','had','has','have','he','her','hers','him','his', 'how','however','i','if','in','into','is','it','its','just','least','let', 'like','likely','may','me','might','most','must','my','neither','no','nor', 'not','of','off','often','on','only','or','other','our','own','rather','said', 'say','says','she','should','since','so','some','than','that','the','their', 'them','then','there','these','they','this','tis','to','too','twas','us', 'wants','was','we','were','what','when','where','which','while','who', 'whom','why','will','with','would','yet','you','your'] def remove_stop_words(wordlist, stopwords=STOPWORDS): wordlist …

Software Development python seo
Member Avatar for HiHe
0
833
Member Avatar for efficacious

hi all, total noob here with assembly. I'm working on a project for one my classes and for some reason we all keep getting segmentation faults when attempting to run the program. I can't for the life of me figure out what the heck is going on and why this …

Software Development assembly
Member Avatar for efficacious
0
355
Member Avatar for kuramahiei

[CODE] void command() { int CourseDistance, StartTime, FinishTime; char cmdChar = ' '; do { cout << "Command? : "; cin.get(cmdChar); switch (cmdChar) { case 'd': case 'D': cout << "Enter New Course Distance (NM): "; cin >> CourseDistance; break; case 's': case 'S': cout << "Enter New Race Start …

Software Development c c# c++
Member Avatar for kuramahiei
0
172
Member Avatar for 909kidd

Hello, I and doing a ball bounce project for Vpython and I am trying run the program I wrote. I keep getting an invalid syntax error, but I am unable to find any. Please help. [CODE]from visual import* wallA = box(pos=vector(0,6,0), size=vector(12.1,0.2,12.1), color=color.red) wallB = box(pos=vector(0,-6,0), size=vector(12.1,0.2,12.1), color=color.green) wallC = …

Software Development python
Member Avatar for HiHe
0
178
Member Avatar for lena1990
Member Avatar for lena1990
0
222
Member Avatar for triumphost

I did not know WHERE to ask this as there is no "General" section on the site this site that I know of. Lets say I found code online but it's under the GPL 3 License.. I read it but it doesn't say that I cannot translate it from Pascal …

Software Development c++ pascal
Member Avatar for mike_2000_17
0
103
Member Avatar for cookiemonstah

Hey guys, first, i wanna say sorry if i'm not making any effort on doing my job here, but im really new to assembly language, i just started like a month ago without any good source. I got a problem here, i was asked to make a program which a …

Software Development assembly
Member Avatar for NotNull
0
10K
Member Avatar for luiseduardo14

Hey guys, i'm trying to compile this piece of code with nasm in Ubuntu. It's a boot loader for a simple operational system i'm doing as a university project. [CODE][BITS 16] ; 16 bit instructions [ORG 0x7C00] jmp word load db "ONYXDISK" ; OEM Label String dw 512 ; Bytes …

Software Development assembly ubuntu
Member Avatar for NotNull
0
360
Member Avatar for gabriellogan

I want to modify this Radix sort C++ to work with strings only. I want to sort words not numbers. I don't know what to change or where to change it. Any suggestions? [CODE] // CS 9F // March 3, 2012 // Include files #include <iostream> // used for cin, …

Software Development c++ ios queue
0
106
Member Avatar for steohl

Hello My first post here. I'm trying to create a dynamic html page from vb.net. Here is my code. I get the error "'DataTable' is a type and cannot be used as an expression" Do you know how to solve this : [CODE]' Create a new XML document. Dim xmlDoc …

Software Development vb.net
Member Avatar for hericles
0
744
Member Avatar for Hypnos_16

[I]Create a program called, Containment, that accepts three command line arguments, a file that contains a list of shapes, and a pair of numbers the specifies the (x,y) coordinates for a point. The program should print out the list of shapes, and a true/false value that indicates if the point …

Software Development java
Member Avatar for Hypnos_16
0
229
Member Avatar for skatamatic

How do you set the Z order on a control in VB6? There doesn't seem to be a property for it... It seems as though I have no control over which control takes the foreground :( I suspect it is based on the order they are declared in the .frm …

Software Development ide visual-basic
Member Avatar for skatamatic
0
284
Member Avatar for dsmith12

I want the program to compare what the user puts in and then compare that string to something in an array and see if it is a match. Here is code for things already put into array [CODE]private static void createExistingUserData(Scientist[] scientist){ scientist[0] = new Scientist("user1", "password1"); scientist[0].setDob("02/02/1995"); scientist[0].setSsn("612-45-7070"); scientist[0].setApplicantName("Peter …

Software Development engineering java oop
Member Avatar for NormR1
0
447
Member Avatar for Chuckleluck

Hello, Suppose I have a chess game. I make a nice class to handle an entire player's pieces: [CODE]class c_ChessTeam { private: // all pieces derive from class c_ChessPiece c_Rook Rook[2]; c_King King; c_Queen Queen; c_Bishop Bishop[2]; c_Knight Knight[2]; c_Pawn Pawn[8]; public: . . . };[/CODE] But what if I'm …

Software Development c++
Member Avatar for mrnutty
0
182
Member Avatar for abed1986

Hello everyone, I have a program that intends to create a doubly linked list of structures, using the following header (q1.h): [CODE=c]typedef struct lNode* ListNodePtr; typedef struct lNode { char* string; ListNodePtr next; ListNodePtr prev; } ListNode; [/CODE] This is my implementation: [CODE=c]#include "q1.h" #include <stdio.h> #include <stdlib.h> #include <string.h> …

Software Development c linked-list
Member Avatar for abed1986
0
823
Member Avatar for nicewave

I added a Button on my form, I want to arrange it's location precisely to the pixel on the form. Does anyone know how I can do that? Thanks in advance.

Software Development
Member Avatar for nicewave
0
188
Member Avatar for dirzy

Hi I have a problem with dice game. So I have a dice game , but I want to see the picture of the dice every time the player throws the dice not only the number.. I dont know how to make it, do I need to rewrite the random …

Software Development gaming
Member Avatar for Mitja Bonca
0
288
Member Avatar for ventura1

Hi: I’m looking for visually appealing, robust Help component to add to my (.NET C#) Windows form. It must have search & indexing etc and docking. Appreciate any recommendations. Thanks!

Software Development c c# c++
Member Avatar for Mitja Bonca
0
185
Member Avatar for MxDev

Hi guys, I just purchased SCJA exam simulator from whizlabs and i pass the final exam with over 92% but i'm still afraid to fail in the real exam. So, what else i need to do to ensure passing the exam?? Thanks

Software Development java
Member Avatar for MxDev
0
96
Member Avatar for Murphyv10

Just need someone to confirm that what ive done is good . It compiles but i need confirmation that its good and up to standards . this is the first class import java.io.Serializable; public class Flight implements Serializable { //instance variables private String flightNumber; private String day; private String destination; …

Software Development java
Member Avatar for Philippe.Lahaie
0
99
Member Avatar for timosoft

Hello. i will like to generate four numbers at random, that will total 100 and assign each to a textbox. thanks for your help.

Software Development vb.net
Member Avatar for timosoft
0
928
Member Avatar for prasenjit_das

Hi ALL, Which c++ compiler is best creating graphics related project.please suggest me. thanks in advance

Software Development c++
Member Avatar for DeanMSands3
0
2K
Member Avatar for zmariow

Hi All, I need to find a way to automatically print a PDF file from my Windows Application in C#. Currently I can invoke the following from the command line: "C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe" /p /h "C:\Test.pdf" This will silently print the PDF file but will keep Acrobat Reader open (but …

Software Development adobe c# pdf
Member Avatar for winnercom
0
3K
Member Avatar for riahc3

Hey I have this code: This is my main part of my program: [code=Java] import org.apache.commons.pool.ObjectPool; import org.apache.commons.pool.impl.GenericObjectPool; import Fecha; public class someclass { private GenericObjectPool<Fecha> fechapool; public boolean somefunction() { System.out.println("Im going to set set actives"); fechapool.setMaxActive(5); System.out.println("set actives sets"); } { [/code] It doest get to the "set …

Software Development apache java
Member Avatar for riahc3
0
399
Member Avatar for emreozpalamutcu

I'm making a mini disk cleaner and I have wrote this code: [CODE]listView1.Items.Clear(); DirectoryInfo dirCustom = new DirectoryInfo("C:\\Windows\\"); FileInfo[] filCustom; filCustom = dirCustom.GetFiles("*.txt"); foreach (FileInfo filFile in filCustom) { listView1.Items.Add(filFile.Name, "test"); }[/CODE] However there are some missing parts, works fine but i need to search multiple path and extensions and …

Software Development display
Member Avatar for emreozpalamutcu
0
165
Member Avatar for easterbunny

Hi, i got a form with 10 button and i want to get the button name of the mouse click in a string variable i tried this: [CODE] private void Button_Click(object sender, RoutedEventArgs e) { string buttonName = ""; if (sender is Button) { buttonName = ((Button)sender).Name; MessageBox.Show(buttonName); } } …

Software Development vb.net
Member Avatar for easterbunny
0
4K
Member Avatar for tartosha

Write a program that reads characters from the keyboard until a period is received. Have the program count the number of spaces and display it to the user. After that, ask the user if he/she would like to count a specific character. Terminate when the user is done counting the …

Software Development java
Member Avatar for stultuske
0
213
Member Avatar for sah

how to develop a crop selection control like photoshop's in c# 4.0 in widows form application. I have a windows form application in c# 4.0 that can crop images. At first you have to draw a rectangle using mouse to select the cropped region [CODE]private Point _pt; private Point _pt2; …

Software Development c#
Member Avatar for ddanbe
0
452
Member Avatar for minxminx

This is a code which sorts arrays. I use clock_t to determine the processing time for my code. However, it always stacks with the time taken from before. It looks like it's just adding the results. [code] int main(int argc, char *argv[]) {unsigned long n;//size of array -- long for …

Software Development algorithm c c# c++ perl
Member Avatar for Labdabeta
0
627
Member Avatar for jtbens01

Hi all, I'm having trouble will inheritance in c++. I am using a BaseNode class and deriving other node classes that can except different types of data. The problem I am running into is I can't find a way to make a decent copy function that can make an exact …

Software Development c++
Member Avatar for mrnutty
0
132
Member Avatar for Wolxhound90

Hey guys, Having a bit of a problem. I have loaded a list of values from a mysql database into a CheckedListBox and want to be able to select them to eb used in a query. The CheckedListBox shows the data as table_name.attribute_name, and when an item is selected I …

Software Development vb.net
Member Avatar for Wolxhound90
0
575
Member Avatar for jjones3580

My wife and i own a contemporary pottery studio that offers what we call pottery perks program. Where in we offer a 20 gift certificate for every six times a person reaches a $20.00 limit. Having a lot of customers and keeping our little pottery perks information cards are starting …

Software Development vb.net
Member Avatar for AndyOwl
0
154
Member Avatar for utkarshsahu
Member Avatar for utkarshsahu
0
136
Member Avatar for DelphiGuy

Hello, basically I want to have two TImage components, one I will use and using the Bitmap tools in Delphi I will create a background. In the second TImage I will create objects which move around the custom background but I still want the first TImage to be visible. The …

Software Development delphi pascal
Member Avatar for pritaeas
0
470
Member Avatar for DontQueef

Hey guys, I am taking my first quarter of java at college and i'm having some difficulties with just 1 method for my current assignment. I wasn't planning on getting help, but I've been stuck on this for hours now, so i've decided to go to the pros. Here's what …

Software Development java
Member Avatar for NormR1
0
123
Member Avatar for dineshswamy

i did a simple bubble sort but it is ot working . help me out. [CODE] #include<stdio.h> main() { int i,j,k; int a[]={7,9,4,2,3,6}; for(i=0;i<7;i++) for(j=i+1;j<7;j++) if(a[j]<a[j-1]) { k=a[j]; a[j]=a[j-1]; a[j-1]=k; } for(i=0;i<7;i++) printf("a[%d]==>%d",i,a[i]); } [/CODE]

Software Development c
Member Avatar for dineshswamy
0
110

The End.