43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for VeyRonX

Hi, This is the line: Class ourClass = new Class.forName("com.app.something"); And this is the the error: cannot find symbol class forName My IDE is Intellij Idea. This is a particular case, but i want to know what causes this type of error, what should i look for.

Software Development ide java
Member Avatar for JamesCherrill
0
652
Member Avatar for george8

Hi all... I hope you have good time .... I have problem in the new program and I want to your help .. I want to back up the database type from Access, but my problem I could not generate code to determine the path of the database, I noticed …

Software Development microsoft-access vb.net visual-studio
Member Avatar for Sahil89
0
291
Member Avatar for Muhammad Anas

Here is a very simple segment of code. What I want is when I click on the button "First Button" then the window become empty. What actually happens is the window just becomes unresponsive. What could be the problem and what could be a solution?? import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import …

Software Development java java-swing
Member Avatar for Muhammad Anas
0
6K
Member Avatar for CEOEngineerSoft

Here is a class to SQL use an access database: Class MyDB Public DBName As String Private con As New OleDbConnection(ConStr) Sub New(ByVal DBN) DBName = DBN End Sub Private Function ConStr() ConStr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & DBName & ";" End Function Private Sub ConInit() If con.State <> ConnectionState.Open Then …

Software Development microsoft-access open-source sql vb.net
Member Avatar for Sahil89
0
202
Member Avatar for SAM2012

I have queue class as below public class queue { public: queue(); ~queue(); bool Empty() const; void Enqueue(message^); void Dequeue(); void DisplayAll() const; private: gcroot<String^> bindingkey; queue(queue const& obj); ListNode* head; ListNode* tail; }; queue::queue():head(nullptr), tail(nullptr) {} queue::~queue() { while (head != nullptr) { Dequeue(); } } //bool queue::Empty() const …

Software Development c++ queue
Member Avatar for emilo35
0
174
Member Avatar for ashboi

I'm getting some errors with my code, & cant seem to find where the problems are. Basically I'm making a student class that calls out the student id & name. I hope someone can point me in the righ direction to get this code working. Thank you student.cpp: #include <iostream> …

Software Development c++
Member Avatar for ashboi
0
162
Member Avatar for empror9

hello, i'm leaning about ActionListener but i can't compile my code, i don't know why :( this is the code package javaapplication7; import java.applet.Applet; import java.awt.Button; import java.awt.Color; import java.awt.Label; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class Test extends Applet implements ActionListener{ Button b1=new Button("Red"); Button b2=new Button("Green"); Button b3=new Button("Blue"); …

Software Development java
Member Avatar for empror9
0
92
Member Avatar for crownedzero

I have a private ArrayList in a class and I'd like to be able to access it outside of this class, what would be the proper way to do this? Right now I've just made the ArrayList public but I would like to allow it to be private. Should I …

Software Development java
Member Avatar for NormR1
0
271
Member Avatar for irtihussain

