#dev-general
1 messages ยท Page 222 of 1
I am confused right now, does someone now how to fix that?
remove the getKey() from the comparingByValue
Didnt helped
scrap that
just replace the Collections.max line with this
final OfflinePlayer topBidder = Collections.max(bids.entrySet(), Map.Entry.comparingByValue());
I removed supressedwarnings and this is result - https://paste.helpch.at/xaminimipu.sql
@hot hull your plugin should be a constant
yeye, I'm still thinking of ways to remove it all together
create a commandsender impl
add a method for sending a Message
get message value from config in commandsender class
still fucking disgusting
it's hard to get rid of it
Exactly, another issue I have is that I still need to somehow include placeholder replacement within that
Which is probably gonna be disgusting
oh I usually do that when I retrieve the string value
so like just before it's being sent to the player
e.g. in the command class, not the enum
Yea but my send method looks like this
Message.send(
sender,
Message.MESSAGE
);
And I mean that's pretty clean
So adding placeholders to that is gonna be a bitch
make a chain api thingy
final OfflinePlayer topBidder = (OfflinePlayer) Collections.max(bids.entrySet(), Map.Entry.comparingByValue());
final OfflinePlayer topBidder = Collections.max(bids.entrySet(), Map.Entry.comparingByValue()).getKey();```
you're welcome to message me, but I don't provide support via pm
so keep that in mind
I have there this -> Bukkit.getOnlinePlayers().forEach(player -> player.sendMessage(ChatColor.translateAlternateColorCodes('&', String.format("%s%s", new Object[] { Config.getString("messages.prefix"), Config.getString("messages.winner-broadcast").replace("%player%", getTopBidderName(topBidder)).replace("%bid%", String.valueOf(this.bids.get(topBidder))) }))));
It should replace player name in chat
Oh god
might be worth learning java
Well I mean %player% and [player]
Sorry it's late, and I've got school work to do, I really can't help you right now. All I can suggest is that you properly learn java instead of blindly copying and pasting things (sorry if this isn't what you're doing, it's just what it looks like)
It isn't...
Your placeholders are [player] and [bid] in the message, yet you're replacing %player% and %bid%
But yea as Piggy said, learning java would probably help, because the above is sheesh
@quiet depot Not the cleanest, but it'll work I guess
https://paste.helpch.at/nimuriferu.java
Frosty using contract
Jeez those contracts
:))
Why does it fail?
replaceList and getReplacements should arguably be in another class
The only one that has fail xD
Well check the method and you'll see smh
I would use contains() instead of getting the list twice
I find that contract to not be needed since the parameters are already not null
Matt yea it's overkill, stop bullying
Aight xD
Consider using Clojure to programmatically generate your yaml file
Or Haskell OCaml JavaScriptJava CoffeeVSCode Groovy Elara
๐ณ
Well, did you?
Consider using Clojure to programmatically generate your yaml file
Or Haskell OCaml JavaScriptJava CoffeeVSCode Groovy Elara
He told him alright
I did
This is my new favourite thing
If anyone asks anything in the wrong channel I will scare them away with FP monologues
What's CoffeeVSCode if I may ask
time to post something in my vscode story
yes
@hot hull clash of code?
@everyone
The 'everyone' mention is disabled so you can't annoy people.
โน๏ธ
@surreal quarry @distant sun @remote goblet
๐ฆ
Yeah later

welp looks like it's just a 1v1
You're gonna lose
i dont know what it is nor do i care
clash of code
I didn't finish all of them :))
yea that was probably a good idea
mine is a 1 liner though ๐
kind of
apart from all of the boilerplate
hello can i do something like that in papi:
@Event
public void onPlaceholderChange(Event e) {
e.getNewValue()
}
maybe i can use observable list but im wondering
can i just watch the clash
Fuck I'm dumb
shortest mode can just fuck off
can I do it? No I can't
Look at this abomination
class Solution {
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
String T = in.nextLine().replace(" ", "").toLowerCase();
final List<String> characters = new ArrayList<>();
for (final char c : T.toCharArray()) {
characters.add(String.valueOf(c));
}
boolean result = true;
for (int index = 0; index < T.length(); index++) {
if (!characters.get(index).equalsIgnoreCase(characters.get((T.length() - index) - 1))) {
result = false;
//System.out.println(characters.get(index) + " / " + characters.get((T.length() - index) - 1));
} else {
result = true;
}
}
System.out.println(result ? "YES" : "NO");
}
}
let s = T.filter (\c -> c `elem` ['a'..'z']) (toLower (pack t))
if (T.reverse s) == s
then putStrLn "YES"
else putStrLn "NO"
Haskell has 2 different String types which really sucks
If only I could read ;C
well i went garbage code
so i had to spend like 5 minutes figuring out how to convert them
lol
I mean that's still a loop at the end of the day so ๐คท
no loops in haskell
aint got time to check for alphanumericals
I only had 3 minutes to think this
๐ฆ
lol well we all did awful on that one
I mean I'll take 40% in 3 minutes
Atleast it's something 
oribund share code
next time
oribuin*
I want to see how you got 60%
I was going to just remove the numbers but then I realised it would've still not worked
allons-y
the fuck are n and r numbers
^
trying to do this functionally will be hell
I don't even know what it wants me to do
oh wait
I got it
pretty eassy Ori if you ask me
xD
I'm a comedian yes
that makes one of us
bruh my brain isn't big enough for this
I got it
but it wants array I gave it a list
I rly don't get it
ok this is killing me
you got 4 minutes
oh waittttt
it doesn't want a list
that's why
thats the test session
fuck man
wait what are you playing?
pain
how the hell you did it?
i did something dumb that didnt work
oh fuck builders and stuff
Literally fucking bruh
genSeq :: Int -> Int -> [Int] -> [Int]
genSeq r max [] = genSeq r max [1]
genSeq r max (head:list) = if (length list) >= max then list else [head * r] ++ (genSeq r max list)
```help me
how the hell did I beat you all?
Why not just use the general equation?
That 1 fucked me all the time
because we don't know math
Cause you have to append it everytime
I got somewhere
well
what now
a*r^(n-1)
how the hell did I beat you all?
well yugi still won
oh that's what i was trying to do
in my mind
i think
but still
Listen we're all dumb and cant do maths
functional programming is hard
Except in Elara
obviously
Imma give haskell a try next round
Probably not even gonna reach submit
I am actually quite enjoying it
lol
it's a fun learning experience
Matt ๐
who cares about winning
Playing tft whiled doing that so if i leave is because i need to focus xD
said by every loser ever
winning doesnt matter
Ofc the one time i join i get a reverse one
beating brister is the only thing that matters
ok wtf is this
im handicapped
so am I
ok this is a thing I guess?
ay
like you start with the first and second one and you think its easy
but then you go to the third example
and you're like what now?
oh wait
i think haskell will kill me if i even try
nvm it makes sense
Noice
this entire thing sucks
Just don't append to the last number
What in the hell are these exceptions
Then do it smh
god
frosty this is not fair
Your problem for using Haskell >: }
still doing coding game?
yes
iโll play in like 10 min
i gave up on haskell
Failure
Found: 20....................50................8........20....................14..............7.......43
Expected: 20....................50...............8........20....................14..............7.......43....
I hate this game and everything it represents
Go time
These weebs getting destroyed
fuck this im using kotlin
If only there was .repeat in Java Matt :((
Use Kotlin 
:kek:
i give up i tried
yeah i gave up on haskell as soon as I saw loops
i got it mostly write
i still have no idea how you're supposed to do those
just the last motherfucking dots
xD
Just don't append to the last number
@remote goblet if you don't start sharing code I'll kick your ass
k. it won't be after this tho
Btw Frosty, java 15 has .repeat
Is this java 15?
we're done
Not sure
well Yugi has to finish
I'd assume 8
next round?
ori...
yesss
you just had to break if (i+1 == lenT)
ooh lots of people hjere
Most likely
@prisma wave you not playing anymore?
if (i != lenT - 1) append(".".repeat(x)) 
functional code that is outside of minecraft is hard
yugi start i guess
@EventHandler
public void onChat(AsyncPlayerChatEvent event) {
event.setCancelled(true);
}
``` is not difficult
oh god
Reverse again ugh
this looks like a haskell problem

not this again
I never learnt binary
bruh i hate binary
fuck
dont know it at all
this one is easy
Suck a dick
BM sthu
whats the pattern
i have no idea
k then
wait a second
If anyone finds the pattern let me know i am playing xD
I think I know the pattern
yea idk how to find the pattern lol
There's two strings,
00000000000111
10101010111100
Compare the strings, 0 & 0 = 0, 0 & 1 = 1, 1 & 0 = 1, 1 & 1 = 0
I think that's it
that's exactly what I'm doing
slow fuckers
but it doesn't work. I made a mistake somewhere xD

oh wait
lmfao
||xor||
huh
Am I right about the pattern Yugi?
yes but its jsut xor
a ^ b
you just need to convert it to string and format it to the right length
yes you are Frosty
Losing, need to focus
binary xor
I've no idea what that means
Exclusive or or exclusive disjunction is a logical operation that outputs true only when inputs differ (one is true, the other is false).It is symbolized by the prefix operator J and by the infix operators XOR ( or ), EOR, EXOR, โป, โฉ, โฉ, โ, โฎ, and โข. The negation of XOR is logical biconditional, which outputs true only when the two inputs are th...
pog @hot hull
Binary can kindly fuck off.
you literally printed
This mf
out
I printed the answers
xD
90% of my time was docs
lol
I know you're a cheater BM
i am not
I didn't have to go to docs because I realised the pattern
using google = cheating
Yes.
they are using their resources well
oh well
So me and u are the true winners
learn languages by trial and error not documentation
I think its my last one for today. As fun as this is too much is never good
Same
Binary can suck my third dick
Why not both
lol
just like I do huh?
i say its both
Didn't know you even had 1
yea i was joking
You can't trial and error what a function is called
never need to read the docs of kotlin if IIJ just recommends you all the methods
and stuff
But you can for some things
You dont know what I got
also yea i trial and error what method names are if i have an idea but i've forgotten
lol
well that obviously calates somethings inter :)
@old wyvern you joining?
times where my third monitor doesnt work where i wish it would
this is how coding job applications should be done
1 monitor โน๏ธ
get a ton of people to do this
oh they actually use this i think
Can we start?
the website offers an "enterprise clash of code" with performance reviews and shit
i guess yugi isn't joining?
ye I think Yugi is not joining this one
okay
Yugi dead again
off we go
I dont know my vowels
You have them listed you idiot
wait what the hell?
he wants it
0 1 0 1 based on what?
ohhhhh
ok this sucks. Idk what I'm doing wrong but it sucks
BM look at my code
everything after var u = 0 was an error
for real
:kek:
what in the world man
yea idk why but it was lol
Mine is beautiful.
ยฏ_(ใ)_/ยฏ
am confused
when
count the vowels
"aaae" => "3 1 0 0 0"
oh nvm frosty did it in java
I'm not dealing with this anymore
James huh?
i said to use when but you used java
I could've used a switch
But I'm a lazy shit, and this works
thanks i hat eit
Blitz, what about lowercasing the letter
^^
also i'm guessing it won't let you compare String and Char?
Probably the issue
I had to use '' instead of "" ?
yea
Well I mean it makes sense kek
import Data.Text as Text
occurrences text char = Text.length (Text.filter (\x -> x == char) text)
main = do
s <- getLine
let text = toLower (pack s)
putStrLn (
show (occurrences text 'a') ++ " " ++
show (occurrences text 'e') ++ " " ++
show (occurrences text 'i') ++ " " ++
show (occurrences text 'o') ++ " " ++
show (occurrences text 'u'))
return ()```
this is actually like
hot
yea ngl that looks decent, expect this shit
occurrences text char = Text.length (Text.filter (\x -> x == char) text)
conflicting functions ๐
later
then
occurrences text char = Text.length (Text.filter (\x -> x == char) text)
fun occurences(text: Text, char: Char) {
return text.filter { x ->
x == char
}.count()
}```
or maybe it's length
or size
ยฏ_(ใ)_/ยฏ
gg
I got higher than blitz despite taking x2 as long
Mine is the only one without ifs
BM didn't use ifs did he
Idk what his does 
I literally beat everyone one round so please shut up. Its called luck
1 sec
just a random photo https://i.imgur.com/2m3aUGj.png
@hot hull @ocean quartz join
k
anyone else in?
ugh
took me 1 minute to understand the question ๐ฆ
@old wyvern haskell?
xD uh
wait so first I need to find which are pairs right?
yeah
yeah
oh ok
I'm on mobile so no
yeah i cba to do this one
Hey does anyone here know what tracker stage 2 is? Its causing some major tps loss and idk what its from...
who's HashBash lol
I think a junior of mine
you don't know?
not the prettiest or shortest but it does the job done
wow nice
Yugi you disappoint me
damn
this one was just annoying
ok
I actually enjoyed this one tbh. Not bcz I'm almost winning but its something that I actually understand before having to do it xD
welp now I 100% won
that's a long time to wait
why do I miss words?
no no
I didn't read the without word
and just thought you asked yugi
oh lol
if he wants to do another one
no
sure send link
k this will take like 5 minutes just to understand
a different one?
lmao
ok this is easy I guess
:)
lmao worth a try ig
sure
incidentally
numbers.toString().replace("[", "").replace("]", "").replace(",",""") -> numbers.joinToString()
the thing is I even noticed it and said I'll remove 1
do you just go 4 by 4 and have a sum that goes up by 1 every time and stop if N-currentTile <= 0
k another then
I think my last
because my mc server is killing me
keeps crashing every few hours
and I can't seem to find anything that could cause it
and people act just like I intentionally crash the server or something xd
k boys
was this duration?
you can change language tho
iij can open hprof files as well but I only found that Eclipse can first time I checked
guihegiuwhduihwed
I downloaded eclipse for that
time to uninstall
putStrLn check ++ " " ++ (show n) spot the error
Yes
Can't disagree
(putStrLn check) ++ " " putStrLn => IO
@old wyvern println("[${if(input.nextInt()%2 ==0)" " else "x"}] $n")
why not that? does that not work
huh?
no idea that's why I'm asking
the template had the variable
I just saw he likes to do everything in one line xD
you don't have to keep the template pretty sure
that wouldn't work?
why not?
because nextInt() will be different to n
he means that to be the current value
we doing clash of code?
there is no n
got it ty
then how you gonna use the value of nextInt twice
without something like apply or run
dont need to right?
oh wait
the n
yea
nvm didnt notice
mhm
the clash of code countdown is so annoying lol
is this ascii?
i think so
ye
ohh distance from the letter Z
i fucking hate regex
regex?
yes
also the java regex thing isnt rlly good
it has so few helper methods with the pattern and everything
well, if anyone has a nice lib for java regex pls ping me
i actually have no idea how to do this
do you get the pattern BM?
oh lol
and i have no idea how i'm supposed to join them
.toString() xD
oh lol James you went for this if (char == '{') char = ' ' interesting
oh i guess they were saying if they pass -1 its a space
i thought they were saying you had to somehow supply that
ye you could've just checked if its -
haskell has broken me
I always forget I can use ' '.
yea lol
he went for python
should i do the next one in python
idk any python at all
all I know is some C++ and Kotlin
and the very basics of Java
yea its really easy to pickup
I don't know how to open hprof files
with IIJ
how do you get to the main menu in IIJ from a project?
oh
close project
we doing another?
From the main menu, select Run | Open Profiler Snapshot | Open.
I don't have this
๐ฆ
ill do another
ye sure I'll do one more as well
yea fr
anyone that has IIJ Ultimate and can open it real quick
just us 4?
@here
if you click on Run do you have an option called Open Profiler Shanpsoht ?
banana?
wait 1 sec i have like 1000 tabs open
@prisma wave join
oh boy
okay
he made it lmfao
i need to sign up
use github dkim
ok
speed run it
speed run account creation :D
im innn
yay
I haven't coded in weeks
shall we start?
but here we go!
what could go wrong?
allons-y
bruh
oh god
this is gonna suck
WHAT IS ThtiS
-
-
-
- ?
-
-
how do u use for
To simply say it. These fuckers.
how do u use for
???
ยฏ_(ใ)_/ยฏ
wait
what?
aHH
for loops lmao
that confused me
k this breaks my head again
wait
I got 6 instead of -6
I'm doing something half ok
xD
wait I got it
im confused
Show the question
add first row and second row, then subtract second - first
how does 4 4 3 4 4 5 4 3 5 4 3 4 5 4 4 3 4 5
4 3 2 4 3 4 3 3 4 4 3 4 6 4 5 3 3 4 get to a signel number?
whats that
Amount of different pairs is it not?
one loop for each line
Oh wait what
i did it by summing top/bottom lines then subtracting
because now I'm broken xD
oh its in python
dkim you can choose language
oooo
I'm confused Right Now
ohhh
i guve up
wait
After y'all finished, someone tell me what the pattern is cause I'm confused
James you're right
I guess your way is the only way
i did it by summing top/bottom lines then subtracting
add the top line to a sum
add the bottom line to a sum
print bottom-top
the answer: ||sum(line2) - sum(line1)||
And y'all struggling with that ๐ค
never 
2 minutes too long
the two for loops
welp
it gives that to you
I thought I can just have one for
oh
but then I realised
but
it gives the first line first
which one is the 1st for loop
second line after
oh
1st for loop is line 1
2nd is line 2
thought it will go line1, line2, line1, line 2
okay
and just have one for
but you didn't do that tho... ๐ฆ you did -totalA + totalB
you're a liar
Maths ๐ค
Well
I accidentally did it the wrong way around
And then couldn't be bothered to change it
So
you could also do one sum variable and then in the first loop subtract and second loop add
whihc should work too
ONLY 6 MINUTE left?!
man I got to install Eclipse again
its like 15 total
Why the fuck Blitz
ew
fuck I'm fucking blind
Yes


the function was added in like
