« first day (2189 days earlier)      last day (2757 days later) » 

2:24 AM
People, i require helps
i changed name
i think
magic
 
 
3 hours later…
5:01 AM
I have a slight issue. Per our project, we are modeling a workplace with Staff Members of class Volunteer, Hourly, Salaried, Executive, all of which are subclasses of StaffMember, where Executive isa Salaried, and thus is a subclass of StaffMember by extension.
We are required to read in information about staffmembers from a txt file and create those objects e.g. if the type in text file is hourly, we create an Hourly object. All of the created objects are stored in a StaffMember[].
We were told to create certain methods, for executives, for example, I created an addBonus(double b) method. I attempted to have the Executive object stored in the StaffMember[3] call this method, but it wont let me. Why?
I was thinking because the addBonus method doesn't exist in the StaffMembers class definition, and when I store an Executive in the StaffMember[] it somehow quietly casts it up the inheritance tree
but I called StaffMember[3].getClass() and it for sure knows that it is an Executive
jeez, thats a lot of text. sorry. please help lol.
 
 
1 hour later…
6:26 AM
hey :)
 
6:38 AM
o/
 
Morning
 
if anyone can check out my question was abit to long to post on here :P pastebin.com/pdNVwGXR
any help would be great :)
 
7:22 AM
morn
 
morn
 
morn
 
horn
 
ignore that question! im going to break it down and start from scartch haha
 
7:43 AM
break crack jack
 
rabbit crab cat
hey cat@Rahul
 
hi Hans
 
@Hans1984 cat
 
catty cat
 
 
7:51 AM
morn java
 
lol :)
good pic cat
:D
 
aah nice
 
very good quality too
:o
morning Tavo o/
 
tavo o/
 
this cat looks angry i guess she wants more fish
 
7:54 AM
\o
 
user6857832
Nah this cat is lookin for another big fish lol
 
user6857832
It's not enough for him/her I guess lol
 
is it you rahul?
 
user6857832
Lmao
 
lol
 
7:56 AM
maybe rahul cat i trying to tell me something
he wants me to give him more food
hmmmm
 
user6857832
@Tavo Your pic is pretty decent. Looks like you're kinda decent guy :)
 
thinks
 
hah
 
user6857832
No I'm not lol
 
user6857832
I'm jus sayin
 
7:58 AM
@rahul are you hungry cat?
 
a colleague of mine made this for me at a conference. It's related to this: meetup.com/Londonjavacommunity
 
lol
 
user6857832
Why would I hit on guys here?lol. It doesn't make sense
 
@Hemlata be fixed on one ,just pick one
 
deleted it ;)
@Hemlata
 
user6857832
8:00 AM
I'm jus playin around lol. I'm not really hitting on anyone here
 
gives rahul some food
 
hehe
 
!!learn hungry "http://wallwindow.com/wp-content/uploads/2014/09/cute-cat-gif-tumblr.jpg"
 
@Hans1984 Command hungry already exists
 
damn
na shit
STOPPP
rLemon will be pissed
no new commands
 
8:10 AM
lool
 
!!info hungry
 
@Hans1984 Command hungry, created by tarboy9 on Wed, 04 Nov 2015 00:44:48 GMT
 
!!hungry
 
na im not clicking some link
!!celing
 
8:13 AM
@Hans1984 That didn't make much sense. Maybe you meant: ceiling
 
!!ceiling
 
only this link
;)
 
8:31 AM
@Hans1984 i was
 
;)
no longer
 
!!info mew
 
@Gemtastic Command mew does not exist. Did you mean: meow, med
 
!!info meow
 
@Gemtastic Command meow, created by rlemon on Thu, 11 Dec 2014 14:07:21 GMT
 
8:41 AM
So he did make it
 
yep
cant take it from us
what now huh?
;)
the master itself made it
hes a good cat :3
 
@Hemlata Why not?
 
user6857832
@ItachiUchiha Cause I do have a life.
 
haha
 
!!shrug
 
8:54 AM
¯\_(ツ)_/¯
 
@Hemlata well everybody has doesnt?
 
caprica doesnt have a life
 
Haha, I agree. But there is no harm in casual flirting ;)
 
user6857832
@ColdFire That's saying.
 
@Hans1984 True that
 
8:55 AM
thats why she wants to....
 
@Hans1984 That didn't make much sense. Maybe you meant: hang, hans
 
:(
 
@Hans1984 yeah evil bot
@Hemlata i see :)
 
caprica is not evil bot, sometimes she is drunk
 
I'm trying to read a CSV file and print it on my console why do I get an error on line 22 ? pastebin.com/i10di7k2
 
