« first day (3425 days earlier)      last day (1740 days later) » 

00:00
The IBM 2250 is impressive ... if you compare it with a system selling for a tenth its price. -- D. Cohen (source)
 
4 hours later…
04:15
dreams of electric sheep
 
4 hours later…
08:07
@user6274491 Hmm, it's been so-o-o many years since I did anything with web using Java/JSP. But, I think you're asking the wrong question :D
@user6274491 If you want to access fields or some properties, the right way to do (back then) would be JSTL. Something like useBean or some such (I don't remember the exact details). However, with the prevalence of MVC (which was already that way for quite a while now), you're probably better dealing with this by way of Model objects.
@user6274491 In other words, don't try to pass or serialize entity private data into JSPs! I mean, not even using stuff like: <% %> tags
@user6274491 Take a look at this SO answer, for example. This has the right idea.
I agree, you use servlets or jsp
don't try to mix and match
and in general, better to use servlets with a heavier emphasis on client
09:13
what is the "CRUD world"?
09:50
create, read, update, delete
CRUD for short
10:09
Does making a class 'final' improves performance?
@HyperXPro Welcome to the Java Chat, the room for Java enthusiasts! I'm Oak, one of the room's bots. If you want to ask a question, just ask it and someone will respond if they feel like it. But remember that this room is not a help desk or tutoring service! If you want to just hang out, then welcome aboard! Oh, and the room's full list of rules are posted here.
10:20
depending on the usage
but that is a premature optimization
it allows the compiler to avoid single dispatch and such
it should improve your performance by 0.00001% in 99.99% of the cases
totally not worth doing
you should use final for when you want your class to not be able to be extended from and have its members overridden
(numbers might be a bit off)
public class HashChannel {

/**
* Generate Hash of Data
*
* @param Data Data to be hashed
* @param hashingAlgorithm Hashing Algorithm to use
* @return Byte Array of Hashed data
*/
public static byte[] generateHash(byte[] Data, HashingAlgorithm hashingAlgorithm) {
try {
switch (hashingAlgorithm) {
case SHA2_256:
return SHA2.SHA2_256(Data);
case SHA2_384:
return SHA2.SHA2_384(Data);
case SHA2_512:
return SHA2.SHA2_512(Data);
case SHA3_256:
return SHA3.SHA3_256(Data);
case SHA3_384:
return SHA3.SHA3_384(Data);
how about this code?
static method and not abstracted
that looks like a utility class
it wont increase your performance there
adding final worth here?
10:24
but I think you should use final tho
I think that is still the recommended thing for a utility class
making it final and/or a private no-args constructor
(the private no-args also makes it effectively final)
I tried Proguard. It makes code faster (as per as benchmarks) but it does lots of internal changes. Do you recommend using Proguard bytecode optimizer?
@Wietlol it's remarkable that you don't mention something about the method's overall functionality
all that returns and nothing is done with the exception if it occurs
and not to mention that default returns null but when an exception is thrown, an empty array is passed back
that code is just eww
on a side note, you shouldnt catch all exceptions and return an empty array, just let the exception fall further down until it reaches a place where you know how to handle it
and, it might be a nicer solution to just use make the HashingAlgorithm be able to do the transformation
giving them the method as responsibility using polymorphism instead of a strategy
and in the case of when you find yourself in a situation where you dont really know what to return (looking at the default: return null;, you should consider just throwing an exception. the code, at that point, reached a state where you have no idea what to do... simply dont do anything from that point forward
let it throw and tell the user it was messed up
mr5
mr5
I see
10:39
on top of that, you might want to enforce a naming convention in the IDE, seeing how Data and hashingAlgorithm use two different conventions
I would recommend camelCase over PascalCase for consistency with the entire Java world
</rant>
@KarelG better now?
@HyperXPro I dont use any optimizers and my code runs just fine...
but I do use a few other very special things which have optimization as side effect
none of which would be available to you tho
@mr5 you C#?
mr5
mr5
@Wietlol me no C# me see blur o_o
 
1 hour later…
11:55
posted on March 09, 2020

archive - contact - sexy exciting merchandise - search - about ← previousMarch 9th, 2020nextMarch 9th, 2020: Hey, I've got a mailing list for SECRET PALS! If you'd like to be a SECRET PAL, baby, now is your chance. I only send out a message like once a month!– Ryan

 
2 hours later…
14:00
Yooooo @Neil, random update: Guess who got a letter from his previous employer to pay back 50k to them! That's right: I got such a letter, another hill on the hilarious, vomit inducing rollercoaster ride that past 5 months have been. Wrote a friendly mail that I do not really feel like paying after all that happened and that by contract they should have given me the opportunity to take on a new contract which hasn't happened so I will not pay. If they insist I will have to have it checked against law.
@geisterfurz007 be careful that it does not backfire
get a lawyer if you didn't have done it already
usually you can request for a free advise at some law firms
@Michael looks at plugins
Adblock
Adblock Plus
Adblocker
Privacy Badger
I don't care about cookies
what is an ad?
and what are cookies?
14:29
@geisterfurz007 wtf.. these guys..
I'd talk to a lawyer and find out what they can and can't do
it'll cost you 100 euros, it'll be worth your while to get some advice
still, frankly it's a little embarrassing
@geisterfurz007 Dang man. Good luck
14:46
Can I ask question about TableView JavaFx
@PeroSof Welcome to the Java Chat, the room for Java enthusiasts! I'm Oak, one of the room's bots. If you want to ask a question, just ask it and someone will respond if they feel like it. But remember that this room is not a help desk or tutoring service! If you want to just hang out, then welcome aboard! Oh, and the room's full list of rules are posted here.
Hello Oak,nice to meet you
I now that to learn first then ask
I learned JavaFx from Oracle tutorials
fyi, Oak is a bot. Please check at the name OakBot
just ask your question :)
I have TableView and "ProductName" column, This column has CellEditor (ComboBox), As the number of rows in the table is variable I create ArrayList of ComboBoxes (ComboBox for each row)
when select Item from ComboBox my program should dynamically create new row in the table (if the ComboBox in the last row only)
@geisterfurz007 ^
14:59
the program act well for the first row ComboBox
geisterfurz is more experienced with JavaFX
well
He will help
but from the second row ComboBox not well
create row, but set CellEditor in the third row and remove it from the first
I was summoned, give me a second
Take your time
Is that really how one should handle comboboxes in a tableview? I haven't done custom editors in a tableview yet but I don't think it's neccessary to keep a second list of the comboboxes. Let me throw a small example together real quick and I will try to get back to you as soon as I can (hoping that my friend doesn't call me for gym time!)
15:08
Ok
@KarelG What are the alternatives? Either I don't react at all which has a good chance to backfire even more or I pay back even though according to the contract I don't have to. My parents checked as well and found that it was the most reasonable thing to do. Lawyer will be the next thing if they still insist that I should pay. (Also @Neil, I guess :D)
@Michael Cheers!
note please, I do this for some reason
@geisterfurz007 sometimes they try to scare you into paying
it's disgraceful, and honestly wouldn't have expected it from a university, but I suppose there are lowlifes everywhere
Oh, it's not the university. It's a city administration :P
15:12
Oi
Where is your profile picture?
@geisterfurz007 Can I show you the code I tried before?
removed it
Sure! For anything longer than a few lines please use a paste site though :)
@ColdFusion How comes? Protest against SE?
haha well you can say that too
@ColdFusion remove the Code?
15:16
No, he removed his profile picture :P
this my code
sorry, misunderstanding
What do you need the list of comboboxes for?
I retrieve item from it to use in another place in my program
when I make comboboxes inside the cell I found that I can't access it again
@Wietlol Browser extensions are practically malware in and of themselves nowadays.
so I separate it
15:23
I carefully chose some of them
@Michael bold claim
adblock is just spam some on your browser
I am not 100% sure of the internal workings but shouldn't the value you want from the combobox be written to the object of each row?
the other two are quite nice
If you don't know what you're doing, you can end up on a website that prompts you to install an extension.
Or, the developer could choose to include malicious code in an update and your browser will just slurp it up without question.
15:24
for each row there is ComboBox
last row ComboBox on action event on it should create new row
this row shouldn't contain ComboBox until user edit it
but if you run my program, you will notice that second row ComboBox create new row but set the first row ComboBox on it
this wrong in my case
Hmmm, I see the problem and I know what you mean but I have no spontaneous idea for what could cause the issue and how to solve it currently. I have to leave unfortunately, maybe I will have time later to check this again. I will come back to you if I found anything!
Ok I will check it again, if not found solution I will till you
tell*
15:46
@Michael at least it solves more problems than it creates
and even then, if the devs decide it is time to abuse it, people can just fork and host a "fix"
16:43
@Wietlol Assuming anyone notices. Is it possible to inspect the source code of an extension?
17:11
Hey guys, anyone knows how I can remove default fields from jsonLayout from log4j?
17:25
@Michael Yes, if the publisher so wishes to make it available
Otherwise, it's all just minified js and some domscript
17:35
@S.R.I So, technically speaking, yes. But practically speaking, no. xD
@Michael shrug
It's the same deal as the rest of the web. There's crapware and there's crapware to remove the said crapware.
@S.R.I No it's not. A website by itself cannot hurt you (unless there is some vulnerability in the browser or operating system).
Hmm, all I want is to read content on a website. Why do I have to jump through hoops to get to that teeny tiny thing? So, I waste 30s on those little nagwares like cookies, notifications, permissions and others. It's just 30s to me, but it adds up. How much time did I waste in an year? How many others did the same thing? what's the total cost? :D
Of course, now I just use the readability mode -- this quietly turns off all that nagware
In an ideal world, I don't even have to do this or even install extensions to avoid this. So yeah, crapware to remove crapware
Hmm, now I'm reminded of: motherfuckingwebsite.com
 
1 hour later…
18:53
Hello :)
 
1 hour later…
19:54
Fun fact of the day: Did you know that your phone uses a separate, dedicated operating system just for handling radio communications?
20:36
 
1 hour later…
21:43
Hey guys, anyone knows how I can remove default fields from jsonLayout from log4j?

« first day (3425 days earlier)      last day (1740 days later) »