#💻︱programming
1 messages · Page 3 of 1
3.11
You should definitely be able to use f strings, very weird
make sure vscode is using the newer version (look bottom right on the blue bar)
When you install new versions it doesn't remove old versions
Bit iffy, but it works 🙂
import random
from typing import (
TypedDict,
List
)
class gameData(TypedDict):
USER_POINTS: int
COMPUTER_POINTS: int
POINTS_TO_WIN: int
OPTIONS: List[str]
def player_turn(game: gameData):
player_choice = input(f"Choose: {', '.join(game['OPTIONS'])} [Type Q to Quit].\n=>> ")
if player_choice.lower() == "q":
return
elif player_choice.lower() in game["OPTIONS"]:
results(game, player_choice.lower())
else:
player_turn(game)
def results(game: gameData, player_choice: str):
computer_choice = random.choice(game["OPTIONS"])
if (game["OPTIONS"][(game["OPTIONS"].index(player_choice) + 1) % len(game["OPTIONS"])]) == computer_choice:
# Computer choice is next one in list and wins
game["COMPUTER_POINTS"] += 1
print(f"\nThe computer choose {computer_choice}. And wins!" + score_formatter(game))
elif player_choice == computer_choice:
# Draw
game["COMPUTER_POINTS"] += .5
game["USER_POINTS"] += .5
print(f"\nThe computer choose {computer_choice}. And draws!" + score_formatter(game))
else:
# Player wins
game["USER_POINTS"] += 1
print(f"\nThe computer choose {computer_choice}. And loses!" + score_formatter(game))
continue_game(game)
def continue_game(game: gameData):
if game["COMPUTER_POINTS"] == game["USER_POINTS"]:
player_turn(game)
elif game["USER_POINTS"] >= game["POINTS_TO_WIN"]:
print("[SYSTEM] YOU win with results:" + score_formatter(game))
elif game["COMPUTER_POINTS"] >= game["POINTS_TO_WIN"]:
print("[SYSTEM] The computer wins with results:" + score_formatter(game))
else:
player_turn(game)
def score_formatter(game: gameData):
return f"\nScores:\n\tCOMPUTER: {game['COMPUTER_POINTS']}\n\tYOU: {game['USER_POINTS']}\n"
def main():
game: gameData = {
"USER_POINTS": 0,
"COMPUTER_POINTS": 0,
"POINTS_TO_WIN": 20,
"OPTIONS": ["rock", "paper", "scissors"]
}
player_turn(game)
if __name__ == "__main__":
main()
print(“You won!”)
It handles all the input for you! Also no need for random module, as I have randomly chosen the result with my mind
Cursed code
import random
print("Q to quit")
def game(player, computer):
if input("Rock, paper or scissors: ").lower() == "q":
print(f'{"Player won!" if computer < player else "Draw!" if player == computer else "Computer won!"}')
return
result = random.choice(["Draw!", "You lost!", "You won!"])
if result == "Draw!":
computer += 0.5
player += 0.5
elif result == "You lost!":
computer += 1
elif result == "You won!":
player += 1
print(f"{result}\nComputer: {computer}\nPlayer: {player}")
game(player,computer)
game(0,0)
It works tho
What's the scripting/programming language
Python
My school only teaches delphi:(
Pascal is useful too
python is just a little easier to read
Will you believe the IT class at the 10th grade is like 30+ students but at the 12th grade is like 3-5 students, Delphi is that hard?
In my school
My school teaches scheme 😭
How is that bad
It's from 1960 and looks like vomit
Ok now I see😂
:p
Well, there are easier languages to learn as your first language. However, if you are interested in programming and/or have some kind of aptitude for it, it should be very doable
I'm very interested
That helps a ton
I'm hoping to become moderator on cubecraft, also wanna be a developer but I don't think I can learn python, I really love cubecraft
Nice, go for it! I am not sure which skills you need to become a CubeCraft developer, but anyone can learn python
I guess so, I'll try:)
I would just practise with making plugins mainly
Will put it in consideration
But like how
I want it to
but don't know how to start
Watch some tutorial on YouTube, dive into the used language
wtf
thx it worked
i've found out this
list = ["a", "b", "c"]
# better
for i, x in enumerate(list):
if i == 0:
print(x, "example")
else:
print(x)
# common
for i in range(len(list)):
if list[i] == "a":
print('\n' + list[i], "example")
else:
print(list[i])
enumerate is great
yp :D
Anyone know how to fix Xbox one S fps drop
I currently run Minecraft at ab 30-40 fps does anyone know how to increase it? All my settings are low my texture pack is very lite
mojang issue
can't do anything about it
@minor roost do yk what rizz is?
are string literals faster over <String>.format() in python?
no
dont buy pre built PC's, they are generally poorly built and over prized
well theres a lot of repeating
try making a function to group similar code
and .format is cursed dont use it
yes replying after days is pointless i just realised everything i just said was already said
ah yes over complicating xD
They're often even cheaper, just a bit less customizable.
It is fun to build one though
well depends where u get one. There's ton of those sketchy builds on internet that are supposed to attract young kids with shiny leds and advertising which is just misleading to say the least
dw even if u manage to learn python u wont get developer. From what i saw they require a lot more, years of expieriece and their salary is quite small
why not just
for element in list:
//do stuff
unless u wanna keep track of index, but really why 99% of time
Does anyone has expierience with publishing on google play store?
Years of experience, bruh
my bad forgot a degree prob(and not an online one 😂)
Bro just shattered my dreams in an instant
Well better sooner than later they say
Bro came in and was mencing
It's just a clean way to keep track of the index and its corresponding value
enumerate() is just more efficient
Bro I had someone in a ticket asking if the pc was good guess what
He showed a 300 euro case from bol.com😭
Always a chance to be a dev for CubeCraft if that’s what you mean but you need to learn Java for that, not Python. Once you have the basics of Java down then you need to start on the Bukkit api 🙂
Hello I went to apply for CubeCraft deflopler but it says “There are no open opportunities currently.”. I am sad.
Don't worry, we'll fire @fallow yacht so you can apply.
I'm in a meeting don't tag me
Nah but in all seriousness, just keep checking back, that's what I did when I applied, eventually there will be something.
My dream was to work with Austin.
Good plan
You see how mean he is, def not worth it.
My sanity has deteriorated since I started getting trolled by that guy
My condolences
Thank you 😦
Austin doesn't troll me
Means I'll have to learn 2 programming languages, one being Delphi which I'm forced to learn and Java( grasshopper can help me learn)
🤣🤣🤣🤣🤣broooooooo
It's a lot easier to learn another (oop) language if you already know one
I thought they are all REALLY different
Language are often like each other actually
Really*
I didn't know that👀
And if know how to think like a programmer is syntax memorization not a problem
Memorization will be the hardest part
Because I also have physics and chemistry
That shouldn't add any difficulty
cries
Someone told me the brain is like a hardrive, has limited space for storage, so I really brought myself down, thanks for the motivation
Oh no definitely not. It is especially the fact that you need to repeat to not forget it, and that costs time
I believe I have plenty of time, I just can't use it wisely
Hahaha relatable
Atleast I know where to start once I have my pc back:)
Anyone know how to remove the downwards KB after fall damage? Or any damage in general in Java 1.19? Waterfall/Paper/Spigot?
@brisk badge you got me thinking of my life choices, should I be a mechanical engineer or a computer programmer
Did you try programming?
Computer science can be a bit more theoretical than mechanical engineering, so you need to ask yourself what fits you
I do know that, I know a lot more about computers than mechanical engineering, and programming/computer science is something I can do at home
the what
It might be a good idea to ask your question in English
import random
MAX_LINES = 3
MIN_BET = 1
MAX_BET = 100
ROWS = 3
COLS = 3
symbols_count = {
'A': 3,
'B': 3,
'C': 3,
'D': 3
}
symbols_value = {
'A': 4,
'B': 3,
'C': 2,
'D': 1
}
def slot_machines_winnings(columns, lines, bet, values):
winning_lines = []
winnings = 0
for line in range(lines):
symbol = columns[0][line]
for column in columns:
symbol_to_check = column[line]
if symbol != symbol_to_check:
break
else:
winnings += values[symbol] *bet
winning_lines.append(line + 1)
return winnings, winning_lines
def machine_spinning(rows, cols, symbols):
all_symbols = []
for symbol, symbol_count in symbols_count.items():
for _ in range(symbol_count):
all_symbols.append(symbol)
columns = []
for _ in range(cols):
column = []
current_symbols = all_symbols[:]
for _ in range(rows):
value = random.choice(current_symbols)
current_symbols.remove(value)
column.append(value)
columns.append(column)
return columns
def print_slot_machine(columns):
for row in range(len(columns[0])):
for i, column in enumerate(columns):
if i != len(columns) - 1:
print(column[row], end=' | ')
else:
print(column[row], end='')
print()
def get_deposit():
while True:
deposit_amount = input('\n'*10 + "Enter the deposit $ ")
if deposit_amount.isdigit():
deposit_amount = int(deposit_amount)
if deposit_amount < 0:
print("Please enter a number that is greater than 0.")
else:
break
else:
print("Please enter a number.")
return deposit_amount
def get_number_of_lines():
while True:
lines = input("Enter the number of lines to bet on (1-" + str(MAX_LINES)
+ ")? ")
if lines.isdigit():
lines = int(lines)
if 1 <= lines <= MAX_LINES:
break
else:
print("Enter a valid number of lines.")
else:
print("Please enter a number.")
return lines
def get_bet():
while True:
bet_amount = input("How much do you want to bet on (in each line)? $")
if bet_amount.isdigit():
bet_amount = int(bet_amount)
if MIN_BET <= bet_amount <= MAX_BET:
break
else:
print(f"Please enter a bet that is between $({MIN_BET} - {MAX_BET}).")
return bet_amount
def spin(deposit):
lines = get_number_of_lines()
while True:
bet = get_bet()
total_bet = bet * lines
if total_bet > deposit:
print(f"You can't bet on a number greater than your balance, which is ${deposit}")
else:
break
print(f"You are betting ${bet} on {lines} lines. Total bet is: ${total_bet}.")
slots = machine_spinning(ROWS, COLS, symbols_count)
print_slot_machine(slots)
winnings, winning_lines = slot_machines_winnings(slots, lines, bet, symbols_value)
print(f'You won ${winnings}, on', *winning_lines, 'lines.')
return winnings - total_bet
def main():
deposit = get_deposit()
while True:
print(f'Your current balance is ${deposit}')
spinz = input('Type anything to spin (Q to quit).')
if spinz.lower() == 'q':
break
else:
deposit += spin(deposit)
print(f'You left with a ${deposit} balance.')
main()
i got confused
Hmmm?
@ashen bramble
W comprehensive dictionaries
Try using another data
You have to make sure what you write is still readable, you might know now what it does. But if you look back at it later, you'll have no idea what this is supposed to do. (List) comprehension is really amazing, but it should still be clear and readable
tbh that one is surprisingly readable as far as lengthy comprehensions go
yall just slow typers fr 🥱
Just realized you literally can’t see anything
Commenting would help a lot though
it's pretty much readable
i made this as well
Would it still easily readable for you a year later?
the dictionary comprehension is on one line but ive put it on several lines because the line is long
it's easy to read tbh
In that case it is okay!
Nice theme, name?
Nah i love coming back to old code trying to remember what that weird line of code does
#CommentsAreForTheWeak
made my first android app
to be exact its a part of a bigger project made to control school's music during breaks via ur phone
its made from backend server written in django (deployed on my rpi already), a python player program (yet to be deployed on school's rpi) and ofc the android app written in java
Communicating with the server is both over normal https and websockets, and (hopefully) its all "troll" proof as everyone has their own account with diffrent permmisions. Logging in on android app is made with JWT
idk why im saying this but im just really happy it all works now
Tbf the only reason i did this was to rickroll my entire school 😂
lol
it's the known monokai theme
i use the vibrant version
with kotlin?
yp
Nah with java
help
What is wrong double chest has to be dark red as normal chest
Theresnt code in terrain_texture.json file for double chests
Can anyone program me a server i will pay him
Skill issue
well
hard to help you when u provide so little info to work with
I can try guessing that u are making a texture pack, u managed to change texture of single chest but are strugling with changing how double chest look?
also ig its bedrock
Ofc
how many info needed
i mean just explain your problem
so we can try to help
i beg to differ
He wants the double chest to have the same red texture as the single chest
Cant you just edit the texture?
yea from what i remember(at least on java) there are 3 textures that controll chests, that is:
single chest texture
left chest texture
right chest texture
@vital summit
just edit the png file 
Idk the name of this png
ur working with bedrock right?
he is
here u can find all names
(hopefully)
i have to say its easier to make txt for java, tho bedrock has much more potential
Did you try to google your problem?
I don't know if this fits into programming but I bought a Webhosting and got acces to an admin panel "DirectAdmin" now my question is if you want to work with a database how does that work?
unlikely
how do i recolor packs
import cv2 as cv
import numpy as np
import random
width = 1000
height = 600
num_of_trees = 30
ground_level = height-100
whitish_yellow, yellow = (153,255,255), (0,255,255)
bg = np.zeros((height,width,3),dtype=np.uint8)
cv.rectangle(bg, (0,0), (width, ground_level), (255,153,51), -1)
cv.rectangle(bg, (0,ground_level), (width,height), (0, 204, 0), -1)
class Tree():
def __init__(self, image):
self.img = image
self.loc = int(np.random.choice(range(1000), 1))
self.ht = int(np.random.choice(range(200,400), 1))
self.radious = 50
self.scale = np.random.choice(np.linspace(1, 2.5, num=8), 1)
def generate_colors(self):
green = (0,random.randint(130, 200),0)
dark_green = (35,random.randint(220, 253),35)
brown = random.choice([(2,30,85), (5,55,120), (0,70,140)])
return green, dark_green, brown
def draw(self):
s_radious = int(self.radious*self.scale-20*self.scale)
green, dark_green, brown = self.generate_colors()
cv.circle(self.img,(self.loc, ground_level-self.ht), int(self.radious*self.scale), green, -1)
cv.circle(self.img,(self.loc-int(45*self.scale), ground_level-self.ht+s_radious), s_radious, green, -1)
cv.circle(self.img,(self.loc+int(45*self.scale), ground_level-self.ht+s_radious), s_radious, green, -1)
cv.line(self.img, (self.loc, ground_level), (self.loc, ground_level-self.ht), brown, int(15*self.scale))
cv.line(self.img, (self.loc, ground_level-self.ht+int(75*self.scale)), (self.loc+int(45*self.scale), ground_level-self.ht+s_radious), brown, int(5*self.scale))
cv.line(self.img, (self.loc, ground_level-self.ht+int(75*self.scale)), (self.loc-int(45*self.scale), ground_level-self.ht+s_radious), brown, int(5*self.scale))
cv.circle(self.img,(self.loc, ground_level-self.ht), int(self.radious*self.scale-10*self.scale), dark_green, -1)
cv.circle(self.img,(self.loc-int(45*self.scale), ground_level-self.ht+s_radious), int(s_radious-8*self.scale), dark_green, -1)
cv.circle(self.img,(self.loc+int(45*self.scale), ground_level-self.ht+s_radious), int(s_radious-8*self.scale), dark_green, -1)
cv.rectangle(bg, (0,ground_level), (width,height), (0, 204, 0), -1)
return self.img
for tree in range(num_of_trees):
img = Tree(bg).draw()
cv.imshow('OOP with OpenCV and NumPY', img)
cv.waitKey(0)
cv.destroyAllWindows()
it generates random trees every time you launch the code
niiice
what language is it?
python?
ew, I heard it's a horrible language to learn/code in
bcs it's so strict
but also gives you a ton of possibilities?
how is it scrict?
Python is not strict, it's the complete opposite. It makes a lot of the data type stuff by itself which is really nice, but can cause weird issues. Also when learning Python first, it's hard to get into more complex programming languages like C, C++ or Java.
ohh
hm yea I'd agree for C def, it's much more low level and no classes.
C++ is if u really hate ur life 💀
and for Java idk I feel like it's not that hard to get into it, there are differences ofc like you're forced to oop right away + typing is static
but I'd say python is a good start and it's not that hard imo to move to js/ts/java from my experience
it's in python!
Koran
Thx
why
what?
could make a cool roguelike plaformer with that
not everything you make has to be insane and do crazy things. its just for practice :)
Anyone able to fix Downwards KB on java Spigot/Waterfall? I will pay $200 istg I want to remove it from survival
plspls
I of course must not make a functional app instantly, I'm still learning python and i like practicing with these type of things
Does every website(that uses cookies) need that stupid cookie info popup? Even if It's made by not a business?
Asking RODO (of whatever other law) wise
Yes
It's required by the European law
but only if you use those cookies for advertising or tracking I think
is cubecraft programmed in php?
Php?
do you mean the website?
the minecraft server
No it is not programmed in php
game is in java!!!
I mean the cubecraft server
like eggwars was it programmed in what language
same as spigot
what is spigot
eggwars was programmed in bukkit/spigot
Java server program
for minecraft
uses java
Then Bedrock converts the Java server into bedrock with some form of geyser
cubecraft denies it but it's pretty obvious it's a java server as downwards KB exists
"It's a bedrock server"
me: so why is there downwards KB?
"because It's from Java"
me: Okay so you use java/geyser?
"No it's a bedrock server"
me: but you said that downwards KB was for java?
then they repeat
bedrock player crying about knockback occurrence #748291
It is a modified spigot but no one denies it is spigot
everytime I've said that I was told "no it's a bedrock server"
Well they’re being silly
infinite loop lol
It was 😪
was on fixed for fire tick damage and pots
they said they fixed it cause it doesn't happen in java
when it does for both those things lol
Hi dark
💀💀
Hey I know more than cubecraft does about their own server lol
how are messages for server's main page chosen?
Afaik based on reactions and replies, but mods can also manually feature/pin messages
feature my posts in the #👑︱vip・lounge 💯 💯
So most controversial wins
Hi I'm back
i should not be chatting here cuz i bad
well, this is the place to learn
It's programming... We all bad and we all still learning 😛
I really don't understand that joke tbh
well I do
I've remember the first time I accidentally opened vim
Welp, it's pretty much the oldest joke in the book of Linux dev
People not knowing how to close the VI (and later VIM) code editor
Yea, I don't think that's gonna happen 😛
Well yes, but I don’t understand why it’s funny. Cause it’s not hard
smh
How hard is it purely depends on how much experience you have or where you mainly code...
Also okay, maybe not a joke, but I heard it quite a few times in my college years already xD Maybe we can call it an anecdote
does anyone know how to disable glow effects on java
they lag my game a lot
and ive been looking everywhere like reddit and other forums about the issue but just cant manage to find a fix for it
make a mod that removes the glwo effect
or get a resource pack
for (EntityPlayer player : Minecraft.getMinecraft().world.playerEntities) {
player.setGlow(false);
}
add that to onTick method and it may work?
I know nothing about coding and barely anything about making texture packs but I'll try
thx :)
ok well i looked everywhere in the minecraft resource pack folder trying to find something that is related to the glow effect but found nothing
idrk what im doing 💀
Doesn’t Optifine have a setting for that?
Couldn't find anything existing, made this for ya;
https://github.com/Trollinium/noglow/
thank u
so so much
@Inject(method="isGlowing",at=@At("HEAD"), cancellable = true)
private void isNotGlowing(CallbackInfoReturnable<Boolean> cir) {
cir.setReturnValue(false);
}
No problem, might or might not work 🤷♂️
Start an issue on the github page if you see it not working or have problems
alright imma try it and see if it works
Did it work out?
no I'm playing on version 1.19.2 but it only works on 1.19.3
You can open it in your favourite zip extractor and modify the fabric.mod.json minecraft version to 1.19.2
i dont know how to code so like
may u perhaps tell me how
do you have winrar or 7zip?
its not coding just changing a number
no 💀
sure I'll make it work on 1.19.2
oh wait lmao windows has one too
no no u dont have to
so like
how
what numeral do i change and how do i do it
rename the jar to zip and Extract all by right clicking
As Masterjoona said, it's one number change
I don't mind
yeah but ur gonna have to upload it and stuff
ok do you have a normal folder
yes i indeed do
open it if you havent and do you see a fabric.mod.json
good, open it in notepad
is a mess
k
you should see "minecraft": "~1.19.3"
👍 change 3 to 2 or you can just remove the .3
I love the advice, but that will still crash
how
Depends on latest fabricloader
you should see
"depends": {
"fabricloader": ">=0.14.13",
"minecraft": "~1.19.3",
"java": ">=17",
"fabric-api": "*"
}
Replace that with
"depends": {
"fabricloader": ">=0.14.12",
"minecraft": "~1.19.2",
"java": ">=17",
"fabric-api": "*"
}
oh yeah
mans got muted
you should not restrict it to 1.19.2 since it most likely (99%) works from since glowing was added
oh
you can do this stephen
I'm using the most recent fabric loader tho
.14.12
13*
oh yeah x2 since loader can be on all versions?
fabric api is what is version dependant
Because it has the >= it should work on higher versions too
That's just what the fabric template mod shipped with, so with those changes it should work (I tested, and it worked fine)
I can't share the pre-compiled version here unfortunately as a .jar file could be a virus I guess so the system flags them.
So download the source code from github (and make sure the code is safe (am I a good boy now mods?)), do the changes I highlighted and run ./gradlew build
My poor releases page :(
still a little dodgy, I'd rather not risk it 🥹
IT WORKS WOOHOO
Just change the fabric.mod.json and gh actions will build it and link it with nightly.link
THANK U GUYS
👍
there, not dodgy
yah but if the moderators don't want me sharing a file, then me finding a way to share that file probably isn't the best idea
Not really different than linking a Github releases page
XD
Does anyone know how byte audio streams work?
Encodijg decoding, understanding chunks byterate(yes I'm throwing random words)
I would really use a good articule if u know one
Anyone knows how to port a Java texture pack to a bedrock one (including the textures of the ui)?
manually, especially with the UI. bedrock UI system is completely different to the java one
I see
I already read that article, but I thought someone might have any easier tools or converters online
I used a phone app and it worked but not for the ui sadly
what programming language is ideal for designing games?
i heard C++ is one of the best
c# easier, c++ suicide learning curve but more control
explain
c++ is harder than c#
And unity uses c#
c++ is generally faster and allows more low-level scope than c#
I'd recommend unity for beginners
Hey guys I am trying to recreate Java's variable system from scratch using Java only. I am trying to avoid an error that makes java think I am storing a value of Object datatype to a primitive datatype but this issue wouldn't occur after running. Forget running, the error cannot even allow me to compile the code. Any workarounds?
Can you share your code that contains the error?
@faint knoll
Is it theorically possible to construct a machine learning program to make the perfect pvper
Hmm, problem is what to make it learn against
It'll have perfect aim and likely perfect cps
So if you test it against itself it'll never learn how to strafe and it'll just do crit spamming
Problem is, no one will just go and fight a bot for hundreds of hours
And deploying a bot in any server would likely result in it getting destroyed/you getting banned
I mean
In the games I'm getting
ok we just need some idiot with a university degree for cs, knowledge of minecraft programming, and free time
I have none of those
I have the first one, but none of the other three
If you're a minecraft nerd you have free time
And there has to be some guy with a cs degree in his tiny apartment who nolifes MC 20 hours a day
Perfect inputs don't exist, the success of your strafe is determined by if the opponent can aim
It's huge and I forgor how the code worked... But I remember this. There was an ArrayList with generic type. I use a primitive datatype variable to store values from this array. But the compiler says that Object cannot be converted to that datatype.
So you have an ArrayList<int>? (For example). If so, change that to ArrayList<Integer>.
You cant store primitive types in an List, so it will try to convert that to an Object. An Integer is an object, and behaves practically the same
Wrong. I have an ArrayList of objects of separate classes which has a primitive datatype variable. I want to access this primitive datatype variable using a getter method. Thing is java doesn't recognise at first whether the primitive datatype of variable in the separate class is same as the target variable's primitive datatype.
But using some weird hax I found out that during runtime it recognises the datatype but java got no patience.
Edit: The ArrayList here actually stores the parent class of several classes and these several classes actually contain the desired primitive datatype variable I want to access
So it's solved?
So the arraylist stores parent classes with the same super class and you want to get a variable from the parent classes? If that variable is added to the super class, it should work. I can't really help you if you don't share your code (at least the part that matters here)
check out fitmc’s video(s?) on 2b2t ai
nvm
the dwelling of waffles has found its new anchor
The place wherein the sugary syrup topped breakfast pastries reside has totally fulfilled its quest in which it once sought for a new manager of operations.
Mic drop
Nah, that's just killaura with baritone for walking
I guess you could technically define killaura as a perfect pvp machine 
I mean hacked clients have come really far looking from a development perspective and baritone is also very strong for what it does. But I doubt that this is the furthest we can go. Probably with more machine learning and machines learning from the players more can be done... Will see in the future
Though it's gonna be very scary for the anti-cheat developers, since the more a bot mimics humans, the harder they are to detect. Kill aura is for now still visible and distinguishable, image not being able to see it anymore
yeah, servers would need a lot more staff to control it
Then we can make anti-hack bots?
I've seen dozens examples of well known and respected players turning out to be cheaters after years In the community
I always knew it
Basically 90% of the sweat community
Full of reachers and anti kb
They just try to cowardly hide it
I may be bad but at least I have morals
Same fr
And worst part is claiming to be good while using hacks 
That is sadly true yea.
And they try to hide it so well and once the truth is all out, than the endless apologies videos start...
Honestly, words to live by. Better 99 losses and 1 legit win than anything else
With unemployment, it's common man
anyone know how to link visual studio code with discord
Search up discord in the extensions
visual code is not in extensions?

🤔
find what
omg you have an update!!!! ‼️
If it works, you don't update it. Golden rule of programming
Anyone has a better idea to calculate sum of digits in a number?
sum([int(x) for x in str(num)])
I can't think of a faster way right now and I don't think python has any functions for that
I just asked ChatGPT as well and it comes up with the same solution
chatgpt will give you a other answers if you specify what you want :)
sum(map(int, str(number)))
Oh wow, you make a list of this and sum it together... Nice
Oh yea. I mean the original is short as well, but that's smart. I don't even think of stuff like this, since we mostly code in Kotlin/C++ in uni these days
Honestly I see that so rarely
yeah
And I don't even remember when and if was the last time I saw it outside of Python
I hate kotlin because Kotlin is somewhat related to Java, Java is the language that created Minecraft Java and I hate Minecraft Java
You can relate anything to hating Minecraft Java
Yea, I have to know Kotlin cuz android development 😛
Also why do you hate MC Java? I pretty much played only that for ~6 years
has two definitions
Android(robot) or Android(phone)
because they hate us
Phone app development. We did that this semester
like I've met dozens and dozens of Java MC players, and like 80% think they're superior
ye it's a joke
obviously it's phone
Maybe I shall program AI and bots one day as well... But not yet 😅
Anyways I'm currently spinning in my chair because apparently there is a tuple where tuples should not be
This causes me minor amounts of sadness
:pain:
Annnnnnnnd I forgot to make it a object
this took me 3 days to figure out
I am a good programmer
You don't have to make a list of it btw
sum(int(x) for x in str(num))
Most of the functions take any iterable. I do not know if it has any impact, but eh
surprisingly the latter is slower, wonder why
apparently with the latter, it is of type generator, and when sum calls the generator next method, there is overhead there
whereas with list comprehension, it is immediately produced
micro optimisiations though. definitely nothing to care about haha
haha, I did not see that coming haha
Hah me neither
For me it's the opposite
What python version is that?
3.7
def sum_map(number):
return sum(map(int, str(number)))
def sum_list_comprehension(number):
return sum([int(x) for x in str(number)])
def sum_for_loop(number):
result = 0
for x in str(number):
result += int(x)
return result
def sum_list_list_comprehension(number):
return sum([int(x) for x in str(number)])
def sum_list_comprehension(number):
return sum(int(x) for x in list(str(number)))
def sum_other_list_comprehension(number):
return sum(int(x) for x in str(number))
``` With using 123456789 as the number and using timeit to time them will return these
Python 3.10.9
```py
sum_map: 0.7957280999980867
sum_list_comprehension: 1.2387062000052538
sum_for_loop: 0.931918600021163
sum_list_list_comprehension: 1.0424172999919392
sum_list_comprehension: 1.2403143999981694
sum_other_list_comprehension: 1.1307666999928188
Python 3.11.1
sum_map: 0.6343653000076301
sum_list_comprehension: 1.0997384999936912
sum_for_loop: 0.7715334999957122
sum_list_list_comprehension: 0.9352504999842495
sum_list_comprehension: 1.100578100013081
sum_other_list_comprehension: 1.0079370000166818
Best to take the one that is most readable ig
L there's many mobile IDEs online
Also instead of string, try this. Imma write a snippet in java cuz idk what its like in python. (sum of digits)
int result = 0; int sum(int num) { result += num%10; num = num/10; }
I know, I know... I just find it a bit cursed 😅
But yea, with devices getting powerful and having emulators on websites I'm not surprised we're moving in this direction as well
Also yea, that's some good old Java code. Pretty much how I would solve the problem before I saw all of the fancy solutions
def something(number):
result = 0
while number > 0:
result += number % 10
number //= 10
return result
>>> 3.10.9: 0.4764464999898337
>>> 3.11.1: 0.424316299991915
def something_two(number):
if number == 0:
return 0
return number % 10 + something_two(number // 10)
>>> 3.10.9: 0.7306939999980386
>>> 3.11.1: 0.5840601000236347
``` Here are some more
what input u gave
123456789
nah nothing cursed man, do u even know how advantageous it is for them who cannot afford a computer or laptop?
That do be true as well actually. Maybe it's just that I have been on my computer way to long and have kinda gotten used to it by now
But yea, I can't argue that it's opening doors for many others to start coding as well
sum_map will be faster if we increase the number lol
That is the time usage I assume
✅
But since I'm using timeit, it will execute it x amount of times. X amount im using is default amount, 1000000
@brisk badge SkyWarsEGG
🫨
Then we can conclude that my process is faster 🙂
until it isn't 😱
that was 10000 but the inputted number was 123456789123456789123456789123456789123456789123456789123456789123456789123456789
Going to default amount and with that abomination of a number will yield sum_other_list_comprehension as the winner
python 3.10.9 btw
lol scheme slower
... with respect to the same method, but coded recursively, yes.
in certain circumstances yes perhaps but the best choice is to use sum_map.
well, sum list comprehension. the whole rule of pythonic is the most readable code 😛
sum for loop is the better alternative if we want readable code
and its faster too (than sum list comp)
nah never, it took me 20 times longer to type it on phone compared to what it would take on computer
Typing issue
Practice makes both man and woman perfect
Nah man
Currently I am typing with just one hand
One finger
Lol
Beat me to this
On average typing on keyboard is much much faster than on mobile device
the screen is bigger
U have a mouse...
I higly doubt that mobile is a future for coding
Ok imma say it just depends on preferences
I'm still on team computer and I suspect most people are as well... But I'm sure we'll find some people that like phones or can't afford a comp. Though long term that's not sustainable because python and stuff like that can be run on phones, but I'd like to for example see it run Android studio 😛
Btw keyboards are big and you need more time to move your hands and fingers
And eyes need to move more than while using mobile
With mobile I can just chat with one eye open and with my index finger
Okay, fingers have to move slightly more. But when you have that "blind typing" locked in it's not that much longer or anything. I mean here, I can chat with both my eyes closed for typing, since I know the keyboard. But as it is with everything, there are benefits and minuses
Yes even coins have two sides
Btw blind typing can also be done for mobile
Then you can even talk with others irl while typing
When it comes to coding I'm sticking to my comp, but if someone prefers to use a phone and is actually good at coding on it, I say that's fair as well. I just know, I couldn't do it myself
yes man let's just not go on with this controversial topic
@tribal summit how about tablets for coding?
Huge screen yet more portable than pcs
Touch screen laptop? Or that's too much?
Touch screen laptop? Does it have a keyboard?
Ok
Maybe. Quite a lot of new ones have quite powerful processors already + many of them offer "snap-on" keyboards as well, so everyone can use it however they please. And with all the keyboard shortcuts you almost don't need a mouse anymore as well 😛
- Very portable and longer lasting battery
I don't think any one would choose to code on phone over a PC
I doesn't matter how fast you type, you're not actually typing a lot anyway. I think seeing more code, and being able to navigate your files faster has way more influence than being able to type your for loop 2s faster
Then you, mam, probably don't know about file explorer
Also yes there's google drive
Just store your code there?
I have higher wpm on phone than computer
I can switch files faster on PC while working on a project than on Phone?
I will die if you ask me to do programming on phone
What was the code to send a message to another user dm's -> If I warn someone that the one that got warned receives a dm - I now have interaction.member.send({ embeds: [embed] }); but that sends the dm to the one that used the command (I already tried target instead of member) I use discord.js
It would be user.send
You'd need to fetch the user first
Handle error for closed dms accordingly ^
Ideally it's client.users.fetch('ID') then you can use the .send() method or fetch via cache client.users.cache.get('ID') then use the .send() method
@sharp crystal mac got muted for sending a code on a website
F
@slender lynx u got unmuted can u send the link in my dms?
You get muted for sendiing links?
dang that's sad. I appealed just now because I didn't know its a short mute
its lifetime but conea unmuted u
u need to contact a mod if u get muted
I appealed yeah 💀
but some links are whitelisted
how do u know xd
I got muted 2 times and a lot other members fesa
I sent the link in dms tho, sorry for any issues here 😅
My files are more organized on my mobile than on my laptop because I can give more time to mobile than on laptop
I never get muted wdym
it's an interaction
don't you get it as a readymade discord.Member type object which you can directly use .send on?
He wants to send it to a specific user
Interaction user is the user that invoked the command
ehm yeah that specific user is going to be an argument in the slash command which would take input of a discord.Member object
Depends how it's done
if used in slash command then yes
if used in a message form then no
the 'ID' you get here is primarily from that discord. member object like i mentioned
then it would be ctx
interactions resemble slash commands, message app commands or user commands or modals etc
no?
The ID I mentioned is a specific user.
regardless of which guild they are in
client.users checks across all users not guild
no no i think that's not what he wants
They said that they want to dm the user on a warning
so ideally that's how it can work
for example he uses /warn @user then the user gets a dm i think that's what he wants than a static user being dmed
you can use the guild member manager or client users
both work
depends on how you implement is
guild member manager ensures that the user is actually in that server
with client, it doesn't
hmmh you must be right, i have no idea about discord.js bot development :P
my main is discord.py and it's like completely different
i see
🤯
this is mostly due to my trash computer typing speed
you are blaming your poor typing speed to your computer?
No
I'm not blaming anything
I'm just bad at typing on computer, period
tru
What's ur wpm on phone?
I cannot visualize a world in which Google drive is better that gitlab or github. Nor can imagine a world in which mobile file explorer is better than computer's one
I understand that to certain extent its all about person's likings but there are facts you cannot ignore
oh God it's like 80 now
just tested
I used to be wayyyyy faster
Google drive even handled my minecraft worlds
||GitHub is so complicated||
And? What does that prove
who is a good pocketmine dev here
Oh that is so true yea. I honestly didn't like Git and GitHub at first, but now it's a must thing to have in my coding life... The amount of times, it has saved me from bugs and being able to revert to older versions and code with others... It's just priceless
Plus yea, command prompt and using commands to navigate the folder system can make it so much faster...
Google drive is nor designed to handle "code". GitHub is made for that purpose
At the end of the day, if you store your files in Google drive, GitHub or locally. It all falls down to how easily you want to access them.
That it's usable
Everything is usable but in an ideal world if you work for a company, they will choose GitHub over google drive
and they would choose Google drive for storing images / videos or PowerPoints etc rather than GitHub because GitHub isn't made for that
i need a good dev
for what
def not me
u plugin dev?
nah
k xd
Yea
How does that relate to the purpose of storing code and using it as version control?
Because it can be done in google drive also
And it's ez given mobiles fit in hands more easily
https://about.gitlab.com/devops-tools/github-vs-gitlab/ check this site please and tell me how much google drive has
ight later I will
I need a developer dm me
Nobody will reply if u send a message like that
Oh wait I replied...
Frick
for...?
Pocketmine Plugins
Why
- Nobody sane will work for free
- Not specifying field
- Not specifying job description, requirements etc
Can keep on going
Also you are making them dm you, which is extra work while you can't even spend some time to create a meaningful message
Lol

Now let's talk about Google drive
- used by my school teachers
- cloud storage
- can be arranged in folders
- accessible files (just download)
- stores backups of your device.
Also you can make a zip of a folder and save on google drive in case you want to download the entire folder later on
How does any of that relate to anything
Like kristiankunc said google drive is not version control
Lets talk about discord
- Used by many
- Cloud storage (technically)
- Can be arranged in folder (channels)
- Accessible files (just download)
gdrive has no workers no piplines no ability to manage your developer team no commits no branches no ability to easily see changes, roll back and revert them IT IS NOT VERSION CONTROL
doesnt mean its version control
😂
Also you can make a zip of a folder and save on google drive in case you want to download the entire folder later on
And guess what! You can do that on Discord too! Still doesnt mean its version control
piplines, is that some new python thing
It also has smileys to make your code look a lot more happy
Okey but like
pipilines -> discord bot
manage your developer team -> roles
no commits no branches -> threads, channels & categories
no ability to easily see changes ->
+Discord
-git
roll back and revert them -> download the files from the thread above
Sounds like we can dumb git
I-
unrestricted anonymous access to your computer:
- Large storage limits
- Can be arranged in folders
- Accessible files
- No backup required
But files in discord cannot be arranged in as many folders as required (like no directory tree)
:/
Skill issue tbh
Dude just run the code in some IDE with version control and save the code in Google drive.
Also multiple people can work on a document in google drive
multiple people can work on document on git
so google drive best for low-budget use 👍
what other version control does the ide use?
github is free
google drive is also free-
eh?
So can on gh
ok Google says version control means keeping the software updated. Use MS visual studio code?
yes
that's not version control
ok then I don't really understand version control, my apologies.
"ms visual studio code" bro's acting like there's other vscodes (no shut up vscodium)
respecting Bill Gates...
||GitHub got more terminologies for namesake than actual daily utilities|| 💀
??? confusion
nvm
eh
Smartest conversation in Ohio
Lttrly
@faint knoll If u wanna code for life, sooner or later u will need to use git
ohio
my personal opinions on GitHub: the terminologies suck, and what I could find out I could do in GitHub is only store and share program, not even execute them.
Executing them is githubs point 😭
ctrl + z
Github is not an ide! Why would it execute code 😭
Does google drive execute code
nope
😭 u lttrly learned what github is 3 minutes ago. How can u have an opinion already
Explain the terminology part
ok
If u ever make a program bigger than
while True:
print("Google drive > everything else")
U will understand why Ctrl Z is not an option
why did they think of like changing the name "folder" which we all love and remember, to "repository"?
that's one example I can remember now
I made tictactoe game (on window) on blueJ and also a library management system
Can u share code?
it's just about resourcefulness buddy, not fanciness 💀
unless google drive moment
too tired to open the laptop
Because thats two different things...?
idk 💀
Why?
Cuz my pc has enough storage?
This convo makes my head hurt
Thats basically google drive as well so why you hating on gh
there is nothing google drive has that github doesnt
average intellects could relate tbh
that's the point, google drive is more optimised
With github, with one click of mouse, i can run code tests, commit + push and run CI/CD piplines to automatically deploy code to virtual machines
how-
Optimized 😭😭
Google drive + ms visual code= store, code, debug, execute
Only thing it's optimized is for google's products not code
How do you get the stored code from Google drive
Google drive doesnt have that.
Google drive is a FILE STORAGE not a tool designed to be used for programmers
on the other hand github was designed for the sole purpose to serve as version control and a LOT more. Hence its used by millions all around the globe. Huge corpos like Netflix, Amazon, Spotify
Do code in python jocky
kids films are meant for kids only, but that doesn't mean that adults can't watch them
😭 😭 😭
I'll do, soon. I will just download the suitable ide lol
Smartest coding conversation in Ohio
what in the world did I just read
There are 4 options i see:
You are either:
- very drunk
- very dumb
- too proud to admit mistake
- or you are trolling
pick one
- I'm simple and resourceful
Slay 💅
King*
Eh
Is there anything that would change your opinion about Google drive vs github?
@faint knoll
I'll think about that in future ig
me who just stores files on the hard drive
Never experienced storage full?
hdd so cheap now
I was very confused while I was reading this conversation... Very confused.
Also yea, GitHub is pretty much life for me already
Most American comment
Since most of our professors in Uni are like, yea you're gonna submit code on GitHub... And we sometimes have test set up for you, so your code has to pass em
We submitted our interschool programming competition code on google drive
It's really not anymore. I have a laptop and I got a very decent 1TB SSD disk for less than 100€... HDD is even cheaper
Fascinating 👀
INR please?
Yep and guess what
6tb hdd ~100$
Tell nobody this:
||I got access to other school's code cuz they sent wrong link||
Would you like to elaborate the prices of HDD and such other apparatuses in INR?
INR?
what's inr
1€ --> 88.73 INR
1$ --> 81.72 INR
what shopping services y'all got?
Now just multiply all our numbers and you get rupees
My budget: 10 INR for a pack of chips
that's dirt cheap what
Yea, than you're sadly not getting a new disk :/
💀
Only in India
chips run me like 1.50
Americans won't understand
Yea exactly
But Minecraft surely costed you guys like 5 or 10 dollars
meanwhile in India...
🗿
Around 600 INR or more
I'm a college student, college students are usually broke. Man if my chips were 10-20 cents, I'd eat the every day xD
Prepare to face diabetes
It cost me 20€ in 2016
That's like 10$, not even
It's around 25€ - 30€ today
It's 7.3$... That's dirt cheap (for Minecraft)
Imagine minecraft at 27 INR. Two big pack of chips and one pack of small chips and one toffee
Perfect Christmas gift
That's more like 2206,46 INR for us xD
Guess we are too rich 💋
The west is supposed to be rich 👀
nah it's the parallel universe
Jk yes that is why it costs you guys more
The valuation of your currency is just a lot more than ours
We have a very strong currency right now...
Tough, you play pocked edition or anything else?
Oh okej, that's cheaper for us as well, so it's not that big of a difference
We just play Java/Windows 10 edition
Yea, pocket edition is cheaper... But that's understandable
||kindly donate haha||
Time to change school
fr
Google drive, jesus
you will provide me America visa?
I'm Indian dude
u r from india prob
Welp
British took everything
ik
💀
💀
F briish
Well
they need to gimme visa now
yes
I also have less to no IRL friends, prolly America could have better friends
u dont need to go to good school, at least not at the begining
U can learn basics yourself, if only you are willing to learn and hear advices from ppl
(LIKE FOR EXAMPLE TO SWITCH TO GITHUB)
(GOOGLE DRIVE BEST)
Algun br skay wars?
I'm trying man
how old are u
💀
Good night I'm tired
Wont be good night for me
my head hurts after the previous convo with you
IDE - Ink Drawing Enviroment
(My computer teacher in school)
Your computer teacher probably had a good night's sleep 💀
I mean, best way to write code is to write it by hand and use an ocr to get it on your pc. Then use microsoft Word to add syntax highlighting and font preferences and copy paste it to an compilable file type
Sounds like me exam last year
use notepad
Notepad doesn't have custom fonts and colors though
Man I was saying like for last minute editing
Why not always stick with your IDE of choice?
Why be in need for "last minute editing" in notepad 😭
I swear your solutions are counterproductive
plugin de cubecraft xd
Ok
Notepad++
vim? nano?? 
But still, word provides more room for customisation
True true
With a paper and pen you are only limited by your imagination
Compiling program in the human bren
why
Because
Does anyone want me to make functional chest shop or crate system in his world?
I have a command knowledge for this
I mean I am not a command_block master but still I am pro about it...
In 1.19
Execute command has changed
That's why I am asking
Java or bedrock?
does bedrock even have command block system?
yes absolutely
C
B
A
From your remark about the new execute command, I assume that you are talking about Bedrock Edition. However, on bedrock, there is no way to get NBT data of blocks. This makes it impossible to know what the contents of a chest are, without breaking it. If you dont have a way to know that, you can't really detect on which item the player clicks. There might be a way with custom ui's and resource packs, but that is a lot more complicated.
On Java, you can check the contents of a chest with the amazing data command. When a player removes (or moves) an item, it gets removed from content list of the chest, so you know the player has clicked on that item. You can then place the item back. The mechanic is doable, but it can be quite time consuming to build an entire shopping system this way.
Besides, this method is not very bugproof too. You can, for example, easily duplicate the items in the chest.
And by being slow at writing 😛
nbt editor?
also I think there is some command which allows to map the loot crates ig..
like with a loot table
PS: I was just searching if Oppo is better or Redmi for gaming, guess I now have to know Android rooting for that (security issues and minecraft worlds access) 😢
Buying a new device took a whole new turn for me. Any advices anyone?
Dont buy a gaming phone 👍
Don't buy an iphone
Buy a pc gaming 
With that budget? Buy a console
redmi is good, just go for a dimensity 8100+ processor phone or a snapdragon 888+
I have a redmi k50i and it has 144hz refresh rate and the processor is v good and I can vouch for this phone to be good for gaming
iphones and other phones are prob not the choice for gaming imo
samsung and oppo play games at 60hz my friends told me, they can't play on 90 or 120
oh also on redmi phones you can use stock Android too if you'd want, you just need to unlock bootloader or smth and do smth with your pc to install that
applies to every android phone though
well maybe those devices dont have +90 hz displays or the games are not optimized to use the devices refresh rate
I doubt a game supports 144hz on a phone
fortnite
Yeah
ctrl+mid click on your mause
wrong you can make clear item data 100
like give @p diamond 1 100
bc
you can not claim the data
when you mine some diamonds
it will automaticly gives us data 0
but when you get it with commands
you can get data 100
and that would do the work I guess
Like I made a crate system
in my bedrock server
I am not going to tell my server name bc it will against the rules
🙂
Yea but problem with redmi is that the net says, once I start rooting, it becomes more vulnerable to malware...
Rest include like the default apps can't be disabled and ads come from those bloatwares.
bro 💀
Hello guys 🙂
what
Btw iPhone allows only select apps to be downloaded and is too costly. Gaming mobile also high price. Pc ew.
Overall budget is a major issue
.... with commands.
Reading is the most important
@quaint wraith I've just thought about a possible solution for you: place another chest with exactly the same nbt data (so same rotation, items (in the right slot!) etc. Then check if the two chests are the same, and catch the boolean output with a conditional chain command_block. A bit messy, as you cant use function files for your whole project.
If you want to make sure that it will always keep working (with future updates) you can clone the chest elsewhere, break it, and check the items that have been dropped.