8:58 AM
@ross.c ArrayList<Patient[]> patients = new ArrayList<Patient[]>(); ?
 
@ItachiUchiha I'm trying to create two arraylist to store stuff in it ?
 
@ross.c I mean thats line 22
and it shouldn't throw an error
 
oh yeah thats the one
yeah idk why it does
because i need that so then i can implement these rules snag.gy/Dv8SAl.jpg
 
Show your stacktrace
 
I get the error, Multiple markers at this line
- Patient cannot be resolved
to a type
- Patient cannot be resolved
to a type
 
9:00 AM
what is Patient there ?
 
model class i guess
 
I needed to create an Ambulance and Patient array to be able to store the co ordinates in them to be able to apply those rules I mentioend above. According to my understanding haha
oh wait I know why -.-
 
yeah i agree with rahul
caprica is just an alcoholic
but not evil
 
lol
ok oakbot is evil
 
yes
!!drink
 
9:08 AM
@Hans1984 That didn't make much sense. Maybe you meant: drunk
 
!!drunk
 
That...did... hic ...diddin make much shensh. Did you mean drunk?
 
see
shes drunk again
 
9:22 AM
 
@Hans1984 Can she massage me?
 
idk
only if your chin is as small as hers
and judging by your avatar this is not the case
 
haha
 
9:42 AM
:>
 
user6857832
10:15 AM
!!hang a
 
user6857832
!!hang
 
Hang Hemlata
 
user6857832
Well that's crazy :/
 
user6857832
What?lol
 
caprica must be tired
 
user6857832
10:17 AM
@Hans1984 Why it's not workin?
 
@Hemlata You can fork caprica and run her on your own server
This way you can know when and why it breaks
 
fge
Where will Carlos Ghosn stop? He is soon to be the CEO of Mitsubishi after Renault and Nissan...
 
in Java and Android era , 16 hours ago, by Cold Fire
in JavaScript, 2 mins ago, by rlemon
@ColdFire the service that returns the random words is down
@Hemlata
@ItachiUchiha lol
 
user6857832
I see
 
!!meow
 
!!hans
 
@Hans1984 hans is a catmaster!
 
well the two important commands work
;)
 
user6857832
!!hang a
 
user6857832
!!hans
 
10:25 AM
@Hemlata hans is a catmaster!
 
 
1 hour later…
user6857832
11:40 AM
Converter<String, Integer> converter = (from) -> Integer.valueOf(from);
Integer converted = converter.convert("123"); // Does this line mean that it's passing string "123" in converter?
 
user6857832
Plus then it pass it to (from) and later convert string to integer (Integer.valueOf(from))
 
it means that string is converted to int
what is this converter
 
user6857832
yea ik but is it workin like how I said?
 
user6857832
It's a interface
 
user6857832
interface Converter<F, T> {
T convert(F from);
}
 
11:43 AM
@ColdFire Its a Function<T,R>
It converts from String to Integer
 
@Hemlata yes
 
@Hemlata Yes
 
@ItachiUchiha got it
is it inbuilt interface?
dont tell me java 8 it is :/
 
@ColdFire No, but you can create you own FunctionalInterface
 
user6857832
yes its java 8
 
user6857832
11:44 AM
Nope its not inbuilt
 
@ColdFire It is java 8, she is using Lambda
 
@ItachiUchiha ohh that is why i dont know it
@ItachiUchiha i thought she was writing in normal language lol
 
user6857832
So that means It's workin jus like I said?
 
user6857832
I'm kinda confused
 
yes it is
 
11:46 AM
@Hemlata See, when you define something like :

Converter<String, Integer> converter = (from) -> Integer.valueOf(from);

It just gets treated as :
 
user6857832
Yea I know that but Is it passing the way I said (values)?
 
@ItachiUchiha that is wrong
yes @Hemlata it is
 
user6857832
Gotcha. Thanks!
 
@ColdFire what?
why?
Ohh, do you mean that I should have used Function instead of Converter?
 
@ItachiUchiha now you corrected it
 
user6857832
11:49 AM
I'm not defining it inside the interface
 
you didnt declared functional first
 
user6857832
It should be define inside the class
 
you can do both hemlata
 
@Hemlata What?
 
user6857832
11:50 AM
@ColdFire No for that, It should be default or static
 
!!hang rain
 
@Hemlata well i mean default only
 
user6857832
@ItachiUchiha I meant you can't declare body inside interface
 
you can in functional interface
what does static has to do with interface or did i miss something?
 
@Hemlata You are right, I was trying to explain a lot of things :P
 
user6857832
11:52 AM
@ColdFire You cant't.
 
user6857832
functional interface means you can only declare "One" abstract method
 
wait why cant?
 
