« first day (1532 days earlier)      last day (3406 days later) » 

fge
1:09 PM
<-- still writing assertions
 
<-- gets back on track on coding
 
I want to implement my java software into another computer . what is faster deployment by gradle or by java web start?
 
@Unihedro I'm coding, but the "wrong" thing
 
fge
@Gemtastic practice git
 
@fge Gotta get this design running first
 
fge
1:18 PM
OK ;) By the way, you may try and have a go at answering this (it's about Thymeleaf)
 
1:44 PM
Hmm, just found out something interesting: You can override a default (concrete / pure method) to make it an abstract one, and then there's no way to call the super method.
 
Yep
 
Eh, I lied, ((SuperInterface)this) works (static casting), but not inference calling SuperInterface.this
 
2:08 PM
Hi anyone wanna help me out with a Java question?
This is the question if anyone is interested... stackoverflow.com/questions/27732781/…
 
fge
@BrianJ again with this problem? :p
 
@fge ya I made some more progress with the file path..but the exif data still isn't being written to the image, the joys
 
fge
@BrianJ I do hope you write to another file and then rename to the old, right?
 
@fge I'm not sure what you mean?
@fge as in write the exif data to another file? but the purpose is to write to the most recent captured image
 
2:33 PM
@Appu Hey! It's been a long time.
 
@fge so I shouldn't be creating a new file?
 
fge
2:52 PM
@BrianJ you should write to another file before renaming to the original
@BrianJ if you don't, and writing fails for some reason, you'll lose the original in addition to failing to write the modified data
And you don't want that, right?
 
user4202350
I was annoyed at that time
 
user4202350
because nobody was supporting me
 
user4202350
Today what Benjamin has done is correct? You please tell
 
user4202350
He is Targeting me
 
user4202350
3:02 PM
@Unihedro This is pure hate against me.
 
user4202350
He should not do this
 
@ShaU No it's not.
You're taking it personal.
I'm watching your comments and flagging the ones which are flaming, and considering they get deleted almost instantly, you should be well aware that you're insulting another user while they haven't even engaged in insulting you, while you are.
 
user4202350
Yes i am taking it personal because 1. He asked others to downvote my all answers 2.He Kicked me from Chat room 3. He again some how unaccepted my answer.
 
I encourage you to make a drink and try to stay calm while I write an answer on your MSO thread.
 
@ShaU Quick tip: you might want to step away from the computer for a bit, just to wait a little to cool down. Not that I'm trying to get rid of you or anything, just saying.
 
3:04 PM
@fge can you give me a code example? If I write to another file then that data will not be valid for that file, each time the exif data is written it is specific for that image.
 
As for their behaviour, I cannot change, and for everyone over at Javascript, I cannot change them.
 
Actually I hav a question in relation to extending classes,aimed at anybody who can help? So I know Java doesn't support multiple inheritance but I need to extend two classes. What are the options in Java for this situation. I tired to overcome this by creating an instance of my other class within the main class, but I can't call the methods from the instance..like this "private Node node;"
 
@BenjaminGruenbaum I started liking Hitler from now on. — ShaU 26 secs ago
Haha
Oh woah, he's here.
 
Godwin strikes again
 
@BenjaminGruenbaum Flag. On sight. No excuse.
 
3:08 PM
@ShaU I'm not sure why you think I'd care about Hitler but go ahead.
bye bye comment.
 
user4202350
@BenjaminGruenbaum If you dont care then why are you responding to my comment? It is my personal choice. i can like or dislike anybody
 
I came here to laugh about it with other people and noticed you were here.
Also - not for long - one more delete vote deletes that bad eclipse question :D
 
@BenjaminGruenbaum Seriously? You should be well aware this is becoming serial.
 
@Unihedro of course it is becoming serial, it started as serial - the whole point was to get him to fix his answers.
 
sigh and I was going to defend you in my answer. At least a bit.
 
3:11 PM
And to stop abusing the chat features.
 
@BenjaminGruenbaum And instead of educating, you're achieving it by punishment?
 
You don't need to defend me, a community manager and a site moderator were in the JS chat when it happened and my answer on that post has a two digit positive vote count while his question has below -20.
@Unihedro it's not like he came to the room and didn't do anything - he trolled the chat for a week first and was asked multiple times to stop.
I'm not the abusive user here.
 
user4202350
@Unihedro Don't defend anybody and Sorry I dragged you in this. You don't need to interfere.
 
user4202350
@BenjaminGruenbaum Free Palestine.
 
I'm all for that you know.
I'd be very happy if that happened, I vote left wing. I'm all for peace in the middle east.
Heck, I even started a post on meta to establish that a "Free Palestine" avatar be allowed in the chat.
 
user4202350
3:20 PM
@BenjaminGruenbaum You are suppressing the voice. So i Said.
 
@ShaU here : " Full disclosure: I am an Israeli from the "other side", our chat was pleasant and on a positive note, we discussed several things some related to JavaScript and some related to politics and philosophy in the JavaScript chat room. The discussion on both subjects was polite and high quality. Personally I don't mind the avatar one bit"
 
user4202350
Thanks for deleting my question on MSE
 
@ShaU that was Brad Larson not me
 
@uni der?
 
user4202350
You influenced him
 
3:21 PM
@ShaU no he didn't
I watch the MSE questions feeds. We get about 5 new questions like yours everyday. "Why downvote" isn't something that warrants a MSE question. They are low quality because it's not what Meta Stack Exchange is for. Therefore, it was deleted.
Take their tour and learn what it is before you post anything.
 
@ShaU you can still turn it around you know - you can still be a constructive positive and respected member of this community. It's all up to you.
 
All you have to do is make an effort and positively contribute, and not abuse the chat - that's not a lot we ask for.
 
@BenjaminGruenbaum Who deleted MSO/q/281585?
 
@Unihedro Brad Larson. You should really rep to 10k and see deleted stuff.
 
3:24 PM
Aww, it's not cached on Stack Printer, but I have a local cached copy because I was writing an answer.
 
Damn, the deleted things I had forgotten. I thought I have all the privileges I want. Maybe I'll need to start answering questions again :-(
 
@kiheru I want to deleteee!!!!
 
Adz
hey guys, since you can decompile android apk files (hence they can see your code), what do you reckon is the safest way a user can get data off your server? If I just log in to my ftp server someone who decompiles the apk can see me log in credentials. I don't have access to the Android chat here
 
Since the post is now deleted and I can't post my answer:
 
fge
@BrianJ that's not the question here
@BrianJ the process is simple: 1. create temporary file in same directory than original; 2. write new content to that temporary file; 3. flush, close; 4. rename temporary file to original
@BrianJ this allows you to capture errors reliably
If you fail at any step, the big gain you have is never to lose the original file
 
user4202350
3:34 PM
@Unihedro Github is banned in my country
 
fge
And that's how all I/O modifying a file should be done
 
ouch. the strangest things can be banned, apparently
 
One second.
 
fge
yawn
 
@fge Okay that makes a bit more sense to me know, I'll give that a go and report back! I hate when one feature takes up a whole week of development..one day 4 now :P
 
fge
3:40 PM
Getting serious on assertions
 
^^^
 
*on
 
fge
@BrianJ meh, such things can happen, you know; the advantage is that the next time, you'll spend less time doing the same because you'll have learned
I remind spending sometimes up to a week developing a single feature
I was a Java rookie, too, at some point :p
 
Adz
sooo guys any1 got any recommendation for me :p
 
fge
@Adz I recommend that you don't drink citric acid
 
Adz
3:44 PM
haha I won't dw
 
Aaaaaand I'm back online
It everything working as expected yet, @BrianJ ?
 
@Charlie not yet, data still not being written to the image,@fge gave me some suggestions above that I'm gonna try
 
@BrianJ Okay, good luck, I'm starting on my first own Android app atm
 
@fge true true, I'm in my final year of a comp sci course, feels like I should know this kind of stuff by now.
@Charlie did you have any luck with it on your side?
 
@BrianJ Nope, and I quitted
@BrianJ Sorry bro
 
3:48 PM
@Charlie no problem, I'll figure it out one way or nother, good luck with the app :)
 
@BrianJ Yeah, thanks, just searching ideas :x
Besides the stupid "Hello World"
 
@charlie how about storing exif data to images :P
 
@BrianJ BEST idea ever, gonna try that
(If it works I'll send you the code)
Sometimes it works to start from scratch
 
@Charlie please do :P
 
POLL Who thinks @BrianJ has an answer before I do?
 
3:52 PM
@Charlie for my sake, me, this deadline is approaching fast like the four horses of the apocalypse
 
@ShaU mawersoft.co.uk/clients/Unihedron/stuff/shau.html
 
What are the chances of my question being answered if I start a bounty? @Unihedro you must have some idea?
 
@Unihedro You really made a post about it ? Nice
 
It's midnight. I'm starving, and I'm out of chocolates to eat. :(
Eh... I'll make ramen.
 
4:12 PM
@ShaU I deleted that question because it was racking up flags at an impressive rate, and your latest edit was horribly offensive. If you promise to behave in a civil manner, I can undelete it to let others respond.
 
23 mins ago, by Unihedro
@ShaU mawersoft.co.uk/clients/Unihedron/stuff/shau.html
I think that warrants ShaU their answer and therefore the thread doesn't need to be undeleted.
The entire thread was bombarding with arguments and going nowhere anyway, I recommend keeping it deleted as is.
Unless you manage to salvage the conversations somehow. ;)
 
Does anyone know how to extend two classes in Java?
i know you can't in Java, but how can you get around this?
 
@BrianJ You can't. Type inheritance is single.
 
The short answer is you can't.
 
@BrianJ No hack can get around this.
If you ever need to extend two classes, you have a design problem.
 
4:17 PM
@Unihedro OK, sorry you got cut off when I removed that. Wanted to cool things off. If it doesn't need to be reinstated, I'll carry on.
 
You can, quite often use composition though
 
@Unihedro not looking for a hack as such, I have a node class and an ActionBarActivity, need to extend both.. Should I make the node class an interface to fix the design?
 
@BrianJ Probably.
Or, just make two classes, extending each you need, then make joints between them.
 
either or both probably should be interfaces
 
Single Responsibility Responsible :)
@BradLarson Don't feel bad about it, I make no loss, having the post out there doesn't warrant any help to any one else anyway.
Except a few imaginary internet points, which I could make back easily.
 
