184 Posted Topics

Member Avatar for trishtren

in java , if you dont provide a constructor , java provides one for you , but if you do give one , then java will follow that constructor only. you have a constructor for objectView , but you dont put anything inside it. plus , i dont think i …

Member Avatar for JamesCherrill
0
383
Member Avatar for somjit{}

my host is XP sp2 , and virtual box guest is XP SP3. i want to access the guest from the host. I read and felt that a host-only network is what i want.( ill be using it to use database loaded on guest from the host). i googled it …

Member Avatar for somjit{}
0
186
Member Avatar for bubunchan

though not related to the problem (which IIM solves above) , but , you should update your java version. A lot of nasty things are roaming all over cyberspace , each new update helps in making the holes a bit smaller for them to enter your system through.

Member Avatar for somjit{}
0
270
Member Avatar for G_S

inheritance is really handy in eliminating duplicate code, and making the overall code more compact, since doctor and patient have things in common, its handy to put the common stuff in a superclass. as regards > Can't we use only the children, since they will also have the setter method …

Member Avatar for G_S
0
197
Member Avatar for somjit{}

i basically need mySQL for learning JDBC connections. will be thankful to any information regarding this matter. didnt find anything concrete on the net...

Member Avatar for somjit{}
0
167
Member Avatar for somjit{}

recently , iv started using both Visual Studio 2010 (to learn C#) and i came across eclipse WindowsBuilder ( and i'm loving it.. ). so i was wondering how do these two compare against each other ... strengths and weaknesses ? iv only begun using VS , but i do …

Member Avatar for gusano79
0
223
Member Avatar for game06

C , about 4 years ago. but then i didnt have my own pc , and shared work on our college lab's turbo C running machines never seemed fun , especially as we got only 40 mins per week. it was in early 2010 after getting my own pc , …

Member Avatar for James singizi
0
663
Member Avatar for somjit{}

hi everyone :) im trying to open this project , but when i double click it , vs2010 opens with error on the forms. double clicking the forms shows that the file doesnt exist at the particular directory , even when its visibly there. its probably a trivial thing , …

Member Avatar for somjit{}
0
100
Member Avatar for somjit{}

i grew up with cartoon network and animax... cartoon network has gone bogus , but i dont feel the same for animax. i saw that SOS , the admin from the java forum has baen nido (from Get Backers ) in his display pic, a character who used to be …

Member Avatar for alyssa.wilkins.77
0
397
Member Avatar for SHINICHI

i ran your code , seems to work... perhaps i didnt get your problem. by the way , > The largest row index : 2 > The largest column index : 2,3 i know i didnt understand that part...

Member Avatar for JamesCherrill
0
758
Member Avatar for toldav

this.dollars = dollars; this.cents = cents; the "this" parts above will give you errors. the compiler is asking for a class instance whose dollar and cents variables will be updated , but this is being called from inside a static method. static methods/blocks are compiled first, everything else comes afterwards. …

Member Avatar for somjit{}
0
264
Member Avatar for somjit{}

i was thinking of downloading some database software that would help me learn sql. so far i have only *read* sql , ie havent done any practical sort of thing. i made a post earlier in this forum , where i was told that sql server express will be a …

Member Avatar for somjit{}
0
194
Member Avatar for somjit{}

hi everyone :) im hoping to learn a healthy amount of vb10/12 by the end of the month. mainly to improve my cv and get a better shot at jobs. originally wanted to learn vb6 for a college project , but after a post in daniweb , my ideas are …

Member Avatar for somjit{}
0
332
Member Avatar for somjit{}

hi everyone :) i want to learn vb6 , but i dont know where to start. I have a college project related to creating banking software where vb6 is being used as the frontend. i have around 1 month to get my vb6 skills up , as the project has …

Member Avatar for chowdhary.barnali
0
241
Member Avatar for tricket_7

i only looked at it for a moment , but : Scanner keyboard = new Scanner(System.in); . . input = keyboard.nextInt(); Scanner scanner = new Scanner(System.in); if(input == 1){ System.out.println("Enter a new string: "); item = scanner.nextLine(); i quite dont get use of having two different scanners, also having a …

Member Avatar for tricket_7
0
989
Member Avatar for spowel4

what do you want the delimiters to be? how do you want to parse it? these are important factors when u decide to parse something, and im unable to get much information regarding these from your code. personally, iv always used bufferedReader and string split methods for parsing with good …

Member Avatar for spowel4
0
9K
Member Avatar for game06

you can pass the level of the shooter to the enemy class , then do a switch case statement like : shooting = true; switch(level){ // the shooters level case 1: counter = 20;// reset break; case 2: counter = 10; break; case 3: counter = 5; break; default: break; …

Member Avatar for JamesCherrill
0
167
Member Avatar for Violet_82

by "client" what iv come to understand is the main method that runs classes and its methods in a particular fashion , to get a particular job done. u might hear terms like "test client" as such as well... they are basically a tester class with just the main method …

Member Avatar for Violet_82
0
168
Member Avatar for bobrown101

welcome to daniweb :) maybe you could post for the other classes as well , that way members could run it and check out the nuances themselves.. not only that , but it would be more fun too .. :) good to play hangman :) however , at a first …