@Hemlata You can have static and default methods
 
then what is that in which you can define one
 
Along with one abstract method
 
11:53 AM
aah yes that is what i thought
 
user6857832
Yea but not the abstract method
 
I shouldn't confuse people
 
user6857832
I mean only 1 abstract method with default or static
 
@Hemlata It's called abstract for a reason ;)
 
well tell me can you define one method or not in functional?
dont confuse me
 
user6857832
11:54 AM
You can
 
i dont know java 8 :/
 
user6857832
You can define 1 abstract method plus you can even define static or default
 
@ColdFire haha
 
user6857832
jus make sure you only define 1 abstract method, not more than 1
 
@ItachiUchiha man android doesnt support java 8 yet
 
11:55 AM
it dose support
 
then why did you say no before @Hemlata
 
from 24
 
@ColdFire It does. Jack compiler ftw
 
24 is a long way
 
user6857832
I said we can't define more than 1
 
11:56 AM
enable jack compiler
 
@ItachiUchiha not that shit
its still premature
 
user6857832
I guess either I confused ya or you confused yourself.
 
you ofc
 
@ColdFire You should try using it. Its just a compiler, in the end everything will be byte code which will run on the ART
 
@Rahul man most of the apps dont even target 24 currently let alone other things
 
11:58 AM
@Hemlata Are you pursuing Engineering ?
 
@ItachiUchiha well 2.2 android is so slow
 
@ColdFire yeah
 
user6857832
@ItachiUchiha Yes
 
@Hemlata which discipline?
 
@ItachiUchiha jack still doesnt support transformation API
 
12:00 PM
@ColdFire Method Reference? or Map?
 
@Rahul do you know any open source image viewer
 
user6857832
@ItachiUchiha You mean major?
 
@ItachiUchiha that is part of build tools not method reference or map
 
@ColdFire no
 
@Hemlata yea
 
user6857832
12:01 PM
Computer science
 
@ColdFire I am not aware of any Transformation API :P
 
aware or not?
@ItachiUchiha yeah i know you are not aware
its not part of java so its expected
 
12:23 PM
its gonna rain even more tomorrow
oh great
 
user6857832
Something something = new Something(); // class name
Converter<String, String> converter = something::startsWith; // startsWith is a method in something class
 
user6857832
what does "something::startsWith" mean?
 
user6857832
@Hans1984 I love rain
 
fge
So, all new Teslas now come with autonomous driving capable hardware, eh?
 
user6857832
Does it mean that it is calling startsWith method?
 
12:26 PM
yes
 
user6857832
Lol you don't even know java 8
 
user6857832
So I cant trust ya lol.nvm
 
its called method reference
 
fge
@Hemlata well, what? @Rahul is right here
 
12:28 PM
good cat rahul
!!meow
 