4:20 PM
@Unihedro oh yeah them principles my lecturer keeps going on about :P
@Unihedro so they actually do have a purpose
 
@BrianJ Yes.
Or, even better, give the stuff you learn from lectures a purpose, so you're not wasting your time.
<-- likes learning
I hate my school though, they don't teach me anything!!
 
@Unihedro I like learning but its hard to take in everthing in a 3 hour lecture
 
@BrianJ Oh.
 
@Unihedro I learn enough on my school, but I don't care about anything
 
In object-oriented programming, the single responsibility principle states that every class should have a single responsibility, and that responsibility should be entirely encapsulated by the class. All its services should be narrowly aligned with that responsibility. The term was introduced by Robert C. Martin in an article by the same name as part of his Principles of Object Oriented Design, made popular by his book Agile Software Development, Principles, Patterns, and Practices. Martin described it as being based on the principle of cohesion, as described by Tom DeMarco in his book Structured...
Here 'ya go.
 
4:22 PM
Expect Maths
sqrt(-1)<sqrt(9)Maths
 
@Charlie Maths is good. Cutting-edge programming like 3D rendering (ab)uses lots of maths.
@Charlie That's simple inequality. Do better.
 
Sorry, we didn't even handle i in class
We're just at (x+1)^2 atm
But I know more than I learn
 
