Java

Dedicated to the discussion of the Java programming language a...
May 22, 2020 19:30
@Michael I like that. This is what I did on one project, I'll suggest that as our team-wide procedure.
May 22, 2020 18:48
I'm working on our team's guidelines/policies for how we do everything. What code style we use, how we use git, etc. This was something I was stuck on in terms of best practice.
May 22, 2020 18:47
The way we do things now, we tag the HEAD commit on master when it's release time. I agree that it would make sense to leave the tag in the same state master would be in, that is, no data rights license applied. Then when we need to package the release to send to the customer a developer will use the license tool to apply the headers to the tagged code.
May 22, 2020 18:40
@Michael Our customers sometimes get to see source code based on the contract, or there are plaintext files we as part of the release, like configs and shit.
May 22, 2020 18:39
I'm thinking about setting up a hook (I have no idea how that works, noob af here) that just does that automatically when someone tags.
May 22, 2020 18:38
I didn't see a version control or git room here
May 22, 2020 18:38
Not a java question in particular, but how do you guys handle applying data rights headers to files in prep for a release? We have a token at the top of the file and tool that replaces all the tokens with content. I'm debating with myself over when the data rights should be applied: before doing the git tag so the header is always there, or we just apply the headers when preparing the release we send to the customer.
May 22, 2020 18:38
@Michael In Lua: "1" .. 1 is the string "11". Very nice.
May 22, 2020 18:33
@Michael I'm not Zoe, but I usually do "cow" + str(1)
Sep 13, 2019 20:08
@Zoe Thought you might have been trashing terminals in general, about to break my heart.
Sep 13, 2019 16:51
@Zoe Anything Windows terminal is awful, but not true for Linux
Sep 13, 2019 03:36
shhhh sweet prince, sleep
Sep 13, 2019 03:36
no
Sep 13, 2019 03:36
@OakBot naughty bot
Sep 12, 2019 21:33
@d0n.key don't duckduckgo it either
Sep 12, 2019 21:03
That being said, methods are the way to go.
Sep 12, 2019 21:03
@SebastianNielsen I don't really care. Whichever one pops into my head first when I need to do a search is what I end up using.
Sep 12, 2019 21:01
^
Sep 12, 2019 18:39
But for-each is fine. Saying it's bad form is stupid imho.
Sep 12, 2019 18:39
It's not bad form. A while loop is more intuitive while( storageElement != whatIWant)...
Sep 12, 2019 16:08
I was using the Simple API, so maybe that's a problem. I'm reading through the not-Simple API, which may or may not be simple.
Sep 12, 2019 16:03
It also nearly set my sad little laptop on fire....core temps hit almost 100 C before I put a cooling pad under it.
Sep 12, 2019 16:03
@Wietlol Do you have any tips to get the Stanford CoreNLP code to "work" right? I ran it against 3700 datapoints, besides taking a long ass time, it was misidentifying positive sentiment as negative/neutral well over 50% of the time, but misidentifying negative sentiment as positive/neutral less than 10% of the time.
Sep 10, 2019 19:54
I pay thousands of dollars in tuition for shitty university wifi...ugh
Sep 10, 2019 19:54
i see now what you mean
Sep 10, 2019 19:54
ah
Sep 10, 2019 19:49
It does that?
Sep 10, 2019 19:48
not a big deal
Sep 10, 2019 19:48
depending on the width, but yes, you right
Sep 10, 2019 19:48
@Wietlol Different tab widths can distort readability too much
Sep 10, 2019 19:47
Sep 10, 2019 19:44
If someone has a different tab width configuration, those tab characters are rendered differently
Sep 10, 2019 19:43
Perhaps. My tech lead and I are ardent disciples of 2 tab width, and converting tab characters to spaces.
Sep 10, 2019 19:41
sacrilege. 2 > 4
Sep 10, 2019 19:41
spare me Satan
Sep 10, 2019 19:41
oh god
Sep 10, 2019 19:41
EVIL
Sep 10, 2019 19:40
@Wietlol I'm just gonna copy your dependency stuff. Also, I hate that tab width shudders in tabstop=2
Sep 10, 2019 17:23
what's models-english-kbp?
Sep 10, 2019 17:23
This made it sound like I just needed the corenlp and models as deps
Sep 10, 2019 17:23
Maven: You can find Stanford CoreNLP on Maven Central. The crucial thing to know is that CoreNLP needs its models to run (most parts beyond the tokenizer and sentence splitter) and so you need to specify both the code jar and the models jar in your pom.xml, as follows: (Note: Maven releases are usually made several days after a release on the website.)
Sep 10, 2019 17:18
The models JAR is just English btw I think
Sep 10, 2019 17:18
I guess something changed between 3.9.1 and 3.9.2
Sep 10, 2019 17:17
Sep 10, 2019 17:16
damn
Sep 10, 2019 17:16
they've dropped by 20 - 40 F
Sep 10, 2019 17:16
while compiling LMFAO
Sep 10, 2019 17:15
................
 

Python

Room rules: sopython.com/chatroom Code formatting guide: tinyu...
Oct 8, 2019 04:20
Is there a way to get the correct answer, or can I only truncate toward zero? I'm learning python for my data mining class, so high precision values are important, but so is accuracy.
Oct 8, 2019 04:18
Howdy folks. Learning python right now, and was trying out square roots. I noticed that doing sqrt(5) * sqrt(5) yields 5.000000000000001. This must be due to rounding error introduced either during the square rooting or during the multiplication, right? I didn't botch anything, I think.