« first day (1489 days earlier)      last day (3451 days later) » 

12:24 AM
Don't buy Asus!
Greetings.
 
 
1 hour later…
1:53 AM
▲ Synchronized trampoline!
 
why the heck am i required to have "http" when navigating in a webview?
 
@DemCodeLines Humm... That's new for me.
 
 
3 hours later…
5:33 AM
@Joe'sMorgue Don't buy ASUS for general purpose computers. I have a specialty build from them for coding. It works great! Actually, the warrant was for two years, it lives its fourth birthday later after new year.
 
hey guys!
 
Heya!
 
is vogel present?
@Unihedron i was working with swing again... and i wanted to close my JInternalFrame programatically.. vigel responded with eventQueue dispatcher... followed it and it did fire my windowclosing event.. problem is the jinternalframe didnt closed..
 
heya
 
Oh?
Heya @Ita!
 
5:40 AM
used it like this:* if(e.getSource() == pv.getBtnCancel()){
System.out.println("Closable");
// pv.dispatchEvent(new WindowEvent(pv, WindowEvent.WINDOW_CLOSING));
pv.dispatchEvent(new InternalFrameEvent(pv, InternalFrameEvent.INTERNAL_FRAME_CLOSING));
// pv.setClosable(true);

}*
 
Departing: B.R.B.
 
NOO @Unihedron dont leave..
 
whats up @Uni?
 
5:55 AM
@Vogel612 found setClosed property to work same as the suggestion you said. found ref on javaranch.. hehe
 
@ItachiUchiha at school
in Smart Developers' Lab, 27 mins ago, by Unihedron
forgot to commit to my private repository at home, so I'm not going to get much done in terms of code in the class
 
6:43 AM
 
7:05 AM
How does one access a file using absolute path correctly in eclipse?
 
@KodeSeeker Right click -> copy absolute name?
 
No I mean using the ClassLoader ..
Im facing an issue similar to this one
-1
Q: FileNotFoundException from the Absolute path of a file (Even though the file is present).Why?

userNotFoundI'm trying to access a file test.gif located at (src/main/resources/test.gif in Eclipse),from my program using the absolute path using the ClassLoader, in the following manner String absPath=this.getClass().getResource("/test.gif").toString(); System.out.print(Path);// prints the absolute path...

 
The classloader doesn't magically find out what the absolute path of a file is. You either have to code a custom classloader, or you have to specify the absolute path correctly. It then again boils down to the technology you're using.
 
Im using Java.
if thats what you were asking
 
Eh... How long have you been doing Java? Then again, this is THE Java room.
'Cuz you're probably using Maven, which messes up with the directories.
 
7:11 AM
For a bit. But I havent had to deal with file locations and maven
Yes Im using maven
 
-_-
What???
 
I meant to say that I havent had the need to access file locations while using maven.
 
So you are using Maven?
 
Yes, indeed
 
7:14 AM
Did that . Doesnt help .
 
"Doesn't help" is not a problem. Only when you have a problem can I tell what the solution is.
Either way, you're using Maven, so absolute file paths must be done the way Maven wants it.
 
Greetings
 
hey
 
@Unihedron Did you push changes to git?
 
@Mr.777 forgot to
 
7:16 AM
Aaah , okay
 
I'm at school, so please remind me when I'm home.
My router is offline, so I can't hack into my home network.
 
Okay, let me know when you are at home :D
 
So the question becomes . What way does maven want it in?
I cant seem to find a resource that explains that
 
Maybe Google query results are user-opt'd, for me the Maven document is on top.
 
@KodeSeeker Maven keeps all static resources in resources folder that is src/resources
 
7:19 AM
@Mr.777 : Thanks for responding . Ok and Im guessing that is a fakepath. In the sense that it actually doesnt exist on the file system?
 
It does exist in file system
 
@KodeSeeker It does exist. Maven just wants it differently.
 
DEPARTING: heading home
 
@Unihedron See you soon
 
7:22 AM
@Mr.777 thanks for the link . So going back to the question. If I wanted to access the absolute path of the file stored in "src/main/resources". would getCanonicalPath() be the way to go about it ?
Im sorta confused after having read that getClass().getResource() is the preferred way.
 
