« first day (1373 days earlier)      last day (3570 days later) » 

1:45 AM
What's the matter?
That's javasccript anyway, and this room is java
 
 
2 hours later…
3:18 AM
Hey @Sam
@NichoDiaz It depends on your class design. If you use these classes a lot, it's better to use a constructor. If the type matters, you would extend a new class. If you're lazy, you would use an anonymous class, and if you're writing good code, use an interface. — Unihedron 21 secs ago
 
Sam
3:35 AM
Hey
 
What does (double) (Double) null do?
 
 
5 hours later…
8:22 AM
Hello @All I have a question:
How to calculate the number of lines for a project using Scrum?
How to calculate the cost of software using Scrum?
 
What's Scrum?
 
Scrum is an iterative and incremental agile software development framework for managing product development. It defines "a flexible, holistic product development strategy where a development team works as a unit to reach a common goal", challenges assumptions of the "traditional, sequential approach" to product development, and enables teams to self-organize by encouraging physical co-location or close online collaboration of all team members, as well as daily face-to-face communication among all team members and disciplines in the project. A key principle of Scrum is its recognition that during...
 
Ah. No experience with it, sorry.
 
@Unihedron Don't worry. :-)
 
 
3 hours later…
Fev
11:54 AM
hello, oi Unihedron how r you
 
Hello there, I'm re-reading the great "You can't parse [X]HTML with regex." once again. So much fun.
4428
A: RegEx match open tags except XHTML self-contained tags

bobinceYou can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool th...

 
Fev
interesting
 
My favourite part: "Even Jon Skeet cannot parse HTML using regular expressions."
 
Fev
lol
make sense since it's DOM
btw that scrum picture above looks cool
 
lolz
 
Fev
12:04 PM
nyihihihi
 
How is everyone doing?
 
@Unihedron m great !
 
@ItachiUchiha That's excellent to hear!
 
wbu ?
 
Enjoying my weekend over here too.
 
12:11 PM
What are you doing for enjoyment ?
 
Reading some stuff on the Internet.
 
Fev
Oh and I'll be travelling back to my small village next week , I'll be far away from software stuff and enjoying food and fress air there
 
ohh well you should share interesting things ;)
@Fev thats good to hear !
 
Fev
thanks
 
@Fev Ah, have lots of fun!
 
Fev
12:13 PM
yeah, i miss everyone there..
 
The air is really bad over here. Everyone avoids heading out most of the time.
 
@Fev if you work(not study), the fun is even morE 1
 
Fev
yes I'm still student but that moment will be even more when I work , i feel it
 
Oh, you'll live. :)
 
:) :)
 
Fev
12:16 PM
Are you guys working in your native place (i don't know how to say it in english), i mean place where you and your families belong
 
I'm a student.
 
Fev
I know , and we are surrounded by algorithms everyday :D
 
My classes teaches (really) starter Java and Pascal, so I typically just nail the classwork and browses StackOverflow.
 
@Fev I work !
not at my native place !
@Unihedron gZ !
 
Fev
@Itachi , I feel you brother
And this is my last year , i will join you as a worker soon
btw It takes 5 years for me ,, :D
@Unihedron , you are so young .
great !!
 
12:23 PM
@Fev That's relative. :)
 
Fev
that's a praise from me as when I'm still at your age , i can't even turn off a PC
 
._. ah lol thanks :p
 
Fev
lol
you know, village boy. hehe
 
@Fev are you studying engg ?
 
Fev
eng ?? i'm studying IT , here it's called Infomatic.
oh, i'm not really good in english ,
 
12:27 PM
It's called ICT here.
 
Fev
Oh Infomation Communication Tech. , google said that
cool
but here informatic is not same with CS (Computer science)
 
ICT and CS are different subjects over here. CS is lowly.
 
ahh, what the difference ?
 
Fev
Students from CS usually have strong maths backgrounds
 
@Fev @Unihedron where are you guys from ?
 
Fev
12:30 PM
that's why they touch inner stuff of computer
 
@ItachiUchiha Because people seem to be really interested in where I lived, I even wrote it in my main profile: "I come from Earth, and stay at Centaurus sometimes. More specifically, HKSAR, which is somewhere in Asia."
 
Fev
I'm half singaporean-japanesse and living in indonesia
 
lolz
 
Fev
lol
 
laugh out loud zebras
 
12:32 PM
Check out: Android vs iOS: A Developer's Perspective techversus.blogspot.in/2014/07/…
 
@SadeshkumarPeriyasamy I like it! Well put and looks neat.
 
@Unihedron Thanks :)
 