Member Avatar for somjit{}
0
429
Member Avatar for toldav

System.out.println("How many positions do you want?"); int userInput = play.nextInt(); // this will lead to problems Clown[] circusClowns = new Clown[userInput]; for (int i = 0; i < circusClowns.length; i++) { System.out.print("Enter the name of the clown: "); name = play.nextLine(); this part of the posted code will lead to …

Member Avatar for toldav
0
278
Member Avatar for somjit{}

i was wondering if there could be some notification system like facebook which pops up a number as soon as something in your daniweb world has changed. currently , i have to refresh to get the info if im already watching the opened page , and if im opening daniweb …

Member Avatar for somjit{}
0
183
Member Avatar for cheesy_ninja45

> Can someone explain what the Fibonacci series is? IIM n <M/> have already added java related information to fibonacci stuff... this post , isnt much about about java , but more about the numbers themselves . if you have seen/read the da vinci code , u might have heard …

Member Avatar for somjit{}
-2
207
Member Avatar for kelay

first of all , welcome to daniweb :) all the membesrs would love to help you out , but you should to show that you gave an effort to solving the problem too .. c'mon thats only fair :) if things didnt work out like that .. daniweb , or …

Member Avatar for somjit{}
0
134
Member Avatar for fatalaccidents

1st of all , i think your complicating your edge class too much... i havent looked at it in detail ,its a lot easier to just keep it as an innerclass of your linked list , and make a constructor as such head = new Node(); // in this case …

Member Avatar for somjit{}
0
895
Member Avatar for milkman93

