« first day (1649 days earlier)      last day (3296 days later) » 

2:02 PM
@Unihedron I'd like to bestow upon you the First Annual Award For Excellence in being very smart . May you continue to grace our internet with your downvotes and wisdom.
2
 
:.)
 
2:15 PM
I promise, as long as I still have reputation in my bank, I will NEVER stop downvoting! :D
 
OakBot Online.
 
=javadoc Assertions
 
@Michael org.assertj.core.api.Assertions: Entry point for assertion methods for different data types. Each method in this class is a static factory for the type-specific assertion objects. The purpose of this class is to make test code more readable. (1/4)
 
LOL Oracle Learning Library video uses IntelliJ instead of Netbeans
 
~celebrates
 
Off to work. :( Later @all
 
Bye bye!
 
Hi
could someone assist me with a question
0
Q: Sorting integer arrays in Java

rubin.kazanThe task was to create a program which organises a users name with their corresponding mark and displays this in descending order. It was created in Netbeans, so I have extracted my coding rather than copying the entire program as it can be very confusing. int [] ArrMarks = new int [5]; String [...

 
@rubin.kazan ... What is wrong with that formatting?
 
2:25 PM
You're naming fields in PascalCase like they're classes.
And the indentation depth is gone.
 
And... tabs.
 
I'd just use Arrays.sort()
 
@rubin.kazan big tip for you: before you post your question to a chatroom, make sure the code is properly formatted!!
 
sorry
 
2:27 PM
Also, either you forgot to ask a question, or I'm blind. ;P
What I see: My task is X, here's my code to do X.
 
What is your question? — Trobbins 16 secs ago
@Unihedron it's not just you ;)
 
whoa four upvotes
 
The problem description doesn't even incur a need for a custom type. — Unihedron 8 secs ago
and now you're attracting bad answers
 
:/
any help?
 
2:31 PM
I actually would use a custom type - one that holds the name and mark. And then use a comparator for that
 
im not to sure what those are, we haven't learned about methods,classes,objects in school
 
Yikes! That's pretty fundamental to Java
Give a kick to your teacher
 
haha
 
> What changes would I need to make in order for the program to sort the Name array with the Mark array in descending order?
... what do you mean?
 
example
Rubin 27
Oliver 12
Tom 36
Jake 8
Holly 99
how would I display this in descending order
 
2:34 PM
... how is that example helpful? it's too arbitrary :p
 
so...
Holly 99
Tom 36
etc
Rubin 27
 
OH
linear sort?
 
like its really basic
i think so^
not entirely sure since our teacher sux
 
Presumably you have been taught some sorting algorithm, and are supposed to use that?
 
we only get taught exactly what we need to answer questions in our course, anything else is frowned upon in our class
@kiheru
kinda
 
2:36 PM
...
 
int Hi = ArrMarks[0];
for(int i = 0; i < 5; i++)
{
if(ArrMarks[i] > Hi)
{

Hi = ArrMarks[i];

}
}
that was what we learned in class and i cannot remember if it was correct or not
it was something along the liens of that
 
2 hours ago, by Unihedron
Haha, schools really do suck.
I say it so many times it's not even funny anymore.
I need to be alone.
 
Beware, next Uni is going to recommend dropping out of your school
 
I'm trying not to.
ダブステップ
 
lol
uh oh
what is mapping
Treemap :SSS
 
2:39 PM
@rubin.kazan do you understand simple maths?
it's easier to explain by modelling it that way.
 
>:|
 
define simple
 
For the sake of simplicity, let's assume you do.
 
the thing is we haven't learnt this in class so
if i learn this then it clashes with the method we learnt in class
could be v onfusing
 
2:40 PM
I'll first teach you maths, to be more specific, a mathematical function - which takes a value, and for every value (x) returns a specific, and unique to x value (f(x) = y).
 
You probably have been introduced to insertion sort. You can check the algorithm from there (there are better algorithms than that, but I guess you must use what the teacher told you)
 
A map is a structure type that takes a key x and returns its mapped value y.
 
@kiheru hmm... I'd guess they started with bubblesort
 
@kiheru yes that sort of looks familiar,
 
For example, (x) => x + 1 is a function that returns 2 for 1, 3 for 2, etc.
!!>[1, 2, 3].map((x) => x + 1)
 
2:42 PM
@Unihedron [2,3,4]
 
@Unihedron i appreciate ur maths lesson, but Kiheru is suggesting something which is closer to what I am looking for
 
Insertion sort is a simple sorting algorithm that builds the final sorted array (or list) one item at a time. It is much less efficient on large lists than more advanced algorithms such as quicksort, heapsort, or merge sort. However, insertion sort provides several advantages: Simple implementation: Bentley shows a three-line C version, and a five-line optimized version Efficient for (quite) small data sets More efficient in practice than most other simple quadratic (i.e., O(n2)) algorithms such as selection sort or bubble sort Adaptive, i.e., efficient for data sets that are already substantially...
 
but in relation to my question
 
Considering that I also take programming courses and they can't even teach merge sort and binary search properly, I highly doubt your class went this far. But hey, potential for anything.
 
@Unihedron umm... for the record... I can't implement a merge-sort or a binary sort..
 
2:43 PM
but checking the other common sorting algorithms may be worth it (insertion sort is not really that common, but it's simple so it's sometimes used as an introduction to algorithms)
 
I kinda got the gist of radix sort, but I doubt I'd get it right...
 
@Vogel612 There's no such thing as a binary sort :) search
 
the syntax looks familiarish
 
hmm... see ? ;)
 
8 mins ago, by Unihedron
linear sort?
^ Just use linear sort; it's academic purpose, it's "good enough" - then come back and when you have time, we can go deeper into optimal algorithms
 
2:44 PM
guys I have several classes in hierarchy Category -> SubCategory -> Event -> Market
event have link to subcategory, subcategory to category, and event to all markets which is List
I have this method Collection<Event> filterCollection(String cat, String subcat, String market) which I have to implement
How to make it with java 7.
I saw this pattern http://www.tutorialspoint.com/design_pattern/filter_pattern.htm. I thought its the right way to implement it but now I dont think so.
Du you have any idea
 
how would I implement linear sort into my code?
 
build a temporary structure clone, (two arrays for your case), then iterate through looking for the maximum value for every element, and assign them to the second structure
 
o.O
 
(Nobody needs to remember sorting algorithms anyway. The standard libraries come with good implementations, and in the unlikely case you need to implement by your own - textbooks exist for that purpose)
 
^^that
 
2:46 PM
u realise i just started learning java about 3 months ago, and learning it amongst 7 other subjects
 
A B C D E
1 4 3 5 2

1st iteration
A B C D E
1 4 3 5 2

D
5

D B
5 4
 
yes something like that
 
@rubin.kazan for the record... that doesn't have anything to do with "java" or "not java"
it's just basic data-structures.
 
@Vogel612 programming*
 
that's stuff that should've been covered after the 5th lesson or something
 
2:47 PM
@rubin.kazan I'm not sure how that affects your learning - in parallel to learning to code, when I picked up programming I was also learning to play a piano by myself, deals with 10 subjects at school, have family issues and go through mental illness.
 
@Unihedron how old are u if i may ask
 
16
 
lies
 
omg m8
 
same age as me and ur knowledge is incredible
i salute u Unihedron
 
2:49 PM
@Unihedron give it a rest
 
11 mins ago, by Unihedron
I need to be alone.
 
get a night's sleep will ya?
 
yes
 
any help?
 
good boy. I promise not to wake you ;)
 