You don't need the absolute path. Forexample:

InputStream is = this.getClass().getResourceAsStream("abc.png");

will get the abc image from src/main/resources
 
In my case I will need the absolute path .. starting from the project folder, because I intend to use this project as a library(jar)
 
Although, you are using this project as library, this will work.
Try creating a jar or war of your application and try running it.
 
Hiya @LeeJeong I just stood up.
 
@Mr. 777 Ok as you say so I have a file " test.gif" in src/main/resources . And I try to print System.out.println(this.getClass().getResource("test.gif")); Only to get a NPE
 
7:33 AM
Anyways... are you sure JInternalFrame does implement window?
 
Whats happening there?
 
Because it really should work with the windowclosing event then
 
@KodeSeeker Do you have the separate jar now?
 
No . Im trying to see how the getClass() approach works in the first place
 
this.getClass() returns the class name of the current object you are holding reference to
 
7:35 AM
Right in that sense why does this.getClass().getResource("test.gif") throw a Null Pointer exception?
test.gif is present in the src/main/resources folder
of the same project
 
See, why exactly is NPE thrown? What exactly is null
 
Are you implying that this could be null?
 
No, I am just asking you to check, what exactly is null, just debug it
 
7:50 AM
this is not null. I dont see what else can be
 
What is not null?
what does this.getClass() return?
 
returns the name of the class
 
And what is that?
 
the fully qualified name packagename.classname
class packagename.classname
 
Okay that's great, now can you do this.getClass().getResource().getPath()
 
7:57 AM
getResource takes an argument. So doing this.getClass().getResource("test.gif").getPath() throws a NPE
and this has caused me to go crazy over the past hour :-(
thoughts?
 
have you tried System.out.println(this.getClass().getResource("test.gif"));?
 
@Vogel612 that prints null
 
there you got your null..
now find out why the loaded Resource is null!
my guess is that the path doesn't work the way you expect.
 
but the file is actually there !
 
javadoc states:
> Returns:
A URL object or null if no resource with this name is found
 
8:10 AM
yes
 
> The rules for searching resources associated with a given class are implemented by the defining class loader of the class.
> Before delegation, an absolute resource name is constructed from the given resource name using this algorithm:

If the name begins with a '/' ('\u002f'), then the absolute name of the resource is the portion of the name following the '/'.
Otherwise, the absolute name is of the following form:
modified_package_name/name
Where the modified_package_name is the package name of this object with '/' substituted for '.' ('\u002e').
I am just copy-pasting documentation here
read up, please
 
also weirdly System.out.println(this.getClass().getResource("/test.gif")); prints the path to the file in target/classes
hmm
thanks for the tips. Ill take a look
 
@KodeSeeker you could use this.getClass().getResource("").getPath()
 
9:06 AM
@miniHessel @Gemtastic @Joe'sMorgue heya !! How have you guys been?
@Narayana heya
 
hiii
am searching for SonarQube chat room.. is it available?
 
are you here seeking answers to your questions?
 
yup.. reagrding sonarqube
 
there is no sonarqube chat room, but you can ask your questions on sonar here
 
i have posted it there
hope some one can help me in that
 
9:14 AM
well I am not very good with plugins in sonar
may be some one in the room can help
 
oh.. am also hoping for the same :|
 
all the best
 
thanks :)
 
No internet at home since Tuesday morning T_T
 
9:26 AM
awww..sad
 
Yeah. They had better resolve that before I get home from school.
shakes fist
 
Adz
morning guys
and girls
 
so where is your course headed ? @gem
@Adz heya
 
@ItachiUchiha It's almost over. Next course I think is web-frameworks
 
@Gemtastic which one is almost over?
 
9:44 AM
JavaFX course
 
Ahh! How was the course?
Did you like what your learn't?
 
Wow, the chat is unresponsive today... none of my messages go through >:C
Some things are better, some are worse
 
@Gemtastic I would like to listen to both of them :)
 
