132,726 Archived Topics
Remove Filter ![]() | |
ok so in my program i'm supposed to read data from a text file and store it in arrays then make calculations from my array. so there will be three functions for the program 1 will be the readfile() which will read the file the other will be calculatedata() which … Software Development c++ | |
![]() | Hi guys i am trying to write a program that uses two classes, Board and Game, to run the Game Of Life. Currently my output is in the console, as a GUI is going to take too long. I am having some trouble writing my nextGeneration method in the Game … ![]() |
give me reasons why JVM is platform dependent? i dont find convincing answers. The ultimate aim of a compiler is to make codes that are to be understood by native machine processor ? if this is the case why there is an interference of operating system(platform)? Software Development java operating-system ![]() | |
I am trying to filter a 2nd Combobox based on the selected value of the 1st Comboxbox. For example, when the user choses "BMW" from the cbxmanufacturer control, I need the cbxModel control to display all models associated to "BMW". I am almost there but I get an error "Cannot … Software Development | |
![]() | My Applet is working but I have 2 issues, I cannot get away from the 'metal' plaf background (trying to make it all solid blue) and when the user clicks on the 1st text box I want the prompting text to clear for the user to type their own. No … Software Development encryption java java-swing ![]() |
Hi there i am trying to make a program that takes multiple files from the command line. I think i have got my my word count working right, but my question is how do i get it to read multiple files on the command line. Like when i do ./a.out … Software Development c | |
I am wondering how extremely basic physics engines work and how I could implement them. lets say I have a player class (like a frame, except it holds the variables for the players), and I would like to add gravity. Could I go something like this [CODE] Player p = … Software Development java | |
![]() | Im writing the Applet GUI code that uses another class to translate a string into pig latin (dubbed PigLatin.class) My gui has two text areas, a few labels, and two buttons, but I'm having some trouble with event handling. [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class TxtCrypt extends JApplet … Software Development encryption gui java java-swing |
Im writing a code that ask for two positive integers entered from the keyboard. The first integer N is odd in range of 3-15 and the second with be an initial value I. N will be the size of the array. Beginning the center of the NxN array with the … Software Development c | |
I couldn't find a meaningful code sample for the wxPython slider (wx.Slider), so I concocted this one and added a few explanations. It explores two different sliders, one is horizontal, the other vertical. The slider events are then fed to a function that retrieves the position values and displays them … Software Development python | |
Hi everybody, I'm sorry If I ask a silly question. I have a simple code like this [CODE]#!/bin/bash verify() { // do something return $(grep -q 'VERIFICATION SUCCESSFUL' result.txt) } if [ verify 'a Condition' ]; then echo debug fi[/CODE] I have the following error: [QUOTE]line x: [: verify: unary … Software Development shell-scripting | |
Hi there, I have two tables in my data entity model accessed by StaffDB. Staffs contains: StaffID FirstName LastName Address Town County Postcode YearJoined CurrentGrade Role Ratings contains: RatingID StaffID Date Rating1 (automatic to avoid conflict with table name also of rating) Comments These are linked by StaffID. I am … Software Development asp.net | |
Hi All, I wanted to know if its possible to create a right click function in vb.net MDI form. Example the way we right click on any program it gives us a list of options, is it possible to do it in vb.net and how? Need help, thank you. Software Development vb.net visual-basic | |
Im writing a program that uses sockets for inter process communication however i have come to a road block and cant get my code to compile. i have googled all the errors with no luck finding a solution. If any one can help me it would be appreciated. Here is … | |
I know, that you can't set the value of CancellationPending of the BackgroundWorker class The default is false. If you call the CancelAsync()-method, CancellationPending is true. I need to call this method, that my program stops measuring. Now you are back on the GUI. You can change values and again … Software Development gui | |
im trying to print the array 5 times, each time containing different numbers but it repeats the same random numbers. help please. [CODE] while(count<5){ fillarr2(ran1,ran2); printar(ran1,ran2,counting); } // functions void fillarr2(int raa[],int rab[]){ int ran1,ran2, i,count=0; srand(time(NULL)); for(i=0;i<10;i++){ ran1=rand()%15+1; raa[i]=ran1; } for(i=0;i<10;i++){ ran2=rand()%15+1; rab[i]=ran2; } return ; } void printar(int … Software Development c++ | |
[CODE] String SearchBroadCastMenu[] = new String[] {"Search Item Code", "Search Title", "Search Country of Origin", "Search Language", "Search Status", "Search Director", "Search Actor", "Search Producer", "Search Frequency", "Return To Previous"}; UIManager.put("OptionPane.messageFont", new FontUIResource(new Font("Tw Cen MT Condensed",Font.PLAIN,18))); UIManager.put("OptionPane.messageForeground", java.awt.Color.blue); UIManager.put("OptionPane.buttonFont", new FontUIResource(new Font("Tw Cen MT Condensed",Font.PLAIN,18))); int SearchBroadCastOption = JOptionPane.showOptionDialog(null, … Software Development java | |
This program is suppose to input a date and output the day of the week that corresponds to that date. I have the program all done, but the code is not presented in the main() of the form. Im guessing i have to organize it a little more. any ideas … Software Development c++ | |
I need some help with a code I'm writing. The user inputs some letters, a loop is ran to check if it's a vowel or consonant, then when the user is done it returns the total amount of vowels and consonants. The problem I'm having is the loop is suppose … Software Development c++ | |
I need to read a file that contains this: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 … Software Development python | |
Im trying to figure out why this simple piece of code isnt working. The aim is for the user to enter a word and then the application echos the word back to them. If the word is equal to 'done' then the application prints 'Complete'. [CODE]import java.util.*; public class word … Software Development java | |
So, here I am again, with my mass of code, albeit with more progress. It's still got a long way to go, and I'm still not that good at coding, but man oh man have I learned a lot through this game. I come with a few more questions than … Software Development c++ | |
Dear Experts I want textbox1 to accept only numeric data as 55,65,698.00 Is there any easy way to validate textbox1 with javascript? Please help Software Development java | |
here i have 2 listbox i already have the code for the selected item moving right and moving left but i don't know how to move all of the listbox1 to listbox2 by just click >> or listbox2 to listbox1 << Software Development asp.net vb.net visual-basic | |
I am stumped on how to go about coding my checkAttempt() method. Its supposed to check to see if the current row in int board is equal to int code as well as check each position and log how many numbers are in the correct position as well as present … Software Development java | |
[B]here is the problem:[/B] -user enters "degree" and a "threshold" value -degree is converted to radians(with a static method) -computing the approximation as long as the absolute value of the series element is greater than the threshold [COLOR="Red"]series:[/COLOR] i.imgur.com/GRsIP.png -Error is computed as absolute difference of approximation and the value … Software Development java | |
Hi, I would like to know how to add the objects of a vector?I wrote a code where it is adding the values to a specific object.I wanted to write a code where it can add all the values of all objects in a vector? Software Development c++ | |
Hi, I am learning C++ and am writing a program to create a Unique List of words. I am having problems getting my struct count field to increment in my createUnique function. After returning from the Search function, the count field within the struct needs to increment if the key … Software Development c++ | |
Hi all, I got a problem.I got to make a program that sorts the digits inside a number given by the user, but I can't use an array. I know that the easiest way is with the bubble sort but I can't seem to make a switch between two digits … Software Development c++ | |
[CODE] #include<stdio.h> #include<math.h> #include<string.h> // function prototype int rv (int, int [], double []); //main function int main() { int n; int res[10]; double vol[10]; double I[10]; double C; int i; for (i = 0; i < 10; i++) { printf("Enter R and V for resistor %d: ", i+1); ReadRes(i,res,vol); … Software Development c | |
Hi forum, I am wanting to advance my programming knowledge to the next level: to create games. I have a pretty-good understanding of VB.NET and I am wondering what I could do to make games. I know that most on-the-web games are written in ActionScript with Adobe Flash, but would … | |
Hi all I have "borrowed" a function from the net, and need som help in modifying it to do what I want. [CODE] Public Function CrossTab(ByVal dtS As DataTable, ByVal leftColumn As String, ByVal topField As String, ByVal dataValue As String, Optional ByVal pFix As String = "") As DataTable … Software Development vb.net | |
so i have to make a function that displays the binary representation of a 32 bit integer this is what i have [CODE]#include<stdio.h> #include<stdlib.h> #include <string.h> #include<stdio.h> void inttobin(int c) { char * s ; char * p ; size_t n = 8*sizeof(unsigned int); p = malloc(n*sizeof(char)); while (n-- > … Software Development c | |
when insert in the first char then it display the related item the combo box | |
Hello, i have eclipse and in my laptop and i have a little problem when i call functions, example: when i create an button and i want to change size... [CODE]Button b = new Button();[/CODE] b.setSize([COLOR="Red"]arg0,arg1[/COLOR]); this is my problem, why eclipse show me as arg0, arg1 and not like … Software Development java | |
Hi, I current I have a vector <void*> that I need to populate with values, stored as char*. Is there a way to convert to void*, then back to char* whenever needed? I have tried casting and using static/reinterpret_cast but when I try to output (converting from void* back to … Software Development c++ | |
Hi, main.cpp vector<Employee>e; e.push_back(Employee("Hawaii",100)); cout<<endl; e.push_back(Employee("Scotland",20)); cout<<endl; e.push_back(Person("Saga",30)); cout<<endl; Employee e1; //created an object sort(e.begin(),e.end()); e1.show(e); Employee.h bool operator<(const Employee& e1,const Employee& e2); Employee.cpp bool operator<(const Employee& e1,const Employee& e2) { return e1.getName() < e2.getName(); } With this code it is just sorting only the first 2 objects and displaying … Software Development c++ | |
I am creating DLL using VC++ - Console application.. I am writing it for crating a new file... I am using Createfile function for this. but facing below error... error C2733: second C linkage of overloaded function 'CreateFileW' not allowed Below is my .CPP file from the project.. #include "stdafx.h" … Software Development c++ | |
I'm trying to read data from a text file that looks something like [CODE] United States 155981460 50.28 Indonesia 40829720 16.8 India 38045000 3.24 [/CODE] I need to add all the numbers after each country together. I also need to which country has the highest number in the third line … Software Development java | |
Hello Im having some new Java problems, while trying to export my project to a JAR file in Eclipse. When I run it from the IDE its OK, all roses and bourbon, but I get hit over the head this when I run it from cmd : [CODE] C:\Users\Joey\Desktop>java -jar … | |
Hi.. Following is my code:- public static void Sync(string sourcePath, string destinationPath) { bool dirExisted = DirExists(destinationPath); //get the source files string[] srcFiles = Directory.GetFiles(sourcePath); foreach (string sourceFile in srcFiles) { FileInfo sourceInfo = new FileInfo(sourceFile); string destFile = Path.Combine(destinationPath, sourceInfo.Name); if (!dirExisted && File.Exists(destFile)) { FileInfo destInfo = new … | |
][B]Is that possible to highlight the row when the cell value is change ? Can anyone teach me and explain to me ? Thanks[/B] [CODE]Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click Dim update As New dboperation Dim t As DataGridViewSelectedRowCollection = Me.DataGridView1.SelectedRows update.makeconnection() If (Me.DataGridView1.Rows(t(0).Index).Cells(0).Value.ToString) … Software Development vb.net | |
need help to add main class to test this program. [CODE]public class Rational { private int num; private int den; public Rational ( ) { num = 0; den = 1; } public Rational (int a, int B) { num = a; den = b; simplify ( ); } private … Software Development java | |
I am auto generating data grid and I am using check box in Data grid View, Now i am invoking check box state changed event but it produces the following error Handles clause requires a WithEvents variable defined in the containing type or one of its base types. Here the … Software Development vb.net | |
Hi friends, I have downloaded VS Express 2010 edition from Microsoft website. I want to convert a VB 6.0 project into VB.Net using VS Express 2010. Is it possible to do it without the "Upgrade Wizard"? How much will it cost me to get basic VS 2010 Professional with the … Software Development asp.net vb.net visual-basic | |
So after a lot of work I got functions to compare one word with another one. Now my problem is formatting the output. I have one function that locates letters int he wrong position, one that finds matching letters and one to compare the results in order to format the … | |
please help... please see attached file for further explanation... Software Development vb.net | |
heres a form i have created. its a search form. [url]http://img266.imageshack.us/img266/722/paymentsh.jpg[/url] it searches and lists the results in list view. heres my mssql query : [CODE] select transactions.trans_id,transactions.cust_id,transactions.trans_amount," _ & "transactions.trans_date,customers.fname+' '+ customers.lname as customer from transactions inner join customers on transactions.cust_id=customers.cust_id " _ & "where trans_type='inv' and (trans_id= " … | |
I am working on a program that uses a recursive function to print the digits of a number in English (i.e. 456 would display "Four Five Six".) Right now I am beyond confused and I don't have much code to show for the hour and a half of work I've … Software Development python | |
I am making an invoice system. Please have a look at the images. [url]http://img32.imageshack.us/img32/9216/capture1iv.jpg[/url] [url]http://img839.imageshack.us/img839/1228/capture2cq.jpg[/url] as you can see, the place order button is creating an invoice. I have actually created a junk table and a junk column in it just to setup the invoice_id and load it when "invoice … |
The End.