43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for jackbauer24

Here is my code:- [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package wrie.and.read; /** * * @author Administrator */ import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.*; import javax.swing.*; public class WrieAndRead { JFrame frame; JTextField field; /** …

Software Development java java-swing
Member Avatar for jackbauer24
0
172
Member Avatar for Ahmed2

Hi guys, the title says it all, I have produced list of numbers from a c++ program into an excel file, and I want to make a CDF graph out of it. What I know is that I need to find numbers greater than zero, then number greater than one …

Software Development c++
Member Avatar for deceptikon
0
620
Member Avatar for v3ga

My objective is to implement a GUI calculator in java. I am thinking of passing the expression entered by the user to bc and then get output from terminal and print to user. My question is [LIST=1] [*]How to execute a terminal command from java so that i can pass …

Software Development gui java
Member Avatar for v3ga
0
358
Member Avatar for picogenkaku

Good day to everyone. I have this trouble of stopping the timer at a specific time, say I have to stop the timer at 1:30. When I try to run it, it doesn't stop. Please help. Here's my C++ code. [CODE] #include <iostream> #include <time.h> using namespace std; void wait …

Software Development c++
Member Avatar for picogenkaku
0
241
Member Avatar for mags11

I am trying to get the program's decimal to output in two decimal places after the decimal. Please advise. [CODE] // MilesPerGallon.java // Program designed by XY import javax.swing.JOptionPane; // Needed for JOptionPane. import java.text.DecimalFormat; // Keeping proper decimal format. public class MilesPerGallon { public static void main(String args[]) { …

Software Development java java-swing mathematics
Member Avatar for mags11
0
2K
Member Avatar for long89

I don't know how to write code to exit for this program.someone please help me :( [CODE] import java.awt.*; import javax.swing.*; import java.awt.event.*; public class Panel extends JPanel implements ActionListener{ private JTextField height, weight, answer; private JButton calc, clear, exit; public Panel(){ this.setLayout(new GridLayout(2,1)); JPanel topPanel = new JPanel(); topPanel.add(new …

Software Development gui java java-swing
Member Avatar for long89
0
213
Member Avatar for sc0tty

I am new to python and cant figure out what I am doing wrong with the global variables. Here is an example of the problem I am having. number = 0 def test(): global number number = raw_input("Please type a number.") def prints(): global number if number2 != 1: print …

Software Development python
Member Avatar for sc0tty
0
210
Member Avatar for ulxlx

I'm probably missing something really obvious, but I downloaded the Python 2.72 release, and now I can't figure out what to do. I've tried googleing it but everything says to just install it. Is that install the setup.py file? If it is, how do I run a python file if …

Software Development python
Member Avatar for ulxlx
0
335
Member Avatar for MasterHacker110

I have been programming in C++ for a while now. I heard about RSA Encryption algorithm, and i have read many online sites on how it works. But i still cant grasp how the algorithm works. i have tried to make programs with RSA, but they doesnt encrypt. If you …

Software Development c++ encryption
Member Avatar for Moschops
0
332
Member Avatar for dilse4sk

hi every one. i am making a booking app in vb.net and im using sql server as my database. i am confused about table creation. I have increment of 1 in customerid which is primary key in customer table. Suppose if a customer books a room and according to the …

Software Development sql vb.net
Member Avatar for kingsonprisonic
0
314
Member Avatar for Graphix

Hi everyone, I'm currently working on a cross-platform project to copy data from the computer onto a USB drive quickly. [B]Main problem: EOF in the middle of the file[/B] It's going good so far, but I stumbled across a problem in my copy_file function: [CODE]int copy_file(char *source_path, char *destination_path) { …

Software Development c file-system
Member Avatar for Graphix
0
2K
Member Avatar for Thropian

I started making a simple drawing program, to use for a level maker, and I came across a slight issue [CODE]from Tkinter import * class Main: def __init__(self,root): w,h = root.winfo_screenwidth(), root.winfo_screenheight() current = {} canvas = Canvas(root, width = w, height = h, bd=0) canvas.pack() root.overrideredirect(1) root.geometry("%dx%d+0+0" % (w, …

Software Development python tkinter
Member Avatar for Thropian
0
177
Member Avatar for radiat

I'm studying enumeration at the minute and i've a quick question. In the following code using enum, are you limited to ouputting the sequence number of the possible values, or can you use the enum operator to output the text "green"? [CODE] #include <iostream> #include <sstream> #include <fstream> #include "conio.h" …

Software Development c++
Member Avatar for Ab000dy_85
0
186
Member Avatar for Sturdy

Hi all, How can i validate a text in text box? I need to check that text length is 7 and first four characters is contain "ABCD" and last three characters must contain numbers. e.g : ABCD123 Thank you.

Software Development visual-basic
Member Avatar for Sturdy
0
1K
Member Avatar for sinatra87

I normally don't try to get outside help on homework that is still due, but I've kinda' hit a wall on this one. I'm trying to write a program that dynamically creates a list of scores for a group of students. It has to ask the user how many students …

Software Development c++
Member Avatar for sinatra87
0
247
Member Avatar for Sturdy

Hi all, How do i know where the cursor position in the text at textbox? Anyone know how to do this? Thank you in advance

Software Development visual-basic
Member Avatar for Sturdy
0
4K
Member Avatar for tomexlfc

Hi, I want to make my staff id text box only accept upper case letters and not lower cases, please how do i go about it? I wrote these lines but they stil dont work: [CODE]Private Sub txtStudID_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtStudID.KeyPress txtStudID.Text.ToUpper() End Sub[/CODE] …

Software Development vb.net
Member Avatar for tomexlfc
0
277
Member Avatar for alexbnc

I want to get the information downloaded from a file (a BMP image) into a char array. I have this function [CODE] #define _countof(x) (sizeof(x) / sizeof(x[0])) char* DownloadBytes(char* szUrl) { HINTERNET hOpen = NULL; HINTERNET hFile = NULL; char* data = (char*)""; DWORD dataSize = 0; DWORD dwBytesRead = …

Software Development c++ file-system
Member Avatar for alexbnc
0
335
Member Avatar for DanWebb3148

[CODE]sizeA = 2**28 M = [0]*sizeA[/CODE] The above code creates an array but, each element is 4 bytes each. How do create a large byte array with type 'B' (eight bits unsigned)? I would like it to be as large as possible. I need it for a sieve prime number …

Software Development python
Member Avatar for DanWebb3148
0
973
Member Avatar for ryklon

Hello! So here I am again asking for your knowledge and help.:$ I have this little project of embedding the g++ compiler in my software. What I have done so far is place the compiler inside the bin of my project folder, inside the Debug folder. I managed to call …

Software Development vb.net visual-studio
Member Avatar for ryklon
0
180
Member Avatar for swissknife007

[CODE] #include <iostream> #include<stdio.h> #include<string.h> using namespace std; int main() { // cout << "Hello world!" << endl; int t,i,j,a,flag; char str[1000001]; cin>>t; while(t--) { a=1; scanf("%s",str); for(i=0;i<=strlen(str);i++) {flag=0; if(!isdigit(str[i])) {flag=0; for(j=i-1;isdigit(str[j]);j--) { if(str[j]!='0') { flag++; a*=str[j]-'0'; //cout<<"flag"<<flag<<" "<<a<<"A"<<endl; break; } } if(flag==0) { a=0;break; } } while(a>9) { if((a%10)!=0) …

Software Development c++
Member Avatar for StuXYZ
0
523
Member Avatar for zekstein

I need some help here.. I need an example to do that : ( a background task ) #includes blablalbalbla void?? ExecuteTask () { while(1) { cout << "first " << endl; } } int main () { ExecuteTask( ); while( 1 ) { cout << "lol" << endl; } …

Software Development c++
Member Avatar for zekstein
0
189
Member Avatar for jefferson9

I'm using a BackgroundWorker object to start a process, the following is inside of my BackgroundWorker.DoWork event: [CODE] ... process.StartInfo.FileName = "process.exe"; process.StartInfo.Arguments = arguments; process.StartInfo.UseShellExecute = false; process.StartInfo.CreateNoWindow = true; process.StartInfo.RedirectStandardOutput = true; process.EnableRaisingEvents = true; process.OutputDataReceived += new DataReceivedEventHandler(p_OutputDataReceived); process.Start(); process.BeginOutputReadLine(); while (process.HasExited == false) { if (worker.CancellationPending …

Software Development
Member Avatar for Cameronsmith63
0
693
Member Avatar for riahc3

Hey I have a folder in my current working path and I want to make a copy of a file inside it to the the current working path. Its kind of a dumb question, I know, but how do it do it? Thank you.

Software Development java
Member Avatar for riahc3
0
210
Member Avatar for Tango2010

Hi All, I wonder if anyone can help - I have been teaching myself Java GUI programming using a Mac running OSX Lion and Netbeans 7, and have followed the tutorial: [url]http://netbeans.org/kb/docs/java/gui-functionality.html#Exercise_2[/url] When I run the program, it builds and compiles fine, but only appears when I choose the command …

Software Development gui java java-netbeans
Member Avatar for Tango2010
0
157
Member Avatar for mohamed moamen

I'm send sound between two clients via UDP server Socket , How i can make users not feel the delay of sound ?

Software Development java
Member Avatar for JamesCherrill
0
92
Member Avatar for Alientcp

Hello, Im new to c# and i have a little problem. I have a folder with 5 text files (group1,group2, etc), each contains a list of names. On my form, I have 2 combo boxes. I want the first one to allow me to select a group (a text file), …

Software Development
Member Avatar for Alientcp
0
2K
Member Avatar for jp071

Hello, I am doing simple read/write program for serial port. I am faceing a error that i don´t understand. Error is: "error C2664: 'CreateFileW' : cannot convert parameter 1 from 'const char [5]' to 'LPCWSTR' " My whole program: #include <windows.h> #include <iostream> #include <string> using namespace std; void set_com_pin(bool …

Software Development c++
Member Avatar for zeroliken
0
2K
Member Avatar for cdea06

So the project is to write a program (for a beginners C class) that compares 2 words and see if there anagrams of each other. I'm about halfway through the program and it was working fine until i tried to add the IF STATEMENTS with isalpha. What I'm trying to …

Software Development c
Member Avatar for cdea06
0
464
Member Avatar for ComputerGirlie

For school I have to write a program that requests a 3 part name and breaks it into a first, middle, and last name. I wrote the code but the alignment of my output is not right. I was wonderng if someone can tell me what I did wrong and …

Software Development python
Member Avatar for ComputerGirlie
0
640
Member Avatar for RiddoKun

[CODE] import javax.swing.JOptionPane; public class Finance { public static void main(String[]args) { boolean Access = false; String studentName = JOptionPane.showInputDialog(null, "Enter in your name: "); //String current = JOptionPane.showInputDialog(null, "Enter your password: "); //double currentBalance = Double.parseDouble(current); Account newAccount = new Account(studentName); //Gains access to Account class JOptionPane.showMessageDialog(null, newAccount.toString()); } …

Software Development finance java java-swing
Member Avatar for RiddoKun
0
96
Member Avatar for GAME

Is there a way to get a Message from a website(like copy it), then have it show up in a textbox? If, so can you provide an example?

Software Development
Member Avatar for jakemdrew
0
860
Member Avatar for kimbokasteniv

What I am trying to do is the following: [CODE] ReceiptBag zero("zero"); ReceiptBag one("one"); ReceiptBag bags[2]; bags = &zero; (bags+1) = &one;[/CODE] Of course that is not valid code. My goal is to be able to reference the same zero or one object by using its variable name or by …

Software Development c++
Member Avatar for kimbokasteniv
0
301
Member Avatar for toomutch

Hi all, Having problems with null dates in a mysql table. Have eventually found out that I can store a 'null' date in mysql as "0000-00-00" and I can run the 'insert' command to add a record to the mysql table. When I check on mysql workbench I can see …

Software Development mysql vb.net
Member Avatar for toomutch
0
843
Member Avatar for Dillary

(I'm new to programming in general) I created a program in python without an interface and part of it used a raw_input to get a users answer and compare with a stored answer. This was in a loop that limited the number of attempts the user could have. This worked …

Software Development python tkinter user-interface
Member Avatar for Dillary
0
416
Member Avatar for Goldfinch

Hi, I'm trying to read a file, line by line, into an arrayList, assigning a different line to each element and ensure that: 1. It's actually happening (which is the reason for the println statements) 2. that the scope of the arrayList with the string elements filled in is sufficient …

Software Development file-system java puzzle
Member Avatar for Goldfinch
0
966
Member Avatar for ventura1

Related to: C#; Windows form, Storing Multiple Instances of a User Control: Hi: I’ve created an app with a user control that accepts parameters. When a user clicks a button I need to store the current view of the control and bring into focus on demand. Several instances of the …

Software Development app-store
Member Avatar for ventura1
0
260
Member Avatar for bill_kearns

I'm using C# in VS2010 and I need some help with a web application. I don't have much experience with web services. I was given the url to a webservice containing methods required to build the login part of the application. No documentation. I have the login piece working though. …

Software Development
Member Avatar for skatamatic
0
204
Member Avatar for Lucaci Andrew

So, even thou I have searched throughout the forums, I couldn't get a clear answer, maybe perhaps I'm a noob @ Python. As a beginner, I don't know much about Python, and it's frustrating to search the net and not find the actual answer. So, I'm working on this project, …

Software Development file-system microsoft-access python
Member Avatar for Lucaci Andrew
0
321
Member Avatar for meetjatin88

Hi Everyone, I am Actually trying to make a simple C++ game in which some random alphabets will fall down and when we press one of those random alphabets keys the aphabet should disappear. The problem that i am facing in making this code is that when i am using …

Software Development c++
Member Avatar for deceptikon
0
271
Member Avatar for razamughal67

please solve my problem i want to know where we show text when we use copy cut command Example: we use a command Ctrl+C or Ctrl+X any text in textbox or any file or folder i want to view his clipboard where it link save OR view in Registry or …

Software Development visual-basic
Member Avatar for BitBlt
0
446
Member Avatar for freedomflyer

Earlier on, in [URL="http://www.daniweb.com/software-development/java/threads/412571"]this thread[/URL] my question was answered about how to add objects of a custom class I called State into a HashSet which was a value for a key in a HashMap. [CODE]Map<String, HashSet<State>> mapping = new HashMap<String, HashSet<State>>();[/CODE] However, I need to ensure that there are only …

Software Development java
Member Avatar for JamesCherrill
0
350
Member Avatar for vlady

Hello, pls can anybody show how works printing? here is the code: [CODE]class Student(object): def __init__(self, name): self.name = name self.report = dict() def add_subject(self, subject): self.report[subject] = list() def subjects(self): return self.report.keys() def s_subjects(self): lpre=[] for subject in self.subjects(): lpre.append(str(subject)) print lpre class Subject(object): def __init__(self, name, teacher = …

Software Development python
Member Avatar for Gribouillis
0
98
Member Avatar for student_learner

i found this code in a book. i am finding it confusing. [code] #include<stdio.h> int main() { int arr[3]={2,3,4}; char *p; p = (char*)arr; // line A p = (char*)((int*)p); printf("%d",*p); p= (char*)(p+1); //line B printf("%d\n",*p); return 0; } [/code] the answer is: 2 0 but i cant figure out …

Software Development c
Member Avatar for DeanMSands3
0
233
Member Avatar for pipelian

My form has a TextBox with values like(e.g: P011112, C0212102) those are products lot numbers that the user enters. Then, what i want is that a DateTimePicker takes the first 4 digits as "MM-yyyy" and add 3 years to that date. Example: TextBox.text = P011112 DateTimePicker = January, 2014 Thanks …

Software Development vb.net
Member Avatar for pipelian
0
322
Member Avatar for radiat

Hi, can you have a quick look at the two for loops here. I've declared the int 'i' in the first for loop but in the second for loop it doesn't recognise it and i have to declare it again. Why is that? [CODE]for(int i=0; i<x; i++) { cout << …

Software Development c++
Member Avatar for MandrewP
0
180
Member Avatar for aristosv

Hi, I have a form with a button which is disabled by default, and a CheckedListBox with 68 items in it. What is the simplest way of enabling the button, when an item in the CheckedListBox is selected or unselected? I’m looking for something like If CheckedListBox1…any of the items …

Software Development gui vb.net
Member Avatar for aristosv
0
656
Member Avatar for LearnVBnet

[code]Form Payment DGV.Columns.Add("FullName", "Customer") ' DGV.Columns.Add("InvNomer", "Invoice No.") DGV.Columns.Add("BalanceDue", "Total") DGV.Columns.Add("Paid", "Paid") Private Sub cmdPayList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdPayList.Click ' where = " AND InvNomer NOT IN(" ' where = where & "'" & row(2).Value & "', " ' where = where & ")" PayList.show() …

Software Development display listview vb.net
Member Avatar for LearnVBnet
0
154
Member Avatar for shibu2all

Can anyone please help me out in removing this error Exception in thread "main" java.lang.NullPointerException at java.awt.Container.addImpl(Container.java:1045) at java.awt.Container.add(Container.java:365) at Client.<init>(Client.java:33) at Client.main(Client.java:17) [CODE=java] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; import java.net.*; public class Client { JFrame frame1; JList list; JList list1; JTextField tf; JButton send; JButton lout; …

Software Development java java-swing
Member Avatar for shibu2all
0
234
Member Avatar for CY0T3R

1 1 0 1 0 1 1 0 1 0 1 0 1 0 1 How To Print The Above Pattern ?? (Using For-Loops Only)

Software Development c++
Member Avatar for ravenous
0
200

The End.