10:23 AM
I still feel like I don't know what I don't know
 
so you know everything :P
 
No I absolutely do not XD
 
hehe
ok let us strat with things which didn't please you
 
Double clicking
FX says "ain't nobody got support fo dat!"
 
No support for double click?
mouse?
 
10:34 AM
No there's no way to scan for a double-click
 
black liquid sorrow?
 
You can count clicks, and react to click but not specific to double clicks. Not as far as I can find :/
 
@Gemtastic you can write a DoubleClick of your own.. it's not that extremely difficult..
 
@Vogel612 Then please enlighten me
Seriously, PLEASE
 
Nothing specific to javafx. All toolkits on any system that I'm aware do it the same way. That's because a double click is also a single click (the computer has no way to know the user intends to click again)
 
10:37 AM
2 days ago, by Vogel612
public class DoubleClickListener implements MouseListener {
    private boolean clicked = false;
    @Override
    public void mouseClicked(MouseEvent e) {
        if(!clicked) {
            clicked = true;
            // scedule a reset
        } else {
           // do stuff
        }
   }
private void reset() {
    clicked = false;
    if (!triggered) { /*propagate click event, if needed*/ }
}
 
@Gemtastic That's the way it is done
@kiheru you are right
 
MouseEvent also carries the click count. That's usually the right way to do it
 
that's all the magic to writing your own doubleclick ;)
 
On UI side, don't design conflicting actions to single and multiple clicks. Besides the technical problems, it's a good way to drive users crazy. Usually it's best if the double click expands on the single click actions, so that simply running them both works cleanly.
 
@kiheru that's more UX than UI ;)
 
10:43 AM
Haha, yes. I don't pay much attention to the jargon
 
Hello @Vogel612 @ItachiUchiha @Unihedron can you guys please have a look at this?
http://codereview.stackexchange.com/questions/70405/any-improvements-for-this
 
UX > UI ;)
 
@Mr.777 Yeah, and the title sucks.
 
@Unihedron Can you edit or tell me what exactly it should be? :)
 
@Mr.777 there's a comprehensive guide on CR meta, but the TLDR is: Make your title so that people will click it
aka. tell us about the problem and don't say that you think you suck,.,..
anyways, your code will probably be torn apart...
 
10:48 AM
Will your community sign up for winterbash @Vog?
 
@Unihedron there wasn't even a "no" answer on the post..
also.. it's opt-out IIRC
@Mr.777 > Any suggestions on coding standards & improvements?
THIS IS NOT WHAT YOUR PROBLEM IS!!!!!
@Mr.777 make the title describe what the code does, not what you think you need
 
@ItachiUchiha But let's say I want it to be selectable as well; click once - selected. Double click - open a file associated with the icon. But it has to be set within a certain time; if you click 20 seconds later I don't want it to open the file; I want it to count as a selection, even if it's already is selected.
 
because you're wrong more often than not.
 
@Vogel612 Yep, thanks :)
 
10:59 AM
@Gemtastic if using the click count of the event is not appropriate (usually it is), then store the time stamp of the previous click. Then you can compare to that and have your own double click delay. The event also takes in account the position of the clicks, and custom mouse handlers usually need that too
Deja vu, it can't me more than two days when all the same issues were talked about with someone else
 
@kiheru it was 2 days..
 
^^^
 
@Gemtastic Yes you can make it selectable. Let me make you a quick example, for better understanding :)
 
any SDET guys here?
 
11:14 AM
 
11:39 AM
@Anirudh whatever SDET is..
 
11:56 AM
@gem der?
single click changes the background color and double click opens a pop up stage
 
