« first day (1678 days earlier)      last day (3277 days later) » 

1:19 AM
how to reverrt all of my changes in my local project from the remote repository in git ? I want to discard all my changes and need exact copy of my project in repo...
(accidentally i formatted my source.... not delete, but formatting the source files...)
@Unihedron
@MadaraUchiha
when i use 'git status' there are whole bunch of files in red color. some of the files, i had deleted .... omg.
 
 
1 hour later…
2:56 AM
how did these code does not produce an IndexOutOfBoundsException:
StringBuilder b = new StringBuilder("hi");
b.delete(2,5);
System.out.println(b);
i believe that the indexing of StringBuilder starts with 0, so accessing index 2 will result on that error. am I right?
 
3:36 AM
Is the local a clone of your remote.??
@CrazyNinja
Are there any commits on your remote after you took a clone?
i.e is your local behind the remote?
 
3:56 AM
yes. My local is clone of my remote
Now i need to replace the whole project from my remote
 
@ItachiUchiha how to tell my repo that I deleted a file then update it.
 
@anathema exception java.lang.StringIndexOutOfBoundsException: Thrown by String methods to indicate that an index is either negative or greater than the size of the string. For some methods such as the charAt method, this exception also is thrown when the index is equal to the size of the string.
 
nvm I solved it
 
@CrazyNinja just type git log
then type git reset --hard <your last git commit>
Note -> git reset --hard will permanently delete all your changes/files added after the commit
 
@Unihedron @ItachiUchiha I will mark this above reply as favorite until i go home and try this as now i'm in office. After that i'll remove. Cos this might not be worth to others. (i mean, i feel like it's not something to be marked as favorite in the chatroom. sorry for that)
@ItachiUchiha thank you. that is what i want now. i have done few minor changes in my project. now i want to revert all those
@ItachiUchiha i think this might work!
 
4:12 AM
@CrazyNinja On the other hand, you can just delete your local repository and take another clone ;)
 
@ItachiUchiha yeah. i saw that in SO as a question. But your reply is the one i was looking for
 
"git diff <commit> <path>" <-- what should I substitute with the <commit>
in windows you can do fc <file1-path> <file2-path>
Is this the same thing in github?
 
@deadlydragon00 didn't really get your question..
 
I want to compare my previous changes to my recent change... How should I do it on git
 
git status
 
4:19 AM
that will only show status not the particular changes
 
Have your recent changes been committed??? If not, then you can use git diff which Shows the differences between your working directory and the index.
 
changes is not yet committed, yes not
 
but added to index???
If not, use git diff HEAD
Is yes, use git diff –cached
 
what does index mean in git?
<-- Im a noob to GIT
ah ok I get it .. TNX
 
Go through this
Feb 15 at 20:10, by Second Rikudo
 
4:26 AM
I saw that vid before, BTW tnx
 
It explains everything about working location, index and commit
 
 
2 hours later…
6:28 AM
What is the best approach in Factory Design Pattern while considering clean code and performance ? I see many solutions like using Enums, and just using equality checking and so on when writing the factory... can anyone show me the best way out of all ?
 
7:11 AM
@CrazyNinja What does the Factory pattern have to do with enums?
@ItachiUchiha HEAD is redundant. git diff == git diff HEAD.
 
fge
Moo
 
@MadaraUchiha according to this article > java.dzone.com/articles/factory-design-pattern
 
@MadaraUchiha Is it? How to check the difference between working dir and index?
 
fge
Well, git diff
Ah
Yes, that's it, git diff
 
7:28 AM
Hello
Hi @fge
What's up?
 
@ItachiUchiha git diff
@CrazyNinja That's the Abstract Factory pattern, and it's an antipattern
 
fge
@Mr.777 work, work and more work :p
 
@fge keep it up
 
@fge YIL Git 2.0 supports automatic signing of all commits via config <3
 
@MadaraUchiha How do you find the difference between working directory and the most recent commit?
 
7:41 AM
@ItachiUchiha I don't think you can combine both staged and unstaged changes in one diff
@fge correct me if I'm wrong
 
fge
@MadaraUchiha oh, excellent
@ItachiUchiha define "most recent"
@MadaraUchiha AFAIK you're right on that one
 
fge
@ItachiUchiha generally speaking you can do git dif <refspec>..<refspec>; if one refspec is omitted it will be HEAD
 
