527 Posted Topics
Re: [QUOTE=willy taufik;666154]where i can find emulator nokia 3500(clasic) for netbeans 6.1?[/QUOTE] Hmmm... this is an old post which may or may not help you-- [url]http://www.daniweb.com/forums/thread82017.html[/url] --since your problem is specific to 6.1, the post might be a bit outdated. Hopefully it helps. | |
Re: [QUOTE=vvfegade;666215]I'm very new to JSP ,i want information about where to save & how to run JSP.what are the othe requairements for JSP[/QUOTE] Ok what you're asking isn't exactly specific enough to know if you want to learn "Java" or "Java Server Pages." There is a JSP forum in the … | |
Re: [QUOTE=CoolGamer48;665325] What are you trying to do with the colon? Also, I don't believe there's a point to a union with only one element. [/QUOTE] I'd like to know this myself. I typically don't see the colon used in unions/structs. I guess it's something I need to study. [QUOTE=CoolGamer48;665325] I … | |
Re: This may help you-- [url]http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx[/url] -- furthermore, from the looks of the FAQ and your assignment, it's fairly obvious of what you need to do. Since you're using Strings, I'd assume that you'd use their first character as a key and then store them through a hash by sorting them … | |
I recently wrote a cpp file that I'm questioning. I'm unsure of whether the approach I took is correct or if it will cause damage to the heap. The goal of the project is to be able to do "clean-up" on dynamically allocated memory by storing the created object in … | |
Re: [QUOTE=Salem;665918]Or just plain WRONG! [url]http://c-faq.com/expr/xorswapexpr.html[/url] You're using a compiler, not a programmable calculator which literally interprets every character of your source code. Overly cute statements like this end up making things worse, not better.[/QUOTE] Not only that, but the bit-shifting operators will only swap values properly for primitives like ints … | |
I'm trying to create my own pattern (or something similar to a pattern I guess) where objects that are anonymously instantiated can still be referenced, but I'm getting weird memory results. It seems as if the free memory is decreasing when it should be increasing-- [code=java] import java.util.ArrayList; public class … | |
![]() | Re: You had some of your code misplaced. I did a few corrections with detailed comments on what is happening in the code. Here it is revised-- [code=java] import java.math.*; import java.util.*; import java.io.*; public class Add1{ public static void main(String args[]) { ; System.out.println("eneter n"); // prints out message Scanner … ![]() |
Re: You're trying to use the input stream operator '>>' on your Calc object, yet you haven't overloaded the operator to accept a Calc object. [code=c++] #include <iostream> #include <stdio> #include <assert> #include <string> #include "bt.h" class Calc { public: } ; int main() { bSearchTreeType<Calc> obj; string command; cout<<"I-Inputtheexpression"<<endl; cout<<"N-InorderTraversal"<<endl; … | |
Re: [QUOTE=lich;665473]hey is anyone know how to change background color when you click a button.... please tell me. im creating a applet.. need sup[/QUOTE] Within applet context... [code=java] //assuming Applet context // assuming button has the listener registered with this overridden method-- public void actionPerformed(ActionEvent e){ getContentPane().setBackground(new Color(200, 100, 50)); } … | |
Re: Hmm, I'm not sure if this is accurate or not, but you misspelled the a_elem value declared in the local parameter-- [code=c++] inline T* GetNext(const T* a_elem) const { return (T*) a_elem->gmListDoubleNode<T>::m_next; } [/code] When I say accurate I mean it may or may not pertain to your problem, but … | |
Re: If you understand UML your best bet is to first start off with a Sequence diagram that determines events for what needs to be done. Obviously you'll have to do some research to refine the Sequence diagram to have the functionality that you want at the right time. Of course … | |
Re: If you need a line to be read from a particular value (like a date), you could do one of many things-- -(Hard) create a regular-expression to match dates (in MM/DD/YYYY format) and separate lines once a new date has been analyzed. -(Easy) create a method that takes a String … | |
Re: [QUOTE=nirali83;662814]roseindia.net[/QUOTE] It's only a matter of time before Masijade flames this reply... | |
Re: This topic needs to be more narrowed in selection. Maybe for mods only, because other could pertain to anyone O_O I voted for professor Narue, then ~s.o.s~ and you AD. Narue first, and I promise you were second AD =P | |
Re: [code=java] public class frmMain implements ActionListener { frmSubscriber SubscriberFrame; frmBill BillFrame; frmMenu MenuFrame; Subscriber s[]; int n = 0, order = 0; public frmMain() { SubscriberFrame = new frmSubscriber(this); BillFrame = new frmBill(this); MenuFrame = new frmMenu(this); MenuFrame.open(); } public void actionPerformed (ActionEvent onClick) { if (onClick.getSource() == MenuFrame.cmdSubscribe) { … | |
Can someone point me in the appropriate direction to learn the proper use of tagging Information on data with Java Annotations? I've used them before (@Override, @Deprecated and @SuppressWarnings(sp) ) but I'm interested in creating my own for testing-purposes and possibly for medium-to-big projects. I need to understand when to … | |
Re: [icode]if(!emp.getName().equalsIgnoreCase("Stop"));// [/icode] try removing the semicolon at the end of your if statement | |
Re: I know for a fact that there must be an easy way around this... If not, you could consider setting up a server, send the files to the server from your computer, keep it up and running then read the files from the Server into the JApplet (once, to prevent … | |
Re: [QUOTE=worldwaffle;661245]I'm only 11, but I know html, CSS, javascript, and C#. I was wondering, [B]if Java is like C#[/B], as it looks pretty similar, I could just start coding :)! -worldwaffle[/QUOTE] Java does not have the delegate system or unsafe context that C# has to offer. Everything done in Java … | |
Re: First and foremost I'd like to say that I'm damn impressed! If I remember correctly, using switch/case statements yields much faster selection than if-else statements. I don't think that's the main issue though - it may be the operations done in the for loops or possibly the amount of threads … | |
Re: If you need to search for a particular word, use the Regex API -- [url]http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html[/url] -- though, be warned. It is not fond of the light-hearted occurrence-searcher. | |
Re: If you're looking to start out in Java, please go to this link (which is stickied at the top of the page by the way) -- [url]http://www.daniweb.com/forums/thread99132.html[/url] When you encounter problems that you absolutely cannot solve through your attempts alone, post them here and we'll give you a hand if … | |
Re: This may help-- [code=java] import java.io.*; public class BAM{ public static void main(String... args){ // dummy bytes to manipulate byte myBytes[] = { ( (1 << 2) + (1 << 3) ), // 2^2 + 2^3 = 12 -- 1100 ( (1 << 4) + (1 << 2) ), // … | |
Re: [QUOTE=Ancient Dragon;660289] A more complicated method is to create an index file that contains key field values and the index value into the data file.[/QUOTE] Sounds almost like SQL O_O | |
Re: [QUOTE=SonxQ7;660104]Well i know the basic difference which is in C++ this is a pointer whilst Java is a reference to a class... I have a confusion though since am new in Java, can you reference a super class with "this"? more so, is the an underlying difference between the C++ … | |
Re: Whoever gave you those requirements was probably trying to help you out so your code wouldn't be solely lumped in main. You can easily dismantle your code by-- adding the values declared/defined at the start of main to a Struct. Making the multi-lines of code that are constantly c-outing values … | |
Re: [code=java] public class OtherExample { private Example e = new Example(); public void someAction() { if(e.getExample == 0){ // error, e.getExample not declared/found (forgot parenthesis) e.setExample(30); } else { System.err.println("Please wait before doing this action again"); } } /* Is refreshed every 600ms */ public void process() { if(e.getExample() > … | |
Re: You need to have references to your "pan" class in the global field scope. From there, after your JFrame is instantiated, make a call to the "pan" classes repaint method in your actionListener. From there your button should call paint. All you need to do from there is make the … | |
Re: [QUOTE=bloody_ninja;657787]I am trying to create a program that generates random passwords using the characters A-Z and the numbers 0-9. It will also have an input of what you want the length of the password to be. What I don't know how to do is to create a method to choose … | |
Re: Here's a Generic extension of your max-value finder where anything that implements Comparable can be compared-- [code=java] public class Manip{ public static void main(String... args){ System.out.println(Manip.<Integer>maxMany(1, 5, 4, 9, 2)); System.out.println(Manip.<Double>maxMany(2.2, 1.7, 11.2, -7.8, 2.0)); System.out.println(Manip.<String>maxMany("Joe", "Bob", "Mark", "Luke", "John")); } public static <T extends Comparable<T> > T maxMany(T... args){ … | |
Re: Don't re-declare another array with the same name as the one in global scope. Also you may want to initialize your Manswer array in global scope to be full of zeros. [icode] void matmult::multiply(){ //int Manswer1[100][100]={0,0,0,0,0,0,0,0}; // you were masking the global Manswer here for (a=0; a<M1n; a++){ for(y=0; y<M2m; … | |
Re: [QUOTE][B]I m working on this project where i need to get user input and then see if the user input is correct or not. [/B][/QUOTE] [B][I]->[/I][/B] Ok so you need to determine if the user input is correct or not. [QUOTE][B]if it is correct then show the user input in … | |
Re: The problem is that pre-initialization occurs before the constructor is called. Because of that, the data in the Base class is not initialized before the pre-initialization done in the Derived object. The order of events that are occurring in your code are-- pre-initialization to derived object derived object calls base … | |
Re: If you were knowledgeable about how Servers operated in Java, you wouldn't have this problem. Really, this is nothing more than I/O with either streams or packets. The scenario can be one of many. If you're the Server, you wait for incoming Clients. The server can support a finite number … | |
Re: If I recall correctly, all pointers (of all types) can be assigned the address of the NULL type (or zero). I don't see why a cast is necessary. I don't know about using NULL vs 0, but I guess if NULL is a macro and you're worried about it not … | |
Re: [QUOTE=g_yan;655005]i am a final year student. My supervisor had asked me for creating one chat program using java. i don't have any idea on how to started it. he asked me for doing a standalone system. please help me solve this problem?[/QUOTE] Refer to this thread for some tips-- [url]http://www.daniweb.com/forums/thread135209.html[/url] … | |
I've been trying to find time to learn Assembly through the HIDE HLA IDE, but I am completely ignorant when it comes to Assembly. I do not know if my code will be portable when I start learning it. Do other Assembly languages conform to the same standards, or is … | |
Re: [QUOTE=Ancient Dragon;654696]1) Don't use [noparse][CODE=CPP] use instead [CODE=CPLUSPLUS][/noparse] 2) The code above contains the same bug as the version previously posted. Q: What is the bug? A: The resulting string is not null terminated.[/QUOTE] Well it's an easy fix isn't it? >_> [code=c++] char strarray[100] = {0}; string str = … | |
Re: [QUOTE=Salem;654415]Well did you just copy/paste it and hope it would work? Perhaps the do on line 21 is matched by the while on line 26 ?[/QUOTE] I think that while should be on line 53? | |
Re: [QUOTE=Ezzaral;654418]Read the message: You are calling the super() constructor with arguments that do not match any declared constructor in the parent class.[/QUOTE] That pretty much sums it up. For a more thorough explanation-- [code=java] // somewhere in product... // only Constructor for product defined // takes a double, String, double, … | |
Re: Here's the code in code-tags. [code=c++] // caja_paquete_2.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> int main(int argc, char* argv[]) { using namespace std; char tipo_servicio, dia; float peso, total_a_pagar = 0, diferencia; // CALCULA PRECIO UNITARIO DE CADA COSA int total_paquete = … | |
Re: [QUOTE=masijade;652999]With the exception of that second link which has mainly obsolete, and often times simply bad, tutorials/examples/advice. Roseindia is a blight on the Java world. Nearly everytime I see someone use some really bad practice on many forums and tell them not to do that, they often come back and … | |
Re: Try posting your code. From the looks of it, you're trying to use a conditional expression on a function that doesn't return anything. Again, it's a wild-out-of-the-backside guess, so post your code so we can confirm the real issue. | |
Re: [QUOTE=Ancient Dragon;654125]1) Yes, but I don't think anyone does because its only a beta compiler 2) No. They are two different compilers. Visual C++ is by Microsoft and Dev-C++ is by Bloodshed[/QUOTE] I like Dev! Even if it isn't really meant for professional purposes, it's still a great learning tool! … | |
Re: In the event that you need some tips for doing this project, refer to the following links-- [url]http://www.daniweb.com/forums/thread135648.html[/url] [url]http://www.daniweb.com/forums/thread135617.html[/url] [url]http://www.daniweb.com/forums/thread135539.html[/url] -- and as for your error [icode] public Object getItem(){ return item; } [/icode] Object's cannot be used for integral/floating operations like '+' or '>' You'll need to do something … | |
Re: Ok, this is a long-shot but it may be possible to prevent the optimization by marking the modifier entering the function as volatile. Again, I have no idea because this is something an individual told me about in class (since I didn't think code could EVER be skipped unless it … | |
I'm having a small design issue with a Checkers game to be done in Java-- I'm not really worried about coding it, I can do that. The problem is listing out the dependencies between classes. For example, what should be responsible for what? IF I code the program with the … | |
Re: Code reposted without any attempt to compile. Done to make copying/pasting a bit easier. [code=c++] // Main Program // #include "square.h" // Derived Class square int main() { //******************************************************************************* cout << "\t\t\t+y"; cout << "\n\t\t\t +"; cout << "\n\t\t\t +" << "\tpoint a" << "\t\t\t\tpoint b"; cout << "\n\t\t\t +" … | |
Re: [QUOTE=Salem;648223]Knowing how to program is far more important than being able to write a for loop in 20 different languages. Being able to construct a meaningful program in any language counts. Writing "hello world" or a bunch of typical homework assignments in many languages doesn't.[/QUOTE] "Understanding the fundamental concept is … |
The End.