No one bothered to comment on my question :(
 
hope it helps to understand
@Mr.777 CR?
 
Yes
 
HEY GUYS!
just got home from effin work...
 
@LeeJeong Hi, What's effin work?
 
11:59 AM
@Mr.777 F-ing. SOlang.
 
effin is Fvckin.. you just used the first letter of the cuss "F" pronounced as "Effin"
xD
@Unihedron hello sir! :D
 
lol
 
hello hello
Not very active in chat today, trying to nail some essays here
 
i see... is it difficult for you?
 
Not really. It's a lot though.
 
12:01 PM
@Mr.777 I don't do CR
 
Not Found
 
12:21 PM
@ItachiUchiha :(
@Unihedron Can you CR?
 
@Mr.777 I would but I'm really busy at the moment.
 
Okay
 
Maybe Jamal will appear, I don't know. I might be able to write an answer in a bit.
 
12:35 PM
@Mr.777 Don't worry you'll get an answer soon enough..
 
@Vogel612 Okay :)
 
CR answers generally take some time if there's nothing terribly obvious, like standard formatting or naming..
 
12:50 PM
How rude @Vogel612
 
@Anirudh hmmm... what exactly?
 
Software Developer Engineer in Test
 
Where you got that from??
 
Huh?
I am working as one!
Lol
 
and what is / was rude???
/me confused
 
12:55 PM
You called me whatever. :- /
 
linkey?
I am around much here and seem to have forgotten...
 
linkey?
 
deminuitive for hyperlink
aka. links or it didn't happen ;)
 
link for what?
SDET?
 
Hey guys! Lets drink!
 
1:06 PM
ohh yeaahhhh
but wait..drink wat?
 
aaaand I am completely lost..
 
spend some time with your pets
 
wat
 
Alcohal maaan
 
unihedron is still around
 
kya
1:14 PM
Hi guys.
 
As you people keep up with your entertainment, I've finished my school work and am going to code, with some herbal drinks because I didn't make enough coffee.
Hello @kya, welcome to the world of Java, where your dreams may or may not come true!
<_<
>_>
 
v_v
 
kya
lol, thanks @Unihedron
I am having a rough time with Java though. Maybe you can help
 
Maybe.
Potential for anything; Everything can happen.
Sorry, I'm in this post-I-nailed-a-dozen-of-4k-words-essay mood.
 
kya
1:16 PM
hahaha, True. I am hoping for the positive end result
 
What's the matter?
 
kya
I've written a stored procedure in SQL Server 2012
 
fge
/me wonders whether Unihedron's "herbal" actually relates to "drinks"
 
kya
tested it and it works great
Now I need to write a java function to return a resultset of Surname, Cost and Reference number to display them on a different page
 
Who's up for it? Alcohol maan, you got to have it when it stresses you..
 
kya
1:19 PM
public static String getSlip(int id)
{
ResultSet rs = Sql.getResultSetSP("{call SLIP}");
String cost = rs.getString(1);
String reference = rs.getString(2);
String surname = rs.getString(3);


}
that's as far as I got
 
Yes @fge. It's a prepackaged drink because I'm too lazy to brew that chrysanthemum, cinnamon and apple juice blend.
 
Who's up for it? Alcohol maan, you got to have it when it stresses you..
but wait, how do you feel if you are LEGITIMATELY stressed already?
 
kya
Anyway you can help @Unihedron ?
 
fge
@Unihedron I was actually thinking about something else
Nevermind
 
wth is that a laptop stand?
 
1:21 PM
@kya Yeah, but you gotta tell me more about how the other page is supposed to work.
@Anirudh What? My workstation laptop to the left, secondary display, a hovering monitor to the right. I posted a pic of my computer setup in Teenage Programmers Chatroom once.
 
kya
The other page will be a pdf. Its already set up. the only thing I need to do is retrieve the data from the database and display it on that pdf. meaning I will store the data from the database into variables
 
You sound excited
@Unihedron
 
@kya Wait, let me get this right - your PDF is automatically calibrated to take values from your program?
 
kya
The pdf currently has hard coded values. But now I want to replace those hard coded values with the values I will retrieving from the database @Unihedron
 
@Unihedron And where do you sit to program? Are you using some external keyboard?
 
1:26 PM
@Mr.777 Surprise... Chair.
 
@Unihedron lol, I asked coz couldn't see your chair :D I thought may be you lay on bed and code :P
 
@Mr.777 Sometimes. But my neck would break if I do that too often.
 
kya
@ItachiUchiha :)
 
@kya Are you using a PDF library by chance?
 
