« first day (2470 days earlier)      last day (2695 days later) » 
00:00 - 12:0012:00 - 00:00

00:05
picks nose
00:56
morn
 
2 hours later…
02:32
God I am so tired
03:15
morning
03:26
random comment
03:57
the last Kurzgesagt video is soooooooooo depressing...
"Great ambition is the passion of a great character. Those endowed with it may perform very good or very bad acts. All depends on the principals which direct them." -Napoleon Bonaparte (source)
04:18
now i have something to watch tonight
04:30
game of thrones?
Kurzegesagt. Oh and GoT too
morning guys
can anyone pls tell me whats wrong in my servlet code ?
it is written while you were drunk?
not really. It all seems fine. but doesnt work
xhttp.open("GET", "<%=landingpage_basePath %>/EnquiryDelete111?info=" + id, true); << id is 1
any specifics that dont work?
04:38
<servlet>
<servlet-name>EnquiryDelete222</servlet-name>
<servlet-class>admin.enquiry.DeleteEnquiry_CTRL</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>EnquiryDelete222</servlet-name>
<url-pattern>/EnquiryDelete111</url-pattern>
</servlet-mapping>
url doesnt go to ser-class
can you access that one from your browser?
I click the the submit button which fires up the JS
but doesnt redirect to web.xml
but it is one of your servers entry points... can you access that entry point by putting the url in your browser's url bar?
localhost:8080/acbdb/EnquiryDelete111?info=1 this in browser redirects to blank page
and your server recieves the call?
04:44
and yes it worked
then I assume your <%=landingpage_basePath %> doesnt work
i have never used it before though
I printed it, its correct
hmm... then iDunno
its ok, thanks anyways
@Wietlol what do you use for basepath?
I dont use servlet
04:52
then?
i use jax-rs
which allows me to get the basepath by in-built functions
and on the client side, i pass the path when the page is loaded
thats much easy
well i fixed it
05:05
what was the issue?
it was basepath and not basePath
stupid case senstivity
05:40
Good morning :)
06:03
Yo yo
@JennaSloan cant listen to it in office :(
@JennaSloan 100% automatic :O
@motaa I ended up using the old code from Swing, because this layout stuff got too much for me... I split it up in seperate functions, have it return a javafx.scene.image.WritableImage with SwingFXUtils#toFXImage and access it via reflection now :D
That way I can use the enum value the form has and a loop over the number of images for each for that is set in the enum value as well to get rid of some switch case stuff
06:33
how do i include a jsp on href click ?
0
A: Include JSP on menu item click

sim186I resolved with request object in this way: In the JSP page: <header> <ul> <li><a href="?page=home">index</a></li> <li><a href="?page=search">search</a></li> </ul> <%if(request.getParameter("page").equals("home")){%> <jsp:include page="index.jsp"> <%}else %> <jsp:include pa...

?
im sending parameters also
i saw this, but doesnt work. Im sending href to urlrewrite.xml > web.xml > jsp
I was just googling :) I have no idea about jsp sadly :/
/javadoc Modifier
Which one do you mean? (type the number)
1. java.lang.reflect.Modifier
2. java.nio.file.WatchEvent.Modifier
3. javafx.scene.input.KeyCombination.Modifier
4. javax.lang.model.element.Modifier
06:40
Which one do you mean? (type the number)
1. java.lang.reflect.Modifier
2. java.nio.file.WatchEvent.Modifier
3. javafx.scene.input.KeyCombination.Modifier
4. javax.lang.model.element.Modifier
@geisterfurz007 javafx.scene.input.KeyCombination.Modifier: This class represents a pair of modifier key and its value. @since JavaFX 2.0
hmm
if you use java -version command. Is it possible that it may not pick the latest SDK version, even if you have the most recent SDK available?
some systems have multiple java SDK's (especially at clients)
that depends on how the java installer treats the path variable (at least for windows)
yeah it depends of the environment/system variable. Each update should rewrite that
06:44
Or rather which folder C:\ProgramData\Oracle\Java\javapath refers to/which files are referenced in it
06:59
Just checked... The folder it references in in C:\ProgramData\Oracle\Java\javapath_target_someNumber
I assume that this folder is updated so that ...\javapath always points on the current ones @KarelG However this only applies to java.exe, javaw.exe and javaws.exe as those are the only ones referenced
 