1 min ago, by Unihedro
I hate my school though, they don't teach me anything!!
 
Exactly that
 
Don't you use the Internet? And you know, look up theorems, like the magic numbers?
 
4:23 PM
Anyone who knows a place I can learn math online ?
 
The 0x5f3759df algorithm is amazing:
 
I know prime numbers
 
Fast inverse square root (sometimes referred to as Fast InvSqrt() or by the hexadecimal constant 0x5f3759df) is a method of calculating x−½, the reciprocal (or multiplicative inverse) of a square root for a 32-bit floating point number in IEEE 754 floating point format. The algorithm was probably developed at Silicon Graphics in the early 1990s, and an implementation appeared in 1999 in the Quake III Arena source code, but the method did not appear on public forums such as Usenet until 2002 or 2003. At the time, the primary advantage of the algorithm came from avoiding computationally expensive...
 
(facepalm)
 
@Charlie Everyone knows prime numbers.
 
4:24 PM
@Unihedro My class mates don't
IS THAT LIKE 1 2 4 8 ETCETERA
 
@Charlie Eh, that's out of context. :p
 
@Unihedro I'm going to go ahead and use nested classes to achieve this
 
Let me rephrase - anyone you will meet on the site for professional and enthusiast programmers (welcome aboard) must know some kind of html or maths.
 