kya
I am using ITEXT
 
1:27 PM
 
Who's up for it? Alcohol maan, you got to have it when it stresses you..
but wait, how do you feel if you are LEGITIMATELY stressed already?
 
kya
@Unihedron my main issue is getting these values from the database using the stored procedure I created
 
@kya Are you trying to return all the values within the same method?
 
@Unihedron Perfect
 
kya
That's correct @Unihedron
 
1:29 PM
hey I am on TV, i can see myself
 
@LeeJeong Why are you spamming?
 
I am a star, son
 
kya
CREATE PROCEDURE [dbo].[SLIP] @ID INT

AS
BEGIN
SET NOCOUNT ON
SELECT a.Reference, a.Surname, b.Cost
FROM dbo.App a
INNER JOIN dbo.Cost b ON a.Turnaround = b.ID
WHERE a.Turnaround > 0 AND a.ID = @ID

END @Unihedron
 
Yay triple pings
 
am i?
 
1:30 PM
@LeeJeong Yes
 
But really, you should pass the result set.
public static ResultSet getSlip(int id) {
    return Sql.getResultSetSP("{call SLIP}");
}
Because that contains all the values in its object, which you can then retrieve at the other end.
 
kya
@Unihedron Thanks a mill, one last thing Now, lets say I would like to store reference into a variable called reference, and Surname into the surname variable and cost into the cost variable. I am not clued up with Java, I am working on a project I inherited and I am still in the learning process
 
Where are the variables? Somewhere in the class itself?
 
variableName/referenceName = VALUE;
 
kya
@Unihedron they are in a class
 
1:39 PM
@kya ....... "a class" - which class?
and static or not static?
 
kya
public static final String src="c:\\temp\\DepositSlipTemplate.pdf";
public static final String dest="c:\\temp\\Result.pdf";
public static String txtCin="Roof";
public static String txtRemitter="10516433";
public static String txtIBT = "0045";
public String txtReference = "QR1411125001";
public String txtAmount = "96000"; // value in cents
public String txtCustomer="Mr/Mrs Customer";
So I wish to do is replace all the hard coded information inserted into those variables @Unihedron
 
Firstly, you're aware that final field can't be changed, right?
The three static fields can be referenced with ClassName.fieldName, while the other three requires you to write to these instances directly.
 
kya
that's correct, I only wish to change txtReference, txtAmount and txtCustomer @Unihedron
 
Since the last method you wrote is static, where is the reference to the object?
Also can you PLEASE stop pinging me? I have the sounds off, but the /ack command is really annoying
 
kya
sorry
 
1:44 PM
what /ack command??
 
short for acknowledge i guess
 
@Vogel612 POST http://chat.stackoverflow.com/rooms/139/ack {'messages':[20051241],'fkey':fkey().fkey}
 
eurgh..
 
See, I told you it's annoying.
 
kya
Java is like a foreign language to me
 
1:46 PM
@kya and that where you can write java so close to english..
 
kya
I am just trying to sort this application, then continue the learning
 
@kya where is the reference to the object?
 
kya
Now that you helped with the method to call the stored procedure
Can't I just pass the id into that method
and out the results
store them into those defined variables ?
 
I thought you wanted to write to the fields?
 
@ItachiUchiha thanks Ita :)
 
kya
1:54 PM
For example: I want to retrieve cost from the database, using the function you helped me with. then store it into public String txtAmount
 
@kya Yes, but you can't write to nowhere. String txtAmount isn't static.
 
kya
My goodness Java is confusing :(
 
But I still have the question for how the eventhandler works; does it count "forever" so that if you click 20min later (without anything in between) it will count it as a double click, or will it "cancel" itself after a given time?
 
kya
Now I have now idea what to do next.
 
Did you at least pick up a book or tutorial or something?
 
Adz
1:56 PM
hey guys, anyone experienced with java websockets?
 
@Adz I use jetty, what are you using?
 
Adz
tyrus
@Unihedron
 
... ? What's tyrus?
 
Adz
java api for websockets
 

« first day (1489 days earlier)      last day (3451 days later) »