1 hour later…
08:01
Does anyone know how to sort a JTable from code?
AAAAAAAAAAAARGH SWING >.>
16
A: How to sort JTable in shortest way?

MadProgrammerAs per How to Use Tables: Sorting and Filtering JTable table = new JTable(tableModel); TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(table.getModel()); table.setRowSorter(sorter); List<RowSorter.SortKey> sortKeys = new ArrayList<>(25); sortKeys.add(new RowSorter.SortKey(4, ...

OK I'm doing something wrong :P
what's the best way to remove data from my table
it implements an abstracttablemodel
and i have a button that removes information from the datamodel that backs it up
Eventhough I know that that is not what you want to hear (I did not want to hear that either) but You should definitely check out JavaFX ;) Other than that, your best guess is to google stuff, sorry. I have not worked with Swing for quite a while now (god bless) and almost remember nothing
@DCON what kind of table?
the best thing that has ever happened to Swing is its decay
falling slowly into oblivion
08:13
what is the main difference between swing and javafx?
never used JavaFX
afaik, JavaFX does not have the stupid layouts that made Swing almost impossible to organise
i have used both a little bit
havent used swing in like... 4 years
but havent used JavaFX more than writing a helloworld app :D
@Tavo Oh they still have them :D You just don't have to care about them in your code anymore :P
otherwise JavaFX wouldn't have been an improvement at all
you care about them somewhere else?
08:18
You do, yes
in the html like thingy?
hmm...
im trying to remove the html "like" thingies in my web project
moving everything to the code
So, I've got an XPathTable model. It's a HashMap<String, ArrayList<String>>() which is displayed in the table
I have a method up and running which correctly deletes the information from the underlying hashmap, based on the selected row
JavaFX has more options to make life easier. For example Properties and Bindings. For example you can bind the visibility of a button to the condition that a textfield may not be empty. Once the textfield gets empty, the button goes invisible. So you do not have to add listeners all over the place. You still can do so if you need more that just changing values however.
08:20
However I'm trying to figure out how to reflect this data change in the table
one way is to just rebuild the table from the hashmap again, but thats kind of less than ideal
the table is also sorted
with a rowsorter
and i want it to keep the sort after i remove data
You do not have to take care of initializing the whole UI in the code. You have a fxml file for that which you can either write on your own or even better generate using the tool SceneBuilder. This opens the option to link methods and variablenames to the fxml file which will then initialize the components using the specified values.
There are even more things I bet, but I do not use JavaFX as "excessive" as for example @ItachiUchiha ;)
08:38
morning
Sayros is here \o/
I started with Swing for a very simple UI, then I realized JavaFX is the way to go. Thing is, I'm using Kotlin. Once I narrowed my search down to that, I found TornadoFX, which looks to be as powerful as JavaFX but without the XML.
@Egoscio Welcome to the Java Chat, the room for Java enthusiasts! Please use a code snippet tool when posting code snippets. If you have an Android question, you're in the wrong place! And remember: this is not tech support! Thanks for visiting and have fun! :D
since it hasn't been done in a while, here's a Friday cat
:3
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaww *-*
08:44
keeping traditions alive
I did not even know it was a thing :D
Oh... While we are at traditions and ColdFire is not here...
well, the Friday video was a previous tradition, but it got... banned
yeah, that
oopsie :D
why banned?
actually, for the sake of tradition I'm going to listen to it
noooooooooooooooo
08:45
yes, it's almost 5pm here
my ears are bleeding already
fun, fun, fun!
5PM? 10:47AM here
yeah he is kinda strange
yeah, I'm not in Europe anymore
Might be that he lives in Singapore though as well
my brains is coming out of my nose now...
08:50
All two grams? :>
ok I guess?
might have something to do with being punched in the nose today at training, but I'm going to blame it on Friday
@geisterfurz007 all I smoke yesterday, yes :P
@geisterfurz007 o/
09:04
hello
@Tavo You are smoking?
Hi! Here's the table I have trouble with. pastebin.com/jmNiV54b
@geisterfurz007 nah, not for years
can someone help c:
@Tavo Good guy :>
09:07
@DCON not me, sorry
Me neither :c
i should post it as a question, because naturally i'll figure it out on my own within 30 seconds of posting
If you do so your first thing to do should be trying to compress your code. The thing you posted above is quite large. If your problem is already recreatable with shorter code do so. I might be eager to test around with that then as well ;)
@DCON also, don't post all your code at once
it is waaaay too much. Be specific
That's the smallest I can get it to
that still runs
09:12
no need for it to run
the original depends on another class for table data so i create some stub data in that one
just say 'I have this table and I want to do this and that. I have tried this and that but it doesn't work'
i know if i ask this question it will be closed as duplicate within 10 seconds
even though it is not
09:24
i think i got it :)
/code
:s what was the link again to post stuff? It's the only one that's not blocked
/help
Commands=====================
/8ball     Simulates a magic 8-ball.
/about     Displays information about this bot.
/afk       Allows users to mark themselves as "away".
/cat       Displays a random cat picture. :3
/define    Displays word definitions from the dictionary.
/groot     I am Groot.
/help      Displays this help message.
/http      Displays information about HTTP status codes and methods.
/javadoc   Displays class documentation from the Javadocs.
/learn     Teaches the bot a new command.
/cat
i have to leave before i start abusing that bot
09:29
Ah I found another one that works
/8ball
@SajalGupta Yes
/rollover
Is there any way of compacting this? https://hastebin.com/semofovaho.scala
ItemMeta is an interface if I understood correctly but I don't see how that could be
Going to lunch, ping me if you have any suggestions thanks <3
1) directly setting if possible 2) setting and not reassigning (if it is well coded that works).
ItemMeta can be an interface if getItemMeta() returns an implementation of it
And enjoy the meal :)
09:40
pls tell me what is wrong with this statement
insert into acboenqdfreqm (acboefdeuid,acboefdcustuid,acboefdstatus,acboefdremark,acboefdextfdate,acboefdt‌​uid,acboefdaddedon) values ('2','1','Follow','null','07/11/2017','null','2017-07-28 15:09:21';
@Pigman168 why do you want to compact that?
Because it is taking something, changing it, and putting it back. One could in theory at least comact it to: change it in the thing you are taking it from
@SajalGupta missing ) in the end?
^--
and are you sure with 'null' ?
that's not NULL
On a deeper layer: Different dateformats...
@geisterfurz007 THANKS!!
@KarelG i am sending value 'null'
09:46
@SajalGupta 'null' = new String('n', 'u', 'l', 'l')
What they want to say is that NULL as null reference is different than 'null' as String
also, you are missing and end parenthese
@geisterfurz007 yes i get it. I am sending the value "null" and not null.
@Wietlol Wow you went superfast with that one didn't you? :D
hello
09:51
@MHDaouas Welcome to the Java Chat, the room for Java enthusiasts! Please use a code snippet tool when posting code snippets. If you have an Android question, you're in the wrong place! And remember: this is not tech support! Thanks for visiting and have fun! :D
Hi guys, I have been searching for this, but the query is too generic. How can I "reference" a class inside another class?
@Shadow Welcome to the Java Chat, the room for Java enthusiasts! Please use a code snippet tool when posting code snippets. If you have an Android question, you're in the wrong place! And remember: this is not tech support! Thanks for visiting and have fun! :D
The idea is to replicate a class within a class, but for organization purposes I want to have that inner class in its own file and "reference" it inside another one
So I would have something like MainClass.InnerClass.some method of inner class, but the InnerClass would be in its own file
09:53
That does not work afaik
@geisterfurz007 huh?
yea, it took me 6 minutes to build my project to find warnings on the statement
:D
11 mins ago, by geisterfurz007
@SajalGupta missing ) in the end?
KarelG and I were a bit faster :^)
I can nest classes, and it is what I am doing right now, but the more complex it gets, the harder to read it is, that is why i wanted to externalize those classes but still have them referenced inside their main classes
@geisterfurz007 and I couldn't even see that I'm missing a )
aaaaaaaaaaaaaaand it's Friday!
time to head!
10:02
hello can any body help me with a HTTP REST headers problem?
@Tavo I have full-day working on Saturday also
I get this error: "Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8085' is therefore not allowed access. The response had HTTP status code 400." when I issue a POST request from an AngularJS app hosted on a TOMCAT 8.5 server.
@MHDaouas what is the problem
@SajalGupta life is not fair :D
@Tavo talk about life being unfair? I DONT EVEN GET PAID.
10:04
I want to send a POST request to a distant server which is on JBoss and has the IP address 192.168.205.125:8080
from a server with AngularJS + Tomcat 8.5
the JBoss server is well configured because I can send POST requests to it from Postman or Android/iOS
but I can't from the AngularJS app
it seems there is a problem with the used headers from the Angular app or the Tomcat server
I tried to use CORS filter on Tomcat without success
Doh, I just figured it out, I can simply create inner empty classes that extend the external classes! And it works!
GET requests work though (from the Angular app)
only POST requests don't work
The complete error I get
OPTIONS http://192.168.205.125:8080/********** 400 (Bad request)
XMLHttpRequest cannot load http://192.168.205.125:8080/*******. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8085' is therefore not allowed access. The response had HTTP status code 400.
@Shadow Sounds like as a bad design on first sight
inner classes should be used for something temporarily, helping to complete complex tasks. Don't treat it as actual classes like you intend to do.
@MHDaouas you could compare the sent data
@Shadow what design pattern would that be?
is there a way to check what Postman sends exactly?
10:14
morn
postman can generate the source code with identical data
sort of
I cant guarantee that that is the sent data
@MHDaouas there is somewhere "code" where you can generate code snippets. Pick "HTTP"
(that link is below the save button right above the window IIRC)
OK one of the differences is that in the Response Headers, "Access-Control-Allow-Origin:*" is missing
test it while using that one and when not using that one
should I add it in the Angular post request headers or somewhere in the Tomcat server?
because it's already added in the distant JBoss server (which is why the request works with Postman)
10:23
@geisterfurz007 Thanks for the tips! Unfortunately I think there's no other way :( I can only set the name from the meta and I can't instantiate an ItemMeta object
@KarelG Shadow's fix is a reversed pattern compared to Interfaces... afaik
I have class X that implements certain interfaces
did you have read his prev comment ?
I have interfaces that contain the declaration of the methods (using defaults)
and then you just pass X instances around
yes
aka, reversing interfaces
Content-Type:application/json is missing in the Request Headers...
even if I add it in my Angular request
it seems like the Tomcat server is interfering with that
10:39
 BigDecimal op1 = ...
 BigDecimal op2 =  ...
 result = op1.doubleValue() / op2.doubleValue();