So I continue them; 8 16 32 64 128 265 512 1024 2048 4096 8192 16384 32728 65536 etcetera
 
@BrianJ Oh no, nested classes, the true evil.
 
user4202350
4:25 PM
@BradLarson No issue sir you can do whatever you want and I accept @Unihedro 's answer. @BenjaminGruenbaum Sorry I will try to improve my answer in future and behave properly. Right now little upset because all my opinion and reaction went in Vain.
 
Can't you like, have two classes?
 
Hey, @ShaU's back
 
@Charlie My post was too long to read, probably.
Yummy ramen
 
@Unihedro I red your post
 
Is it too late to say that I've been chatting while eating yummy ramen while coding at 0.30 am?
 
4:26 PM
@BrianJ Installing Google APIs Intel x86 Atom System Image, Google Inc. API 21, revision 3
@Unihedro Neh, that's normal for me
 
I should probably prepare for a test.
 
could*
Haha
must* actually
Ahw well, I won't correct an Englishman on his English :x
 
@Unihedro I was thinking it may be a bad idea..so I have a Node class that encompasses all the methods of node, addChild() etc. I want to extend this Node class in my MainActivity class but I can't as it already extends the " ActionBarActivity". How could I get around this?
 
Extend an interface, which extends/implements both classes ?
Or it that wrong ?
(Trying to learn about interfaces)
@BrianJ ^
I feel dumb around you all :C
 
@Charlie you implement interfaces and extend classes, but you may be on to something, anyways I have to get back to the exif problem :/
 
4:31 PM
Do you really need to extend it? Usually you just need an instance somewhere. If needs be you can delegate interface methods to that instance
 
@BrianJ Still Installing Google APIs Intel x86 Atom System Image, Google Inc. API 21, revision 3
Blargh Android Studio
Ah, it's done
 
@kiheru I made an instance of the class Node like this "private Node node;" in the MainActivity class but when I try to call Node's methods like node.addChild(); they aren't coming up..Am I missing a step in creating an instance?
@charlie
@Charlie the new download of the adt bundle has less stuff installed, its a pain downloading all the extras
 
@BrianJ what do you mean by "not coming up"? That does not make an instance, it just defines a field that would be a Node instance. private Node node = new Node(); would both declare, and initialize it.
A declaration of a field, without initialization initializes it to the default value, which for reference types is null
 
@kiheru Okay I tried to create an instance using the above loc, but it has to take params of "String name, Node parent"
 
@BrianJ Give it those params
Wait, Node parents ?
You need a Node to create a Node
Can you use null ?
new Node("name", null) < Try this @BrianJ
 
4:38 PM
At some point there apparently needs to be a root node
 
@kiheru Guess so
How about new Node("name", this) @BrianJ
I don't not know nothing about Android yet
 
Without knowing the libraries in question, it's hard to tell how to make that. It could have a special class for that, or a factory, or Node constructor can accept null, ...
 
@BrianJ read @kiheru 's message Above ^
@BrianJ Isn't there an Android room ?
 
@kiheru this is the node class I'm using: hastebin.com/rahehovido.java
@Charlie there is but I can't get access, said I need to answer more questions
 
@BrianJ :/
 
