« first day (2328 days earlier)      last day (2837 days later) » 

00:36
morn
 
1 hour later…
01:49
@JonahSloan Full stack means you can accomplish many different tasks without needing any other technologies.
Hey @Tavo
yo @Michael
@Michael Yeah, but where does the phrase "full stack" come from?
@Unihedron I'm doing a lot of technician work at my current job, so much of this knowledge is directly relevant to me.
@JonahSloan Dunno where it originated from.
Guysss
what is it mean ? "A number is called magical if the number of odd numbers in it is odd and the number of even numbers in it is even."
we need to check for every digit ?
@damniatx I don't know, ask your teacher.
01:56
thank you
have you guys ever take a test on hackerearth.com ?
 
1 hour later…
03:04
@Tavo morning!
Good morning.
@ItachiUchiha yo, morn
04:00
Good morning
guys yesterday I had an interview..I got asked diff b/w synchronization on this and A.class.I said this locks on a particular obj while .class on whole class.He was not convinced what did I miss
 
3 hours later…
06:33
boh, I'd take that answer as ok
 
2 hours later…
08:20
morn
hey @Nicktar
@Vishal synchronizing on A.class doesn't synchronize on the whole class but on the class object, which is in many apects just like any other object but can usually be considered a singleton.
08:38
morn
Joe
Joe
09:09
It should be quick to
inserting an element
remove an element
search for a certain element
What is / are data structures suitable for this?
Insufficient Information Provided Error
Joe
Joe
@Nicktar u talk to me brother
brother Nicktar o/
Does it need to be ordered, iterable, able to contain multiple copies of same/equal objects?
09:11
Does it grow, shrink, stay in stable size?
Joe
Joe
grow
u add new elements
but you want to remove as well... If you remove about as many as you add, you stay the same size (roughly)
Joe
Joe
yes true
there must be atleast one element
remaining
How do you want to address the element for retrieval?
Joe
Joe
u can add 1000 elements and remove 500 elements
Joe
Joe
that is the question ? should I use an array? or BST or linked list or queue
thank you jonah ,, whats ur opinion?
Maybe a HashSet?
Joe
Joe
is hashset same like Hash Table??????
No
@JonahSloan could be good, could be bad, can't handle multiple instances, hard to address specific entries, unordered
Joe
Joe
what is good about it??
09:27
it's fast
But since you don't answer the questions it's impossible to tell what suits you
Joe
Joe
no need to be ordered and it should contain duplicates
So not a HashSet then.
No Set at all.
I say ArrayList, CopyOnWriteArrayList, or Vector
With the information given, I'd go for a LinkedList
@JonahSloan A Vector ist just a thread safe ArrayList, thus close to guaranteed slower than ArrayList
Joe
Joe
09:41
I found this bigocheatsheet.com
it says that linkedlist is good in add and remove
but not in searching
the same thing is with a stack and queue
So I guess that stack or queue or linkedlist are equaly good
@Joe Just throw some code at the computer and see what works.
Joe
Joe
good idea but I cant see the speed of each code
:)
we need a superman for that
according to the theory , I suppose that iam right
I think I should probably go to sleep now
Joe
Joe
sleep?????
It's almost 4:00 AM here
Joe
Joe
09:55
where
UTC-6
It's 4:00 AM in eastern North Dakota
You go to bed around the time I get up. I get up at around 4 am
10:11
@Joe you can't have the pie and eat it. You can't have fast retrieval without overhead in adding and removal for upkeep
A Stack is just a Vector with some added functionality. It's synchronized and ths slow
and a Queue is not for storage
Joe
Joe
but stack can be implemented with a vector or a linkedlist,,, why queue is not for storage? I thought that it idoes do that!!!!!!! very strange , first time I hear it @Nicktar
A Queue is for object storage the same way as it is in real life for human storage
But if you insist on exclamation mark abuse and know it all anyway... why should I bother answering?
Joe
Joe
ok ,, is object storage not same like element storage??
no man it is not abuse bro ... I just did not know that
take it easy bro
10:26
gotta work
11:20
!!stop
!!meow
hey?!?
oh oh
11:44
hi
IN how many ways we can generate the HashCode in java?
I mean using Java api,Apache api.... still we have any other Apis
?
hey@CapricaSix
why dont you talk to us
sad
!!stop
does any one know?
CAATTT
whhhyyy?
12:01
@Michael unicode_thinking_emoji
@Hans1984 why????
yes
someone ducktaped poor caprica
thats why she cant talk
!!meow
12:15
don't mess woth bots
so unethical, you guys
13:01
¯_(惄)_/¯
Hello all why does wont work?
public static final Int[] hours = { 1, 2, 3, 4 };
theres no such thing as Int
theres int
and
Integer
@RegieBaguio
Morning, Java!
hey@Michael
Hey @Hans
13:12
thanks @Hans1984
you re welcome
OakBot Online.
\o/
Oak
where did you learn Java @hans?
I mean like website of knowledge
college,books,work, people and by myself
@RegieBaguio
;)
14:01
/8ball Did you miss me?
Oak in hibernation..again
_(
MICHHAAEEELLLL
._.
Ugh.
Need better hosting.
OakBot Online.
ty
/8ball Did you miss me?
ahh nvm
/8ball sup?
@Hans1984 Yes definitely
14:16
ohai
!!8ball huh?
/8ball right?
caprica not allowed to talk but Oak is :o
@Hans1984 Better not tell you now
hey o/
\o
14:43
hmm
maybe someone can help me
all of a sudden i cant import git projects into eclipse
when i go to file->import
there is no Git option
can anyone help?
Git plugin installed?
Use a better IDE?
Use git via CLI?
hmmmmmm
You can try doing a "git clone" from the command line instead.
yeah ty
but the view has to be there
its no longterm solution
I like to do a git clone, then I run "mvn eclipse:eclipse" or whatnot to add the appropriate Eclipse files to the project. Then, I do a File > Import from Eclipse to import an existing project into the workspace.
14:59
I see
well thank you
i ll have a look
15:41
@Michael do you use discord?
join my chat room, I'll set you up with my cloud
@Unihedron Never used it.
Is it free?
yeah
it's basically that new standard (cue xkcd) that people who hate skype and teamspeak switches to, me being said type of people
Ok, I have an acccount.
No one's around to play with Wumpus :(
wumpus is weak and boring and really, really stupid just ignore wumpus
16:08
Is the reason we should make all variables final in Java because it is pass by value-reference? Ensuring immutability when calling methods?
I didn't realize that all variables should be final
eh that makes no sense
The "all variables must be static" rule for various static code analyzers is pretty popular in projects
ensuring immutability only works when and because you need immutability, it is not a magic rule
don't just assume you need immutability, evaluate your use case.
I just do what my lead developer tells me, I am only a mid level :)
I am trying to understand through from this post http://softwareengineering.stackexchange.com/questions/115690/why-declare-final-variables-inside-methods
16:13
65
Q: In Java, should I use "final" for parameters and locals even when I don't have to?

