Info

Login

Channels

APIs

Credits

  • cheeser
  • ernimril
  • joed
  • kinabalu
  • lunk
  • ojacobson
  • r0bby
  • ThaDon
  • ricky_clarkson
  • topriddy

« 2018-06-22

2018-06-23

2018-06-24 »

Nick Message Date
menip [menip!~menip@c-73-83-2-241.hsd1.wa.comcast.net] has joined ##java [12:04]
purplex88 [purplex88!~purplex88@unaffiliated/purplex88] has joined ##java [12:11]
katieex7_ [katieex7_!~katiex7@ip72-196-214-135.dc.dc.cox.net] has joined ##java [12:17]
toytoy [toytoy!~toytoy@unaffiliated/t0yt0y] has joined ##java [12:18]
bobek [bobek!~bobek@unaffiliated/bobek] has joined ##java [12:20]
DTZUZO [DTZUZO!~DTZUZO@S0106bcd16584b0aa.vs.shawcable.net] has joined ##java [12:20]
paddyez [paddyez!~paddyez_@wikipedia/paddyez] has joined ##java [12:20]
cbot [cbot!~FS@ool-4351bb76.dyn.optonline.net] has joined ##java [12:29]
menip_ [menip_!~menip@c-73-83-2-241.hsd1.wa.comcast.net] has joined ##java [12:30]
kooldavi [kooldavi!~kooldavi@p5B22A88C.dip0.t-ipconnect.de] has joined ##java [12:33]
mohsen_1 [mohsen_1!uid289573@gateway/web/irccloud.com/x-jicooicwugoccfwi] has joined ##java [12:34]
theWhisper_ [theWhisper_!~quassel@unaffiliated/thewhisper/x-7482734] has joined ##java [12:35]
Goplat [Goplat!~Goplat@reactos/developer/Goplat] has joined ##java [12:40]
bojangles [bojangles!~textual@d114-75-117-117.sbr1.nsw.optusnet.com.au] has joined ##java [12:40]
bojangles I've got a scheduled task which runs on the minute, I've also got a couple of Date fields that are set to different times. When the task runs, I want to check if the time it's running is equal to any of my predefined set Date fields. What's the best way to approach this? [12:42]
bojangles (n.b. I can't schedule the task on a cron expression to run on those dates, it needs to poll on the minute) [12:43]
gaoyan [gaoyan!~gaoyan@114.243.216.232] has joined ##java [12:45]
surial bojangles: Date is old hat. Use java.time. [12:45]
surial bojangles: .equals() works. [12:45]
surial if (LocalDate.now().isEqual(markedTime)) { ... yup we're on the date ... } [12:46]
bojangles surial, can I check it to the minute? and disregard seconds? [12:46]
surial bojangles: ah, so we're presumably talking Instant then. [12:47]
surial Instant.now().truncatedTo(ChronoUnit.MINUTE).isEqual(targetInstant /* you should probably truncate this as you create it */) [12:48]
surial If the marked 'run NOW!' thing is based off of reading human time, you should probably use ZonedDateTime or LocalDateTime depending on what you read. [12:49]
bojangles surial, that is absolutely what I'm after! thank you [12:49]
bobek [bobek!~bobek@unaffiliated/bobek] has joined ##java [12:52]
tashie [tashie!~tashie@2603:3005:2f03:5c00:3480:e9f:64db:ac01] has joined ##java [01:01]
rs0 [rs0!~rs0@104.244.223.151] has joined ##java [01:05]
beatzz_ [beatzz_!~beatzz_@ip-99-203-142-175.pools.cgn.spcsdns.net] has joined ##java [01:06]
beatzz_ I passed the OCA!!!!! [01:06]
beatzz_ I wana say thank you to all the people here who helped me along the way, for putting up with my stupid questions and whatnot! [01:08]
fstd_ [fstd_!~fstd@unaffiliated/fisted] has joined ##java [01:09]
cheeser huzzah! [01:09]
cheeser congrats, beatzz_. hopefully, it'll give you a leg up in whatever's next. [01:10]
sauvin [sauvin!sauvin@about/linux/staff/sauvin] has joined ##java [01:21]
Pawnee [Pawnee!~Pawnee@2a02:8109:8bc0:273c:d117:98b6:599c:355b] has joined ##java [01:28]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:9136:b7fa:d9cc:d9c8] has joined ##java [01:43]
spicerack [spicerack!~textual@unaffiliated/druiddesign] has joined ##java [01:47]
led1 [led1!~Thunderbi@hotspot10.rywasoft.net] has joined ##java [01:48]
tashie [tashie!~tashie@2603:3005:2f03:5c00:3480:e9f:64db:ac01] has joined ##java [01:50]
AMcBain [AMcBain!~Art@172-223-245-094.dhcp.chtrptr.net] has joined ##java [01:51]
Kol [Kol!~Kol@S0106bcd1656621da.vc.shawcable.net] has joined ##java [01:54]
rmanak [rmanak!~rmanak@91.202.55.33] has joined ##java [02:05]
acidjnk [acidjnk!~acid@mue-88-130-58-227.dsl.tropolys.de] has joined ##java [02:17]
UnChallengeD [UnChallengeD!~Tyrant@host-20-net-119-160-119.mobilinkinfinity.net.pk] has joined ##java [02:20]
cfoch [cfoch!uid153227@gateway/web/irccloud.com/x-njpsajdwbgnbtqjx] has joined ##java [02:26]
minos_ [minos_!~simonbosm@223-172-145-85.ftth.glasoperator.nl] has joined ##java [02:27]
led_ir22 [led_ir22!~Thunderbi@hotspot10.rywasoft.net] has joined ##java [02:36]
CoffeeAddict [CoffeeAddict!uid249824@gateway/web/irccloud.com/x-xkrumaqbzogjqewb] has joined ##java [02:42]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:9136:b7fa:d9cc:d9c8] has joined ##java [02:46]
mohsen_1 Is it a better idea to put user profile pictures in database or put them on the disk? [02:48]
mohsen_1 What would you do [02:48]
beatzz is the database not on the disk? [02:51]
mohsen_1 beatzz: yeah, i mean user photos in their respective table in the database [02:53]
beatzz seems like a logical place to me, although I don't have a lot of db exp [02:55]
mohsen_1 beatzz: Most of the web suggest putting it in the filesystem [02:55]
ratanparai [ratanparai!~Thunderbi@unaffiliated/ratanparai] has joined ##java [02:57]
Gazooo can someone point me in the direction of possible log pattern standards, specifically best practice stuff for java if there exists any [02:57]
purplex88 [purplex88!~purplex88@unaffiliated/purplex88] has joined ##java [02:59]
Birdface [Birdface!~Birdface@p200300624619BC027C42B3B38973B205.dip0.t-ipconnect.de] has joined ##java [03:00]
sauvin [sauvin!sauvin@about/linux/staff/sauvin] has joined ##java [03:04]
cp7781 [cp7781!~Thunderbi@pD9EA8AAD.dip0.t-ipconnect.de] has joined ##java [03:05]
cp7781 Good morning, guys. I got redirected here. What is this channel all about? [03:07]
Gazooo Coffee [03:07]
cp7781 Alright. Thank you. I will just make a copy. [03:08]
cp7781 What is the latest topic in terms of JPA? Will it replace SQL, or just make things more complicated, less intuitive, and much better, it terms of prototyping and development? [03:11]
ratanparai1 [ratanparai1!~Thunderbi@unaffiliated/ratanparai] has joined ##java [03:11]
cp7781 Will JEE fall apart soon? Is Servlet API all we need to know? [03:14]
cp7781 I think that Java Enterprise Edition is a misleading title. Could have been called Java Server (JaSe). [03:18]
cp7781 And Java Standard Edition something like Java Desktop (JaDe). [03:18]
cp7781 Whatever. I know that this is just buzz. [03:19]
cp7781 Similar ideas: Java Core (JaCo) for everything, except UI and advanced I/O related stuff. [03:21]
Xiti [Xiti!~Xiti-@unaffiliated/xiti] has joined ##java [03:21]
cp7781 Would you like JavaC, JavaD and JavaS better? [03:22]
cp7781 Or JCore, JDesktop, JServer. [03:23]
AMcBain They're already making it confusing enough with just numbers alone. [03:25]
yawkat (1) you dont necessarily need to know the servlet api. [03:26]
yawkat (2) jpa was never intended to replace sql, and never will [03:26]
yawkat (3) java se is certainly not desktop only. and advanced io stuff is part of se. [03:27]
vitimiti [vitimiti!~vitimiti@unaffiliated/vitimiti] has joined ##java [03:28]
geaaru [geaaru!~geaaru@151.60.168.99] has joined ##java [03:28]
Naeblis [Naeblis!~Naeblis@unaffiliated/naeblis] has joined ##java [03:29]
paddyez [paddyez!~paddyez_@wikipedia/paddyez] has joined ##java [03:33]
Tungki [Tungki!~Tungki@subs31-116-206-15-42.three.co.id] has joined ##java [03:35]
cp7781 Are there Frameworks for C++, which are quite similar to Java EE? [03:39]
cp7781 At least the servlet part, which is most important to me. [03:40]
schu-r [schu-r!~Thunderbi@82-149-107-2.wco.wellcom.at] has joined ##java [03:43]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:9136:b7fa:d9cc:d9c8] has joined ##java [03:48]
peey [peey!1b388fdb@gateway/web/freenode/ip.27.56.143.219] has joined ##java [03:49]
borkr [borkr!~borkr@static130-244.mimer.net] has joined ##java [04:05]
acidjnk [acidjnk!~acid@mue-88-130-58-227.dsl.tropolys.de] has joined ##java [04:13]
vitimiti [vitimiti!~vitimiti@unaffiliated/vitimiti] has joined ##java [04:15]
vitimiti [vitimiti!~vitimiti@unaffiliated/vitimiti] has joined ##java [04:16]
ratanparai1 [ratanparai1!~Thunderbi@unaffiliated/ratanparai] has joined ##java [04:18]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:9136:b7fa:d9cc:d9c8] has joined ##java [04:19]
pi0 [pi0!zeropi@gateway/shell/xshellz/x-smhkdzrzoileofig] has joined ##java [04:29]
pi0 object reference not set to an instance of an object [04:29]
pi0 hmm, not sure how to trouble shoot that [04:29]
mrherder [mrherder!~mrherder@c-aea1d954.501802001424-0-757473696b74.bbcust.telenor.se] has joined ##java [04:35]
bobek it sounds like NullPointerException [04:37]
pi0 total = (num(1+num))/2 [04:38]
Maldivia ok.... [04:39]
pi0 trying to determine were it 's not working out [04:40]
bobek unboxing? [04:40]
bobek is num int or Integer [04:40]
seli [seli!~seli@81-236-184-212-no272.tbcn.telia.com] has joined ##java [04:40]
pi0 let me show you the logic [04:42]
Maldivia yeah, without some type info and a stack trace or something, not really easy to say [04:42]
Maldivia showus [04:42]
Maldivia Paste the code (and any errors) in a pastebin where we can see it. See ~pastebin for options. Also see ~testcase for good examples as to how to help us help you quickly diagnose and solve problems. [04:42]
pi0 its actually a flowchart [04:45]
JD-Robbs [JD-Robbs!~JD-Robbs@146.66.35.40] has joined ##java [04:45]
pi0 https://i.imgur.com/poCwa3o.png [04:47]
vitimiti [vitimiti!~vitimiti@unaffiliated/vitimiti] has joined ##java [04:48]
bobek do you have actual java code? [04:48]
pi0 it's for a homework assignment [04:49]
pi0 i will but i have to create a flowchart first [04:49]
bobek so where did that error message come from then? [04:49]
foddo This is ##java, not ##flowcharts. [04:49]
pi0 true, but the code will be in java :D [04:50]
Maldivia pi0: total = num(num+1) <-- meaning total = num * (num + 1) [04:51]
Maldivia or ? [04:51]
pi0 correct [04:52]
Maldivia so what is the actual question then? [04:52]
pi0 let me change it to that [04:52]
bobek pi0, a few things: your loop condition should be n > 0, not n >= 0, at least that's how I understand "Enter number greater than zero" [04:54]
pi0 ah it is suppose to be greater than or equal to zero [04:55]
bobek and the negative branch should point back to start, otherwise it's like being stuck there forever [04:55]
pi0 Maldivia: i will paste the actual question [04:57]
pi0 give me one sec [04:57]
pressure679 [pressure679!~naamik@host-88-83-11-84.adsl.gl] has joined ##java [04:57]
pi0 we work out the project in raptor [04:58]
pi0 flowchart application for windows [04:58]
pi0 then create the code in java after we understand the logic [04:58]
patriick [patriick!patrick@gateway/shell/blinkenshell.org/x-yolpmkbagrvdikup] has joined ##java [05:03]
ratanparai [ratanparai!~Thunderbi@unaffiliated/ratanparai] has joined ##java [05:04]
pi0 bobek: i understand now what you mean about the endless loop [05:04]
pi0 bobek: https://i.imgur.com/Ln5Rr10.png [05:06]
bobek pi0, keep in mind I have no idea how those RAPTOR charts are interpreted, so it's highly likely i'm wrong [05:06]
pi0 you were correct actually [05:07]
pi0 and Maldivia adding the * made the code run, thank you [05:07]
pi0 now i need to convert that into java code [05:08]
bobek have fun [05:08]
pi0 https://pastebin.com/c2vYbSFh [05:10]
pi0 here was the assignment [05:10]
Maldivia pi0: well, num * (num+1) is not what the assignment asks for :D [05:12]
Maldivia you would need a loop there, or something [05:13]
Maldivia [total = 0] b:[total = total + num] c:[num = num - 1] d[num > 0] (yes -> b | no -> e) e:[PUT "the sum is " + total] [05:15]
Maldivia ohh, you had /2 in the beginning, yeah - that works aswell, if you don't want it the loop way :D [05:17]
pi0 the interesting thing is when to use for loop or while loop [05:19]
ratanparai1 [ratanparai1!~Thunderbi@unaffiliated/ratanparai] has joined ##java [05:19]
pi0 Maldivia: i see, i am working out the logic to trying to make it happen in java [05:21]
pi0 thank you :D [05:21]
pi0 I find loops hard [05:25]
Maldivia for(init; condition; increment) { ... } can basically be translated to a init; while(condition) { ...; increment; } [05:32]
purplex88 [purplex88!~purplex88@unaffiliated/purplex88] has joined ##java [05:33]
pi0 only 4 compile errors lol https://pastebin.com/xX1fpZYL [05:45]
ratanparai1 [ratanparai1!~Thunderbi@unaffiliated/ratanparai] has joined ##java [05:46]
lilalinux Can I inject a "Authorization: Bearer ..." request header in HttpSecurity from a value (the access_token) stored in a cookie? [05:47]
toytoy [toytoy!~toytoy@unaffiliated/t0yt0y] has joined ##java [05:54]
deavmi [deavmi!~Thunderbi@41.164.24.82] has joined ##java [06:04]
gryffus [gryffus!~gryffus@unaffiliated/gryffus] has joined ##java [06:05]
pi0 brain is toast [06:06]
pi0 brb [06:07]
gryffus Hello, i have implemented logging to my app as following: "Logger.getLogger(Myclass.class.getName()).log(Level.INFO, "Log message");" and i have somewhat feeling that this is not the right way. How should i propely implement logging? Also, how do i define log format? I have tried setting "-Djava.util.logging.SimpleFormatter.format=" , but it did not help [06:07]
adadelta|txter [adadelta|txter!~gulli@unaffiliated/gulli] has joined ##java [06:13]
gryffus_ [gryffus_!~gryffus@unaffiliated/gryffus] has joined ##java [06:15]
Maldivia logging [06:22]
Maldivia Logging is the recording of various events that happen in an application. Java has built-in logging, but use it right after gnawing off your own neck. Instead, consider ~slf4j, ~logback, ~commons-logging, and ~log4j. Also: see http://www.masterzen.fr/2013/01/13/the-10-commandments-of-logging/ [06:22]
Maldivia gryffus: j.u.l is generally considered a bad choise of logging :D [06:23]
logithack_ [logithack_!54b696e5@gateway/web/freenode/ip.84.182.150.229] has joined ##java [06:24]
Maldivia but otherwise, java.util.logging.SimpleFormatter.format is the right property to st [06:24]
Gurkenglas [Gurkenglas!~Gurkengla@unaffiliated/gurkenglas] has joined ##java [06:26]
logithack_ i've got an assumption which i'd ask you to confirm/disprove: when doing something like "boolean c = getA() && getB();", is it correct that first getA() is called and if that returns "false", the && can no longer become true, resulting in getB() not being called? [06:28]
Maldivia && and || are short-circuit, so yes [06:29]
logithack_ Maldivia: very good, thanks! [06:30]
Maldivia logithack_: c = getA() && getB(); esentially translates into: if (getA()) { c = getB(); } else { c = false; } [06:30]
logithack_ yeah, seems evident now. thanks for the term "short-circuit", immediately found what i needed :) [06:32]
Maldivia logithack_: this is why you can do if (list != null && !list.isEmpty()) { .... [06:32]
markoong [markoong!~marco@46.166.137.74] has joined ##java [06:33]
logithack_ ah, i see! i used that a couple of days ago, implicitly thinking of short-circuiting. wasnt thinking of that in my current example for some reason [06:33]
deavmi [deavmi!~Thunderbi@41.164.24.82] has joined ##java [06:36]
minos_ [minos_!~simonbosm@223-172-145-85.ftth.glasoperator.nl] has joined ##java [06:37]
beatzz Maldivia: I got my OCA today :o [06:37]
Maldivia beatzz: grats; be prepared to never have a use for it :D [06:38]
beatzz pssh, Im gana sell the shit outa that OCA [06:38]
beatzz like ice to an Eskimo [06:39]
deavmi [deavmi!~Thunderbi@41.164.24.82] has joined ##java [06:40]
access_info what's the nicest java cms you guys have used? [06:42]
Maldivia hehe, I saw CMS and thought Concurrent Mark and Sweep, as in tlaking about garbage collectors :D [06:43]
Maldivia but have some experience with Liferay, Magnolia, Hybris... can't really call any of them nice D [06:45]
psychicist__ [psychicist__!~psychicis@5356A22B.cm-6-7c.dynamic.ziggo.nl] has joined ##java [06:45]
adadelta|txter I'm starting to think I might be doing things to generic here. I have three classes that inherit from Employee, so getAllEmployees will be returning a list containing lists for each type. [06:46]
adadelta|txter https://pastebin.com/6KsXAWGQ [06:46]
adadelta|txter Any suggestions? [06:46]
guwop [guwop!~guwop@LFbn-1-3720-204.w86-229.abo.wanadoo.fr] has joined ##java [06:49]
Maldivia adadelta|txter: why not simply https://www.hastebin.com/yejukamepu.java then ? [06:51]
Maldivia adadelta|txter: and you don't want getAllEmployees to return a Map<EmployeeType, List<? extends Employee>> ? [06:52]
tashie [tashie!~tashie@2603:3005:2f03:5c00:3480:e9f:64db:ac01] has joined ##java [06:53]
adadelta|txter Ahh thanks. An ofcourse a map would be better [06:54]
adadelta|txter Using a map with lists makes 100x more sense [06:56]
Pulp [Pulp!~Pulp@151-168-35-213.dyn.estpak.ee] has joined ##java [07:02]
sameerynho [sameerynho!~lxsameer@unaffiliated/lxsameer] has joined ##java [07:03]
qwedfg2 [qwedfg2!~adam@194.177.29.74] has joined ##java [07:12]
adadelta|txter Another design error there though. I have a getEmployeeById, and it returns the interface, Employee. Wondering how I would be able to make this more precise. I can't assume what ever is calling knows exactly the class of the employee with that ID [07:13]
adadelta|txter I guess I could add getEmployeeType to the employee interface, which each class inheriting from Employee could set using the EmployeeType enum. Could ues that to cast to the right class after fetching a generic Employee from getEmployeeById, but it seems messy [07:21]
acidjnk [acidjnk!~acid@mue-88-130-58-227.dsl.tropolys.de] has joined ##java [07:24]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [07:24]
Akamus [Akamus!~aaaaa@ppp091138139042.dsl.hol.gr] has joined ##java [07:25]
pawle [pawle!~Thunderbi@public-gprs204897.centertel.pl] has joined ##java [07:34]
GenteelBen [GenteelBen!GenteelBen@cpc129112-lutn14-2-0-cust66.know.cable.virginm.net] has joined ##java [07:37]
Gurkenglas [Gurkenglas!~Gurkengla@unaffiliated/gurkenglas] has joined ##java [07:42]
pawle [pawle!~Thunderbi@public-gprs204897.centertel.pl] has joined ##java [07:44]
bobek [bobek!~bobek@unaffiliated/bobek] has joined ##java [07:51]
vdamewood [vdamewood!~vdamewood@unaffiliated/vdamewood] has joined ##java [07:55]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:9136:b7fa:d9cc:d9c8] has joined ##java [08:02]
surial adadelta|txter: Employee should have, in the interface: EmployeeType getType() [08:06]
surial adadelta|txter: this is more or less duplicating the functionality of instanceof, but nevertheless, it tends to read better. You can now switch on it too. APIs like, say, javac's ASTs and such do this. [08:06]
surial adadelta|txter: but even without it, there's instanceof. [08:06]
rmanak [rmanak!~rmanak@91.202.55.33] has joined ##java [08:20]
EoN [EoN!~EoN@unaffiliated/eon] has joined ##java [08:22]
paddyez [paddyez!~paddyez_@wikipedia/paddyez] has joined ##java [08:32]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:9136:b7fa:d9cc:d9c8] has joined ##java [08:33]
minos_ [minos_!~simonbosm@223-172-145-85.ftth.glasoperator.nl] has joined ##java [08:47]
Katana [Katana!~hentai@unaffiliated/katana] has joined ##java [08:59]
pawle [pawle!~Thunderbi@public-gprs204897.centertel.pl] has joined ##java [09:00]
con3 [con3!~quassel@ml.sun.ac.za] has joined ##java [09:02]
ratanparai [ratanparai!~Thunderbi@unaffiliated/ratanparai] has joined ##java [09:04]
electricbear [electricbear!~electricb@unaffiliated/electricbear] has joined ##java [09:05]
pawle_ [pawle_!~Thunderbi@public-gprs370234.centertel.pl] has joined ##java [09:12]
kupi [kupi!uid212005@gateway/web/irccloud.com/x-yykrancsdcwwjwtz] has joined ##java [09:13]
yokel [yokel!~yokel@unaffiliated/contempt] has joined ##java [09:14]
AMcBain [AMcBain!~Art@172-223-245-094.dhcp.chtrptr.net] has joined ##java [09:22]
electricbear [electricbear!~electricb@unaffiliated/electricbear] has joined ##java [09:30]
dendazen [dendazen!~dendazen@pool-96-242-161-215.nwrknj.fios.verizon.net] has joined ##java [09:33]
afroboy [afroboy!~afroboy@unaffiliated/afroboy] has joined ##java [09:34]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:9136:b7fa:d9cc:d9c8] has joined ##java [09:36]
pawle [pawle!~Thunderbi@public-gprs370234.centertel.pl] has joined ##java [09:39]
Unh0ly_Tigg [Unh0ly_Tigg!~Unh0ly_Ti@c-24-21-196-226.hsd1.or.comcast.net] has joined ##java [09:39]
soned [soned!~soned@2001:638:904:ffc7:21d4:ce8:be84:69dd] has joined ##java [09:43]
electricbear [electricbear!~electricb@unaffiliated/electricbear] has joined ##java [09:44]
electricbear [electricbear!~electricb@unaffiliated/electricbear] has joined ##java [09:45]
matsurago [matsurago!~matsurago@p18095-ipngn2801funabasi.chiba.ocn.ne.jp] has joined ##java [09:45]
DLSteve [DLSteve!~DLSteve@c-73-109-135-169.hsd1.wa.comcast.net] has joined ##java [09:53]
sahasatvik [sahasatvik!~sahasatvi@122.163.84.107] has joined ##java [09:56]
Folkol [Folkol!~Folkol@h-14-233.A328.priv.bahnhof.se] has joined ##java [09:59]
pawle [pawle!~Thunderbi@public-gprs370234.centertel.pl] has joined ##java [10:00]
pawle [pawle!~Thunderbi@public-gprs370234.centertel.pl] has joined ##java [10:02]
Folkol [Folkol!~Folkol@h-14-233.A328.priv.bahnhof.se] has joined ##java [10:07]
Cyp___ [Cyp___!~Cyp_@87-52-78-149-cable.dk.customer.tdc.net] has joined ##java [10:07]
acidjnk [acidjnk!~acid@mue-88-130-58-227.dsl.tropolys.de] has joined ##java [10:13]
beefjoe [beefjoe!~beefjoe@unaffiliated/beefjoe] has joined ##java [10:13]
minos_ [minos_!~simonbosm@223-172-145-85.ftth.glasoperator.nl] has joined ##java [10:27]
adadelta|txter [adadelta|txter!~gulli@unaffiliated/gulli] has joined ##java [10:32]
Farad41 [Farad41!~Thunderbi@pool-71-249-126-131.nycmny.east.verizon.net] has joined ##java [10:36]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:9136:b7fa:d9cc:d9c8] has joined ##java [10:37]
canton7 [canton7!canton7@about/csharp/regular/canton7] has joined ##java [10:38]
canton7 [canton7!canton7@about/csharp/regular/canton7] has joined ##java [10:44]
saltlake [saltlake!~saltlake@unaffiliated/saltlake] has joined ##java [10:54]
saltlake Hi, which website is suggested here to learn about Set in java? [10:54]
saltlake http://tutorials.jenkov.com/java-collections/set.html is it a good one? [10:55]
surial saltlake: looks fine [11:07]
upgrdman [upgrdman!~upgrdman@blender/artist/upgrdman] has joined ##java [11:09]
saltlake Is Set a class or Interface? [11:12]
saltlake Is Set a ordered one or sorted one by default? [11:13]
saltlake Set<Integer> setB = new HashSet<Integer>(); [11:13]
bobek https://docs.oracle.com/javase/8/docs/api/java/util/Set.html [11:13]
saltlake We can't create object of Set interface [11:14]
bobek read the docs [11:14]
saltlake But when we do: Set<Integer> setB = new HashSet<Integer>(); new HashSet<Integer>() is a object [11:14]
bobek it mentions SortedSet and NavigableSet [11:14]
bobek setB is a reference to an instance, yes [11:15]
saltlake I'm reading this: https://docs.oracle.com/javase/9/docs/api/java/util/Set.html [11:15]
bobek it's the same thing [11:16]
bobek even better than what I suggested [11:16]
saltlake If we want Set as sorted, then which one should we use? [11:16]
saltlake HashSet or TreeSet or LinkedHashSet? [11:17]
bobek the one that implements sortedset [11:17]
kurosaki1990 [kurosaki1990!~afroboy@unaffiliated/afroboy] has joined ##java [11:18]
Regon [Regon!~Regon@unaffiliated/regon] has joined ##java [11:18]
saltlake How would I know that? [11:18]
saltlake https://docs.oracle.com/javase/9/docs/api/java/util/TreeSet.html does it implement sortedset? [11:20]
strykerawb [strykerawb!~rob@redhat/jboss/rawblem] has joined ##java [11:22]
MarkyC [MarkyC!~MarkyC@toroon4512w-lp130-02-74-12-111-5.dsl.bell.ca] has joined ##java [11:25]
mohsen_1 What's the standard approach for handling file uploads in rest apis? [11:30]
gelignite [gelignite!~gelignite@55d49b51.access.ecotel.net] has joined ##java [11:31]
mohsen_1 I'd appreciate it if someone explain the standard workflow [11:33]
dendazen [dendazen!~dendazen@pool-96-242-161-215.nwrknj.fios.verizon.net] has joined ##java [11:35]
mohsen_1 Should I go the usual post multipart way? [11:37]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:9136:b7fa:d9cc:d9c8] has joined ##java [11:40]
ratanparai [ratanparai!~Thunderbi@unaffiliated/ratanparai] has joined ##java [11:40]
pokEarl [pokEarl!~pokEarl@89.24.52.218] has joined ##java [11:41]
MarkyC mohsen_1: yes [11:41]
MarkyC If you're using Spring, you can use this tutorial: https://spring.io/guides/gs/uploading-files/ [11:41]
MarkyC MarkyC's title: "Getting Started Uploading Files" [11:41]
MarkyC If you're using Servlets: https://docs.oracle.com/javaee/6/tutorial/doc/glraq.html or maybe make use of Apache Commons FileUpload: http://commons.apache.org/proper/commons-fileupload/ [11:42]
MarkyC MarkyC's titles: "The fileupload Example Application - The Java EE 6 Tutorial" | "FileUpload Home" [11:42]
DLSteve [DLSteve!~DLSteve@2601:601:1301:40a8:5406:7a80:7830:61fc] has joined ##java [11:43]
surial mohsen_1: the modern modern way to do it, is to use client javascript to upload straight into local doc store, and from there ajax it to your server. [11:44]
surial This makes it muuuch simpler to for example have progressbars, resume after network interruptions, yadayada. [11:45]
surial Though I do believe there are some practical limits about how large the offered file can be; with straight multipart <input type="file"> style it's basically limitless. [11:45]
Katana [Katana!~hentai@unaffiliated/katana] has joined ##java [11:48]
mohsen_1 surial: the clients are not web browsers [11:50]
surial then who cares how you do it? [11:50]
surial multipart it, just send a giant json blob, just send the file.... whatever works for you. [11:50]
theWhisper_ [theWhisper_!~quassel@unaffiliated/thewhisper/x-7482734] has joined ##java [11:50]
white_lilies [white_lilies!~jtdoncas@toroon0247w-lp130-01-74-12-137-206.dsl.bell.ca] has joined ##java [11:52]
mohsen_1 surial: I'm trying to keep it standard, what if some people try to use the API in the future? They're gonna blame me because of not going the standard way. [11:54]
mohsen_1 Moreover, if you do something, do it right. [11:55]
mohsen_1 ^ that's my rule [11:55]
RazielZ [RazielZ!~Raziel@unaffiliated/raziel] has joined ##java [11:57]
surial for http based APIs, and here 'do it right' is ask in ##java and just blindly do what they say? [11:57]
surial Your condescion is fucking grating and dumb. I know you. You are not even remotely in the same ballpark as this veneer of perfection you're going for here. [11:57]
MarkyC mohsen_1: The standard (least surprising) way is multipart/form-data, surial gave you additional tips for sprucing up the frontend (if it were a browser) [12:00]
surial The 'right' way to do it, is to have libraries for each targeted language. It's still nice to have the core REST api be sensible, but, hey, it's REST. Opinions differ. If you really wanna make this 'do it right' shit and take it seriously, don't ask here, go google for famous APIs and see how they do it. [12:01]
kp__ [kp__!~kp@pool-72-83-138-33.washdc.fios.verizon.net] has joined ##java [12:01]
surial mohsen_1: I've helped you along by finding your first. Telegram bot APIs: https://core.telegram.org/bots/api#sending-files it offers 3 ways: [1] refer to a file already existing on the telegram servers, [2] send a URL that the telegram servers will download the file from, [3] multipart/form-data. [12:02]
MarkyC Is there a nicer way to do this if-check in RxJava, I feel like flatMap/zipping is too heavy-handed: https://gist.github.com/MarkyC/654c4fd376fcd77ed8c8da3ee087030d [12:03]
MarkyC Basically my flow is (1) get the user's location (2) convert it to my model (3) if the country is not supported, show an error (4) if the country is supported, save their current location, update the view, etc [12:04]
beefjoe [beefjoe!~beefjoe@unaffiliated/beefjoe] has joined ##java [12:06]
toytoy [toytoy!~toytoy@unaffiliated/t0yt0y] has joined ##java [12:08]
mohsen_1 surial: would you please do me a favor from now, until ever, never answer my question again? [12:10]
surial mohsen_1: no. But I can offer some advice. [12:10]
surial mohsen_1: Type this: /ignore surial [12:10]
surial mohsen_1: then press enter. [12:10]
katiex7 [katiex7!~katiex7@ip72-196-214-135.dc.dc.cox.net] has joined ##java [12:11]
surial I'm also pretty sure I gave a really useful answer, and put some time into finding the right telegram page, but, hey, if you wanna shit in the mouth of the horse that was given to you, fuck you too asshole. [12:11]
Zarthus on the other hand, i'll be here all day to provide poor quality answers to you mohsen_1 if that's what you want [12:13]
surial ##java. Offering whatever you need. Apparently ;P [12:14]
mohsen_1 surial: There's a nice expression in persian, which says: "Silence is the best answer to a foul" [12:14]
surial There's a duck joke in there somewhere. [12:14]
cfoch [cfoch!uid153227@gateway/web/irccloud.com/x-nuyqzovbmusdbwak] has joined ##java [12:16]
cheeser mohsen_1: there's another common expression, "if you don't like the free help you're getting, pay someone for it or stfu with the whining." [12:19]
kirua [kirua!~kirua@unaffiliated/kirua] has joined ##java [12:24]
mohsen_1 remains silent [12:25]
DCTWD [DCTWD!~DC@c-76-106-168-36.hsd1.ga.comcast.net] has joined ##java [12:26]
cheeser because *I'm* the "foul" here. [12:26]
cheeser and that is, by definition, *not* remaining silent you pompous ass. [12:26]
cbot [cbot!~FS@ool-4351bb76.dyn.optonline.net] has joined ##java [12:41]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:9136:b7fa:d9cc:d9c8] has joined ##java [12:41]
Regon [Regon!~Regon@unaffiliated/regon] has joined ##java [12:47]
psychicist__ [psychicist__!~psychicis@5356A22B.cm-6-7c.dynamic.ziggo.nl] has joined ##java [12:54]
kirua if i am missing api to compile servlet, while i get errors during the maven build ? [01:02]
DranikProgrammer [DranikProgrammer!~vlad@82.209.215.9] has joined ##java [01:03]
cheeser tias [01:03]
cheeser Try it and see. You learn much more by experimentation than by asking without having even tried. [01:03]
paddyez [paddyez!~paddyez_@wikipedia/paddyez] has joined ##java [01:06]
kirua i'm not etting any error but the jsp is not rendered [01:06]
hammond_ where can I get the Json lib that has the JSONObject in it. I see that json.org is not running [01:09]
yawkat json [01:10]
yawkat json is short for JavaScript Object Notation. It's a lightweight data-interchange format, based on a subset of javascript and very popular for webapps. See http://www.json.org/ for an explanation of the format. See 'json parsing' for more info [01:10]
yawkat json parsing [01:10]
yawkat JSON parsing can be done with Jackson ( https://github.com/FasterXML/jackson ). Do not use org.json; it sucks. You can ask me about exotic options that aren't recommended via ~exotic json parsing. [01:10]
lilalinux hammond_: "Open Type..." in your IDE? [01:10]
DranikProgrammer who has made this javabot? Just because jackson is used by first-class frameworks doesn't make it superior to others. org.json is absolutely fine for simple message/state parsing [01:12]
DranikProgrammer exotic json [01:12]
yawkat DranikProgrammer: lol no it's not [01:13]
yawkat org.json is fucking terrible [01:13]
waz there's really no reason to use org.json [01:13]
waz sure it may work for your simple app until the day it fucks you [01:13]
waz go with jackson or gson [01:13]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:9136:b7fa:d9cc:d9c8] has joined ##java [01:14]
DranikProgrammer how will it? [01:19]
waz good question, it can fuck you in many ways [01:23]
waz google is your friend [01:24]
waz or you can ignore the collective knowledge here and hope you don't get fucked over by your poor choice [01:24]
Goplat [Goplat!~Goplat@reactos/developer/Goplat] has joined ##java [01:24]
Maldivia DranikProgrammer: also, the factoids are provided by the people in the channel [01:27]
azuri5 [azuri5!~azuri5@103.87.57.116] has joined ##java [01:27]
Maldivia as for who made it [01:27]
Maldivia source [01:27]
Maldivia you can download my source at http://github.com/evanchooly/javabot [01:27]
DranikProgrammer I've been here some times, and the bot tells me every time not to mess with him [01:28]
waz info json [01:28]
waz json was added by: soulcutter on 10 Apr 2016 at 08:17 and has a literal value of: <reply>json is short for JavaScript Object Notation. It's a lightweight data-interchange format, based on a subset of javascript and very popular for webapps. See http://www.json.org/ for an explanation of the format. See 'json parsing' for more info [01:28]
waz smart bot [01:28]
jasmith [jasmith!~QualityAd@ip68-103-155-114.ks.ok.cox.net] has joined ##java [01:30]
bobek [bobek!~bobek@unaffiliated/bobek] has joined ##java [01:43]
theWhisper_ [theWhisper_!~quassel@unaffiliated/thewhisper/x-7482734] has joined ##java [01:44]
DranikProgrammer What's the point of enqueueing soft&weak references if they're gonna be gc'ed anyway? [01:45]
DranikProgrammer I just opened some old project of mine and flushed my mind why I am dropping them every time manually [01:46]
yawkat enqueueing? [01:46]
DranikProgrammer Yep Reference::enqueue [01:46]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:9136:b7fa:d9cc:d9c8] has joined ##java [01:47]
DranikProgrammer https://docs.oracle.com/javase/7/docs/api/java/lang/ref/Reference.html#enqueue() [01:47]
DranikProgrammer Ahh... looking at old code is great [01:47]
yawkat shrugs [01:47]
yawkat when are you enqueueing them? [01:48]
yawkat it can help with doing some atomic stuff [01:48]
DranikProgrammer I have an abstraction layer over them, which adds strong and null reference. Each time I want to set a new value, I enqueue the reference, nullify the pointer to the reference, and create a new one [01:50]
DranikProgrammer The only thing I want to know if calling Reference::enqueue is pointless [01:50]
saltlake [saltlake!~saltlake@unaffiliated/saltlake] has joined ##java [01:52]
DranikProgrammer Got it, the enqueue does not instantly delete the object underneath, so the reference queue can actually pick up the object [01:52]
saltlake Hi, if we want to get sorted set, which should we use? [01:52]
saltlake Set or something else [01:52]
cheeser javadoc SortedSet [01:54]
cheeser cheeser: http://bit.ly/2yHX7Pc [JDK: java.util.SortedSet] [01:54]
DranikProgrammer why not, I haven't used it much, but can't say something bad about it [01:54]
cheeser Set isn't ordered [01:54]
orbyt_ [orbyt_!~orbyt@172.92.5.20] has joined ##java [01:54]
geaaru [geaaru!~geaaru@151.32.212.132] has joined ##java [01:55]
saltlake cheeser: SortedSet<Integer> setB = new HashSet<Integer>(); will it be sorted set? [01:57]
DranikProgrammer No, use TreeSet [01:58]
guwop [guwop!~guwop@LFbn-1-3720-204.w86-229.abo.wanadoo.fr] has joined ##java [01:58]
DranikProgrammer TreeSet is an implementation of SortedSet [01:59]
DranikProgrammer Which is just an interface on it's own [01:59]
saltlake Do I have to use TreeSet with SortedSet? [01:59]
saltlake cheeser: ^ [01:59]
cheeser Set<Integer> set = new TreeSet<>(); [02:01]
cheeser "will it be sorted?" write a test and see. or read the docs. [02:01]
saltlake cheeser: Then why did you give me the link of SortedSet? Or why did you suggest to use SortedSet? [02:03]
yawkat DranikProgrammer: it's useful if you want to trigger your refqueue [02:03]
cheeser because if you'll look at the "known subclasses" you'll see some options to us. also, i assumed you know how polymorphism, interfaces, and java work. [02:03]
yawkat DranikProgrammer: for example for closing a resource [02:04]
EoN [EoN!~EoN@unaffiliated/eon] has joined ##java [02:04]
cheeser saltlake: nothing i've said contradicts anything else i've said. [02:04]
saltlake cheeser: So both Set and SortedSet work with TreeSet, right? [02:05]
cheeser interfaces [02:05]
cheeser saltlake, interfaces is http://download.oracle.com/javase/tutorial/java/concepts/interface.html [02:05]
cheeser "work with TreeSet" makes little actual sense [02:05]
cheeser a TreeSet is a SortedSet is a Set [02:06]
cheeser this is basic inheritance and polymorphism [02:06]
saltlake So TreeSet has to be used in both case, it is the trick [02:08]
cheeser there is no "trick." [02:08]
cheeser this is how things work. there's no magic or subtlety involved. [02:09]
cheeser read up on interfaces [02:09]
toytoy [toytoy!~toytoy@unaffiliated/t0yt0y] has joined ##java [02:09]
Kol [Kol!~Kol@S0106bcd1656621da.vc.shawcable.net] has joined ##java [02:12]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:9136:b7fa:d9cc:d9c8] has joined ##java [02:18]
minos_ [minos_!~simonbosm@223-172-145-85.ftth.glasoperator.nl] has joined ##java [02:19]
electricbear [electricbear!~electricb@unaffiliated/electricbear] has joined ##java [02:28]
j4nnis [j4nnis!~Thunderbi@ip1f1087a7.dynamic.kabel-deutschland.de] has joined ##java [02:30]
brainproxy [brainproxy!~michael@pdpc/supporter/gold/brainproxy] has joined ##java [02:31]
gaoyan [gaoyan!~gaoyan@114.243.216.232] has joined ##java [02:32]
armyriad [armyriad!armyriad@gateway/vpn/privateinternetaccess/armyriad] has joined ##java [03:06]
jak2000 [jak2000!~jak2000@187.141.232.130] has joined ##java [03:06]
jak2000 hi all [03:06]
jak2000 Maldivia? freeone3000, mexico win!1 and other: installed GF4 and 1.8.0_151 for send mail with javax mail.... Testing... [03:07]
jak2000 done email sent :) [03:11]
cheeser yay? [03:12]
jak2000 hi chesser, remember my problem? cant send mail and Maldivia recommend me: <Maldivia> 8u151 or so, if you want GF 4 and mail to work [03:14]
jak2000 followed the advice and worked :) [03:14]
cheeser i do remember, yes. [03:14]
jak2000 now i have this issusue: [03:17]
gxt [gxt!~gxt@2a02:908:e851:4020:ba27:ebff:fe06:f1a0] has joined ##java [03:17]
jak2000 https://imgur.com/a/SBHUHh7 <-- how to set a Name for the sender, not like me miemail@midomain.com [03:17]
jak2000 jak2000's title: "Imgur: The magic of the Internet" [03:17]
jak2000 done... message.setFrom(new InternetAddress(from, "Robot: ILAS Email Automatico")); [03:18]
acidjnk hello [03:19]
asix3 [asix3!470e55cb@gateway/web/freenode/ip.71.14.85.203] has joined ##java [03:21]
jak2000 how to install java 8u151 or where download? [03:21]
cheeser downloads [03:21]
cheeser Find current releases for Java at http://www.oracle.com/technetwork/java/javase/downloads/index.html . Older releases can be found at http://www.oracle.com/technetwork/java/javase/archive-139210.html . If you don't need the Oracle Version, see ~alternative jdk [03:21]
acidjnk I have an interface Logger with implementations On and Off. Method is void log(Supplier<String> message). In On, it is calling get() and doing additional stuff, and Off has an empty method body. That's because the call is (in nearly 100 % of cases) computation expensive. Is that a good design, or is there better? [03:22]
jak2000 this one: jdk-8u151-linux-x64.tar.gz ? [03:22]
jak2000 for debian... [03:22]
asix3 Hi -- I've generated several JAXB classes and several of them have @XmlAttributes of isAdded, isUpdated, isDeleted. Can I use a generic method to take a list of one of these classes and return the item that has isIsAdded() == True? [03:23]
asix3 I tried something like private <T> T getLatest (List<T> changes) {}, but I can't call T.isIsAdded() [03:24]
megaTherion [megaTherion!~therion@unix.io] has joined ##java [03:25]
jak2000 Maldivia? [03:27]