@fge the last commit. The commit which appears on the top of the list when you type git log :P
 
I hope so for Chrome
 
fge
7:46 AM
Then the last commit you did on the current branch
Well, how doesn't git diff fit the bill?
Since that last commit is HEAD
 
then how is git diff == git diff HEAD?
 
git diff <commit> <path> works
 
java morning
 
I guess this blog has either redundant data or is incorrect?
 
Oak afternoon
 
7:59 AM
@ItachiUchiha no, you were right
git diff - between unstaged and HEAD. git diff HEAD - between WD and HEAD
 
morning
 
8:21 AM
Morning
 
8:38 AM
@MadaraUchiha cool :)
 
8:52 AM
@MadaraUchiha but in the big heading says, that is Factory Design Pattern. I'm just a newbie to start learning the design patterns. If that is Abstract Design Pattern, can you please point me to the most efficient (Pure) Factory Design Pattern ?
 
9:45 AM
@CrazyNinja The difference between the Factory Pattern and the Abstract Factory Pattern is that the Factory pattern is guaranteed to return an instance of a concrete class
And Abstract Factory Pattern is guaranteed to return an instance of an abstract class (or an interface)
 
@MadaraUchiha that's easy to remember. thank you
 
@CrazyNinja You use a factory when you don't want to use new
When you have every right to use new but you don't want to use it
 
10:17 AM
morning~
 
@Unihedron Hey morning
 
@uni You are late, were you attending school today?
 
@ItachiUchiha yess
 
10:37 AM
hiya uni
 
10:52 AM
@deadlydragon00 Hiya ^^
 
11:08 AM
@Unihedron I made my db connection for singleton in my web application(I think you are aware of this which i asked questions relate to JSPs).I think that Every Http request is handled in a seperate thread in Tomcat server. Now i see that Singleton for db connection is a bad design... What do you suggest here about my database connection?
 
@CrazyNinja use an enum
and also, follow the Dependency Injection paradigm
 
i'll search on this. thanks for the feedback
Is this correct? "Every Http request is handled in a seperate thread in Tomcat server"
 
I wouldn't know, I don't use Tomcat ;)
or care enough about it to know, unfortunately
 
@CrazyNinja yes it is correct
 
11:13 AM
@ItachiUchiha in that case, having a singleton instance for db connection, will definitely make pain....
 
@CrazyNinja use Connection Pooling....
 
@Vogel612 thanks
@Vogel612 can you point me to a perfect example of it?
 
did you even google?
 
yes. all of those showing maven projects. But i'm not using maven
 
@CrazyNinja What are you using?
 
11:26 AM
just Servlets and JSPs( -_- in silent mode)
 
um
so.. ant?
 
not yet. Need to write the file next week
 
Then why can't you use the maven tutorials?
 
@CrazyNinja ditch it,
or rather,... WAT
 
umm... I don't have much time for it. Sorry if this sounds like i'm not trying. Actaully i need to finish this project before my next semester starts
 
11:36 AM
is that a new Project?
and you are supposed to use JSP and Servlets?
Even for university that stuff is too old
 
@Vogel612 hahaha
@Vogel612 lol... i found a good article. > snaq.net/java/DBPool
 
see.. google helps.
 
@Vogel612 doesn't apply when it comes to Unihedron :P
 
s/google/search engine of preference/
 
s/duckduckgo/google/bing/your_mom
 
11:45 AM
your_mom -> best search engine for everything ever in your house
3
 
> Nothing is truly gone until not even your mom can find it
 
Since my minor exams are finally coming to an end and I have a buffer leisure time before I have to take and fail most of the major exams, anyone up for a game of chess?
 
12:10 PM
I go on summer vacation soon \0/
My group assignment didn't go very well on my part so I got another week to write essays on my work stuff instead. I'm happy!
I still got a chance at the top grade if I write the reports/essays well
 
:o
 
Luckily the teacher and course headmaster were understanding when I told them about what happened
 
What happened ?
 
My group-mates kept stealing my tasks
 
life
 
12:14 PM
And they also wrote a little spaghetti cluster >_>
 
lolz
 
I never managed to produce anything that fit into it
 
@Gemtastic did you tell your teacher?
I hate it when my teammates write crummy code
Of course, that's a privilege that only I can do!
 
obtw, HAPPY BIRTDAY @Gemtastic
 