4:43 PM
@kiheru @Charlie figured it out there was a runner class for the node class :)
 
That Node class apparently makes root nodes by just passing null as the parent. If a higher level interface is provided, obviously that should be used
 
Is there any good Android forums? I've been stuck on the same question all week and could do with some help.
 
but obviously, you if you already had some kind of node you were supposed to use, you'll need to do that
I'm not on any of the android chats
 
fge
5:04 PM
@BrianJ your problem is not android specific, really
(well, yes, maybe, since you use Android specific APIs)
 
Or, you know, use Stack Overflow, but it has stricter quality guidelines
 
So I am a dev who primarily has been doing .NET / html5/css/js / python .... but am getting more serious about wanting jump into Android and/or Java.
Should it be that I try to learn about Java first.... or just start learning about android dev in general first
I understand from stuff I've done with ASP.NET that there's kinda two sides to the coin... there's the c# lang but then there's also asp.net itself.
 
fge
@Bubbas Java first; although you'll have to learn Java 6 if you want to do Android since Dalvik still has no support for Java 7+
 
I am wondering if java/android is similar
Oh I see
What are some of the best java beginner resources out there?
 
fge
@Bubbas Android uses Java as a language, but its VM is not a "real" JVM
 
5:14 PM
I see
 
@Bubbas Nope. I develop Android through NDK unless I have to, then I use SDK.
 
NDK
so... you dont have to use java?
for android development
 
fge
You use the Java language
 
What is NDK?
 
5:17 PM
haha am reading about currently
looks like i an pass it anyway
 
fge
<-- has never done Android
 
so back to java language
i mean here's the deal
here's why i'm here.
i have a web app i built that the company i work for is using
its for ppl who go out in the field and collect data
in various forms.
 
fge
Uhwell, tutorials abound; if you really want to learn the language, set yourself a goal, work towards it
I don't even recall how I got started with Java in the first place
Only that I came from a C background...
 
one way they capture data is thru images. they take photos on their device and then use my web app to upload them to our servers and keep them organized to a specific program
but, this photo upload thing is working fairly well in my web app.. however i want to make it better. for some reason android has been giving it some troubles
images turn blank... out of memory issues.. whatever
the backstory isnt so important.
but here i am, i want to create a native android app to replace that component of my web app that deals with image capture/upload
SO ...... that brings me to - do I need to start research into the specifics on android?
i think at this point i can quickly learn new languages (as opposed to when i fisrt started dev)
so i dunno if Java lang is going to be the major hurdle for me
 
stop chatting just do it
 
5:22 PM
Lol
^true
 
5:33 PM
A wonderful evening to you all
and a (late) happy new year
 
Hiya!
 
Did I miss something important in the last week?
 