she was talking about me :(
 
fge
Also, this method will be called only if the instance is actually called
@ColdFire Oops...
Sorry
 
user6857832
Yep, thanks @Rahul
 
@Hemlata java 8 doesnt not mean i dont know java, and but that i mean i dont know the new java 8 crap
 
user6857832
12:29 PM
@ColdFire She**
 
@fge :(
 
user6857832
@ColdFire Well I don't wanna offend ya, but like ya said you don't know java 8.
 
fge
@Hemlata nevertheless, here he is right; it's a method reference
On method startsWith of instance something
 
user6857832
Yea, he is right.
 
also i will never answer something i dont know, so dont worry
when android support java 8 fully i will be master of it
 
user6857832
12:33 PM
Well I've one more question
 
ask then
 
user6857832
@ColdFire Like I said, I really didn't meant to offend ya. Plus if I offend ya then sorry.
 
user6857832
String startsWith(String s) {
return String.valueOf(s.charAt(0));
}
 
naah its fine
 
user6857832
Something something = new Something();
Converter<String, String> converter = something::startsWith;
String converted = converter.convert("Java");
System.out.println(converted);
 
user6857832
12:35 PM
Does String converted = converter.convert("Java") line means that it will first pass "java" to convert (interface) and then It will pass to startsWith method?
 
yes first to convert method and then to startsWith
 
btw what do you mean by convert (interface)?
convert is a method
converter is a interface
 
user6857832
Yea my bad, I was jus tryin to type as short as possible so I wrote "convert (interface)" that convert is inside an interface. Lol
 
@Hemlata A very simple example of this which you can test is :
Function<String, String> converter = String::toUpperCase;
String converted = converter.apply("Java");
System.out.println(converted);
 
user6857832
1:11 PM
Thanks. I got it.
 
2:12 PM
Morning, Java!
 
oh look whos here
where have you been Michael?
hello btw
 
Hey @Hans!
Oh, around.
 
OakBot Online.
 
i see
yay Oak
\o/
 
hey micheal
 
2:19 PM
Hey @Cold
 
2:38 PM
The chat is alarmingly Java-centric today
 
So how 'bout the weather
Who is being what for halloween?
 
user6857832
@ballBreaker not a crab for sure :D
 
halloween is not that big over here
there are some halloween parties though
 
oh really?
Yeah the parties are the best part
 
yep
i ll go rob kids for there sweets
and eat them all
 
user6857832
2:46 PM
Crab will eat all of your candies lol
 
;)
 
he wont
 
user6857832
He will lol
 
nope
 
user6857832
2:48 PM
@ballBreaker do ya like hershey kisses chocolate?
 
by the time he arrives in germany they are all gone
 
user6857832
Lol
 
:p
 
@Hemlata I like regular old kisses if you're offering
 
user6857832
@ballBreaker Lol
 
user6857832
2:50 PM
I jus love hershey kisses chocolate.
 
user6857832
They are really good
 
They are
 
user6857832
Which flavour do ya like?
 
user6857832
I like almond ones
 
2:54 PM
I don't eat much chocolate anymore, never had the almond ones before though
sounds yummy
 
user6857832
Yea they are
 
@ballBreaker lol
 
fge
3:49 PM
^^^ excellent video of how a failure is handled in flight
pilotseye.tv is a great source for anything flight related
 
ssc
4:04 PM
@fge
If passengers see this, they will die at the same moment with the fear
 
fge
Really?
Not me, no
 
hehe
 
fge
Quite the opposite
 
ssc
4:34 PM
@fge lol why not?
Won't you be afraid that what if it doesn't get fixed? :D
 
fge
@ssc I trust the staff at the "helm" to do whatever is needed to guarantee passenger safety in such events; and that video is an excellent illustration
In spite of one engine failing, they were able to bring everyone back "home"
 
ssc
well... I will just start screaming :D
 
5:06 PM
@fge did you get that tesla yet?
 
5:19 PM
if anyone has a chance, ive got a question. I have a super class A, and created an array that holds objects of type A (so it includes subclasses). Class D is a subclass of A and is stored in the A[]. When i call A[IndexOfD].getClass() it returns that it is of type D, however when I call a method in class D that Class A does not have, I cant call it. Why?
 
user6857832
5:45 PM
Predicate<String> predicate = (s) -> s.length() > 0;

predicate.test("foo");
predicate.negate().test("foo"); // What does negate() mean here?

Predicate<Boolean> nonNull = Objects::nonNull; //
Predicate<Boolean> isNull = Objects::isNull;

Predicate<String> isEmpty = String::isEmpty;
Predicate<String> isNotEmpty = isEmpty.negate();
 
user6857832
What does negate() mean?
 
6:19 PM
So I came across this interview question (over the phone):

"What is the strategy of the garbage collector?"

How would you answer?
 
ssc
@Hemlata negate means if true that is negate true which is equals to false.
@Ishmael It marks the objects and do some stuff, not sure so much but let me share link.
 
@ss
 
@ssc thanks
 
user4196492
I need a faster way to render images instead of using bufferedImages. They run really slow. Any better ideas to improve performance?
 
user6857832
6:38 PM
@ssc That means if it is equal to false then it will change it to true?
 
ssc
Correct
 
fge
@Adrian yes I did; for one month now
 
6:54 PM
@peb
@pebble225 how are you using bufferedImages to render an image?
 
user4196492
7:11 PM
so I would initialize all of the BufferedImages in one class for everything to reference instead of repeating a reference to an image in multiple objects. So if I had an enemy class, I would have it reference it's sprite image from the main class instead of making a private bufferedImage in the constructor. Every single enemy shouldn't each have an individual bufferedImage when generated.

When it comes to actually drawing it, I would just use g.drawImage(x,y,w,h,null); referencing the bufferedImage in the main class
 
user4196492
I made a chess game a while back that had a total of 13 BufferedImages. I needed to be able to run a render constantly to update the game. On my Intel i3, it ran like crap, but it worked just fine on an i7.
 
9:51 PM
@pebble225 are you re-drawing it on each frame?
 
10:09 PM
if anyone has a chance, ive got a question. I have a super class A, and created an array that holds objects of type A (so it includes subclasses). Class D is a subclass of A and is stored in the A[]. When i call A[IndexOfD].getClass() it returns that it is of type D, however when I call a method in class D that Class A does not have, I cant call it. Why?
 
11:03 PM
@Adrian in one word, polymorphism ;)
you meant A[IndexOfD].methodOnD()... this would fail for sure..
 

« first day (2189 days earlier)      last day (2757 days later) »