12:44 PM
Huh, I've actually never hit the daily rep cap (200) before, I should try getting that milestone today.
 
Fev
@Unihedron what mobile platform you comfort ?
 
Learned a bit of Android before, didn't go very far though.
 
Fev
I wanna explore mobile oneday
but for now i don't get enough time ,
:D
 
Fev
1:25 PM
 
Nah, deep thoughts related to simple matter like these can often lead to enlightenment, or terrible skeptics.
I'm pretty sure the compiler removes unnecessary code it finds anyway, so you are free to use a code like this in your project:
private static final boolean debugMode = ${pom.debugging};

{
    if (debugMode) {
    // ...
    }
}
the compiler would just remove the if block entirely and leave the code intact if the condition can be evaluated to true upon the compiler optimization pass, or rubs the code if it's evaluated to false.
Actually, I've seen someone use for (int i=0; i<1; i++) before...
1
Q: How to print the result in descending order in java?

HaruI managed to get the result if I enter the base and exponent, but the output should be For example: the output should look like this >>base:5 exponent: 2 5^2 = 25 5^1 = 5 I need help to put something somewhere to make this happen... import java.util.Scanner; public class recursion...

 
Fev
1:46 PM
it was found in colleague's codes , that forced me to think about it
then it means nothing :D
 
It may be a good use if it's par design, but I'd say it's bad practice and will make any future programmer whom has to maintain the code twitch, badly.
 
Fev
that is absolutely true !!
but probably i'm the one who missed what he means in the code
well who knows for sure
i found that line on his internship , he created a water program simulation
huge codes !! I almost cried at the time , yohooho :D
 
2:02 PM
Good morning, Java!
 
Hey @Michael !
 
Fev
oh hey dude
 
Hi @Unihedron, how are you?
Hi Luffy xD
 
Fev
xixi
 
Lovely weekend here, you?
 
2:03 PM
A little hot, but OK.
@Fev Yeah, that's a pretty useless if statement.
 
Fev
@Michael , that's right !
I never been taught about Tautology before , Or maybe I slept in the class when the lecture taught about it
 
I gave up trying for the Unsung Hero badge, btw. (Because I can't spell it right)
 
Fev
In logic, a tautology (from the Greek word ταυτολογία) is a formula which is true in every possible interpretation. Philosopher Ludwig Wittgenstein first applied the term to redundancies of propositional logic in 1921; (it had been used earlier to refer to rhetorical tautologies, and continues to be used in that alternate sense). A formula is satisfiable if it is true under at least one interpretation, and thus a tautology is a formula whose negation is unsatisfiable. Unsatisfiable statements, both through negation and affirmation, are known formally as contradictions. A formula that is neither...
 
Ah, wasn't aware of that concept either.
 
Fev
I just assume if(){} will always be true
I just use it, never think deeper about it
@Michael, you are Author of ez-vcard, a Java vCard parser . Coooollll !!!
 
2:20 PM
@Fev Thanks! :D
 
Oh, I do have to learn eZ-vCards, some reliable automation helper it is! :D
 
nuc
2:56 PM
@Unihedron does Hong Kong actually have some demand for Pascal that they teach you it in school?
 
Not really. Our programs are mostly written in C# and Java around here.
 
nuc
So just a learning exercise? I can understand that. I had to learn Fortran while we were learning MATLAB. But that was b/c I was an engineering student.
 
Yes, exactly. We were taught Java and Pascal, but I highly doubt what I've learned from school's sufficient.
 
nuc
Just take everything you learn with a grain of salt. I consider my CS degree useless, apart from the theoretical stuff. I probably learnt more in my first internship as a PHP Full-stack, than any coding class I took at uni. Helps that they didn't teach me that one.
 
lol. I do hear from my friends at uni that the methods they taught are deprecated.
Thank god I have (a bit of) backend knowledge.
Thanks for the advice, though. :) If Pascal becomes a useful language in the future, I might have to re-learn it myself.
 
