132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for jcAmats

I’m creating a program that displays random lines from a file. I have 8 lines on my text file and after displaying the last/8th random line… it displays [B][I]Segmentation fault[/I][/B] and then terminates the program. The program should display a message saying that there are no lines left to display. …

Software Development c++
Member Avatar for jcAmats
0
11K
Member Avatar for rayden150

I cant seem to save these data correctly I have mainly doubles and strings, I am saving these in a .txt file called "autosAudi.txt", I get these weird codes and boxes and sometimes for whatever reason Chinese in my textfields? Here is a example of what appears: [url]http://www.flickr.com/photos/63259070@N06/6449175293[/url] as you …

Software Development java java-swing
Member Avatar for hfx642
0
223
Member Avatar for Octet

I am creating a database search and I am having a bit of issue when I want to return to my main menu. I have attempted to use loops with no success, could anyone suggest how I can do this? [code] #include <iostream> #include <fstream> #include <windows.h> #include <string> using …

Software Development c++
Member Avatar for Octet
0
303
Member Avatar for eblanco1

Ok I was able to validate user input if the user would enter a larger number or a negative number but how do you validate if the user happens to enter a letter or word, even character i.e % # @, or if the user enters all. How do you …

Software Development c++
Member Avatar for Narue
0
589
Member Avatar for David321

I'm supposed to be making an inventory program with a logo. I can get the inventory part working fine in a jframe, and I can get the logo working fine in jpanel, but if I combine them it starts acting really weird. Every time I click a button, it generates …

Software Development gui java java-swing
Member Avatar for JamesCherrill
0
202
Member Avatar for learner guy

