132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Khan_1

import javax.swing.*; public class BankAccount { //======== fields (attributes, members)====== private String name; private String acctNo; private double balance; private final double MIN_BALANCE = 50; /** initialize all fields as default values */ public BankAccount() { name="N/A"; acctNo="00000"; balance=0; } /** initialize the fields @param n initializes name @param aNo …

Software Development java java-swing
Member Avatar for jwenting
0
463
Member Avatar for sasikrishnasamy

Hi to all, It’s one of the question in test, I am confused please someone help. MainClass{ Public static void main(String [] a){ Employee e=new Employee(); for(int i:e){ // Something } Now If I compile this code I will get an error. But without changing for each condition I want …

Software Development java
Member Avatar for jwenting
0
121
Member Avatar for moaz.amin.37

My code is not compile and run Code is Below import java.util.Scanner; class Input { public static void main(String arg[]) { int rno; System.out.print("Enter Your Name = "); System.in.nextInt(rno); } } i think if System.out.println() is run then upper code should have to run but not run please solve this …

Software Development java
Member Avatar for moaz.amin.37
0
553
Member Avatar for EnglishInfix

I am working on my first project. I am trying to create a program that can fetch a string from a text file when the number for that string is entered, and allow the user to edit that string if they wish. Right now I'm just trying to get menus …

Software Development python
Member Avatar for EnglishInfix
0
3K
Member Avatar for Start4me

I have linklabel which has spaces at the end, I want to copy the label's content without the spaces. This copies the linklbl with spaces at the end: Clipboard.SetText(E_mailLinkLabel.Text) But couldn't figure out how to trim the linklabel before copying it.

Software Development vb.net
Member Avatar for Start4me
0
394
Member Avatar for gwmang0k

hello, i am really new in C programming. This is regarding switch case. How do i limit user input in switch cases? In this case, after they input 1 or 2, i dont want them to input any other number other than 0. Im still new in loop so any …

Software Development c
Member Avatar for Angus_1
0
542
Member Avatar for Mr.UNOwen

First of all I apologize if the title is a bit vague, I couldn't phrase my question to fit in the given space. So given you have an array of floats that you want to cast as a pointer to a struct containing only floats, assuming the array size is …

Software Development c++
Member Avatar for Mr.UNOwen
0
180
Member Avatar for ala_2

the code is the following : BSTR MethodName = SysAllocString(L"DefragAnalysis"); BSTR ClassName = SysAllocString(L"Win32_Volume"); IWbemClassObject* pClass = NULL; hres = pSvc-> GetObject (ClassName, 0, 0, &pClass, 0); IEnumWbemClassObject* pEnumerator = NULL; hres = pSvc-> ExecQuery ( bstr_t ("WQL"), bstr_t ("SELECT * FROM Win32_Volume"), WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL, &pEnumerator); IWbemClassObject *pclsObj; …

Software Development c++
0
134
Member Avatar for Dimaric

Using the following code as a foundation (it reddens the upper left corner of an image), I was told to create 2 different programs: one that would brighten the entire image, and one that would convert the entire image to grayscale. I need major help with this. Here's the code …

Software Development image os-x python
Member Avatar for Dani
0
343
Member Avatar for ZZucker

Challenge: change the code so that only .py and .txt files of a given directory are listed. ''' filename_list_given_dir1.py use module glob to list all the filenames of .jpg files or any extension(s) you specify in a given directory ''' import glob import os # all files (split off file …

Software Development file-system python
Member Avatar for snippsat
0
519
Member Avatar for smitsky

Hi. Can someone tell me how to output a two-dimensional priority queue please? In particular I am using an array of priority queues. The method I use to output an array of vectors is not working. I will show the one that is working (array of vectors): if(!diskQueues[i].empty()) { for …

Software Development c++ queue
Member Avatar for tinstaafl
0
928
Member Avatar for acrocephalus

Hello! I have started experimenting with GUI programming using TkInter. Up to now, I have written this code: [CODE]import Tkinter, tkFileDialog, Tkconstants from Tkinter import * root = Tk() root.title('Watermark Image Processing 1.0b') #Options for buttons button_opt = {'fill': Tkconstants.BOTH, 'padx': 5, 'pady': 5} #Define asking directory button dirname = …

Software Development file-system gui python tkinter
Member Avatar for ronkalycarlos
0
18K
Member Avatar for vbshad

hi...i am a new user of vb.net and i want to have a code where changes in my existing data could be save when i click the button "update"...can anyone help me about this matter?...here's my code for the said matter... Private Sub menu_update_Click(sender As Object, e As EventArgs) Handles …

Software Development microsoft-access vb.net
Member Avatar for vbshad
0
748
Member Avatar for CooRay

I need to add the URL property to webbrowser1 (located on my form) from a dataset containing the URL, but am getting the error "Invalid cast from 'System.String' to 'System.Uri'. The column in datagridview1 is called link. I need the web browser URL to change with a corresponding textbox and …

Software Development dataset vb.net web-browser
Member Avatar for philippeslim
0
352
Member Avatar for riayas

I am importing data from an excel worksheet in to a sql table, one of the columns in the table is set to nvarchar(50), the data i am importing are barcodes, but the problem i am having is the column is changing the data for example the number "5900397732209" is …

Software Development microsoft-office sql vb.net
Member Avatar for riayas
0
279
Member Avatar for Asabre

Write a java application that uses random-number generation to create sentences. Use four arrays of strings called article, noun, verb and preposition. Create a sentence by selecting a word at random from each array in the following order: article, noun, verb, preposition, article and noun. As each word is picked, …

Software Development java
Member Avatar for JamesCherrill
0
466
Member Avatar for samkri

I am developing a C# Windows Form Application. Now i am trying to select value from Listbox and load corresponding value in List view using the stored procedure. And this is my stored Procedure: ALTER PROCEDURE [dbo].[spPOExport] @BST_BESTELLUNG INT AS BEGIN SELECT BH.BST_LIEFERANT AS Product Name, BZ.BDT_REFNUMMER AS Unit Price, …

Software Development client-server listview sql
Member Avatar for hericles
0
315
Member Avatar for satroan

Hi I am trying to write a code that finds approximations of sine and cosine using the equations below with a given value of theta in degrees basically as a novice programmer i am having trouble setting upa a while loop for the expansions. Also can you guys please quote …

Software Development python
Member Avatar for ZZucker
0
292
Member Avatar for Paul_23

I have been working on this for a few days now and I am having trouble understand how to create a paralell array between the seatList and seatPrices so the user can reserve that seat. I was wondering is someone could explain how it would work so I can write …

Software Development c++
Member Avatar for Paul_23
0
523
Member Avatar for jack_7

How I can increase size of stack in assembly (NASM OS X intel64) I used **.STACK 4096** before **section .data** but return this error error: attempt to define a local label before any non-local labels error: parser: instruction expected Please guide me.

Software Development assembly os-x
Member Avatar for Hiroshe
0
333
Member Avatar for sing1006

i have 2 class for example class a and class b. i need the string store at class a pass and use by class b, here is my code for class a and class b. class a public void actionPerformed(ActionEvent arg0) { JFileChooser fileChooser = new JFileChooser(); fileChooser.setFileFilter(new FileNameExtensionFilter("Text Files", …

Software Development java
Member Avatar for iamthwee
0
314
Member Avatar for PerplexedB

I have a form with a dgv on it. The dgv has 1 column defined as a DataGridViewCheckBoxColumn. I would like this dgv to behave as a radiobutton group, i.e. when I click on one cell, that should be set to true, and the others to false. I've got it …

Software Development storage vb.net
Member Avatar for PerplexedB
0
245
Member Avatar for TheFearful

I am new to Java and am experimenting with the language. I am looking a way to convert a user-inputted date and convert it to the MSexcel format. So 1998/07/05 is 35981. Any clue on how to do this? This is what I have so far import java.util.*; import java.text.*; …

Software Development java
Member Avatar for TheFearful
0
228
Member Avatar for XodoX

If I want to have a datagram socket, what do I have to change here ? It's a stream socket right now. Just change it where it creates the socket ? `sockfd = socket(PF_INET,SOCK_STREAM,0);`

Software Development c client-server
Member Avatar for Hiroshe
0
196
Member Avatar for Mya:)

I have to do a project on geotechs, and I need at least 3 forms, but how do you make it go from one form to another?

Software Development delphi pascal
Member Avatar for Mya:)
0
5K
Member Avatar for perlinda

Hi everyone, I have 4 .py files : main.py , file1.py , file2.py , file3.py as : main.py: import sys import file1 import file2 import file3 def main(a,b): c=file1.somme(a,b) d=file2.mul(a,b) file3.div(a,b) print c,d if __name__ == '__main__': a,b=sys.argv[1:] a=int(a) b=int(b) main(a,b) file1.py: def somme(i1,i2): return i1+i2 file2.py: def mul(i1,i2): return …

Software Development python
Member Avatar for perlinda
0
506
Member Avatar for Cameronsmith63

Hi, for some reason I can read this file perfectly on my machine (.net framework 4.5 is installed) But when I run it on one of the servers (.net framework 4.0 is installed), i can't get the file to even open. try { // Connect to the file with the …

Software Development file-system open-source
Member Avatar for cgeier
0
478
Member Avatar for 6435232

I'm making a game for class, and I don't know how to go about it for this part of the game... How do I make the program detect the command buttons around it? The game is a 8x8 board that looks like this: http://s27.postimg.o...shovn/image.png When it is a player's turn …

Software Development visual-basic
0
101
Member Avatar for Adem_1

hi guys i need a small help about drawing gragh. program should include [this](http://postimg.org/image/xmx2aagxr/) user interface. User will enter a and b values then click the draw button. Then program should show the graph of function. i will add the type of function and the formula of it, if anybody …

Software Development c++ user-interface
Member Avatar for Ancient Dragon
0
416
Member Avatar for Auroch

Hello funs2code! I have the following problem. I need to count the number of occurrences of a concrete word in a text file. I've tried to count the number of occurrences of each word at first. The following code has no errors but it isn't working! When I type in …

Software Development c++ programming-construct
Member Avatar for Auroch
0
466
Member Avatar for moaz.amin.37

My question is that what is ".in" in system.in and i am not understandin the workin of System.in suppose Scanner obj=new Scanner(System.in); plz understand me the working of upper line.

Software Development java
Member Avatar for JamesCherrill
0
137
Member Avatar for bonzo2008

Hello I have a maskedbox and I will when I press OK button it will generate a new number in the maskedbox.

Software Development visual-basic
0
108
Member Avatar for george08.08

Is it possible to count the instances of a for-each boolean statement. for example, say you have patients in a hospital and certain criteria must be met to discharge them. 100(%0) health would equal a discharge, pseudo code would read something like this: totalHealth - HighTemperature + medication * recoveryPeriod …

Software Development xml
Member Avatar for george08.08
0
635
Member Avatar for masonketcham

I've got all my parts to inventory part 5 to compile successfully but when I go to run the program I get this message, I am unsure what to do. I know that it possibly means something to do with the image. I've checked the errors that came back and …

Software Development gui java java-swing
Member Avatar for stultuske
0
140
Member Avatar for kool005

Hello, I am new to C# and i am stuck when i try to fetch the data from SQL Server to Visual studio. I am writing the code as a n-tier application - Data Access, Business logic and the front end. I am fetching data in a disconnected env. I …

Software Development c# dataset sql visual-studio
Member Avatar for johnrosswrock
0
237
Member Avatar for Qromium

Closing my program saves the entire listview. Opening the program restores the entire listview, however, each item loses it's ImageKey. How do I restore the ImageKey when reopening the program? A better way of putting it: If any item in the listview has the same name as any item from …

Software Development listview vb.net
Member Avatar for Qromium
0
261
Member Avatar for TrustyTony

I am looking for alternatives to setup a server in work place which does not allow to setup new software to computers to check and reserve rooms for meetings both through local network computers or possible from home / on the move. I of course would like to have thy …

Software Development html-css java-swing python
Member Avatar for TrustyTony
0
295
Member Avatar for DXNNX

http://pastebin.com/piCzf2sT when put a token in vertical that the main windows is full appear all the line in selected color and not only one, anyone can know why?

Software Development python
Member Avatar for woooee
0
251
Member Avatar for aegugka

I'm working on a C++ program to convert MPH to minutes and seconds. I'm stuck. This is my code so far. It runs, but when I key a value (i.e. 6.5), the program crashes and stalls. What I am overlooking?

Software Development c++
Member Avatar for Hiroshe
0
1K
Member Avatar for rshalev

I am in the process of converting a software package from Matlab to C++. As I was searching for a library that can read multipage tiff, I found that it can be done using Boost (GIL) however, my level of expertise is not good enough to understand how to use …

Software Development
Member Avatar for Hiroshe
0
436
Member Avatar for GagaCode

hey all i have another little issue it's regarding the databinding here and what i'm trying to do here is to get some data from access to my programme how ever the code only work for the first and when i try to invoke it again it give's me the …

Software Development
Member Avatar for cgeier
0
139
Member Avatar for TrustyTony

To continue[ my quiz series](http://www.daniweb.com/search/query/0?q=%22quiz+of+the%22+pytony#gsc.tab=0&gsc.q=%22quiz%20of%20the%22%20pytony&gsc.page=1), explain what happens with this code (how you would name this action and is there other way to get same result), why, and what is actually the value of `a` at end. a = ['a', 'b','e'] a[2:2] = ['c', 'd']

Software Development python
Member Avatar for TrustyTony
0
256
Member Avatar for ctrah

hi .. I have done coding for calculation ... but the results obtained (eg.13.9484736273928) .. how can I get the results in 2 decimal point (eg 13.95)? Your help is greatly appreciated Private Sub tx_kh2_Change() Text2.Text = Now() Dim x As Integer x = DateTime.DateDiff("s", Text1.Text, Text2.Text) Text3.Text = x …

Software Development visual-basic
Member Avatar for Aslam Mansoor
0
155
Member Avatar for DkgMarine

So i just finished my first c course, so what comes after? like i learnt how to sort arrays, import from files and change them, linked list and stacks and queues, so thats it? can't wait for the new semster to learn more, i just wanted a heads up to …

Software Development c linked-list
Member Avatar for Hiroshe
0
163
Member Avatar for Mr.M

Hi Dw I've create an ASP.NET web app using VB.NET and now I want to connect an access database to it so that it can save data, and also read data from it, I've added the database as resources but I'm not sure if this is appropriate and I haven't …

Software Development asp microsoft-access vb.net
Member Avatar for Mr.M
0
342
Member Avatar for aseeman

I want to write a program that do this: It should receive the URL (Wikipedia 's URL) from input and download that web page And read the content of that page and save it into a file please help me Thanks

Software Development
Member Avatar for aseeman
0
296
Member Avatar for Slavi

Okay, so I have the following while(!connected){ if (details){ System.out.println("connected"); defaultHost = tfServer.getText(); defaultPort = Integer.parseInt(tfPort.getText()); program.run(); } System.out.println("Not connected"); } where details is true when a button is clicked. This works fine expect that my console is getting spammed by "Not connected" until I press the button and details …

Software Development java
Member Avatar for JamesCherrill
0
112
Member Avatar for Gotoma

Hello I'm new to programming in general and this was one of the assignments I did. I was suppose to create a class called employee that includes three pieces of information as data members - first name, last name, monthly salary. Then was suppose to write a test program that …

Software Development c++ ide
Member Avatar for aashi.bajwa.9
0
10K
Member Avatar for airhalynn101

For this project, my client asked me if he could select seven names from the list (which is a DataGridView) and use them in a single, separate form. The solution that came to my mind is to use the CheckBoxColumn for this matter. My problem is I have never used …

Software Development vb.net
Member Avatar for airhalynn101
0
6K
Member Avatar for Gerald_2

1. Write a pseudo code or draw a flowchart which -Inputs the height and weight of 1000 students -Outputs the average height and weight -Include any necessary error traps for the input and weight

Software Development
Member Avatar for deceptikon
0
116

The End.