132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for chiiqui

I am once again experimenting and Only to find out that java is pass by value, how do I actually manipulate a method or an array that has been pass to another method? for example [CODE]int[]a ={1,2,3,4,5,6}; modify(a); ________________________ void modify(int[] aTest){ aTest[1]=2; }[/CODE] //take note that those arrays are …

Software Development java
Member Avatar for JamesCherrill
0
251
Member Avatar for rajhans

Hello All, I have stuck in a problem. There are set of strings of different length. I have to remove repeated elements from all the strings except from the string in which it appeared first. For example say the input strings are "3 4 7 2 15 10" "5 7 …

Software Development java
Member Avatar for rajhans
0
210
Member Avatar for sidra 100

m a begineer of java programing plz tel me wats wrong in my program. [CODE]// my first program public class HelloWorld { public static void main(String[] args) { System.out.printIn("Hello World"); } }[/CODE] it shows the error cannot find symbol. symbol:method PrintIn(java.lang.string) location: class java.io.printstream system.out.printIn("helloWorld") 1 error

Software Development java
Member Avatar for vijaykavin10
0
98
Member Avatar for user543820

Hi! I try to open an existing excel file and have included namespaces and libraries as well but the highlighted words show errors. Please help. [CODE]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Excel; using Microsoft.Office.Interop.Excel; namespace excel { public partial …

Software Development microsoft-office
Member Avatar for Teme64
0
178
Member Avatar for eziekiel123

[CODE]import java.util.*; public class scwhile{ static Scanner input = new Scanner (System.in); public static void main (String[] args) { char letter; String inputMessage; String inputString; String outputMessage; inputMessage = "Program to convert uppercase " + "letters to their corresponding "+ "telephone digits.\n" + "To stop the program enter #.\n" + …

Software Development java
Member Avatar for JamesCherrill
0
234
Member Avatar for techyworld

A program that accepts two positive integer values x and n, and uses a function to calculate the value of x raised to the power n. The function should calculate power by repeated multiplications. The result should be returned to the main function and displayed. I use linux terminal to …

Software Development c
Member Avatar for techyworld
0
175
Member Avatar for iamnot

This code is give in a data structures book I issued from my library. I am not able to understand how the functions are working. I am aware of the algorithms. Can anyone please explain how qinsert(),qremove(),build(),encode() are working.Please explain in detail [CODE]#include <stdio.h> #include <string.h> typedef struct node_t { …

Software Development c queue
Member Avatar for Mouche
0
236
Member Avatar for gahhon

[CODE] public class Rectangle { private double length; private double breadth; public void Rectangle(){} [COLOR="Green"]public Rectangle(double length, double breadth){[/COLOR] this.length = length; this.breadth = breadth; } public void setLength(double length){ this.length = length; } public double getLength(){ return length; } public void setBreadth(double breadth){ this.breadth = breadth; } public double …

Software Development java
Member Avatar for ~s.o.s~
0
124
Member Avatar for nick6987

we given a program department program which user enters a number to a specific department and now our teacher wants us to convert that to a switch and use enum data type having a little trouble with some of the errors. [CODE]import java.util.Scanner; enum MenuOptions currentPrompt { BILLING, FORECLOSURE, LISTING, …

Software Development java
Member Avatar for stultuske
0
151
Member Avatar for manugm_1987

Hello everyone How can i get all the table names of database and display these table names using combo box. Or store the table names in an array . I am using sqlexpress and c#

Software Development
Member Avatar for manugm_1987
0
350
Member Avatar for dennysimon

hello all in dataGridView1 I have 2 columns Column fruitname and column fruitpictures The content are : banana (picture of banana) orange (picture of orange) etc How to print the content of the dataGridView1 (including the fruits picture ) ? thank you denny

Software Development
Member Avatar for dennysimon
0
403
Member Avatar for WDrago

All, I can't seem to find anything on the web about how to connect to a LibreOffice database. I am currently using the following code to connect to a MS Access database and would like to know how to change it to work with LibreOffice. [CODE]String strConnect = "jdbc:odbc:DRIVER=Microsoft Access …

Software Development java microsoft-access
Member Avatar for WDrago
0
3K
Member Avatar for techyworld

Write a program containing a function that takes 2 integer parameters x and y and returns the value of x2 + y2. The main program should then allow the input of two integer values a and b and display the value of a2+b2. Can someone help me?am having this error: …

Software Development c c# c++
Member Avatar for techyworld
0
112
Member Avatar for swissknife007

What are the settings I require so I can debug line -by line? Or else ,I can identify lines of code where run time errors are occuring.. I want to view exact line number of error in this code/[CODE]#include<stdio.h> #include<conio.h> #include<string.h> struct node {struct node * left,*right; int freq; char …

Software Development c c++ data-structure
Member Avatar for gourav1
0
299
Member Avatar for guidely

Hi, I having problem with enter file name to read file it give me result like this [CODE] Please Enter Ship File path or Ship File name: data Segmentation fault: 11 [/CODE] Here is my code [CODE] #include <stdio.h> #include <stdlib.h> struct harbour { int harbourId; int maxCap; int timeUpload; …

Software Development c file-system
Member Avatar for WaltP
0
221
Member Avatar for guitarguy889

Hello Daniweb! :) I am brand new to this site, and wish I didn't need the help but I do! So let's give it a go shall we? I have a program I have been working on for about two weeks now, and I feel like it should not be …

Software Development c file-system
Member Avatar for WaltP
0
191
Member Avatar for umer jaan

Hello dear i want to Identify filled rectangles in picture given picture in vb .net. Please help me in this matter. please

Software Development vb.net
Member Avatar for umer jaan
0
104
Member Avatar for JoshuaBurleson

I'm trying to use cx_Freeze and everything everything seems like it should work fine, however I'm getting an import error for import tkinter [CODE]Traceback #... from tkinter import __fix #... import_tkinter ImportError: DLL load failed: The specified module could not be found.[/CODE] This only happens when I take the the …

Software Development python tkinter
Member Avatar for JoshuaBurleson
0
354
Member Avatar for rcowboy

Hello all, I'm getting an error in the following code, and I can't figure out why exactly. Error is as follows: no match for 'operator>>' in 'scoresIn >> scoresArray' this is at line 28 on the code below. I'm trying to bring in some data from a text file into …

Software Development c++
Member Avatar for rcowboy
0
191
Member Avatar for ShadyTyrant

I am trying to install sql server 2005 express edition from the visual studio 2008 CD. This is the error I get. [CODE] [04/19/11,00:56:13] Microsoft Visual Studio 2008 Professional Edition - ENU: [2] CMSIDirectory::SetDirectory - Invalid argument ***EndOfSession***[04/19/11,00:56:13] Microsoft Visual Studio 2008 Professional Edition - ENU: [2] CMSIDirectory::SetDirectory - Invalid …

Software Development sql visual-studio
Member Avatar for ShadyTyrant
0
364
Member Avatar for rotten69

Hey everyone, I have been looking for video tutorials on SWING class and pretty much of GUI side in Java .. I found tutorials on Oracle site but they require lots and lots of reading.. if anyone knows a good site that has videos on GUI, please share it.. Time …

Software Development gui java java-swing oracle
Member Avatar for ceyezumma
0
433
Member Avatar for dancks

A lot of problems here. I was to write a program that sorts an array. I had problems overwriting data in an array so I thought I could store the sorted array in another array. Basically it looks for the smallest value, stores it in the first spot, then finds …

Software Development assembly
Member Avatar for dancks
0
3K
Member Avatar for Fattman

Hi All, I have noticed that there is another thread about this matter, but could not quite get my head around it. Basically I have to create an application which is a quiz. According to the users score it will then determine what level of skill they have. I know …

Software Development vb.net
Member Avatar for codeorder
0
370
Member Avatar for manugm_1987

Hello everyone, Is it to possible to validate cells of datagridview using regular expression? Also i am loading datagridview using combo box i.e table names are provided in the combo box depending on the selection corresponding tables data will be loaded on to the grid view. And all the tables …

Software Development
Member Avatar for manugm_1987
0
145
Member Avatar for Zssffssz

Well when I run my program the bar at the top says C:\programing\C++\Test\Test.exe (<<just an example) How do I change this? And how do I make the console window look more XPish (I heard it was called luna). Answer the title one first please. I wnt this too be all …

Software Development c++
Member Avatar for NathanOliver
0
445
Member Avatar for Tom_Weston

So example.txt contains this; [B]The Man Walked Into The Forest[/B] What I would like is for it to show, what line the word "Walked" is on. [CODE] #include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; string word = "Walked"; ifstream myfile ("example.txt"); if …

Software Development c++
Member Avatar for Tom_Weston
0
88
Member Avatar for Wilha

im trying to write a code that i can input a,b,c and the code will run it in the quadratic formula and give me the answer but i keep getting a error problem import math from math import sqrt print print ("Welcome to the Quadratic Program") print ("--------------------------------") print a=input("Enter …

Software Development python
Member Avatar for Wilha
0
373
Member Avatar for r4rozen

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace DiceSimulator { public partial class Form1 : Form { StandardDie die1, die2, die3, die4, die5; Random rand; public Form1() { InitializeComponent(); rand = new Random(); } /// <summary> /// This is the Event …

Software Development
Member Avatar for cale.macdonald
0
238
Member Avatar for ben1996123

How do I create a message box that lets me display a variable? I also need to know how to display variables with text. Here is the code in the switch(message) statement that I have at the moment that doesn't work. [CODE] case WM_CREATE: CreateWindow( TEXT("button"), TEXT("Click"), WS_VISIBLE | WS_CHILD …

Software Development c++ gui windows-api
Member Avatar for Frederick2
0
597
Member Avatar for Sudo Bash

Hi all, I am trying to create a class to serve as a customized cout class. Right now I have made some test code to see if I can do it. Right now I am trying to make it function just like cout, but later I will have it do …

Software Development c++
Member Avatar for Sudo Bash
0
2K
Member Avatar for born316

hii I am trying to develop a simple image browser.this is wat i have done so far [CODE]from Tkinter import * top=Tk() def search(): global pic global photo pic=PhotoImage(file='images\\pic.gif') photo=w.create_image(250,200,image=pic) w=Canvas(top,height=500,width=500,bg="white") entry=Entry(top,bg="white") nxt=Button(top,text="next",activebackground="blue",command=next) prev=Button(top,text="prev",activebackground="blue") b=Button(top,text="search",activebackground="blue",command=search) b.pack() entry.pack() nxt.pack(side=RIGHT) prev.pack(side=LEFT) w.pack() top.mainloop() [/CODE] as u can see it will display a …

Software Development image python tkinter
Member Avatar for Netcode
0
774
Member Avatar for StephNicolaou

Hi all, Trying to simply call method, (below) from another class and return the value found by the scanner. Please see below: [code] public int getInt(String prompt) { System.out.print(prompt + "a"); //int result = in.nextInt(); if (in.hasNextInt()) { x = in.nextInt(); y = in.nextInt(); sum = x+y; System.out.print("sum" + sum); …

Software Development java
Member Avatar for StephNicolaou
0
150
Member Avatar for maybnxtseasn

[url]www.learncpp.com/cpp-tutorial/103-aggregation[/url] In the example given they state a department can have a teacher and if a department goes out of scope/deconstructs it doesnt destroy the teacher that was in that department. for example in real life departments at different school change names,get added,and get deleted all the time. Just because …

Software Development c++
Member Avatar for maybnxtseasn
0
118
Member Avatar for trantran

Why is this possible (in VS2009): [CODE] struct outer{ struct inner1{ void f(){ inner2 in2; in2.g(); /* no previous forward declaraction*/ } }; struct inner2{ void g(){} } }; [/CODE] ... but not this (???) [CODE] struct outer{ /* This line required to remove error: struct inner2; */ struct inner1{ …

Software Development c++
Member Avatar for trantran
0
181
Member Avatar for Laxman2809

So I have been tasked with creating a program that is essentially a planner for a person. It has to have the abilities to add events of 3 types(Party, Dance Class,Club Meeting). It then has to be able to display everything enter, and be able to display the things that …

Software Development java
Member Avatar for stultuske
0
121
Member Avatar for nav010

Please help me I am new to VB.net and I want to create a pop-up window in VB.net Thanks

Software Development vb.net
Member Avatar for imawesome511
0
16K
Member Avatar for mihirpatel12

i m using following query for inserting data into my database... everything is ok but whenever i restart my form there is no data in my tables :( do i need to use commit statement ?? if yes then how ? [CODE] Private Sub Button1_insert_Click(ByVal sender As System.Object, ByVal e …

Software Development vb.net
Member Avatar for Netcode
0
200
Member Avatar for Neversleepin

Hi all, Here is what i found with google to Find and Replace word in Java: [CODE] public class ReplaceAll { public static void main(String[] args) { String str="We want replace replace word from this string"; str=str.replaceAll("replace", "Done"); System.out.println(str); } }[/CODE] It works well but how to do the same …

Software Development java
Member Avatar for stultuske
0
1K
Member Avatar for 2k9-it

hello friend i want to change arabic or farsi alphabet convert into unicode so plzz give hints

Software Development java
Member Avatar for stultuske
0
79
Member Avatar for AQWst

I am new to GUI Java programming and I am attempting to find the best way of creating a frame to contain a series of menus. I am first adding logic to have the date and time appear in the frame, but the way I am doing it they are …

Software Development gui java java-swing
Member Avatar for stultuske
0
421
Member Avatar for anu07

The output I expected was: [ICODE]alpha beta[/ICODE] I used the following code: [CODE]#include<iostream.h> #include<conio.h> void main() { clrscr(); char choice[2][5]={"alpha","beta"}; cout<<choice[0]<<endl; cout<<choice[1]; getch(); }[/CODE] But this is what comes: [ICODE]alphabeta beta[/ICODE] Can anyone tell me what I did wrong? Thank you. P.S.:I know I am not using standard c++, but …

Software Development c++
Member Avatar for anu07
0
177
Member Avatar for zifina

i have a trackbar bound to a text box.how can i change value of the trackbar to its maximum value if text box value exceed the max limit for trackbar.is there any setting in properties of trackbar? its very urgent..please help..thanks in advance.

Software Development
Member Avatar for zifina
0
96
Member Avatar for Dersev

Hello I have a small problem with ListSelectionListener. I can not copy dataList.getSelectedValue().toString(); to global String variable text. How can I do it ? This is inside of if statement and that is the problem. Anyone knows how to solve it ? [CODE] ListSelectionListener lListener = new ListSelectionListener() { public …

Software Development java
Member Avatar for mKorbel
0
322
Member Avatar for iamnot

[CODE]#include<stdio.h> #include<conio.h> #include<string.h> struct node {struct node * left,*right; int freq; char c; }; typedef struct node node; int front=1; node * q[256]; char * code[128]={0},array[1024]; node * new (int freq,char c,node * a ,node * b) { node * n=(node *)malloc(sizeof(node )); if(freq) {n->c=c; n->freq=freq;} else {n->left=a;n->right=b; n->freq=a->freq+b->freq; } …

Software Development c
Member Avatar for gerard4143
0
191
Member Avatar for ceyesuma

Hello all. In my Apache derby db I set up Decimal data types like this: [code] admin_pay_rate DECIMAL(5,2), [/code] I use JFormattedTextFields to filter decimal usage in text fields concerning money Like admin pay rate would be 150.00: this is good. In the JFormattedTextField it will allow 1,000.00 but the …

Software Development apache java java-swing
Member Avatar for mKorbel
0
209
Member Avatar for aFg3

Hi, I am writing my output using printf(...) procedure. Sometimes I would like to use bold font.like this [CODE]interface(.... turn bold on :-) .....) printf("something in bold\n"); interface(.... turn bold off :-) ....) printf("something not in bold\n"); Is any way to do this?[/CODE]

Software Development shell-scripting
Member Avatar for cfajohnson
0
5K
Member Avatar for glut

Here's my error. "[B]System.NotSupportedException[/B]" I have some problems with the StreamReader class. I have a textbox, and with the textbox, the text is the files location. I have tried with a pattern('@'), and with using the double slash character, and NOTHING has worked. Here is my function [CODE] static string …

Software Development c#
Member Avatar for Mitja Bonca
0
175
Member Avatar for manugm_1987

Hello everyone, Please someone help me out from this problem. I have an datagridview which is bound to an datasource which contains two tables CompDetails and Orders. Now when i click on button and if texbox.text=1 data will be displayed fine, if i click the button for second time the …

Software Development dataset
Member Avatar for Mitja Bonca
0
134
Member Avatar for zaxon1987

Okay so basically I'm studying Introductory programming using the 'BlueJ' Java program on Mac. I'm trying to create a 'Dynamic Billboard' program that asks a user to enter a five letter word using the letters; ' S, P, A, R, E', then displays it in white on a black screen …

Software Development display java
Member Avatar for JamesCherrill
0
222
Member Avatar for vedro-compota

hi there) guys, plesae tell me - what should i change in this code to see message in a console window (i also need define the OS) = [CODE]#include <stdio.h> #if defined(_WIN32) || defined (_WIN64) #include <windows.h> #define WINDOWSS 1; #endif int main() { char* mtext = " Please specify …

Software Development c
Member Avatar for vedro-compota
0
1K

The End.