3:29 PM
when thread1 is running a synchronized function of object1, can thread1 run another function of object1 without sychronized?
 
@jesse When a thread executes a synchronized method, it holds a lock on that object. This means that no other thread can run that method or any other synchronized methods in that object until the thread releases the lock.
 
nuc
@Unihedron yea start learning Spring or Play!. Or JavaFX if you'd rather do applications. You'll learn quite a bit more than you think from even just working through he tutorials. I have a Java/Scala formal (2nd) interview next week for a Java/Scala Play! position. Will be thrilled to leave PHP.
 
@Michael how about method without synchronized and static method?
 
@jesse How do you think they behave?
 
@Michael let me have a try
 
3:45 PM
@nuc Good luck with your interview!!! And I will definitely look into Spring and Play. Thanks for the advices! :)
 
@Michael only functions with synchronized keyword without static keyword will be locked. is it right?
I found thread2 can access static synchronized function while thread1 are running a synchronized function.
 
A different lock is used with "static synchronized" methods.
"Sychronized" methods use the object instance as a lock.
"Static synchronized" methods use the class itself as a lock.
 
4:01 PM
@Michael thank you, I will google for more details.
I think it is the key point.
 
The fact that different locks are used is very important.
 
4:33 PM
Good afternoon.
@Michael Did you happen to get a chance to look at that question? stackoverflow.com/questions/24961307/…
 
Good afternoon!
 
@Unihedron And a very good evening to you!
 
@aliteralmind Thank you kind sir!
And my sincere thanks for codelet xP
 
How's it going?
 
I automated my first javadoc comment
It just says "return name;" but the method is getName(), so
 
4:40 PM
@aliteralmind I don't know if it's possible to switch JVMs mid-build.
 
@Michael No it's not.
Well, not easily, and apparently not recommended.
So what now?
It seems either you need to upgrade ez-vcard to 1.7 (which seems unwise to do something like that suddenly),
 
Well, just because the target version is 1.5 doesn't mean that the JDK is 1.5.
 
or somehow split your build into pieces, so it does everything up-through-but-not-including javadoc (to 1.5), then compile your Codelet customizers (you don't need any, but I'm going to create at least one for you) and run JavaDoc, and finish your build.
 
I think I've been using a 1.6 JDK to build ez-vcard.
 
I'm really just stabbing in the dark, since this is so new to me, in so many ways.
It's pretty important to figure this out though, if people are ever going to use it.
@Michael 1.6?
 
4:48 PM
Yeah. Unfortunately, that's the latest version of the JVM for Mac.
I also have Java 7 installed, but everything's defaulted to use the Mac JVM.
 
What? So Codelet can't be used on Mac at all?
 
No, you can download and use Oracle's JVM. They release a version for Macs.
 
Any thoughts on how to proceed?
I've finally gotten through much of the Maven madness, and have the time to do this.
 
I'm not sure if you actually have a problem.
As long as the developer has a Java 7+ JVM, he should be fine.
 
I don't understand. It seems that brings us back to the original question:
How do you compile ez-vcard in 1.5, compile codelet customizers in 1.7, and run JavaDoc in 1.7?
 
4:57 PM
The "target version" variable just tells the JVM to build a class file that can be read by that Java version.
So, when it builds ez-vcard, it generates .class files that are compatible with Java 1.5.
 
Right. So there seems to be (at least these) two issues: the customizer classes should not be in your jars--especially given that they will be compiled to a different version.
And also, there needs to be two compilations in your build. ez-vcard proper -> 1.5
Then Codelet customizers -> 1.7.
 
I gtg.
 
So if these are the issues, how does that happen?
 
I'm not sure if this matters. It should still work.
The target-version setting only effects the outputted .class files.
 
