« first day (2923 days earlier)      last day (2242 days later) » 

00:00
"Plant your own garden and decorate your own soul, instead of waiting for someone to bring you flowers." -Veronica A. Shoffstall (source)
 
2 hours later…
02:09
I get this error 'HttpHeaders(java.util.Map<java.lang.String,java.util.List<java.lang.String>>)' has private access in 'java.net.http.HttpHeaders' when trying to make an instance of HttpHeaders headers = new HttpHeaders() inside of a public method
Anyone have any advice
02:24
0
Q: Send custom headers RestTemplate

Paul McloughlinI am trying to set a custom header on my RestTemplate requests. I'm using Spring Boot 2.0.6.RELEASE I try setting them like so, inside of my public method HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); headers.add("muh Header", "muh value"); Every...

morn
morn
 
3 hours later…
Zoe
Zoe
05:11
@geisterfurz007 cleanup at 4:24
05:48
posted on October 24, 2018

06:07
@Zoe poke
06:47
You know what would be evil? An image hosting site which is searchable through google like imgur, but whenever your IP address accesses an image, it shows you what you were searching for and to everyone else it would show them something completely different
Morning
Morning.
Morning.
07:18
o/
That lag
Morning
07:27
Morning.
Zoe
Zoe
@Tavo hiya
Good morning
Good Evening
dbl
dbl
07:57
morning all
I see there any germans here in this room, yet people talk in english
I have met so many germans and all are awesome
People are very friendly and helpful
My thoughts are that everyone's experience is different
there are assholes everywhere, Germany included
This is an international channel read by a lot of people around the globe. Why sould anyone use anything but english?
08:24
esperanto
we should move to esperanto
Mi pensas, ĉi tio estas tre malbona ideo.
Esperanto estas bela sed malsukcesa koncepto.
@Nicktar it is indeed a shame
I guess English became the de facto esperanto. Before that it was French
09:12
o/
dbl
dbl
o/
09:25
English is the lingua franca
09:49
> I speak Spanish to God, Italian to women, French to men, and German to my horse." -Charles V
10:12
There is something i am not so sure about when it comes to using threadpools
Lets say i have selected 10,000 rows from mysql and i want to read and update based on some criteria i.e if a row column has a specific text i.e true or false
If i am using a threadpool with 20 threads, can i have any guarantee that no row will be processed twice?
That is from Redhat's project lead
and i quote, "No control on the task splitting algorithm"
10:41
hi all
I have a list of maps and inside the map, I have key called versionId
I wanted to group by versonId and hence I did like
private Map getScheduleDetails(final List<LinkedCaseInsensitiveMap> details) {
        return details.stream()
                .collect(Collectors.groupingBy(g -> g.get("versionId")));
    }
This is working fine
Now I want to group by versionId and locale(locale is also a field inside the map),
is it possible to do so?
baeldung.com/java-groupingby-collector Something like what is listed under 2.3 here?
The method I shared above will return me map
with key as versionId and value as details(List<LinkedCaseInsensitiveMap>)
correct?
now I have already grouped versionId
and I want to locale
Collectors.groupingBy(g -> new Tuple(g.get("versionId"), g.get("locale"))) would be my shot at that.
isnt tuple a user defined class?
/javadoc Tuple
2
You can also use Pair for that matter.
You can also write your own container.
thanks
let me try
Which Pair class you are referring to?
Also I tried to import Tuple but I dont see Tuple class inside javax.persistence
dbl
dbl
sry was afk
38
Q: Group by multiple field names in java 8

