132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for UNDER-18 FG

Hi, I've been given an assignment to write a java program that determines if a random given number is Prime OR not. But we also have to make comments in each lines, explaining the function/purpose of each lines to this java coding. So far, I've gotten the program corrected! All …

Software Development java
Member Avatar for JamesCherrill
0
293
Member Avatar for kevin.deasis.1

My problem with my TIC TAC TOE game is that it does not save end the game when someone has won if they have more than four moves. THe method of my code to check if someone has won is that it goes over a list of list. The list …

Software Development python
Member Avatar for woooee
0
405
Member Avatar for subhraakasuny

hi folks,basically i am facing a problem importing a package, dir structure is like src |---com |---example |---model |---BeerExpert.java package com.example.model; import java.util.*; public class BeerExpert { public List getBrands(String color) { //code goes here } } src |---com |---example |---web |---BeerSelect.java now in BeerSelect.java i am importing the BeerSelect …

Software Development api java
Member Avatar for subhraakasuny
0
422
Member Avatar for shhh

Imports MySql.Data.MySqlClient Public Class Form1 Public sConnection As New MySqlConnection Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If sConnection.State = ConnectionState.Closed Then sConnection.ConnectionString = "SERVER = localhost; USERID = root; PASSWORD =; DATABASE = vb;" sConnection.Open() End If LoadPeople() End Sub Public Sub LoadPeople() Dim …

Software Development vb.net visual-basic
Member Avatar for Pgmer
0
129
Member Avatar for Mirfath

Hi! I am designing a form which contains a datagridview which can display all customer orders. I also have a button inside the datagridview so that if a user clicks the button it will open another form which contains the items which the customer ordered in a datagridview. I am …

Software Development c# vb.net
Member Avatar for pritesh2010
0
1K
Member Avatar for gelaisg18

Hi guys can you please help me with this. All I need to do is input a number and display the corresponding alphabet.For example 2 then the output should be A B.. I am working on a code but my problem is the output is displaying together with a special …

Software Development c display
Member Avatar for gelaisg18
0
526
Member Avatar for dean.ong.14

i want to make sure that people can quit in the middle of the game and the question is random not in order... please help me.. # make input equal to Python3 style input even in Python2 import random try: input = raw_input except: pass question =" " print("Welcome to …

Software Development python
Member Avatar for dean.ong.14
0
456
Member Avatar for TheMrPatrick

Hi, I am currently making an assigment for JAVA but I am stuck. I have to make a birthdate from the three parameters: day, month and year, which are numbers = int. With this I have to put in some checks for valid dates. That part I think is done, …

Software Development java
Member Avatar for TheMrPatrick
0
304
Member Avatar for Cosmo_Kramer

Hello all, I was just wondering if anyone has code snippet for a function that is a multi-queue.....this is for python 2.3 or 2.4 I think so it has to be a bit primitive. The program is simulating people at a store arriving at the checkout, the input from a …

Software Development python queue
Member Avatar for Cosmo_Kramer
0
217
Member Avatar for new_developer

Hi everyone, I writing a program in which two methods I want to count when it is called. I don't know how to do this. //parent class void BankAccount::deposit(double dep) { if(dep > 0) balance += dep; } void BankAccount::withdraw(double wd) { if(wd > 0 && wd <= balance) balance …

Software Development c++
Member Avatar for L7Sqr
0
96
Member Avatar for KE50

When formatted text is pasted from MSWord to a TRichEdit control, the bullets are well formatted (on the display) but after; Fetching the rtf data from the TRichEdit control using TStringStream, Saving the stream's DataString to a database and then Loading the saved rtf string back to the TRichEdit control …

Software Development delphi pascal
Member Avatar for pritaeas
0
285
Member Avatar for Cosmo_Kramer

def random(fileName) setup = open(fileName, "r" ) z = setup.readline() waiting = stack() for line in setup: customerNum, arrivalTime, serviceTime = line.split() plane = Customer(customerNum, arrivalTime, serviceTime) push(waiting, plane) setup.close() print "The data file specifies a", z, "-server simulation." print "There are", len(waiting) , "arrival events in the data file." …

Software Development python
Member Avatar for Cosmo_Kramer
0
191
Member Avatar for Violet_82

Hi there I am reading some java tutorial and a have a question about these 2 classes java.util.Scanner; javax.swing.JOptionPane; In the tutorial I am looking at the 2 classes are used in separate programs to get the input from a user With the first class http://www.homeandlearn.co.uk/java/user_input.html after importing the class …

Software Development java java-swing
Member Avatar for Violet_82
0
2K
Member Avatar for Umairuddinahmed

How to write a calculator program in c language using command line arguments??? The calculator only needs to perform basic functions of addition, subtraction, multiplication and division of 2 integers only.

Software Development c++
Member Avatar for Lucaci Andrew
0
205
Member Avatar for algrandjean1

I am having some trouble with a gcd program that I have created. My problem is that my output is not formatted correctly, and I believe that I need to use arrays to print it out correctly. THe format for the output is: Num1 Num2 GCD Num1 Num2 GCD for …

Software Development java
Member Avatar for Taywin
0
166
Member Avatar for Neethaa

Dim Cname As String Dim CID As Integer Dim Rmaterial As String con = New OleDbConnection("Provider=Microsoft.ace.Oledb.12.0;Data Source= C:\Users\Lenovo\Documents\Visual Studio 2010\Soft\Database\Login.accdb") con.Open() cmd = New OleDbCommand("select * from Purchase where CompanyID='" & txtnum.Text & "'", con) dr = cmd.ExecuteReader() If txtname.Text = "" And txtnum.Text = "" And txtraw.Text = "" …

Software Development open-source vb.net visual-studio
Member Avatar for Reverend Jim
0
599
Member Avatar for ncis_sg1

I am trying to understand how packages work. I think I have finished steps 1-7 but I am not sure. Now I am trying to start step 8 however I am confused as to how I can get the Test class to use the squar and cube classes. How does …

Software Development java
Member Avatar for ncis_sg1
0
144
Member Avatar for LadyQuietB

I need help doing this assignment. Here are the instructions: **5.06 Assignment Instructions – Bottle Cap Prize** **Instructions:** Write a program that uses the Monte Carlo sampling method to estimate the average number of bottles of e-Boost someone would have to drink to win a prize. There is a 1 …

Software Development algorithm java
Member Avatar for Taywin
0
1K
Member Avatar for bprosic

Hi, I have a simple program with datagrid view bounded to MsAccess DB in Visual Basic 2010. When user changes the width of datagridview columns and restarts the program, width of the columns have been reseted to original state. Now, what code can I use and how can I save …

Software Development vb.net visual-basic
Member Avatar for bprosic
0
549
Member Avatar for new_developer

I want to write a simple program to check class and inheritance in Code Blocks but i don't know how to write. I have make new project and add new class named "Car". This is main class. #include <iostream> #include "Car.h" using namespace std; int main() { Car c; return …

Software Development c++
Member Avatar for new_developer
0
386
Member Avatar for murali1

Hello everybody , Im created an Application in vb6.0 . In that application i have to store data in a web Mysql database.How can i connect tht

Software Development mysql visual-basic
Member Avatar for AndreRet
0
2K
Member Avatar for choeychoco

i am trying to execute an exe file on a remote computer using vb 6.0 and i'm using psexec here is my code: shell("psexec //computer1 d:\test.exe") but it is not working by. by the way i am using a cloned system. can anybody help me.. thank you so much.

Software Development visual-basic
Member Avatar for AndreRet
0
319
Member Avatar for jaasaria

hi guyzz i wanted to remove item in the lisview using the for each i want to delete multiple item with similar field in the listview. any help.. for this problem.. it could be possible ? i have here code but it delete only selected item in the listview. (ListView1.ListItems.Remove …

Software Development listview visual-basic
Member Avatar for bluemarine90
0
3K
Member Avatar for mcbentz

Hey quick question..I have a file..have decoded it..but in order to work out the file contains..I was asked to use brute force..I have entered all the keys (0-255) but not one of them give me a decent outcome..I hope this makes sense..this was done in java..(its for a coursework) I …

Software Development java
Member Avatar for Taywin
0
331
Member Avatar for glenwill101

hello ive been working with c++ for a few weeks now and from yesterday ive attempting to write a console game but i keep getting an error. //where all the noise is coming from class Story{ public: Story(); ~Story(); void mainMenu(); void start(); private: void levelOne(); void judgement(); }; Story::Story(){ …

Software Development c++
Member Avatar for glenwill101
0
105
Member Avatar for MissAuditore

Hi guys, Having a bit of a problem with reading and writing to a file. I have a file that has a lot of symbolic stuff I want to remove. And get a new kinda clean file with just the numbers and names. And it finds the line where it …

Software Development python
Member Avatar for Lardmeister
0
232
Member Avatar for serdar.ilarslan

Hey guys i am in trouble about BST Tree exercise.. i need to create an array that can take number of elements user want and the user has to enter integers but the program need to get this number in one line ... Here is code that i already wrote …

Software Development c++ programming-construct
Member Avatar for serdar.ilarslan
0
324
Member Avatar for Lethugs

Hi, I have 3 tables Description, Item, Transaction Description Item Transaction DeID Name IID Name DeID TranNo Type IID Date 1 Printer 1 Stylus T10 1 1 Repair 1 2 Monitor 2 HP 1 2 Repair 3 3 ViewSonic 2 I need to count how many printers, Monitors etc. are …

Software Development printer sql vb.net
Member Avatar for john.knapp
0
189
Member Avatar for Brick Wall

Right guys i need you help please! Im building a weather station that is meant to be updated every 1 hour. To save on time we are setiing the timer tick event to occur every 5 sec which is equal to 1 hour. Now heres the problem! Every thing is …

Software Development
Member Avatar for Momerath
0
111
Member Avatar for howard.teoh.7

Actually, i want connect a database is in another computer, may i know how to connect the database over LAN to retreive the database on another computer, and what step i need to do?

Software Development c#
Member Avatar for BobS0327
0
109
Member Avatar for Youler

Hi everyone, First post here so feel free to school me if my etiquette needs it. I'm reading a very long string of data (genome stuff AT TT GT AA AG AA ... etc) and comparing it using hamming distance with a similar string. (Naively checking for similarity entry by …

Software Development c++
Member Avatar for Lucaci Andrew
0
159
Member Avatar for d.noora

**how we can use recursion in implementing tower of HANIO?? and how does it work i need someone's help ??!!!**

Software Development c++
Member Avatar for Lucaci Andrew
0
94
Member Avatar for panatda.tokhume

#include<iostream> #include<fstream> #include<sstream> #include<stdlib.h> #include<math.h> #include<iomanip> using namespace std; int main() { int NUM_Object,NUM_Medoid; cout<<"How many menus u have?"<<endl; cin>>NUM_Object; cout<<"How many Medoids(k) do you want?"<<endl; cin>>NUM_Medoid; ifstream myfile("Nutrient.txt", ios::in); int i,j,k,count; count = 0; float TEMP_num; double Object[NUM_Object][5]; double Medoid[NUM_Medoid][5],Medoid_New[NUM_Medoid][5],SUM_Distance[NUM_Medoid],SUM_Pij[NUM_Medoid], SUM_P[NUM_Medoid],SUM_Distance_New[NUM_Medoid],SUM_Pij_New[NUM_Medoid],SUM_P_New[NUM_Medoid]; long double Distance[NUM_Object][Object]; for(i=0;i<NUM_Object;i++) { for(j=0;j<NUM_Object;j++) { Distance[i][j] …

Software Development c++ ios
Member Avatar for panatda.tokhume
0
189
Member Avatar for marius2010

Need to find larger prime number then has been inputed.how to do that: I *cin* 5 the reult it self should be 7...?

Software Development c++
Member Avatar for Lucaci Andrew
0
192
Member Avatar for ku.heng.7

public partial class TestingDisplay : System.Web.UI.Page { PagedDataSource pds = new PagedDataSource(); protected void Page_Load(object sender, EventArgs e) { /*SqlConnection conCart; SqlCommand cmdSelectCount; conCart = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionNWind"].ConnectionString); conCart.Open(); cmdSelectCount = new SqlCommand("Select Count(*) From ProductDetails Where CategoryCode = @category", conCart); cmdSelectCount.Parameters.AddWithValue("@category", ddlCategory.SelectedItem.Value.ToString()); var countStart = (Int32)cmdSelectCount.ExecuteScalar(); lblCount.Text = countStart.ToString();*/ /*if …

Software Development open-source
Member Avatar for Mike Askew
0
355
Member Avatar for letterG

I'm stuck at comparing the operators, it seems I can only compare the current operator to the topmost of the stack, how do I keep on comparing it til the stack is null or the precedence don't hold true anymore?...i've commented the part where I think my program fails...any help? …

Software Development c++
Member Avatar for letterG
0
4K
Member Avatar for csstu

How do I display an image in a picturebox using a variable name? string name = "photo.jpg"; pictureBox1.ImageLocation = name; // or Image image = Image.FromFile(name); pictureBox1.Image = new Bitmap(image); neither is working. I'm getting the small box with an x in it. Any help? Thanks

Software Development image
Member Avatar for csstu
0
139
Member Avatar for forjustincase

Hi.. I am working with netbeans for making my desktop application (swings).. I want to edit my frame (like setting icon to the Jframe , etc ) but i couldn't able to do so. This auto-generated code in netbeans really sucks. I cant see where the jframe object is created …

Software Development java
Member Avatar for JamesCherrill
0
982
Member Avatar for robotnik

Hi, im trying to make a C++ project for my class which reads the input from a text file and outputs the mean, median, and mode. but im running into an error i get when i run it. i get this error when i try to build it error C2040: …

Software Development c++
Member Avatar for Lucaci Andrew
0
396
Member Avatar for bdl365

1. Create arr, an array of size six. Each element of arr is a random two-digit positive integer. (The program should make a random selection using the function rand.) Print the elements of arr. 2. Compute x as the average of the array. Print x. 3. Compute y as the …

Software Development c++
Member Avatar for Lucaci Andrew
0
94
Member Avatar for ganges

Why static medthods cant be abstract ?

Software Development java
Member Avatar for jalpesh_007
0
167
Member Avatar for miran788

I'm having trouble with this assignment: Write a class Coins with one constructor that takes a number of cents as a parameter. Supply four public methods, getQuarters, getNickels, getDimes, getPennies, that return the number of corresponding coins that add up to the amount (in the optimal representation with the smallest …

Software Development java
Member Avatar for jalpesh_007
0
1K
Member Avatar for ashley9210

I am creating a bar graph essentially **just by only using the graphics module**. I am stuck with it. Below is my code that I have done which creates a perfect square. (10 x 10) so for every one bar I was it to decrease by 10. def drawRectanglePatch(win, x, …

Software Development python
Member Avatar for woooee
0
198
Member Avatar for diya45

hi all now guyz i add a info in datagrid view also displau now i hve some probelms that when i create a update fuction in guestinfo table then the guest_id is autogenerte then can i delete through guest_id or not and it is also not updated public void update() …

Software Development open-source
Member Avatar for arunkumars
0
218
Member Avatar for Zatara7

So this is going to be the last project for my java class. Any input is appreciated and I'm generally posting it here because someone else might benefit from it. It is not done yet but when it is I'm going to post the full code. I made a video …

Software Development gaming java java-swing user-interface
0
396
Member Avatar for mmpal78

Hi, Im new to programming and to Python. Im making a program to get weather information from online, parse it the way I want to, then have Festival read it aloud to me. I got the weather info and parsing done exactly how I want but am getting an error …

Software Development python
Member Avatar for mmpal78
0
269
Member Avatar for Goldfinch

I'm learning the PIC16F690 and I'm trying to program it to do a simple operation, move over one led each time the single button is pressed and then reset. I'm not asking for code, just if I can bounce ideas of how to implement this off someone who can maybe …

Software Development assembly
Member Avatar for Goldfinch
0
176
Member Avatar for andrew mendonca

Assignment 9, Due Dec 2 Design and implement a program that allows the user to keep track of students in a college course. The program will function as a simple database in which students can be inserted, removed and updated. Additionally, the user can display students in order by name …

Software Development c++ database-design
Member Avatar for andrew mendonca
0
226
Member Avatar for joedavis23

This program asks the user to enter pricer for items. The user enters a price of 0 to stop. The program then prints a reciept including a list of items bought arranged from least to most expensive, and a total that includes 5% sales tax. I am lost can anyone …

Software Development java
Member Avatar for zeroliken
0
1K
Member Avatar for James.M.Dallimore

Hi all, Had alot of problems with writing this code to update an access database from vb 2010 - even my computing teacher is at a dead end as what we havent tried. - Da.update(ds, "stafftable") Basicallly i can navigate records fine - but as soon as i try to …

Software Development vb.net
Member Avatar for john.knapp
0
300

The End.