2:49 PM
@Vogel612 It's 23:50.
 
Is that really all that surprising? Someone who's interested in programming at early age can be pretty good despite being young
 
any help?
 
@naskobg13 no.... use your brain
@rubin.kazan you also got help... use your brain.. I am just 3 years older than you, get a grip
 
@Vogel612 how
 
@naskobg13 umm, I could give you the fish, or I could teach you to fish
 
2:50 PM
D;
come on guise
pweeeeez
 
@naskobg13 oh I don't know, maybe start thinking??
25 secs ago, by Unihedron
@naskobg13 umm, I could give you the fish, or I could teach you to fish
 
@Vogel612 i thought
 
@rubin.kazan what do u need dude?
 
@naskobg13 then carry on
 
maybe i can help
 
2:51 PM
6 mins ago, by naskobg13
guys I have several classes in hierarchy Category -> SubCategory -> Event -> Market
event have link to subcategory, subcategory to category, and event to all markets which is List
I have this method Collection<Event> filterCollection(String cat, String subcat, String market) which I have to implement
How to make it with java 7.
I saw this pattern http://www.tutorialspoint.com/design_pattern/filter_pattern.htm. I thought its the right way to implement it but now I dont think so.
Du you have any idea
 
lol my question is very basic
How would I sort a linked array in descending order
0
A: Sorting integer arrays in Java