@Michael If you're around sometime today or tomorrow, I'd appreciate knowing what you're thinking. I'm at a loss at the moment, with how to start this in your POM.
 
5:05 PM
I already told you. :P Forget about target-version. I don't think it will be an issue.
 
Sorry, I'm not getting it.
So leave the target version as 1.5?
 
Yes.
 
Even for the Codelet customizers, which require 1.7
 
Let me ask you this: What .java files are you compiling, other than ez-vcard's?
 
Okay. To be clear, you don't have to create Codelet customizer functions in order to use Codelet. You can get away with none. So if you have none, then there's only the ez-vcard classes to compile.
But I'm going to create at least one Codelet customizer function, and place it in a separate class.
 
5:08 PM
Ok. How will that Codelet customizer's .class file be used?
 
(I would have put it directly into one of your classes, as a private static function, but given the different versions, I don't see that working.)
 
Will it be included in the ez-vcard JAR file?
 
It's only used by javadoc.exe.
It certainly doesn't need to be in your jars, but they're not large functions, so it shouldn't do any harm being in the jars.
 
heya
@Michael heya, how are you ?
 
Ok, if you have to add anything to ez-vcard's source code, then it will be a problem, because the source code you add might use classes or language syntax which is unique to Java 7.
 
5:10 PM
Right.
 
@ItachiUchiha Good how are you?
 
So I'm going to place it in separate classes.
@ItachiUchiha Greetings.
 
M great !
 
@ItachiUchiha Hey there!
 
@Unihedron hey man !
 
5:11 PM
@aliteralmind Ok. As long as those classes don't end up in the final ez-vcard JAR (i.e. as long as they are not in "src/main/java"), then you should be OK.
 
So set the compilation of all classes, including Codelet customizers, to output to 1.5.
 
Only if they will end up in the ez-vcard JAR.
 
Okay...
 
If they are just used to generate the Javadocs and don't need to be included in the ez-vcard JAR, then they can use 1.7.
 
So where/how/when does that fit into your build?
Your code must be compiled first, then your examples, then the codelet customizers, then run javadoc
 
5:14 PM
I'm talking about the JAR that is created when you run mvn package.
The JAR that ends up on Maven Central.
 
I got the impression you ran a single mvn clean install deploy command.
Or whatever the syntax.
 
No, I run: mvn release:prepare release:perform
These goals build the project, then upload it to Maven Central.
I don't use "install" or "deploy".
 
Okay.
So, aside from clean, is that the one and only command you run to build ez-vcard from scratch?
That compiles, runs javadoc, puts your jars on Maven Central...?
 
I rarely use "clean". I will use "test" a lot though.
Yes.
Ok, I gtg.
 
Okay. Thanks. I'm honestly still not sure what to do, although a few bits and pieces seem clearer.
 
5:20 PM
Don't worry about the version stuff and give it a try.
 
You mean just add the additional/separate path of the customizer classes to your current compilation task?
 
See you!
 
Will give it a try.
Thanks again.
 
5:31 PM
@Unihedron ssup ?
 
@ItachiUchiha Chilling.
 
Oh my god. It's a game about squares!!!!!!
 
6:00 PM
I give up...
 
lvl ?
 
19
At level 21 now, don't think I'm going to make anymore progress, lol.
 
6:21 PM
@ItachiUchiha Very nice game. Great style.
I got through eleven, but I need to stop.
 
^^^^^
 
I AM STUCK AT 11
 
dis be impossibru
 
Oh, I thought was yours.
 
6:34 PM
Is there anything I can improve in my answer?
0
A: NumberFormatException - how to get the result and suppress the exception?

Unihedron1. Wrap entire code in try block: try { int num1 = Integer.parseInt(a.getText()); int num2 = Integer.parseInt(b.getText()); c.setText(String.valueOf(num1 + num2)); } catch(NumberFormatException exception) { // Ignore? // Handle? exception.printStackTrace(); } 2. Val...

 
6:45 PM
why do you have a link in validate ?
option 3
a of validate is a hyperlink
 
It leads to my other answer which uses the same regex method to validate a String for numbers.
Nice sight you have there. :P
It's also there so the other question appears in the "Linked" bar. (I do that sometimes.)
 
well this is confusing
you can enter the link with an instruction after option 3
1
A: JavaFX pausing during for loop WITHOUT using Thread.Sleep()

ItachiUchihaThe freeze is because you are trying to do everything on the same thread, when you are using Thread.sleep(delays), you are actually putting your UI thread to sleep and hence the lag ! Try using different thread for your work, you can either use a worker thread, if whatever you are doing will no...

check this out
as i have provided the links at the end
or even better
this suits your condition more
0
A: Java Fx control and concurrency

ItachiUchihaFor updating the UI, you have to be on the Javafx thread. Once you are on any other thread, use Platform.runLater() to update those data back to Javafx UI. A working example can be found below import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ExecutorService; import ja...

 
Very nice! I usually wrap references in a quote block with the subtitle "Referenced / Specified by:" or "Read more:" though.
2
A: tostring() is implicitly called... how?

UnihedronYou're calling "p is " + p, which effectively is compiled to new StringBuffer("p is").append(p) This code calls p.toString() within .append() as p is Object. Specified by:http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html#append(java.lang.Object)

And I used "Read more:" for my links here:
2
A: Rails 3 - Precompiling all css, sass and scss files in a folder

UnihedronThis answer is specifically for the regex. You're looking for "absence of character sequence css" in place of [^(css)]. This regex takes a similar approach to yours: /(page-specific\/(?:(?!\.css).)++\.css)/ Explanation: page-specific\/ matches the character sequence "page-specific/" liter...

@ItachiUchiha Like the edit?
 
7:00 PM
@Unihedron You said you got something working with Codelet?
 
Yeah, it writes the line "return name;" and replaces the {@...} tag in the javadocs when I- Whoops! I indented a line wrongly at return Boolean.valueOf(true); @ItachiUchiha you'll have to fix it, sorry xD
(That's what happens when you do code formatting edits at 3am...)
I can forsee easily done javadocs automation, codelet is going to be helpful :D
 
@Unihedron So it just worked? Sweet!
 
@aliteralmind Yeah it did. I wonder if it's possible to configure Eclipse to show your {@.<package> on content assist - it shows stuff like @author, @link, etc.
 
Not sure what you mean.
 
7:16 PM
I'll rephrase, Eclipse currently shows content assist on existing javadoc tags it knows, I wonder if I can "teach" it your "tags": .codelet.and.out, etc.
 
Hm. And if it could recognize the built-in (and your own created) customizers, that'd be incredible. I'm always using
{@.codelet.and.out com.github.aliteralmind.codelet.examples.adder.AdderDemo%eliminateCommentBlocksAndPackageDecl()}
Really glad it worked for you. First person other than me that's ever used it :)
 
Hooray! :D I should add a small link "Javadocs generated in courtesy of Codelet [link]" somewhere in the project page when it's finalized and posted to public.
 
Please! And let me know, cause I'll add it to my docs :D
 
@Unihedron which edit ?
@Unihedron what do I have to fix ?
 
Eh, you probably will get a notification at the main site for revisions, and it's here:
1
A: Java Fx control and concurrency

ItachiUchihaFor updating the UI, you have to be on the Javafx thread. Once you are on any other thread, use Platform.runLater() to update those data back to Javafx UI. A working example can be found below import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ExecutorService; import ja...

 
7:26 PM
ohh i see
thanks mate !
 
You're welcome!
I actually did notice that I missed indenting that part, but the robo-reviewers are too fast... lol
because if an edit is made by uni it must be absolutely helpful, right?
 
uni ?
 
<- Prefix in my username.
 
ahh
:P
 
Sorry for the dry humor. xD I also just noticed I hit the daily reputation cap, nice! I should probably sleep now.
 
7:37 PM
good night !
sd
:P
 
night night :P
 
@Unihedron Good night!
 
@aliteralmind Have a good afternoon!
 
 
3 hours later…
10:19 PM
hallo
 

« first day (1373 days earlier)      last day (3570 days later) »