OakJava allows marking variables (fields / locals / parameters) as final, to prevent re-assigning into them. I find it very useful with fields, as it helps me quickly see whether some attributes - or an entire class - are meant to be immutable. On the other hand, I find it a lot less useful with lo...

your post is a signpost to a signpost that leads to this, and I agree with the answer to this
just switch to scala and you're okay
So it has nothing to do with Java being pass by value-reference?
leaving
bye
o/
hi everyone
is someone here that give me some advise on how to configure a X509 cert?
in detail it's something about the extension iaik.x509.extensions.SubjectAltName
 
1 hour later…
17:27
posted on March 08, 2017 by CommitStrip

18:12
"The interface that allows the user to interface with the system directly"
user201891
18:48
I've got a map that has about 100 entries. It's entirely static and read-only. I'm considering moving the "data" into a file because I remember this is A Good Thing, but can't remember why. Separating code from data sounds good, but that's a very abstract reason. Being able to change the data without recompiling the application is a bit better, but I don't need that. Does anyone know other reasons to externalize data from code, given that the data never changes?
@DavidS Your sanity
If that isn't enough to convince you, I don't know what will
user201891
@Unihedron ah but that's just the problem. I "know" I'm supposed to separate it because the same as you I take it for granted, but right now it just looks like a waste of time. Does it really matter if the data file ends in .java or .txt? Seems arbitrary.
user201891
Mind you as I work on this project, I can see that developers have been putting data all over the place. I guess a problem is that once you say you can make a map with 100 static entries, you've opened the floodgates and data is spread out all over the application so you don't know where to look for it.
user201891
19:03
at least when you tell developers the data needs to be externalized, they'll probably do something like create a "data" directory with all the data files
>right now it just looks like a waste of time
>proceeds to waste time ranting about stance
user201891
Well, first of all I was asking for suggestions, not declaring that it was definitely a waste of time. Second of all I can't see any ranting in what I wrote. And finally, if you're not interested in talking about it, feel free to... well uh not talk about it, eh?
user201891
+1 for feel good vibes
I'm getting some weird output when I try to save file through ObjectOutputStream. Saved to a file called default.dat, opened it up in Notepad++, and instead of the integers I tried to store, it stores something like "Java lang integer valuexr" etc.
I'm getting the numbers I want to store from a Queue-class I made which has an array of the type T inside of it, and each time I dequeue() it returns the first element in the array(which in the function head has the return type T).