hi i am making my rook move with the help of validRook() and rookMove() functions.. i have placed validRook inside rookMove so that it is only executed when validRook return s true.. plz see if my validRook algorithm is correct(Note: this is phase 1 of my game and i just …

Software Development algorithm c++
Member Avatar for Schol-R-LEA
0
2K
Member Avatar for Stefano Mtangoo

Hi, I need to concatanate lines based on regex. Lines to be concatanated are scattered. All lines begin with number$number$number$number$sentences. There is nothing to mark the end of sentence, only the beginning. Here is an example. I want to rewrite this one [CODE]2 $5$233$ check big cat if it have …

Software Development python regex
Member Avatar for Stefano Mtangoo
0
215
Member Avatar for Unsated

Hi everyone i have this simple banking program here and i was hoping someone could help me jazz it up.. Something simple like making it easier to use or making it look better. Just trying to go beyond what was asked for.. [CODE] import javax.swing.JOptionPane; class MiniLab5z { public static …

Software Development java java-swing
Member Avatar for JamesCherrill
0
168
Member Avatar for oldezwe

I do not know how to do this and can not find how on google. I want to add code to my action listener to disable a jButton after it is clicked an then enable it again after x amount of time. anyone know how to do this?

Software Development java
Member Avatar for JamesCherrill
0
241
Member Avatar for toldav

Any will help will appreciated. Every time I run my code my list city still visible at run time how do i make not to visible when I run my vb code. [CODE]lstCity.Visible = False[/CODE]

Software Development vb.net
Member Avatar for TechSupportGeek
0
168
Member Avatar for persianprez

So here is what I'm trying to do: I have a file with a list of ip addresses eg.(123.45.6.789:80) I have two arrays; ip and port, what I want to do is break the address and place the parts into the arrays. so 123.45.6.789 would go into the ip array …

Software Development java
Member Avatar for JamesCherrill
0
125
Member Avatar for IcyFire

I have an assignment to make a craps game in c. The program i wrote runs but it always ends before it should. I think that the while loops in main have a problem but im not exactly sure wat the problem is because ive reviewed this code over and …

Software Development c gaming
Member Avatar for IcyFire
0
2K
Member Avatar for Octet

I am creating a MAC Database for my home network which shall contain a list of names of those on the network and allow me to quickly search for people when I get a warning about a user. I am using switch statements to go to each main section (sorry, …

Software Development c++
Member Avatar for Octet
0
193
Member Avatar for TurkAlush

Hey Can someone explain me how I can make a simple calculator, which can plus to numbers together.. And later make the program ask if user wants to multiply or divide..?

Software Development
Member Avatar for TurkAlush
0
1K
Member Avatar for ThomsonGB

I am just starting to use Visual Studio C++. Before I was working with UNIX (years ago). It looks like there are many things that I need to know. I copied a program from CPlusPlus.com and tried to compile it as a CLR console application. This is as far as …

Software Development c++ unix visual-studio
Member Avatar for ThomsonGB
0
508
Member Avatar for dre-logics

I use Visual Basic 2008 with Mysql I have a table article with the following data : Articlenb - Productcode - amount 1 - XXL - 1 2 - 12 - 1 3 - 10 - 1 4 - 1.5 - 1 5 - 7 - 1 6 - 4 …

Software Development vb.net visual-basic
Member Avatar for adam_k
0
193
Member Avatar for ekin5683

hye..its kinda easy..but i still cant solve it.. [QUOTE]1.Write a program that has an array of at least 10 string objects that hold student’s ids and names, you may make-up your own strings or use the following: “1000614921, Abdulkadir Musa Jibrin” “1000717859, Abdulwahab Ali Esmail Al-Nawah” “1000716597, Ahmed Ebrahim Mohammed …

Software Development c++ seo
Member Avatar for ekin5683
0
2K
Member Avatar for Joey_Brown

Hello; Is there a way in java to create a flip card effect. I have two pictures, that are to form a double sided card. Ive come with a way to snapshot them in different angles and finally iterate through them in a loop. Its not very good :) Is …

Software Development java
Member Avatar for hiddepolen
0
111
Member Avatar for efronefron

Server Code [CODE]import java.io.DataInputStream; import java.io.DataOutputStream; import java.net.ServerSocket; import java.net.Socket; /** * * @author efron */ public class Server { public static void main(String[] args) { try { ServerSocket serverSocket = new ServerSocket(Integer.parseInt("49999")); System.out.println(serverSocket.getLocalPort()); while (true) { System.out.println("Waiting for Client...(port = " + 49999 + ")"); Socket acceptSocket = serverSocket.accept(); …

Software Development client-server java socket-programming
Member Avatar for ~s.o.s~
0
1K
Member Avatar for pbracing33b

Hello Dani-Web participants, I have an problem, I currently have simulation that runs fine in console, and now our teacher wants us to put it into a GUI type format. The problem that I am having is that the cancel button and close (X) button does not work what so …

Software Development gui java
Member Avatar for mKorbel
0
2K
Member Avatar for vammy

Hi Guys, I want to enforce validation rule in create table statement for a coloumn. im using vb.net as front end and access as back end. could u please post a sample code here.help would b highly appreciated.

Software Development vb.net
Member Avatar for vammy
0
91
Member Avatar for vammy

Hi friends, i want to restrict -ve values entering into access database table.im using vb.net as front end... please help..

Software Development vb.net
Member Avatar for vammy
0
120
Member Avatar for Rizvi404

one from a datetime picker n the other is a text field.. Am using this query.. dim arrtime as datetime arrtime = (Ccur(txttime.value)+( Ccur(txtdot.text)).. It shows type mismatch error...

Software Development visual-basic
Member Avatar for WaltP
0
124
Member Avatar for f4fjks

Assalam U Alaikum Guys! can somebody help me how to convert a string to Char array? like if m having a string=("hello"); and i want to convert it to arr[5]={'h','e','l','l','o'}; is that possible.. or can somebody help me?

Software Development c
Member Avatar for WaltP
0
80
Member Avatar for UNDER-18 FG

Hi everyone. My assignment this time requires me to: [B]1.[/B] List down the marks obtained for each 5 Quizzes. [B]2.[/B] Choose the best 2 highest marks out of the 5 Quizzes. [B]3.[/B] To make the "best 2 highest marks" becomes the ultimate Quizzes total mark which has a 10% carrying …

Software Development c
Member Avatar for WaltP
0
89
Member Avatar for Dakot

hello , whet i compile , i get these errors , but i dont know where i mistaked g++ -Wall -o "untitled" "untitled.cpp" (in directory: /home/btwnix/Documents/Projects) untitled.cpp: In function ‘std::string bunnynames(std::string)’: untitled.cpp:14:14: error: no matching function for call to ‘tolower(std::string&)’ untitled.cpp:14:14: note: candidates are: /usr/include/ctype.h:116:12: note: int tolower(int) /usr/include/ctype.h:116:12: note: …

Software Development c c# c++
0
306
Member Avatar for Awais Ali

Can anyone tell me about the "pseudo stack" ?? Also tell me some implementation... I have googled but there is nothing..

Software Development c++
Member Avatar for Awais Ali
0
217
Member Avatar for mkbear

Hey so Im a beginner, and I need some help. My professor gave us this code: [CODE] def average(list): total = 0.0 for number in list: total += number return total / len(list) [/CODE] Then, he asked us to rewrite that program so that it uses a while loop instead. …

Software Development programming-construct python
Member Avatar for askandstudy
0
205
Member Avatar for new_in_c

I HAD A PROBLEM IN MY PROGRAM. MY PROBLEM IS ON HOW TO COMPUTE THE MONEY BREAKDOWN OF THE WITHDREW MONEY. PLEASE HELP ME..THANKS FOR ALL COMMENTS AND SUGGESTIONS.. #include<iostream.h> int main(){ int bd; char transaction; int withdraw, deposit, money; double balance = 50000; cout<<"What transaction do you want?"<<endl<<endl; cout<<"[1]DEPOSIT"<<endl; …

Software Development c++
Member Avatar for theguitarist
0
81
Member Avatar for Lucretius

So I have an assignment where I have to read in a file that contains 6 blobs of X's, and delete them one blob at a time using a recursion. The blobs of X's don't touch, so once it hits an X, it deletes that blob of X's, adds 1 …

Software Development c++
Member Avatar for theguitarist
0
100
Member Avatar for desolatebeast

hello all, Im trying to make a command line parser and honestly am having trouble starting it. I need a function called parse which reads one line of user input and creates an array of the strings found in the input. the function should be passed the array and reference …

Software Development c++
Member Avatar for thines01
0
164
Member Avatar for MrEARTHSHAcKER

Hi, What's wrong with this code: [CODE] //Comments explain what I check int Array[9]={1,2,3,4,5,6,7,8,9}; int Integer=0; int i=8,n=0; for(int x=0;x<9;x++) cout<<"array="<<Array[x]<<endl; //Are all members ok? for(int exp=0;i>=0;i--){ Integer+=Array[i]*pow(10,exp); cout<<"Integer1="<<Integer<<endl; //Is Integer being summed fine? exp++; } cout<<"Integer="<<Integer<<endl; [/CODE] Program's function is to create an integer from array ( for example: …

Software Development c++
Member Avatar for mazzica1
0
118
Member Avatar for nyfan68

I have an assignment that I am almost finished with but I am trying to figure out why my code won't compile. I believe the issue to be minor but I can't seem to figure out the bug. The problem call for me to build an inheritance heirarchy that a …

Software Development c++
Member Avatar for mazzica1
0
103
Member Avatar for AurosGamma

Hello there. I'm making a simple Pacman game because I'm practicing C# (I've never programmed in C# before), but I ran into a problem. Here is my code: [CODE]void addGhost(object sender, EventArgs ea) { Random random = new Random(); int ghostNum = random.Next(5); // Here I use and enum I've …

Software Development c# ide
0
169
Member Avatar for walid86

Anybody know how to have a power factor in text.. 100 m2 etc.. is it a unicode character? thanks

Software Development
Member Avatar for walid86
0
104
Member Avatar for sam1

hi, I am trying to replace an integer in string or list...what i have done is to use foreach loop..but it wouldnt replace it. The whole idea is that i have few lines of string in list and want to find a line and replace the int with another int,,, …

Software Development
Member Avatar for thines01
0
95
Member Avatar for mhariharasudan

Hi, I am a new Java Programmer.could you help me in resolving this. I am trying to created a JPanel withing a main JPanel. For the nested one, i have included Grid Layout and i am trying to add components to it dynamically. i.e i have added a combo box …

Software Development gui java java-swing
Member Avatar for mhariharasudan
0
1K
Member Avatar for tallygal

I'm creating a sales commission application. I have to use a Select....Case statement to implement the sales commission schedule. When the calculate button is clicked, three methods should be called. One to calculate gross sales, one to calcuate the commission percentage based on the commission schedule and one to calculate …

Software Development vb.net
Member Avatar for tallygal
0
246
Member Avatar for mkbear

Hey so Im a beginner, and I need some help. My professor gave us this code: def average(list): total = 0.0 for number in list: total += number return total / len(list) Then, he asked us to rewrite that program so that it uses a while loop instead. So far …

Software Development programming-construct python
Member Avatar for inuasha
0
223
Member Avatar for jackmaverick1

Before you read this, please don't say how I could make this better, I've thought of it, or because of the circumstances, it's not possible. I'm having a problem where when I input a command into the Runtime class's exec function, it doesn't run. When I try the exact same …

Software Development java
Member Avatar for NormR1
0
295
Member Avatar for arubajam

I have a snippet of code and am trying to make sure I am doing this right. Here is what I have so far and what needs to be done. Any help would be great [CODE]#include <iostream> using namespace std; const int NUM_TEACHERS = 3; class Teacher { public: Teacher(); …

Software Development c c# c++
Member Avatar for arubajam
0
192
Member Avatar for umsungun

import javax.swing.*; class ch9reverse{ public static void main (String [] args){ int Character, count = 0; char letter; String Str; Str = "The gate to Java nirvana is near"; [COLOR="Green"]For this must print out the "ehT etag ot avaJ anavrin si raen[/COLOR] Character = Str.length(); System.out.print(reverseString(Str));

Software Development java java-swing
Member Avatar for zeroliken
0
94
Member Avatar for Jdan2388

RK TEAM YDS YDS/G PASS P YDS/G RUSH R YDS/G PTS PTS/G 1 Philadelphia 4951 412.6 3066 255.5 1885 157.1 271 22.6 2 New Orleans 4946 449.6 3566 324.2 1380 125.5 362 32.9 3 New England 4724 429.5 3510 319.1 1214 110.4 331 30.1 4 Green Bay 4414 401.3 3345 …

Software Development c++ file-system
Member Avatar for Clinton Portis
0
140
Member Avatar for cool_intentions

Hello guys, I have a small problem, and searching for solution. I am trying to write program that will write all numbers from 00000000 to 99999999 into txt file. Result in txt should look like this 00000001 00000002 00000003 So, how can I do this? Thanks

Software Development
Member Avatar for thines01
0
208
Member Avatar for Prisms

Hey guys I have this code snippet and I want to read from this file and print the contents of my text file (Transcript.txt) to the screen. I don't have any errors but when I run the program it prints "Display it to the standard output" instead of whats on …

Software Development display file-system java
Member Avatar for NormR1
0
242
Member Avatar for blackhawkss4

I am doing a project that produces a gradebook for an amount of students and exam scores. the project link is [URL="http://www.ecst.csuchico.edu/~chmorris/csci111/projects/06/"]http://www.ecst.csuchico.edu/~chmorris/csci111/projects/06/[/URL] There are some additional things I need to produce besides being able to print the array chart, but I am stuck and have been trying to solve this …

Software Development c c# c++
Member Avatar for ravenous
0
213
Member Avatar for Mindless Z

I'm working on a project and i'm having a bit of trouble. the basic idea is to make an employee database using a basic structure. the program is to have 3 files and in the header file the professor wants the function prototype to be: [CODE]int addEmployee (struct employee *, …

Software Development c
Member Avatar for Mindless Z
0
156
Member Avatar for hfx642

[B][I]This it only for people who are running a DUAL Monitor system.[/I][/B] I wrote a sample program to display what occurs. No matter which button I click on (Primary Display OR Secondary Display), the JOptionPane will pop up on the Primary Display. What I would like to happen is... If …

Software Development display java java-swing
Member Avatar for hfx642
0
962
Member Avatar for nyfan68

I have an assignment that calls for me to make a class called RationalNumber with the following capabilities: a)Create a constructor that prevents a 0 denominator in a fraction, reduces or simplifies fractions that are not in reduced form and avoids negative denominators. b)Overload the addition,subtraction,multiplication and division operators for …

Software Development c++ file-stream
Member Avatar for Schol-R-LEA
0
386
Member Avatar for jlharri9

I have tried everything with this problem and I cannot get it to work. My program complies and I get no errors but it is not catching my exceptions. The exception is that no grade should be less than zero or more than 100. I can find the average and …

Software Development c++
Member Avatar for Schol-R-LEA
0
219

The End.