I did, and he's gonna get to evaluate it tomorrow. Though the course isn't as much about the code as just producing, test and deliver it. Testing is impossible on their code :P
@Vogel612 Why thank you (:
I'm old now
 
12:24 PM
@Gemtastic HappyBirthday!!!!
 
wat
 
Is it not her birthday today?
 
It is
About now it should be all over the world as well
 
haha yeah
 
Will be fun to check facebook when I get home :P
 
12:28 PM
well my smartphone notified me at 0:30 AM this morning...
because I was still doing #stuff then
@Unihedron I did some changes to the javadocs... I really want to go through all the javadocs on JavaBot to write them with these tags.
 
Happy birthday! :D
 
Would be even better if IDEs decided to support specialized rendering for them...
 
@Vogel612 Hehe
I was out walking for 3h in untraversed forest yesterday so I went to bed early :P
 
Happy Birthday Gem
 
Dragon birthday :D
 
12:40 PM
This dragon doesn't seem deadly to me :P
 
12:50 PM
@ItachiUchiha same rationale in why people add positive prefixes like "AwesomeAlex"
 
canvas.todataurl("image/png"); using image convert into string in my client side
in my server struts and servlet using and i dont know how to conver string into image?
i am trying lot but not working
 
@Uni I just recently read the rules of playing chess wanna play?
 
@deadlydragon00 Ok!
 
1:04 PM
@Unihedron GG
 
Good game :D
 
screw the rules :D
 
Oh no, I fell from rank 2 to rank 4 :/
 
<--- need training , I wish it is as easy as DOTA
 
Does it help if I play blindfolded?
Then again, I just beat mooseman blindfolded, so I doubt it's that much of an advantage.
 
1:13 PM
yeah...
 
@deadlydragon00 chess is probably easier than DOTA when comparing the basic rules and ITEMS of Dota
 
Chess is high arts and comes deeper into tactics while DOTA is just MOBAS.
 
in my case dota is easier for me..
 
Also, MOBAS arts are lame, while Chess doesn't even have quality art to worry about.
 
1:14 PM
"just mobas"
 
@Vogel612 Don't even get me started on how League is as boring as it could be. :p
 
well the rules and intrinsical basics of chess are less and simpler than Dota
@Unihedron League is boring as hell in comparison to about everything
 
Simple is good. Easier to pick up, difficult to master.
@Vogel612 true
 
it still is fun to play sometimes..
 
1:32 PM
Hello please see if anyone can help on this
0
Q: Awake thread from sleep

Bansal_SnehaI am creating an program and working with threads in details for the first time and stuck into an situation .Please help me in that. I am having a thread which is in wait state.Now at some instance I want to kill or to awake thread and resume from another class .For this I am saving object of thr...

 
@Bansal_Sneha awake :O
 
may be wrong but used simple english term
 
You have put it to sleep, there is no way to wake it up unless you interrupt it
 
Pour cold water onto it. — Unihedron 5 secs ago
 
reanimate or resurrect would have been good too
 
1:36 PM
@sneha A better way can be to use wait
Though I haven't read your question and I am not sure what you want
 
@ItachiUchiha I just wanted to do same task that will be done when wait time will get finish
so I thought it will be good if rather than killing thread I could resume it
 
@Bansal_Sneha Use Future and ExecutorService
/javadoc Future
 
Which one do you mean? (type the number)
1. java.util.concurrent.Future
2. javax.validation.constraints.Future
 
@ItachiUchiha java.util.concurrent.Future: A Future represents the result of an asynchronous computation. Methods are provided to check if the computation is complete, to wait for its completion, and to retrieve the result of the computation. The result can only be retrieved using method get when the computation has completed, blocking if necessary until it is ready. Cancellation is ...
performed by the cancel method. Additional methods are provided to determine if the task completed normally or was cancelled. Once a computation has completed, the computation cannot be cancelled. If you would like to use a Future for the sake of cancellability but not provide a usable result, you can declare types of the form Future and return null as a result of the underlying task. (1/6)
 
1:38 PM
@Bansal_Sneha Use this ^^
@Bansal_Sneha I guess I misread the question. If you want to do some task after the wait time, just write it below Thread.sleep()
 
and the nhow to awake?
@ItachiUchiha
 
It will awake after the time is over :)
 
invoke is better
:)
 
But it will only work if the thread is in wait state and not if its sleeping
 
@Bansal_Sneha no it's not
 