this can be slower 100000 times than

op1.divide(op2, 1);
Java has already notice this
public double More ...doubleValue(){
       if (scale == 0 && intCompact != INFLATED)
           return (double)intCompact;
        // Somewhat inefficient, but guaranteed to work.
       return Double.parseDouble(this.toString());
    }
why would you use op1.doubleValue() / op2.doubleValue() ?
for example in some groovy developper can have their framework
for example they can have MyDecimal extends Number
and then they override groovy operator using doubleValue
this make disaster in performance
MyDecimal op1;
MyDecimal op2;

op1/op2;
but groovy uses the operator overloading there
I for my part fear I am somewhat missing the point here
right?
so, op1.divide(op2)
@CrowleyAstray it is a horrible design so, you shouldnt fear at all
10:45
I am talking about overloading operators by other custom frameworks
11:28
did anyone of you ever work with OrientDB?
If I want to draw 2 dimensional object on console, I'd have a nested loop body right?
something like:
****
most likely, yes
------
| |
| |
------

This would most easily be achieved with a nested loop. (if you only use one character it gets even easier)
also, it skimped my spaces :<
So basicly n^2 for printing to console right?
yes, if you want a square
it's height*length, and if height = length, it would indeed be n^2
now, if I manipulate the counter using conditional (if else, etc) would it be faster than simply using nested loop?
you know, using newline
11:36
if it isn't really big performance won't be much of an issue
and I am not completely sure what you mean by manipulating the counter via conditions
let me brew a sample
btw, I would really not worry about it if it is anything short of 1000x1000 (I recently had something similar and still a run-time of 1 sec without optimisations)
let's assume it's going to take a very large number
sure, just brew your example already :3
somehow closed my text editor
sorry. let me do it again
11:47
tries to produce minimal working sample for 5 minutes
closes text editor
oh jolly!
my pc is a mess
god
re-opens text editor because it ofcourse stores the text you write in it whenever it hasnt recieved any input for x seconds or when it shuts down
oh jolly!
I have this distinct feeling that I will receive the sample some time tomorrow :p
greetings, @pizza
how to tell the employer that I want to leave ?
00:00 - 12:0012:00 - 00:00

« first day (2470 days earlier)      last day (2695 days later) »