Win a copy of Rust Web Development this week in the Other Languages forum!

Richard Shelly

Greenhorn
+ Follow
since Oct 03, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Richard Shelly

thanks all, but ive worked it out (thats twice now ive had a problem, then figured it out myself while awaiting some sort of forum hope, i feel like im wasting peoples time).

Also, i would use bubble sort, except for its horrendous inefficiency. also, can you use Arrays.sort() on a class?
15 years ago


Ok, heres the thing, i wrote this, throughoughly intending for it to sort my objects in ascending order. for whatever reason, i've somehow rigged it to sort in descending order. anyone able to tell me how to fix this? (and yes, im praying it wont involve massive code revamping)
15 years ago
well, clearly, i redefined tickets in the constructor (possibly me just assuming Eclipse is smarter than me.
15 years ago
its cool!! it works now!! booyah!!
15 years ago



Ticket is simply a class that holds an int(ticket number), an int array(the lottery numbers), and a string(suburb in which it was bought).
15 years ago
it doesnt! (is anyone really surprised!?)

heres the deal, i have a class, with a integer variable called ticketCount.
ticketCount is in a loop to read from a file, and increment, thus counting the number of tickets. strangely, it seems this increment never happens. despite every other command in the loop working. (and no, its not commented out!)
15 years ago
cheers man, but thankfully, ive already solved the problem, a couple of string tokenizers'.
thank though
15 years ago
ok, so i have to line in a line of text from a file in the format of:
<integer>;<array of integers>;<string>

now, getting the int and String arent at all hard, but i am unsure how to fill an array with the numbers in the middle there.
15 years ago
features!? then you cannot, and i repeat cannot go past including the "generate getters and setters" feature, saves so much time wasted on basic code!!
I personally love eclipse, and while i havent tried IDEA.... the budget man in me says not to bother.
I'm sure it is a decent IDE, but, like george costanza rightly says: "its like going to a prostitute. why pay, when if i apply myself, maybe i could get it for free?"
i mean really!
i was wondering if there was a way to do it, by writing 1 sorting class, instead of having to write code to sort integers and code to sort class objects.
15 years ago
implements Comparable huh? awesome, will remember that.
now, as for the specific task.
i need to take an array of objects (each of which contain an array of integers), sort the integers (using whatever method i choose, going with quicksort, as its my personal favourite, it has quick in the name, how can i lose?), then after sorting the integers in the objects, sort a seperate array of integers. this seperate array is then used to compare all the objects, and thus put the objects into 4 groups.
15 years ago
i need to write a quicksort class, that will sort an array of other classes. it needs to sort them by an array of 6 integers. there are also a couple of other simpler sorts i'll need to do (like sort the numbers in those arrays, and sort a seperate array, that will then be used to classify the classes into 1 of 4 or 5 groups.)
so, i figured the best way to cut down code was to write a QuickSort class. now i just have to implement it generically (right?) so that it will take the classes i build, and the seperate arrays of integers.
i think i may be in over my head just a little bit.
15 years ago
AJAX stands for Asynchronous Javascript and XML.
Ajax is a way of building interactive web apps. the way ajax works allows interaction, without having to reload the page, (i believe the way the digg counters refresh is a little ajax trick).
but imsure these are things oyu already know.
websites of interest for AJAX:
AJAX Patterns
AJAX: Getting Started
AJAX & HTTP Request
15 years ago
JSF
well, i dont know about "real" projects, heh, but this could help you.

do tell if this what your after.
15 years ago
JSF