add() can always work without main method.. this is a simple code showing that happening. import java.util.ArrayList; public class tester { ArrayList<String> arr = new ArrayList<String>(); public tester(){ arr.add("sure "); arr.add("it "); arr.add("does"); arr.add("... see :) "); for(String s : arr) System.out.print(s); } public static void main(String[] args){ tester t …

Member Avatar for milkman93
0
2K
Member Avatar for somjit{}

from today morning , my keyboard just cant keep up. i type a few words , and then it starts displaying the first letters! quite a trouble this ! i tried google-ing about keyboard becoming slow , but the few forum threads i found suggested a format, but thats not …

Member Avatar for javanoob101
0
150
Member Avatar for game06

not sure if "more" or "less" random really make much sense mathematically ... but maybe you could try a switch - case block , and run different code for different cases for different output of the random method.. that way , you can easily write up an increasing number of …

Member Avatar for JamesCherrill
0
105
Member Avatar for game06

you do not want your enemies to collide , but you havent mentioned what you do want them to do when a collision happens or aboout to happen... maybe if you fix that , its will be easier to comeup with algorithms. one possible way is the particle collision model …

Member Avatar for somjit{}
0
134
Member Avatar for game06

instead of while(current_node != null) { System.out.println(current_node.name+"\t"+current_node.age); current_node = current_node.next; } do this : while(current_node.next != null) // as the head (which the current node has been assinged ) is a sentinel , and actual data starts from the next node { System.out.println(current_node.name+"\t"+current_node.age); current_node = current_node.next; } also , in …

Member Avatar for game06
0
176
Member Avatar for somjit{}

can anyone help me understand this code part ? this is about binary minimum heap , ie root has the lowest key.. the part of the code im trying to understand checks whether the subtree ( of a certain minHeap pq[1..N] ), rooted at k is also a min heap …

Member Avatar for somjit{}
0
194
Member Avatar for Lindsey1211

can you give the customer code? at first glance , bits of your code seems redundant... like public void addCustomer(Customer c) { database.add(c); } your already doing this inside the try catch block.. so why keep this? public void readCustomerData(String CustomerNames) { try { File f = new File("CustomerNames.txt"); are …

Member Avatar for javaAddict
0
187
Member Avatar for greyfox32

first of all , welcome to daniweb. :) now, regarding your code, when you say linked list as an array , im supposing this to be an implementation of a singly linked list. in which case , as you said , one array will hold the data , and another …

Member Avatar for greyfox32
0
1K
Member Avatar for mferarri

both are good , and usually it depends on the particular code your working in. but if the 1st method can be done , ie if the values to set are known at the time the new instance is created , i cant see why not to use it... makes …

Member Avatar for mferarri
0
330
Member Avatar for jmartzr1

your code will be slow for large "end" parameter, as it has to check for every number because of the for() loops. a faster method will be this : from the [wiki page for perfect numbers](http://en.wikipedia.org/wiki/Perfect_number) , ull get a formula with a variable p that all perfect numbers (48 …

Member Avatar for JamesCherrill
0
540
Member Avatar for somjit{}

i wrote a code to implement some basics of priority queue , but apparantly its not giving desired output. the code is implemented using binary heap as its data structure. i tried tinkering here and there , nut no luck... i want to display a given number of max or …

0
141
Member Avatar for jspence29

is there any particular reason ur keeping your readlines method static? edit : didnt see that james already posted there....

Member Avatar for jspence29
0
400
Member Avatar for clouds_n_things

dont have much of a sweet tooth , i like hot spicy stuff ... but thats generally reserved for luch or dinner. as a snack , i might like some fresh peas , chilled mangoes , and some grated fresh coconut topped with some sugar. simple and light. :)

Member Avatar for somjit{}
0
106
Member Avatar for toldav

james and radhakrishna already pointed out the things you should be doing.. i just saw that in ur isSolvable() method , ur doing this : if(((a*d) - (b*c)) == 0) return 0; else return 1; you dont need to have a if else structure for return.. once return is called …

Member Avatar for radhakrishna.p
0
369
Member Avatar for ilove.lyka15

welcome to daniweb. :) > how can i make my 10 different program as one program would be good if you could explain a bit more about these "programs" . if you have written some code , post them here , that would speed up the problem solving procedure. :)

Member Avatar for jwenting
0
167
Member Avatar for somjit{}

i want to sort a list of two dimensional points based on their polar angles with respect to a particular point. this will a part of a bigger code to find collinear objects from a set of points. the method i thought of for doing this is is: 1. create …

Member Avatar for somjit{}
0
544
Member Avatar for nova4005

perhaps this isnt a good place to post this query , but im doing so as my doubt relates to the if-else structure that has been talked about here... in this code // compare by y-coordinate, breaking ties by x-coordinate public int compareTo(Point2D that) { if (this.y < that.y) return …

Member Avatar for JamesCherrill
1
238
Member Avatar for pvn29

> import java.io.BufferedReader; > import java.io.IOException; > import java.io.InputStreamReader; it seems you didnt import java.util.ArrayList. without doing so , it arraylist wont work. > System.out.println("Last entry is "+users.get(initialCapacity)); this should be `System.out.println("Last entry is "+users.get(initialCapacity - 1));` as arraylists an arrays have the same convention regarding indices. else { if(users.size() …

Member Avatar for somjit{}
0
251
Member Avatar for bobit

i agree with james , but then again , school/college teachers rarely follow the best practises... keep a circle class , it will have ONE variable only : radius. the methods will be setRadius() , getArea() , and if you need it, keep a getRadius() too. all these methods should …

Member Avatar for stultuske
0
575
Member Avatar for gronkite

> is there a standard best/worst case for sorting algorithms? there are hundreds of sorting algorithms out there... some of them have different variations of themselves as well. they all have their own standard best/worst case complexity. example : considering two classic algorithms : quicksort and mergesort, quicksort has time …

Member Avatar for somjit{}
0
804
Member Avatar for bobit

does this code do atleast some part of what you hoped it would? since your reading from a file , bufferedReader is a faster way of doing things. a part of a code i wrote for parsing purposes : try { is = new BufferedReader(new FileReader(fileName)); while ((line = is.readLine()) …

Member Avatar for bguild
0
147
Member Avatar for <M/>

> In other words, in each iteration, the odds of choosing the current value are: > (number of values still needed) / (number of values left to choose from) so if i have to find 'k' non reapeating numbers from a certain 'range' , and if i do this: ((obtained …

Member Avatar for <M/>
0
431
Member Avatar for thetechie

@thetechie , welcome to daniweb :) regarding the problem above , have you tried writing some code? or do you want some algorithm of sorts? if you have some code, you can post it here , it would help the members to help you... to answer your question , try …

Member Avatar for JamesCherrill
0
210
Member Avatar for somjit{}

i have to create a queue where the dequeue operations will be random. that is , a random location will be chosen, and deleted after returning the data stored at that location. i was going through the two underlying datastructures that im allowed to use **:** linked list , and …

Member Avatar for somjit{}
0
2K
Member Avatar for somjit{}

in an assingment, i have to implement a deque ( double ended queue ). the underlying datastructure is allowed to be arrays or linkedlist. only that im not allowed to use any prebuilt java api that does the above. (like the java.util.LinkedList api) implementing the above using doubly linked list …

Member Avatar for somjit{}
0
194
Member Avatar for somjit{}

forgive my ignorance, there must be a really simple answer to this, but im unaware of it, also, tried google-ing for it, but didnt know what to look for exactly, and didnt get much good answers either. my question is, since 2^32 is around 4Gb, so max usable RAM on …

Member Avatar for Palebushman
0
214

The End.