132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for nicolemarie

Java error- java:12: class, interface, or enum expected? class ProgrammingProject01 { public static void main(String blabla[]) { System.out.println("Hello"); World world1 = new World(); Turtle turtle1 = new Turtle(world1); } } public void drawN1() { this.penUp(); this.moveTo(50,50); this.penDown(); this.setPenWidth(5); this.setColor(new java.awt.Color(255, 0, 0)); this.turn(180); this.forward(50); this.turn(180); this.forward(50); this.setColor(new java.awt.Color(255, 200, 0)); …

Software Development java
Member Avatar for stultuske
0
277
Member Avatar for jehlaipixy

This is a plate, requirement for our semifinals. Enhance the addInterest method of the SavingsAccount class to compute the interest on the minimum balance since the last call to addInterest. Hint: You need to modify the withdraw method as well, and you need to add an instance field to remember …

Software Development java
Member Avatar for stultuske
0
1K
Member Avatar for dekker13

[CODE] public: Mixed(int whole = 0); Mixed(int whole, int num, int denom); bool SetFraction(int n, int d); bool SetFraction(int n, int d=1); bool SetValue(int w, int n, int d); int getWhole(); int getNumerator(); int getDenominator(); void showFraction(); double Evaluate(); void Simplify(); void ToFraction(); Mixed& operator++(); //prefix increment Mixed operator++(int); //postfix …

Software Development c++
Member Avatar for dekker13
0
294
Member Avatar for mahimahi42

Hi all, I'm working on a project for my CS class to go a little above and beyond the requirements. I have a simple GUI that takes in a username and password and checks a few things (needs uppercase and digit, etc), but I'm trying to have a JLabel that …

Software Development gui java java-swing
Member Avatar for stultuske
0
142
Member Avatar for long89

[CODE] class Circle { private double radius; private String colour; Circle() { } Circle(double r, String c) { this.radius=r; this.colour=c; } public void display() { System.out.println("Radius of circle is "+this.radius); System.out.println("Colour of circle is "+this.colour); } public String getColour() { return (this.colour); } } [/CODE] how calculate and display the …

Software Development java java-swing
Member Avatar for long89
0
154
Member Avatar for PhoenixInsilico

I am trying to parse an html file. But unable to remove spaces using \s (matching character for whitespace) [CODE]use strict; use warnings; open(FILE,"<paragraph.txt")|| die "Can't open para.txt"; my @file = <FILE>; my $all = join("",@file); $all =~ s/\n/ /g; $all =~ s/\./\. /g; $all =~ s/\s\s*/ /g; open (FIL,">paraone.txt")||die …

Software Development perl
Member Avatar for histrungalot
0
120
Member Avatar for lupacarjie

See I created a program that accepts three values from the user to be arranged as a linked list(ascending order). After it asks a number, it displays the content of the list. The output is like this: [CODE]Enter number: 6 List value: 6 Enter number: 4 List value: 4 6 …

Software Development c c# c++ linked-list seo
Member Avatar for lupacarjie
0
300
Member Avatar for npsgaming

I have put together some code for a homework assignment and I have almost got it working. There are a few key items that are missing or not fully functional and I am fresh out of ideas on how to attack it. The code is to take 9 digits/integers from …

Software Development algorithm c++ programming-construct
Member Avatar for deceptikon
0
204
Member Avatar for floatingshed

My first gui application is working fine. Fine, that is until the user forgets to select the output directory. I have set up an error message that, when clicked, directs the script to the open directory dialog. This works but I would prefer the user selected the open directory option …

Software Development gui open-source python
Member Avatar for Gribouillis
0
272
Member Avatar for Awais Ali

Can anyone help me by giving out a complete tutorial on the step by step way a connecting to a database using C++ ?

Software Development c++
Member Avatar for Awais Ali
0
78
Member Avatar for infantheartlyje

Hi folks, I'm having a doubt. I write a letter in notepad and i saved it as 'letter.txt'. Then i realized that i forgot to say one matter in that letter. So i opened 'letter.txt' using any text editor such as notepad, wordpad or something. Now i inserted the letters …

Software Development c
Member Avatar for deceptikon
0
237
Member Avatar for jonnyboy12

Hello all . I have just started using the gcnew instead of new for the public ref class, that i have needed to learn for windows forms. I have a problem that shouldn't be as difficult as it is. I have a class that i made called vector2 . It …

Software Development c++
Member Avatar for thines01
0
175
Member Avatar for Amiet Mhaske

Hey guys Hello, I am new a programmer. I am learning C, C++ and C#. But in future I am planning to make some serious applications using C#. Those applications would be based on LAN environment. So which books should I start to read for network programming using C and …

Software Development
Member Avatar for syd919
0
169
Member Avatar for ForceStr

Hello, can anyone explain me why I'm still one step behind with this code? [CODE]private void jTextField1KeyPressed(java.awt.event.KeyEvent evt) { try { DefaultTableModel model=(DefaultTableModel)jTable1.getModel(); model.setNumRows(0); String Name=jTextField1.getText(); String sql= "SELECT * FROM APP.Workers WHERE First_Name LIKE'" +Name+ "%'"; rs= stmt.executeQuery(sql); while (rs.next()) { String d1=(rs.getString("First_Name")); String d2=(rs.getString("Last_Name")); String d3=(rs.getString("Job_Title")); String d4=(Integer.toString(rs.getInt("ID"))); …

Software Development java
Member Avatar for ForceStr
0
180
Member Avatar for thedonedeal

I currently have the following bits of code: [CODE=VB.NET]Public Class MainFrm Private _storage As New List(Of StopwatchStorage) Public TotalParticipants As Integer Private participantLbl As Label Public participantName As TextBox Private participantClock As Label Private participantContinuation As New Stopwatch Public ParticipantStop As Button Private participantContinue As Button Private participantTimer As Timer …

Software Development storage vb.net
Member Avatar for thines01
0
158
Member Avatar for long89

how to write code include a try-catch statement to handle exception of this code. In the catch() statement, will provide a proper alert to the user on the error occurred. [CODE] import java.io.*; import javax.swing.JOptionPane; class TestArray { public static void main (String []args) { double a; double w; double …

Software Development java java-swing
Member Avatar for rushikesh jadha
0
429
Member Avatar for praset

I have problem when itegrate my webcam with JMF. I have got this following error, when i running JMFINIT or running jmfregistry and detect capture device. [CODE] Trying 6 352 288 Trying 6 768 576 Trying 7 160 120 Trying 7 320 240 Trying 7 640 480 Trying 7 176 …

Software Development java video-card webcam
0
147
Member Avatar for sajil123

Hi i have the following code. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim con As New OleDbConnection Dim da As New OleDbDataAdapter Dim ds As New DataSet Dim dsnewrow As DataRow Dim cb As New OleDbCommandBuilder(da) Dim a As String con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\DB.mdb;Jet …

Member Avatar for sajil123
0
2K
Member Avatar for riahc3

Hey I would like to do a ".bat' type of command in C#: Something automated. Im trying to run a program that is sort of shell itself so it just need to input certain words/letters into the command line box. Lets see if I can explain it better with a …

Software Development
Member Avatar for thines01
0
162
Member Avatar for Kjeks

Hey! I got a Java Project which runs fine when i call the Main class with the java command. Made it into a -jar file with: jar cmfv manifest kort.jar * the manifest file contains [code] Main-Class: src.KortBord [/code] with the line break at the end when i try to: …

Software Development java ubuntu
Member Avatar for JamesCherrill
0
386
Member Avatar for ruval002

ok, i need help with changing the state of a process. So far my struct Process has an integer which contains the priority and a pointer next which points to another process, and i need to add a state so that every time i call the function insert() it would …

Software Development c++ queue
Member Avatar for L7Sqr
0
468
Member Avatar for cubicbox

Hi everyone, I'm now nearly finished with my project which tells us to write a PASCAL program for entering the information of the employees. However, I came across a BIG problem is that I've got no idea on how to edit records in the text files or delete unwanted data …

Software Development file-system pascal
Member Avatar for pritaeas
0
3K
Member Avatar for sigridish

hi everybody! i already know how to save in excel using openfiledialog. but what i want to happen is that when i save another file, i want it to be saved in my existing file but in a different sheet. can you guys help me? this is my code for …

Software Development file-system listview vb.net
Member Avatar for sigridish
0
680
Member Avatar for dejanc

Hello, I'm need to create a small report to be send automaticliy from VB.NET Windows application. I have wrote below code which is workin on my private PC, and with Gmail settings, such as username + password + smtp.gmail.com, etc... But with, my work informations, like my proxy ID + …

Software Development email vb.net visual-studio windows-server
Member Avatar for dejanc
0
1K
Member Avatar for bhagawatshinde

Hi Guys, Can you have any idea about randomly shuffle the questions in database without affecting questions id. Let i will explain little bit more ...... read carefully 1) I have a table containing 5 questions like this que_id que 1 abc 2 bcd 3 efg 4 hij 5 klm …

Software Development
Member Avatar for bhagawatshinde
0
101
Member Avatar for jasbun

how to allow the user to select different pen thickness for the lines, eg. triangle, circle, square?

Software Development
Member Avatar for hericles
0
100
Member Avatar for sumanth232

#include<stdio.h> int ways(int n,int m) { if(n=0) return m; if(m=0) return n; else ways(n,m)=ways(n-1,m)+ways(n,m-1); //there is an error here.pls explain// return ways(n,m); } int main() { int a,b; printf("give a and b"); scanf("%d %d",&a,&b); ways(a,b); printf("the no of ways from (%d,%d) to (0,0) are %d",a,b,ways(a,b)); return 0; } what is …

Software Development c++
Member Avatar for MandrewP
0
926
Member Avatar for harrispc

Hi all, I need my form to automatically select the first entry in the datagrid view when it is loaded. I am having trouble finding the correct way to code it. [CODE] Private Sub CustomersForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cust = From customers In …

Software Development vb.net
Member Avatar for M.Waqas Aslam
0
1K
Member Avatar for bhagawatshinde

Hi guys, i used the query for randomly selecting questions from access but it will give me same result, i try it by passing different different values also passing time in rnd fuction but i will display same result. [CODE] DataSet ds = new DataSet(); string strsel = "select * …

Software Development c# dataset
Member Avatar for bhagawatshinde
0
311
Member Avatar for kolibrizas

1. I did try without trying to read output or trying to read only first line of the output - both of these were successful. 2. However when I try to display full output, it just gets stuck and does nothing. 3. Even more crazy stuff - when I close …

Software Development
Member Avatar for kolibrizas
0
664
Member Avatar for hamidvosugh

In this string "13 12", I like to find if there is an occurrence of '3', but I am not interested in char '3' which is part of "13". In other word I am looking for number 3 not 13. By using the following code in python I always get …

Software Development python regex
Member Avatar for Gribouillis
0
160
Member Avatar for chuyauchi

I have difficulty to declare the following type of array. 1/36, (one divided 36) 2/36, (two dvided 36) 3/36, 4/36, 5/36, 6/36, 5/36, 4/36, 3/36, 2/36, 1/36 [CODE]double exptRoll [arraySize] = { 1/36, 2/36, 3/36, 4/36, 5/36, 6/36, 5/36, 4/36, 3/36, 2/36, 1/36}; [/CODE] This doesn't work. Can someone tell …

Software Development c++
Member Avatar for MandrewP
0
99
Member Avatar for vb2learn

Hello Once again i need help. I have a webbrowser So once webbrowser is completed then it should add the specified value in [TEX]<input type="file"> [/TEX] value in php. Eg: Webbrowser link is [url]http://tinypic.com/[/url] When webbrowser is completed then this [url]http://screensnapr.com/e/LCgzhP.png[/url] value will be our specified value. I tried using …

Software Development vb.net web-browser
Member Avatar for sean7725
0
509
Member Avatar for chuyauchi

How can I set the [U]Actual rolls[/U] and [U]Expected rolls[/U] to no decimal, and [U]Actual percentage[/U] and [U]Expected percentage[/U] to 1 decimal plus a % symbol ? [url]http://images.plurk.com/a2f077138ef908ce71f46b08909c998d.jpg[/url] [CODE] cout << "Point" << setw(17) << "Number of Rolls" << setw(17) << "Actual Percent" << setw(17) << "Expected Rolls" << setw(17) …

Software Development c++
Member Avatar for mrnutty
0
193
Member Avatar for surajrai

Hi, I have seen in couple of places the code where ToString() method has been overriden. Like : class Employee : IComparable<Employee> { public int Salary { get; set; } public string Name { get; set; } public int CompareTo(Employee other) { if (this.Salary == other.Salary) { return this.Name.CompareTo(other.Name); } …

Software Development business-entrepreneurship
Member Avatar for darkagn
0
549
Member Avatar for Thisisnotanid

I need advice. I'm writing a calculator; I've got the basic functionality of it down, and have finally moved to having it process functions. In this regard, I find the standard library of mathematical functions provided by Python unsatisfactory. While the more commonly used functions are defined, some of the …

Software Development mathematics python
Member Avatar for Thisisnotanid
0
384
Member Avatar for Naggelos

Hi, I created an XML file that will hold the latest news and stories, and trying to display it now in my HTML file using Javscript (I scrapped XSLT, as it altered the CSS styling and alignments compared to the other pages and couldn't work my way around that). So, …

Software Development html-css xml
Member Avatar for ajcoder
0
220
Member Avatar for codechrysalis

ok so im making this console app in which I have to allow the user to enter any number of values then display orignal value , and then the percentage of the original value to the total. [B]My question is how do I initialize my memory locations correctly for a …

Software Development
Member Avatar for codechrysalis
0
239
Member Avatar for Rowdy Busch

Hi and Greetings, I am new to these forums, so if I submitted this to the wrong forum, my apologies. Before I get to my question, a little backstory. I was running an application on my laptop that was using Microsoft Vista, with Microsoft Office 32 bit and JRE 1.5. …

Software Development java microsoft microsoft-access
Member Avatar for Rowdy Busch
0
436
Member Avatar for irishsailor

I'm fairly new to java and need help. I need to show time required to travel somewhere by having the user input Speed and Distance traveled. And the outcome be a floating point value. lets say they put in 60 mph and 148 miles I Can't seem to get the …

Software Development java
Member Avatar for NormR1
0
1K
Member Avatar for floatingshed

Hello, newbie here to both this forum and Python, so expect silliness! My first project has been to build a GUI front end for some command line utilities I use regularly. One of them is the utility: eac3to which joins mp3 files together. It's command line is: "eac3to.exe infile1+infile2+infile3 outfile" …

Software Development gui python
Member Avatar for NewbieXcellence
0
2K
Member Avatar for Tiffany216

Assignment 2-a: Program 1: You are given the task of determining the download speed of an Internet connection. You decide to use two files whose size is known (in Kilobytes-KB). You will download the two different files, and record the time it takes to download each one. You will determine …

Software Development algorithm c++ printer
Member Avatar for DeanMSands3
0
124
Member Avatar for subone

Hi, I have a Java Final exam after few days. And I am looking for some website that contains [B]SOLVED [/B]programming exercises. Can anyone give me at least one site? Note: what I mean by [B]SOLVED [/B]is that I want the exercises to have solutions with them because I want …

Software Development java
Member Avatar for hfx642
0
290
Member Avatar for pritaeas

I am looking to encrypt data (preferably XTEA) on my .Net Micro Framework, send it to a webservice in .Net (Azure) and decrypt it there. I found this [URL="http://www.dmcinfo.com/Blog/articleType/ArticleView/articleId/83/Encryption-Compatibility-Between-NET-Micro-Framework-and-the-Full-NET-Framework.aspx"]blog post[/URL] but I am unable to get it to work. The encryption result on .Net differs from the .NetMF. I hope …

Software Development asp.net encryption
Member Avatar for pritaeas
0
206
Member Avatar for sonicx2218

I can't seem to figure out how to separate the code I wrote into 3 separate methods. 1. The main method, 2. the method that creates the strings i need and sends em back to the main method, 3. and the method that displays the if statement. [CODE]import java.io.*; import …

Software Development java
Member Avatar for stultuske
0
156
Member Avatar for chuyauchi

I'm making a dice program that calculates the statistics such as actual percentage, expected rolls and expected percentage and so on. I'm having a difficulty on the Pseudo random number generation. With two dice, the mim. sum of the dice is 2, not 1. There is something wrong with my …

Software Development c++
Member Avatar for DeanMSands3
0
153
Member Avatar for Joniniko

Alright so basically i need to create a simple maths game in C. Involving addition subtraction and multiplication of random numbers. But i also need to add a timer to that. So lets say you are given 10 seconds to answer the question and every correct answer adds you 10 …

Software Development c gaming mathematics
Member Avatar for JilMakias
0
455
Member Avatar for Labdabeta

I was working on a project when I thought that maybe a ::. operator would look funny in some code. Just for fun I typed that into the global scope area like this: [CODE]::. int main() { //etc...[/CODE] and my code completion software said too many results to display. My …

Software Development c++
Member Avatar for Labdabeta
0
200
Member Avatar for spyhawk

i have a given picture and have to create a picture that is twice as wide as the given picture. For each pixel (x, y) in the original picture, the pixels (2 * x, y) and (2 * x + 1, y) in the new picture should be set to …

Software Development image python
Member Avatar for NewbieXcellence
0
316
Member Avatar for xnycdplx

Hi I'm trying to read in actors from a file that I got off IMDB and I wanted it to be searchable to whenever the user enters an actors name, the program would output the movies the actor has starred or been associated with. I've gotten the search function to …

Software Development c++ ios
Member Avatar for Lerner
0
829

The End.