package array1; import javax.swing.*; import java.util.Random; class pickrand{ Random rand = new Random(); public static String get(String[] array){ int rnd = rand.nextInt(array.length); return array[rnd]; } } /*********************************************************************/ public class Array1 { public static void main(String[] args) { int size = 10; String[] passcheck = new String[size]; String[] pass = {"abc345", …

Software Development java java-swing
Member Avatar for irtihussain
0
1K
Member Avatar for razamughal67

Hello everyone we use a listview box and we add some path's of the files in list and now we want to show the file icon with in file path example: listview1.item.add " D:\test.txt" listview1.item.add " D:\picture.jpg" now we want to show these files icon in my listview please tell …

Software Development listview visual-basic
Member Avatar for Jx_Man
0
2K
Member Avatar for nagatron

Hello to all java programmers, I have a problem about method and array. The program will display the second highest value of the inputed set of numbers in the main method. The problem is that it won't accept less than four inputs which mean it is necessary to put 4 …

Software Development java
Member Avatar for nagatron
0
252
Member Avatar for BryantFury

Hi im trying to learn polymorphism and i stumbled upon a question. Polymorphism to me means 1 with many forms. here is my code: // virtual members #include <iostream> using namespace std; class CPolygon { protected: int width, height; public: void display(); virtual string area () { return ("FIRST"); } …

Software Development c++
Member Avatar for BryantFury
0
97
Member Avatar for sonicx2218

import java.util.*; import java.io.IOException; import java.util.Scanner; import java.util.Random; public class LinkedListProgram { public static void main(String[] args) throws IOException { int i,number, ran; Scanner sc = new Scanner(System.in); LinkedList<Integer> list = new LinkedList<Integer>(); ListIterator li; String line; Random random = new Random(); int pick = random.nextInt(150); System.out.println("Enter # of nodes"); …

Software Development java linked-list mathematics
Member Avatar for sonicx2218
0
3K
Member Avatar for crownedzero

I'm using a loop to get user input and compare it; Idk why but on the first iteration of the while it works fine and displays only once. Second run thru I get two prompts, hoping someone can point out where I'm screwing up. public static void main(String[] args) { …

Software Development java
Member Avatar for NormR1
0
207
Member Avatar for weblover

Hi, i'm new to python and I'm having a problem that I'm not able to solve. I have the following 2D array: valuearray = [['A', '21', '45'], ['A', '12', '23'], ['A', '54', '21'], ['A', '15', '54'], ['B', '23', '53'], ['B', '34', '53'], ['B', '32', '54'], ['B', '24', '13'], ['C', '31', …

Software Development python
Member Avatar for Gribouillis
0
441
Member Avatar for Baduizm

I have this Singleton class: package com.CCharles.Singleton; import java.util.ArrayList; public enum Singleton{ INSTANCE; public void createList(){ ArrayList arrayList = new ArrayList(); for(int i=1;i<101;i++) { arrayList.add("Job "+i); } for(int i=1;i<101;i++) { System.out.println(arrayList.get(3)); } System.out.println("DONE"); } public void sayHello(){ System.out.println("Hello World"); } } and I am accessing Using: package com.CCharles.Singleton; import com.CCharles.Singleton.Singleton; …

Software Development java
Member Avatar for Baduizm
0
182
Member Avatar for jaymayne

Its an exam question that wants to modify code so that the following output is generated 1 2 3 4 5 2 3 4 5 3 4 5 4 5 5 **This was the original code** #include<stdio.h> void main() { int i,j; for(i=1;i<5;i++) { for(j=1;j<=5;j++) { printf("%d",i); } printf("\n"); } …

Software Development c
Member Avatar for jaymayne
0
170
Member Avatar for joankim

Learning Java, I have never used the keyword "this". So I am wondering when it is smart to use it. I know that it does prevent name conflicts: public class test { int x; int y; public test(int x, int y) { this.x = x; this.y = y; } } …

Software Development java
Member Avatar for devninja
0
282
Member Avatar for sonicx2218

So my java class is a joke, and we're expected to learn how to do our assignments via the web...I'm a hard worker, but I'm just not good at this. [Assignment pic](http://oi50.tinypic.com/aw3zx2.jpg) There's the assignment image. I think i got how to do the first part with the adding random …

Software Development java linked-list programming-construct
Member Avatar for sonicx2218
0
550
Member Avatar for nuclear

Maybe I'm just missing something but I was thinking what do you call something like a Windows Form Application in Visual Studio where you can drag and drop and stuff like that. Do you call that an API or SDK or GUI or something else? By the way, as I …

Member Avatar for mike_2000_17
0
246
Member Avatar for yamigx

hi.. i am trying want to solve this Write a complete program that reads 11 integers from a file called ‘file.txt’ and stores them in an array. Your program should then remove the duplicated numbers, find and print the sum of all the even numbers in the array as well …

Software Development c
Member Avatar for TrustyTony
0
278
Member Avatar for bettybarnes

Hi I have a program in java that outputs 1000 hello world without using iterators (for, do while etc).. I tried to translate my code into vb.net and here's my code: `Module Module1 Sub Main() printToThousand(1) End Sub Public Function printToThousand(ByVal i As Integer) Dim r As Boolean Console.WriteLine("Hello World") …

Software Development vb.net
Member Avatar for Reverend Jim
0
86
Member Avatar for FUTURECompEng

The output of the following line of code is: Not Done End boolean notDone = false; if (notDone = true) System.out.print("Not "); if( notDone = false) System.out.print("Done "); System.out.println("End"); The answer is false but I am having a hard time understanding why. Aren't the if statements setting notDone equal to …

Software Development java
Member Avatar for FUTURECompEng
0
271
Member Avatar for Valiantangel

Hi, how do i output a list,1-5 of the following factorial? #include <stdio.h> #include <stdlib.h> #define fact 5 int main(void) { int i,result=1; for (i=fact;i>=1;i--) result*=i; printf("factorial of (%d) = %d\n", fact, result); return(EXIT_SUCCESS); }

Software Development c
Member Avatar for TrustyTony
0
92
Member Avatar for HungMob

I keep getting an error with the "ButtonListener." I don't know what it is that's causing it, but help would be appreciated. import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class MovingCarPanel extends JPanel { private int delay = 2; private Car car; private Timer …

Software Development gui java java-swing
Member Avatar for DavidKroukamp
0
190
Member Avatar for khuzdaar

I have my project due of hangman and it is worrying me lately. I need to make a hangman game. I have studied arrays, functions, loops, if else statements. That is about it. I haven't done 2d arrays. Will do it now, because someone told me it is not possible …

Software Development c++
Member Avatar for khuzdaar
0
324
Member Avatar for Baduizm

I Have This Workers List: private List<Worker> buildWorkerList( Producer producer ) { List<Worker> workerList = new ArrayList<Worker>( 11 ); workerList.add( new WorkerImpl( "Garnett", producer ) ); workerList.add( new WorkerImpl( "Durant", producer ) ); workerList.add( new WorkerImpl( "Xavier", producer ) ); workerList.add( new WorkerImpl( "Daniel", producer ) ); workerList.add( new WorkerImpl( …

Software Development java
0
179
Member Avatar for mehnihma

I need Subversion server for eclipse and client which works on Mac, I need something free or a 30 day trial Do you have some idea? Thanks

Software Development client-server java
Member Avatar for ~s.o.s~
0
118
Member Avatar for king03

Hi there guys I need your suggestions. Do you know any system or game that is not that hard to program, like something that can be done for less than 3 weeks because I need it for my term project. thank you for those who will help out.

Software Development c c# c++
Member Avatar for thines01
0
118
Member Avatar for jhamill

Hey so this is my code for checking for palindromes...it compiles fine, the problem is it doesnt work. Basically I converted the four sentences into strings without spaces or other characters and added them to a new string called newstr....i used the newstr to check for a palindrome in the …

Software Development java mathematics
Member Avatar for NormR1
0
313
Member Avatar for Gus_19

My textboxes and labels are fine in design view, but when I switch over to Debug or Build, a couple of the textboxes are pushed together and the labels aren't in their original spots. Haven't seen this before and was wondering if anyone has any suggestions as to why and …

Software Development vb.net
Member Avatar for Mitja Bonca
0
232
Member Avatar for TrustyTony

I would like to take string argument for class BalancedTrinary intializer, but the string type of argument is processed before it enters the init function. I guess I must override any class method which deals with those for int/long? def val(number_sequence, base): """ produce integer value of number_sequence as base …

Software Development oop python
Member Avatar for Gribouillis
0
277
Member Avatar for choosenalpha

Greetings All, I have a brain fart. I am trying to print the first and second number in the array which is [0] and [1]. I have the for loop going through each element in the array integersCount[] so I can find those positions. But do I need an if …

Software Development java
Member Avatar for choosenalpha
0
209
Member Avatar for lfmconsummates

I currently have this login form in my python program with a submit button: <input type="text" class="input-small" placeholder="Email"> <input type="password" class="input-small" placeholder="Password"> and I have an sql database that has emails/logins/etc. How do I make it so the after pushing the submit button, the email/password is verified with the database …

Software Development python sql
Member Avatar for lfmconsummates
0
126
Member Avatar for Gus_19

Is there a way to check the x and y coordinates of a label in debug view?

Software Development vb.net
Member Avatar for adam_k
0
64
Member Avatar for jwill222

#include<iostream> using namespace std; int main() { int Partnumber[15] = {112,130,156,173,197,150,166,113,123,143,167,189,193,117,176}; int Quantitynumber[15] = {12,30,56,17,19,50,66,13,12,14,16,18,19,11,76}; int hashTable[19][2]; int collisions = 0; int index = 0; for(int i = 0; i<15;i++) { index = (Partnumber[i] % 19); hashTable[index] = Partnumber[i]; if (hashTable[index] != 0) { do{ index++ }while(hashTable[index]!=0) } if(index >= …

Software Development algorithm c++
Member Avatar for jwill222
0
613
Member Avatar for ManafShabbir

I am making a project for my final year, asp.net with vb.net ( Beginner ). i upload the file using the fileupload control of asp.net on the server. Now how will the client be able to download that file? Would appreciate help.

Software Development client-server vb.net
Member Avatar for ManafShabbir
0
107
Member Avatar for NickPatton

I've written a Rational Class that takes fractions and can add, subtract, multiply, divide etc. I'm trying to keep my fractions reduced but for some reason, some but not all of my fractions are being reduced. I've posted my code below. I commented the fractions that aren't being reduced as …

Software Development c++ mathematics
Member Avatar for NickPatton
0
1K
Member Avatar for v3ga

I just started learning Java (Currently, I know basic swing components like JPanels, text areas, textfields etc) and I have chosen a Logic Circuit Simulator as a project. My objective is to simulate the working of logic gates by making circuits using drag & drop. So far, I have thought …

Software Development java java-swing
Member Avatar for v3ga
0
1K
Member Avatar for Majestics

I want to assigne value to string array but i dont know the size of the array from start... Is there any way to do it Programatically for(int i=0 ; i < unkownSize; i++) string[i] = some value I hope my question is clear.

Software Development java
Member Avatar for NormR1
0
144
Member Avatar for NyQii

Im trying to run a sipmple program in c++ using openGL but get these errors... can somebody please help me? Error 1 error LNK2028: unresolved token (0A00002D) "extern "C" int __stdcall __glutCreateWindowWithExit(char const *,void (__cdecl*)(int))" (?__glutCreateWindowWithExit@@$$J18YGHPBDP6AXH@Z@Z) referenced in function "extern "C" int __stdcall `anonymous namespace'::glutCreateWindow_ATEXIT_HACK(char const *)" (?glutCreateWindow_ATEXIT_HACK@?A0x6d0c8cb1@@$$J14YGHPBD@Z) c:\Users\Surané\documents\visual studio …

Software Development c++ opengl visual-studio
Member Avatar for NyQii
0
226
Member Avatar for eshray

hello, acually your site is helping me alots , thanx alots I have an assignemt n i stuck on readind data from user and hendle them as single string plzzzzz anyone can help me:( i tried alots and alots Write a C++ program that will make use of the following …

Software Development c++ data-structure
Member Avatar for nullptr
0
115
Member Avatar for anuj_sharma

Hi, I am trying to get a screenshot of the active window on the screen, for which unfortunately Java does not have an API. It allows me to capture the screenshot of the whole screen but not of the active window. Now, I did a bit of workaround but it …

Software Development api java
Member Avatar for anuj_sharma
0
263
Member Avatar for Johannady2

/*This code counts the vowels in strings? It has to use user defined methods: */ import java.lang.String; import java.io.*; import java.util.*; public class vowelConsonant2 { static Scanner scan = new Scanner(System.in); public static void main(String args[]) { String text; int actualI, actualC; System.out.println("Enter the String:"); text = scan.nextLine(); System.out.println("There are …

Software Development java
Member Avatar for NormR1
0
279
Member Avatar for Sawamura

hi all, this my question again.. i need to load data from database and it will show in combo box. if i want to load id_user from database i will get all id user fill the combo box item, so i can choose the user. how can i do this? …

Software Development vb.net
Member Avatar for Iamateur
0
380
Member Avatar for himanshuyadav

Hello, Can you please help me in following scenario in Perl scripting? I want to correlate two text files to get output. CONSIDER TWO CHEMICAL REACTION:- (1) A+E+C--->F+H+L (2) A+B--->G+I INPUT_FILE1.TXT #REACTANT #REACTION NO. A 1 E 1 C 1 A 2 B 2 INPUT_FILE2.TXT #PRODUCT #REACTION NO. F 1 …

Software Development perl
Member Avatar for 2teez
0
210
Member Avatar for drichird

import os def a(): print("A") def b(): print("B") # I want to sometimes skip the main body if os.path.isdir("C:\\Blender\\mainbody"): print("main body of module_A") Is there a way to control whether or not the main body of a module gets executed by passing in arguments to the import command, such as …

Software Development python
Member Avatar for drichird
0
8K
Member Avatar for drichird

I am finding myself a little confused about how Python imports. Would the following be a correct statement: In any Python interactive shell, if the shell (since it was initiated or opened) has never before imported "myScript.py" then if the user types in "myScript" he will get an error like: …

Software Development python unix
Member Avatar for drichird
0
391
Member Avatar for kutuup

I'm trying to implement a template class called "Tree", here is the code for the main function: [code=c++] #include "Stack.h" #include <iostream> #include <time.h> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int gameObjects = 0; Tree<Player>* PlayerTree = new Tree<Player>; Player** players; players = new Player* [5]; Player* …

Software Development c++
Member Avatar for pubudu1199
0
150
Member Avatar for SAM2012

Dear All, I have function that works like this. Here # represnts one word while * is for one alphabet. Can anyone help me changing this code where # is for 0-N words, means it works if at # there is no word between dots, while for * there must …

Software Development c++
Member Avatar for SAM2012
0
428

The End.