How do I solve this?
@DavidS I've talked exactly 15 words on it. I'm not going to add anything more. Feel free to continue, I'm not stopping you.
user201891
19:10
Thanks Unihedron!
user201891
Sounds like an OK question for StackOverflow, Jack. Don't know if anyone can solve it here without code, which I don't recommend posting here.
@JackOfBlades ObjectOutputStream uses the serializeable implementation. That's why it saves with a (typically) non-binary format.
Oh right facepalm
user201891
huh
user201891
double facepalm
19:13
If you want to store the numbers as numbers in text and not objects, use a file writer and write those numbers.
I would, though I think the professors would complain that "oh, you didn't make it able to take just any kind of object"
you can use what you have as is then, read with ObjectInputStream
yup, thanks (y)
19:27
Where do I put the Serializable keyword?
The GUI where the saving takes place extends JFrame, the Queue class implements an interface IQueue. Seems like there's no place to put Serializable.
Or would a ByteArrayOutputStream work instead with the ObjectOutputStream?
user201891
Well you said earlier that "I'm getting the numbers I want to store from a Queue-class I made" so shouldn't your Queue-class implement Serializable?
Not sure if you know what you're talking about? You might want to read up on how the Serializable contract works. Numbers already implements it.
Just use an ObjectInputStream, wrap the file in it, and read it into your desired object type.
Like this?:
	public void loadFromFile() throws FileNotFoundException, IOException, ClassNotFoundException{
		ObjectInputStream in = new ObjectInputStream(new FileInputStream(pathName+this.fileNameTxt.getText()));
		while(queue.front() != null){
			queue.enqueu((Integer)in.readObject());
		}
		in.close();
	}
Yep, although I assume you're using nio file?
I don't think the loading is the issue, the output is what is making problems.
I don't know what a nio file is.
The save-function looks like this:
public void saveToFile() throws FileNotFoundException, IOException{
int someInt = 0;
ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(pathName+this.fileNameTxt.getText()));
while(queue.front() != null){
someInt = queue.dequeue();
out.writeObject(someInt);
}
out.close();
}
Ah, sorry about the formatting, it's screwing with me.
19:40
		while(queue.front() != null){
			queue.enqueu((Integer)in.readObject());
		}
surely the condition needs to change here?
oh, right
for the time being I've just replaced it with 3 of these:
queue.enqueu((Integer)in.readObject());

Just to see if it gets anything through, but it doesn't. The array it is supposed to load to doesn't contain anything but null.
Oh, this was weird, when I did this in the save-function:
out.writeObject(String.valueOf(someInt));
Instead of this:
out.writeObject(someInt);

Suddenly it worked(for Strings at least)
or you could use writeInt() instead of writeObject()
just an idea
user201891
could he also just write and load the whole Queue at once? it is writeObject, after all
19:55
I'll try both out
Dammit, it won't work.
"java.io.NotSerializableException: Queue"
I added Serializable in Queue, but it still only loads nulls
your queue object will have to handle serializing / deserializing those objects in it, it doesn't work by magic
20:19
There is a high chance that I may be retarded, seeing as I forgot to call the loadFromFile-function anywhere.
Kept clicking the Load-button thinking "Why does it keep loading null?"
20:54
Jack of Blades
what is that, fable?
@ballBreaker That's what the internet says
Fable Official Website: lionhead.com/games/fable
21:31
sweet
I'm so awesome
user201891
no
The official website either gives a 404 or redirects to xbox.com
@DavidS You're wrong
also what is your avatar,
samus?
BOOM, awesome again.
Samus is awesome
@DavidS reaction right now
user201891
21:36
:D
@ballBreaker is your avatar a lobster or crab?
lobster
but hans calls me crab
he also knows it's a lobster..
it's a beachball you fools
I like mustached crustaceans
Hey, guys, is the @Override annotation some sort of AOP implementation? Or is it a completely different thing?
21:43
@JoĆ£oPaiva It's a thing that does things.
@JonahSloan thank you
I'll take that as a personal compliment
user201891
Sort of a completely different thing, @JoãoPaiva. It's optional, but if you include it the compiler will fail if you annotate a method that doesn't override another method. So it's a compiler hint, I'd say.
user201891
In my IDE I've enabled warnings if I don't include it on a method where I could include it.
The Override annotation is used to note what methods are overriding a method in a superclass
In short, the annotations annotate.
22:01
@JonahSloan lol just saw this now
I'm sure it wasn't a funny experience, just kind of chuckling at how you brushed right past that
 
2 hours later…
23:32
I broke Windows (again)
Note to self: don't open big files in Word.

« first day (2328 days earlier)      last day (2837 days later) »