1:53 PM
I will apply wait on thread
and then invoke it
@ItachiUchiha will it work
@Unihedron what will not work
 
@Bansal_Sneha What does not being better have to do with not working?
You said to invoke is better, which is wrong. End.
 
There's an arrow next to replied messages. Use it.
 
@Bansal_Sneha I still do not understand your question and what you really want.
Do you have two threads running parallel to each other ?
 
yes
see I am having two apis
 
1:56 PM
and...?
 
now one api generates a thread
and incase if second api gets hit I want to stop that thread
or to resume
 
@Gemtastic sorry I missed the commotion because I was sleeping. BUT HAPPY BIRTHDAY!
 
@Bansal_Sneha stop the thread accessing the first API?
 
@Dustiny thank you ^^
 
yes
its not accessing the api but it was generated by first api to wait for some event
 
1:58 PM
^ cake for @Gem
 
and that event is occured when second api gets hit
 
I'm curious how people know other people's birthdays.. or is it because they were personally told?
 
@Unihedron omnomnom!
 
@Dustiny magic
google plus
 
2:00 PM
Hmm so their google plus accounts are linked to SO then?
 
@Bansal_Sneha Now I am confused, does the main thread spawns both the thread or does the first thread spawns the second one? :/
 
@Dustiny no
 
@Dustiny We have hangouts, every now and then
 
we just have each others' google plus because we're in a developer circle you're not in
:P
be jealous
2
 
haha
 
2:01 PM
Ohhh okay haha
I aint shook!
...that much
 
We'll let you join if you sell your soul.
 
We all did the same ;)
 
hmm who am I selling it to?
 
us
isn't that obvious?
 
Well wouldn't it have started with one person, so each subsequent member gets less souls than the first person who started it
but yeah it was pretty obvious, there were only really two options: you or satan .. so
 
2:06 PM
@ItachiUchiha see Its my first time with jsp apis so dont know much about main thread .
 
@Bansal_Sneha Thread has nothing to do with JSPs
 
see what I have done is created two apis
 
@Dustiny You'll sign a mutual inclusive license.
 
thread has been created from first api and I want to stop that thread from second api
@ItachiUchiha
 
@Unihedron I'll sell my soul..to feel accepted
 
2:08 PM
@Dustiny That's the spirit (pun intended)
 
@ItachiUchiha tiem to leave .But incase if you find the solution please let me know
 
@Bansal_Sneha lolz, I cannot find a solution without understanding the requirement :P
 
@Unihedron heehehe
@Unihedron So where do I sign. Or is this one of those things where someone will wake me up in the middle of my sleep with a contract and I sign it in a half-sleep state
 
その通り~!
 
@Dustiny with your blood :P
 
2:22 PM
lol just let me go get my sacrificial dagger
 
2:51 PM
Does any library exist to hash using SSHA (SHA1 + 4 byte salt)?
 
likely, search harder ;)
 
thanks for your help, greatly appreciated ;)
 
"hi - I can help - I can help you - I can help you help yourself! hahaha"
 
3:08 PM
Note to self: Don't try to fix headphones by bending the audio jack back into position...*sigh*
 
@Dustiny Use a fishing rod. Bending without craftsmengear is basically breaking it.
 
I'm confused how you would use a fishing rod in this scenario
 
@QPaysTaxes You bet it is
 
single tear rolls down cheek, drips off chin, lands on ipod and plays the next song
 
@QPaysTaxes Indeed.
Welcome to my other world!
 
3:20 PM
hey guys, I was trying to write a cron trigger for a job which starts at 9AM everyday and repeats itself every 3 days
does anyone have any ideas here?
 
What don't you understand about a cron job?
 
I understand a cron job and am using quartz plugin
just trying to write a cron expression
 
3:38 PM
crontab -e
Write whatever you want, save and restart :-P
 
fge
@rahulserver man 5 crontab if you're on a Unix system, this will tell you the syntax
Quartz's is the same, except that IIRC it has a supplementary entry for milliseconds and a few extensions as well
But all of this is documented online
 
thanks @fge
i have read the manual
what i feel the syntax for a trigger that fires at 9AM every 3 days would be "0 0 9/48 ? * ?"
but just did not want to experiment because it would take 3 days for me to find out if its correct. Hence asked here if anyone has experience.
 
@user2821894: Your message was really messy, please use a code hosting service to store the code and reformat your message.
 