Philip JohnFirst of all, I would like to give a suggestion. Use lists instead of arrays. This kind of coding is not a good conventional way of coding. I will show a conventional way to handle the issue. You may take this if you like. Create another class Mark.java with the following content class Mark { ...

 
@rubin.kazan the answer is what uni explained to you
 
I am so mad
 
thanks ;)
 
0
A: Sorting integer arrays in Java

Philip JohnFirst of all, I would like to give a suggestion. Use lists instead of arrays. This kind of coding is not a good conventional way of coding. I will show a conventional way to handle the issue. You may take this if you like. Create another class Mark.java with the following content class Mark { ...

 
2:52 PM
 
STOP SPAMMING
 
flagging spam works better if you flag all of them
then it is transparent why it was flagged
 
@rlemon meh...
point taken
 
I'm not that mad yet...
 
2:54 PM
So firstly, use the List not an array
 
posted my question twice?
list?
 
@rubin.kazan thrice
and that after you got help..
 
thx for help...
 
yes, don't post your Q's multiple times in the same room
 
right
 
2:55 PM
@rubin.kazan If your teacher is strict about using exactly what you have been taught, check some fellow student who is certain about the algorithm you have been taught. Then go on to adjust it to your needs.
 
an imlpementation of a List ie. ArrayList
 
If he's not, then use one of the answers you got to your question
 
what if i have no means of contacting fellow students
 
then recapitulate your notes?
 
2:57 PM
@KernelKoder See the question they linked - we're not only sorting with a library, we're sorting an array while having another array sync'ed to its new indexes.
 
omg
this is so confusing
 
10 mins ago, by Unihedron
A B C D E
1 4 3 5 2

1st iteration
A B C D E
1 4 3 5 2

D
5

D B
5 4
 
okay u probably get this all the time
but how do i get better at coding
 
practice
 
i am determined to solve this, thank u for all of ur help btw.
 
2:57 PM
and more practice
 
@rubin.kazan listen when you ask
 
Apr 22 at 18:38, by Madara Uchiha
The book will teach you the language, getting "yelled at" by peers teaches you best practices
 
And then some more extra practice.
 
ask and ye shall receive.
 
@Unihedron
 
2:58 PM
And then even some more practice, then do a project of sorts.
 
write more code. get other people to review it. be prepared to have it cut up to pieces. take it with a grain of salt. write more code.
 
^^^^
 
what if ppl get mad i keep asking for help...
 
don't ask the same questions
that is annoying
 
ask new ones
 
2:58 PM
asking new questions is fine.
 
Just keep trying @rubin.kazan.
 
fuaaaaa okay gu
 
if I ask how to concatenate strings 4 times re-worded I expect people to get annoyed.
 
guise*
 
it will get better, also don't waste too much time in chatrooms, write the code
 
2:59 PM
xD
 
hmm.. sometimes people who know more see parallels you don't. if they get mad, it's often because they can see you could already know the answer
 
@KernelKoder nothing wrong with chat rooms ;)
 
Dec 10 '14 at 10:59, by Unihedro
Word of wisdom: Meh.
Meh.
 

« first day (1649 days earlier)      last day (3296 days later) »