I've been trying to get AWS to work, so there's that.
Not that my VPS is insufficient (They've been working well for me), but Bitnami will only power on AWS, which is stupid. And amazon doesn't provide a payment method thru paypal, only with a credit card.
 
fge
@Unihedro want to know the next plan I have for throwing-lambdas? :p
 
@fge Oh? :P
 
5:40 PM
"Constructors are not members, so they are not inherited by subclasses, but the constructor of the superclass can be invoked from the subclass."
 
fge
@Unihedro use generic interfaces and then use reflection to check the method prototype
 
so I was watching a vid last night and saw this dude make a call that started with super.[something]
 
Ugh... At least MH the reflecting
 
fge
Then use an implementation of Throwing* which will use a MethodHandle
 
\o/
@fge This plan is A++
 
5:41 PM
is it common in java to make calls to the super class?
 
@Bubbas super.method(), super()
 
fge
@Unihedro you still cannot .getDeclaredMethods() with java.lang.invoke, otherwise I'd have done that; but of course, I'll .unreflect()
 
It's done when needed, Whether it's common depends on the design
 
ok
 
@fge yes, unreflect is magic
 
5:42 PM
=about
 
OakBot v0.0.2 by Michael | source code | built: Yesterday at 6:50 PM | started up: Yesterday at 6:50 PM
 
=javadoc super
 
@Charlie Sorry, I never heard of that class. :(
 
=javadoc java.lang.invoke#getDeclaredMethods()
 
@Charlie I don't know that command. o_O
 
5:43 PM
=javadoc java.lang.invoke#getDeclaredMethods()
 
@Unihedro Sorry, I never heard of that class. :(
 
=javadoc java.lang.invoke#getDeclaredMethods()
 
@Charlie Sorry, I never heard of that class. :(
 
=javadoc java.lang.invoke
 
=javadoc java.lang.invoke.MethodHandle#getDeclaredMethods()
 
5:43 PM
@Charlie Sorry, I never heard of that class. :(
@Unihedro I can't find that method anywhere.
 
=javadoc Class#getDeclaredMethods()
 
Which one do you mean? (type the number)
1. java.lang.Class
2. org.jsoup.select.Evaluator.Class
 
1
 
poor oakbot. so many questions of unheard things
 
@Unihedro java.lang.Class: Instances of the class Class represent classes and interfaces in a running Java application. An enum is a kind of class and an annotation is a kind of interface. Every array also belongs to a class that is reflected as a Class object that is shared by all arrays with the same element type and number of dimensions. The primitive Java types (boolean, ...
byte, char, short, int, long, float, and double), and the keyword void are also represented as Class objects. (1/5)
 
5:44 PM
Bug! @Michael ^^
 
=javadoc java.lang.Class#getDeclaredMethods() 1
=javadoc java.lang.Class#getDeclaredMethods() 2
 
@Charlie Method getDeclaredMethods(): Returns an array containing Method objects reflecting all the declared methods of the class or interface represented by this Class object, including public, protected, default (package) access, and private methods, but excluding inherited methods. (1/6)
 
=javadoc java.lang.Class#getDeclaredMethods() 3
=javadoc java.lang.Class#getDeclaredMethods() 4
 
(ignored lol)
 
=javadoc java.lang.Class#getDeclaredMethods() 5
I hate you @OakBot
 
fge
5:45 PM
Meh, that reminds me of what freenode's javabot replies when you say "javabot: fuck you"
Answer: "you can't afford me, sweetie"
 
Ahwww
Forever Alone
 
@Unihedro So super.method() is a call to some method defined in the superclass and super() is a call to the superclass' constructor (do all classes in java have only one constructor?)
 
@Bubbas Classes can have multiple constructors.
 
ok
 
class Foo {
  Foo() {}
  Foo(int bar) {}
  Foo(Baz bar, Bar baz) {}
}
 
5:50 PM
ah, simliar to overrides in .net i think .. ?
so its still always the same call, just a different number of members
 
C# resembles java quite a bit
 
members/parameters.. not sure of the java lingo
 
@Unihedro Foo(Bar baz){}
 
yea, so far it seems to very much. this is to my surprise :)
 
=help
I think I crashed him xD
 
5:53 PM
=about
 
"If the subclass is in the same package as its parent, it also "
... can someone please provide me examples of what a call might look like to some inside and outside of a package
 
import com.example.package1;

public static void main(String[] args) {
Foo foo = new Foo(); // From package1
foo.bar(); // From package1.Foo
}
@Unihedro How did you do spacing ?!
 
@Charlie You mean code formatting?
 
oh of course. basically anything outside of the package will be imported
 
@Unihedro Yeah
 
5:56 PM
@Charlie "fixed font", the button that appears to the right of "send"
 
@Unihedro Hmn, I only see "upload"
public static void main(String[] args) {
  Test();
}
Ah, I see
 
@fge only getting around to doing your edit now, so create a temporary file first?
 
It's a bit annoying that the chat does markdown, but only sort of
 
Yeah, I already saw it
Nice colours though
@Unihedro How did you do those colours :C I feel like a dumb noob (Which I am)
 
5:58 PM
Does java have closure?
 
Custom CSS ?
 
is it not called closure in java?
 
@Charlie clearly
 
"A subclass does not inherit the private members of its parent class. However, if the superclass has public or protected methods for accessing its private fields, these can also be used by the subclass."
Is that not what closure is?
 

« first day (1532 days earlier)      last day (3406 days later) »