4:01 PM
lol...
just got back a research task from the customer...
he said: "It's not implemented"
I lol'd.
oh well.
 
I have a constructor in a class FResource say :

public FResource(HttpHeaders httpHdrs) {
super.setHTTPHeaders(httpHdrs);
}
I have a method in another class say XYZ.java where am calling FResource.java in the following way.

FResource pref = new FResource(getHTTPHeaders());
pref.fcreate(req, request); (fcreate is a method from FResource.java)


Now what i wanted to do is i wanted to get rid of FResource.java and use a single clas as XYZ.java and create the fcreate.java in FResource.java class
but am not sure how to add teh getHTTPHeaders in the new class as I will be no more instantiate FRe
 
4:19 PM
Can anyone direct me to a library that can convert a set of pictures into a movie format?
 
5:25 PM
does any one have a solution for me please?
 
@user2821894 Of what?
 
I have a constructor in a class FResource say :

public FResource(HttpHeaders httpHdrs) {
super.setHTTPHeaders(httpHdrs);
}
I have a method in another class say XYZ.java where am calling FResource.java in the following way.

FResource pref = new FResource(getHTTPHeaders());
pref.fcreate(req, request); (fcreate is a method from FResource.java)


Now what i wanted to do is i wanted to get rid of FResource.java and use a single clas as XYZ.java and create the fcreate.java in FResource.java class
but am not sure how to add teh getHTTPHeaders in the new class as I will be no more instantiate FRe
 
You're just duplicating your previous problem statement.
 
oh i didn't mean to duplicate, I just thought to put it again as you asked for what?
 
@user2821894 Your problem is ambiguous and is hard to give help because you're not even aware of the problem in your design.
And your code uses field naming that are unhelpful.
 
5:29 PM
I mean to ask how to call the getHTTPHeaders in XYZ.java if i remove FResource.java
 
@user2821894 Your local function named getHTTPHeaders() should return something like httpHdrs and store it in some local instance of the class after setting it in super.setHTTPHeaders() may be?
 
@Mr.777, thanks. yeah, that is what my question is. How do i store it in local instance of the class
 
@Unihedron Anything interesting so far?
 
Create an instance of HttpHeaders headers;
 
@MadaraUchiha absolute waste of my time
they ate 30 minutes with the stupid intro
and they showed the phone, which is way worse than apple's watch
in Tavern on the Meta on Meta Stack Exchange Chat, 33 mins ago, by Unihedron
I thought this live thingy would improve my opinion of Google, but meh...
there's my conclusion
@googlephotos
Bringing your photos to life
1 tweets, 1.2k followers, following 1 users
follow count going up...
 
6:23 PM
the only interesting thing in this keynote was C++ support in Android Studio
 
6:58 PM
which isn't even much
 
 
2 hours later…
user3208640
8:45 PM
hi @Dustiny
 
user3208640
@Dustiny are you there?
 
user3208640
I have a question
 
Yoyo
It's my brain-dead time of the time but I'll do my best
^lol point proven
 
user3208640
sorry, my question is about designing class diagram from BPMN diagram if you have experience in it, I'm new in BPMN
 
Never worked with BPMN before, sorry!
 
user3208640
8:52 PM
you are welcome, no problem, I am sorry for asking a subject you haven't worked on it.
 
It's okay, maybe someone around here has worked with BPMN before. Might be worth it to ask later on, it seems like most people aren't around right now
 
user3208640
yes, only me and you are here now...
 
0
Q: Where am I going wrong in my SQL Joins [or is it the where clause ]?

CoffeeHere is my SQL code : SELECT DISTINCT hur.reg_request_id /*null*/ AS "Request No" , frt.RESPONSIBILITY_NAME AS "Module", submittedRow.PERFORMED_DATE as "submitted", /* to_char(hur.creation_date, 'DD-Mon-YYYY HH24:MI:SS') AS "Submitted" , */ /* Dy ...

 
omg lol
 
@Coffee first off: this is the java room, not sql, not oracle not database, java... seconly: this question in it's current form is waaay to broad. You're dumping a huge load of code without much explanation, a minimal "working" example or similar.
 
9:00 PM
Hi ! is there any one who knows where I can find gwt's room ? Thanks
 
ohhhh
It's blocking the CORS request.
 
9:20 PM
damn it
 
9:47 PM
agh come on, why??
 

« first day (1678 days earlier)      last day (3277 days later) »