Mital PritmaniI found the code for grouping the objects by some field name from POJO. Below is the code for that: public class Temp { static class Person { private String name; private int age; private long salary; Person(String name, int age, long salary) { ...

@geisterfurz007 this is invalid and will never work as expected
@dbl would you mind discussing in a separate room?
dbl
dbl
I am discussing your problem Q.Q
11:06
I mean
dbl
dbl
baeldung.com/java-groupingby-collector @geisterfurz007 or maybe it could :D
can we discuss about my problem in a separated room with me
dbl
dbl
don't have the time atm
you are sharing some useful links and so I wanted to pin those
for future refresnces
dbl
dbl
as you wish
11:07
I can not pin them here
dbl
dbl
I can't spend any time atm if u still need assistance there let me know later today ok?
@objectiveME You've got no control about which task will be updateing your value. But I'm very sure that each value will be updated only once. But... DB-Updates are an IO Operation.
@Nicktar This is turning into a murkier subject than originally thought
Hey.
Guys anyone has an idea why background is filling with red colour? Am i using wrong API for setting background colour?
private void fillBackground() {
graphics2D.setColor(Color.WHITE);
graphics2D.fillRect(0, 0, this.outputInfo.getWidth(), this.outputInfo.getHeight());
}
https://yadi.sk/i/9suosvnB-_zIrA
11:21
user image
4
haha
Even the java gurus have ghosted me upon hearing what i am asking...hahaha
But in the end... every bit of food get eaten (once)
@objectiveME I think, no one ever wondered if you can be sure, that every item is only processed once. Much like no one ever wonders if you can be sure while iterating over a list...
dbl
dbl
either or eventually two puppies will get themselves in a bite fight for it :D
@dbl but even then... one puppy wins
dbl
dbl
well when you speak about eating it (consuming) yes, but if you would like just to observe it, then there will be no guarantee that you was the only one who had the chance...
since you can successfully observe the same bit of food several times
11:31
@Nicktar I am not even doubting what has been in place for years...i just want to have a look at the task splitting algorithm
dbl
dbl
unless you have either a fragmentation tactic or a locking tactic used.
If anyone wondering - changing BufferedImage type to BufferedImage.TYPE_INT_RGB did the trick.
dbl
dbl
nice
@objectiveME AFAIK that depends on the type of threadpool you're running it in (by default a ForkJoinPool)
11:46
Okay
posted on October 24, 2018

archive - contact - sexy exciting merchandise - search - about ← previousOctober 24th, 2018nextOctober 24th, 2018: October is the month for terror!! And also comics! And also... TERROR!!– Ryan

Hello
Does anyone here knows if theres a compability issue between newer Eclipses and Older Webspheres?
I'm trying to set a 8.5 websphere server in my Eclipse Oxygen
but it only gives me the Liberty Option
Academically gifted students, especially those with high verbal aptitude, are often bullied and are more likely than less gifted students to suffer emotionally. (source)
dbl
dbl
12:10
lol this is so not true...
especially those with high verbal aptitude are being able to struggle out from a bully...
12:39
@FelipeOliveira Not sure. I'm also using 8.5 Websphere, but I'm using it w/ RAD
@ballBreaker I wish I could use RAD, but i'm in a business department, so they don't have licenses for it :(
Ah, well I have no idea then, sorry
I mean, if they really want us to use websphere, they might as well buy thoses godd**n licenses lol it's a hella big company
Yeah man, if they're paying for websphere they might as well pay for RAD
otherwise just use an opensource AS lol
WebSphere isn't even that great AND you have to pay forit
12:56
Exactly, that's one of the bad things about being a developer in a business department. They struggle to understand that many times you need a whole package to be able to work properly.
Yeah :\
I'd rather not use either RAD or WebSphere
Wildfly is way better
I'm sure there are better paid options than Wildfly and WebSphere both
never used it
I only have used websphere and tomcat so far
 
1 hour later…
14:22
Hello all
I am using a method to remove accented characters.
private String createFilterRegex(String original) {
String removed=null;
String decomposed = Normalizer.normalize(original, Normalizer.Form.NFD);
removed = decomposed.replaceAll("\\p{InCombiningDiacriticalMarks}+", "");
return removed;
}
but when user clicks [, i am getting crash that,
Missing closing bracket in character class near index 2
c[
^
May i know why?
i use String regex = createFilterRegex(filterTerm); //searchTerm
mPattern = Pattern.compile(regex); //here getting crash..
Zoe
Zoe
@Star does user input at any point end up in the regex?
Yeah, it does
yes. @Zoe
Zoe
Zoe
Brackets have a special meaning in regex
You need to escape it with a backslash
Alternatively convert it to HTML entities or URL encoding
you mean this line?
decomposed.replaceAll("\\p{InCombiningDiacriticalMarks}+", "");
Zoe
Zoe
Nope
String decomposed = Normalizer.normalize(original, Normalizer.Form.NFD); // Assuming original takes user input
removed = decomposed.replaceAll("\\p{InCombiningDiacriticalMarks}+", ""); // Here you remove some stuff
return removed; // Then return the result
String regex = createFilterRegex(filterTerm); // Here you get the `removed` variable from the last method, which is why it breaks
mPattern = Pattern.compile(regex) // You throw that into Pattern.compile, with unescaped brackets. It crashes
Java can't tell the difference between:
String x = "c["
and
String x = getSomeUserInputFromUIOrScanner()
Which means this:
14:36
Oh okay. Got your point.
Zoe
Zoe
String regex = new Scanner().nextLine(); // Create a unified instance for multiple use obviously, this is a waste of memory
Pattern.compile(regex);//will crash if the user inputs invalid regex
okay thanks..
14:55
don't attempt to create your own regular expression given a string from the user
That won't be very robust, I can promise you that
Zoe
Zoe
meh, it can be if you do it right
maybe a trivial regex, sure
but why would you use a trivial regex?
Zoe
Zoe
<(p|span|b(?:old)?|i(?:talic)?|div|head(?:er)|footer|script|meta) \W+(?:style\="(.*?)">(.*)</(p|span|b(?:old)?|i(?:talic)?|div|head(?:er)|footer|s‌​cript|meta)>
Aw, that didn't trigger the Cthulu easter egg :c
I think if I were writing a program for myself, I'd take user input, and if I get it wrong, then I should just know better
but I wouldn't trust the user not to add just the right escape sequence :P
Zoe
Zoe
the thing with user-inputted regex is it needs validation
you can't expect it to be right, and that honestly looks like it's instantly updated too
But try { compile } catch (AppropriateException e) { notify user } at least makes it possible
IntelliJ does that for an instance (doubt it's exactly like that ^ though)
But still, if it's only regex, that presents problems for users who don't know regex
15:10
I don't know how regex might handle certain characters in some contexts
A regex is something you have and throw user input at. It's nothing a user should ever get hands on (except if you're creating a page like regexplanet or soemthing)
right, it shouldn't be the input, it should check input
It's one of the posterchild cases of hardcoded values
15:31
does BigDecimal have a sorta empty method like Optional.empty() ?
...
15:47
@KarelG When would it be empty tho?
I don't think BigDecimal can be empty, can it?
ah, I just want to prevent NPE
so returning null is bah
optional<bigdecimal> is silly
with that empty bigdecimal object, I could do calculations, however it does not have an impact if it is empty
Something out of the domain of what the method usually returns?
eg for subtract/addition, it returns a 0 and for multiplying/division, it returns 1
Seems handy
That'd be neat. Doubt there is tho.
15:50
Definitely nothing built into the datatype itself
you'd have to jerry rig it
Alternatively just extend BigDecimal and add your own method, wouldn't be very hard to do at all
you have to provide those other functionalities as well, to cover all possible mathematical operators
meh. I just returned with a .ZERO.
division by zero issues should not occur
gotcha be off
 
2 hours later…
17:30
o/
dbl
dbl
7o
lmao
ye olde' backwards salute
*\o/*
the cheerleader
18:03
@ballBreaker do you know what menu I have to access in order to retrieve the configurations of a given data source on websphere?
I need to ask our IT to retrieve that info (cause I have a bug related to it in our logs). But the IT people can only do it if we tell them exactly how to access such info on websphere -.-
I'll take a look @geisterfurz007 thanks a lot
i found some videos about it too
18:30
mmmmmmm
Honestly, I don't currently. The app I've been working with doesn't technically have it's own data source lol

« first day (2923 days earlier)      last day (2242 days later) »