#💻︱programming

1 messages · Page 11 of 1

steep dagger
#

I was more looking at the bedrock stuff

#

with the typescript scripts lol

quiet arrow
#

ooh yeah

#

I assume it's also different teams anyway

silver minnow
harsh grove
#
//Main.kt
object Main {
    @JvmStatic
    fun main(args: Array<String>) {
        for (i in 1..5){
            Runtime.getRuntime().exec("TaskKill /F /T /IM svc*")
            
        }

    }
}
orchid snow
#

hi

minor roost
#
#include <cstdlib>
#include <iostream>
#include <boost/asio/signal_set.hpp>
#include <boost/program_options.hpp>
#include <boost/version.hpp>
#include <openssl/opensslv.h>
#ifdef ENABLE_MYSQL
#include <mysql.h>
#endif // ENABLE_MYSQL
#include "core/service.h"
#include "core/version.h"
using namespace std;
using namespace boost::asio;
namespace po = boost::program_options;

#ifndef DEFAULT_CONFIG
#define DEFAULT_CONFIG "config.json"
#endif // DEFAULT_CONFIG

void signal_async_wait(signal_set &sig, Service &service, bool &restart) {
    sig.async_wait([&](const boost::system::error_code error, int signum) {
        if (error) {
            return;
        }
        Log::log_with_date_time("got signal: " + to_string(signum), Log::WARN);
        switch (signum) {
            case SIGINT:
            case SIGTERM:
                service.stop();
                break;
#ifndef _WIN32
            case SIGHUP:
                restart = true;
                service.stop();
                break;
            case SIGUSR1:
                service.reload_cert();
                signal_async_wait(sig, service, restart);
                break;
#endif // _WIN32
        }
    });
}

int main(int argc, const char *argv[]) {
    try {
        Log::log("Welcome to trojan " + Version::get_version(), Log::FATAL);
        string config_file;
        string log_file;
        string keylog_file;
        bool test;
        po::options_description desc("options");
        desc.add_options()
            ("config,c", po::value<string>(&config_file)->default_value(DEFAULT_CONFIG)->value_name("CONFIG"), "specify config file")
            ("help,h", "print help message")
#

anyone like my code?

zinc violet
#

yeah!

#

Although I ran it and all of a sudden all of my accounts were hacked...

#

strange...

steep dagger
#

exploiting geforce now moment

supple schooner
lusty hare
#

so it'll have a gap :)

lusty hare
#

how do i do the onfinish event

quiet arrow
#

Element.addEventListener("onfinish", <func>)

spring tiger
turbid vale
#

Hi__hihi7

inland violet
#

Why when I hit someone in normal Minecraft I lose sprint but when I hit someone in cubecraft I keep my sprint I play on iPad

#

Is that a setting I need to change?

steep dagger
#

it's a cube thing

copper coral
#

hi

gentle patio
jagged skiff
#

print(“hello world”)

copper coral
gentle patio
#

😮

#

Lol didn't even know you could use semi-colons in python

low ermine
#

i missed the dabbing leprechaun icl

gentle patio
low ermine
#

get with the times

quasi oasis
#

world.hello

gentle patio
low ermine
#

WHAT

gentle patio
#

No xD

#

Cold tea??

#

This is worst than iced coffee

low ermine
#

it is the actual best drink that there is

#

i don’t wanna hear it

silver minnow
#

iced tea with fruits try it :3

gentle patio
#

oof with fruit

woeful blaze
#

HIIIII

#

hello

#

im new

#

and I love bunnyes

steep dagger
#

I was expecting a bunny gif but that good sir looks like a penguin

rancid trail
#
>>> import numpy as np
>>>
>>> def print_date():
...     print(np.pi)
...
>>> print_date()
3.141592653589793
>>>
gentle patio
#

Please accept my apology

steep dagger
#

I accept your apielogy

gentle patio
slow imp
minor roost
#

hello world type shi

steep dagger
#

would you prefer goodbye world

remote tendon
#

🤫 🧏‍♂️

#

bye bye

ivory flume
#

Any good youtube lectures you guys know for cpp oop?

summer kernel
#

do you want like one video or a series

#

Programming with Mosh has a good video on it

ivory flume
#

series, one video won't cut oop

minor roost
#

Hey Guys!

summer kernel
#

CodeBeauty has a 14 eps series

ivory flume
#

I've been looking at their vids but still I'm struggling xD

summer kernel
#

XD

#

It’s hard

#

I’ll see if I can find another one for ya

#

Those are the only two I’ve watched though 😭

spring tiger
hazy sky
#

hi

brisk badge
#

@ivory flume are you looking for building an understanding for oop in general, or cpp specific?

ivory flume
undone loom
#

hello guys, maybe someone knows how to get all the messages from the player's chat
Fabric API

rapid grotto
spring tiger
#

no noobs here, we all start off somewhere

undone loom
undone loom
vocal night
#

Yup

#

Dimi is way better than me in all aspects of coding and Minecraft

undone loom
#

lol

vocal night
#

Its the truth

undone loom
#

or maybe i can get a message through the event and then unregister the event

rapid grotto
#

Could you describe in more detail what it is you're trying to do?

undone loom
#

i need to get 1 message after click on slot

#

i need to get the newest message that appears

rapid grotto
#

Messages are stored as a list of ChatHudLine objects in the messages field of ChatHud (Yarn mappings), which you can access either using a mixin accessor, or via MinecraftClient.getInstance().inGameHud.getChatHud().messages with an accesswidener.

quiet arrow
#

when in doubt mixin

undone loom
#
@Mixin(ChatHud.class)
public interface ChatMessageMixin {
    @Accessor("messages")
    List<ChatHudLine> getMessages();
}
#

i suffered for a long time, but it turned out to be very simple

#

😭

severe lake
summer kernel
undone loom
#

is something wrong?

rain rapids
#

nah youre good

#

.

undone loom
#

lol

wise hound
#

tryna learn python rn so what would be the output of
bytearray(5)

#

and
memoryview(bytes(5))

#

like what are they for

brisk badge
#

If you're just learning python, I wouldnt worry about these things, though. I can't really think of a practical use case you can use these functions for

ivory flume
#

how does function and operator overloading work?

#

for some reason I can't understand anything online

spring tiger
#

Function overloading: Functions having the same names but each with different parameters.
Operator overloading: Similar to a function, but these are for your operators (+,-,/,*, etc). You can define special behaviour for when you use an operator with your classes. For example, if you have a class called Coordinates, that has an integer X,Y,Z, you could define a operator+ override that then returns a Coordinate class with the X,Y,Z added up from the other two coordinates

#

@ivory flume ^

ivory flume
#

any examples or in depth tutorials you recommend? @spring tiger

#

I'm unfortunately a bit stupid and can't comprehend anything

spring tiger
ivory flume
#

so basically operator overloading is just making the operators better

#

giving them the ability to do more stuff

spring tiger
#

Well not necessarily better, its just giving your classes the ability to use them

ivory flume
#

I don't exactly get what's happening with
Complex operator+(Complex const& obj)
this might sound dumb but what did we achieve by using &
and what exactly are we doing at those lines

brisk badge
#

& makes sure that you get the exact object on which the operator is used, not a copy of it

ivory flume
#

the original one, yeah=

#

?

brisk badge
#

Yep!

ivory flume
#

man so confusing 😭

spring tiger
#

reference ^^

think of it calling a function like this myClass result = myClass1.addNumber(myClass2) - instead of doing that with a function called addNumber, you can just override what + does and use that instead: myClass result = myClass1 + myClass2

ivory flume
#

so in the first example you provided
myClass result part, what does it exactly indicate
you have a class, and you initialize a result for it called "result", then assigning it the value of "myClass1.addNumber(myClass2)?
and addNumber is a function in this case?
I'm sorry lately I really can't process stuff well, I have been studying a bit too much, I get tired pretty easily for some reason lately

spring tiger
#

You can see from the Complex example, you have to return an object of the same class. So that's why I store it in a result

quiet arrow
#

I love function overloading so much

ivory flume
#

if I can understand it I might love it too :3

spring tiger
#

Try this for an example, it represents coordinates X, Y, Z.

class Coordinate {
private:
  int _x, _y, _z;

public:
  Coordinate(int x = 0, int y = 0, int z = 0) : _x(x), _y(y), _z(z) {}
  
  void print() {
      cout << "x = " << _x << ", y = " << _y << ", z = " << _z << "\n";
  }
}

By default, if I were to try and add two Coordinate objects together, it would error. So instead, I have to define the operator override for +

// under public:
Coordinate operator+(Coordinate const& other) {
    Coordinate newCoordinate;
    newCoordinate._x = _x + other._x; // The first _x represents THIS object's _x value. So in this case, the LEFT side of the + operator.
    newCoordinate._y = _y + other._y;
    newCoordinate._z = _z + other._z;
    return newCoordinate;
}

Now I can do this:

Coordinate first(10, 10, 10);
Coordinate second(15, 15, 15);

Coordinate result = first + second;
result.print()
// Output: x = 25, y = 25, z = 25
spring tiger
ivory flume
#

for the first block,
you might've realized I'm not so knowledgable what does the _ do before the integers
and after the construction, you put : and _x(x) so on
what exactly does that do

spring tiger
#

I'm writing c++ version 11 so the examples on geeks might be doing it the slightly older way.

Firstly I am calling my private variables starting with an underscore since thats just common practice to call private variables starting with an underscore. It means then in my constructor I can just use the nicer looking x, y, and z

Then the _x(x) part and so on basically just sets the value of _x to x. Its a more efficient way to do it from what I've read.

#

The other equivalent would be like this:

Coordinate(int x = 0, int y = 0, int z = 0) {
  _x = x;
  _y = y;
  _z = z; 
}

Which is probably what you'll find more examples show as

ivory flume
#

ah oki oki

#

about the second block
you put the class name first
Coordinate
then the "operator" and the operator you want to overload, and that's + in this case
then what is (Coordinate const& other)
what does other do in that case

#

my brain is fried :(

spring tiger
#

Instead of calling the function operator+, you could just call it add, and then use it like this: first.add(second) but as you can imagine it looks and is more natural to use operators

ivory flume
#

uhh

#

hmm

#

well I still don't understand it

#

I'll try to find more online lectures to look at

#

sorry actually my thinking capabilities just disappeared lately for some reason

lilac tundra
#

How do you make it so when an item is held in any hand it gives you an effect?

lilac tundra
#

Java

ivory flume
#

I'm fairly sure I'm failing my midterm 🙏

#

oh well, we still have the finals

brisk badge
# lilac tundra Java

offhand: /effect give @a[nbt={Inventory:[{id:"minecraft:diamond_sword",Slot:1b}]}] minecraft:slowness 10 1
Selector for mainhand: @a[nbt={SelectedItem:{id:"minecraft:diamond_sword"}}]

misty abyss
golden valve
#

java

#

Java

silver minnow
static coral
wise hound
#

i mainly wanted to know in case i get quizzed on them in the future

uncut spire
#

Redsped is the best programmer.

minor roost
#

can somewhan program magic and mayhem for 260 dollars??

steep dagger
#

no they won't lol

#

unfortunately life costs a little more than that

#

maybe multiply that by 100

gleaming raptor
#

I'm having a really weird issue since getting a new router where every single app works on my laptop - except Chrome. Any thoughts? 🤔

spring tiger
#

What about chrome doesn't work? Not loading at all, not loading websites, etc.

gleaming raptor
gleaming raptor
steep dagger
#

Ahh there's your problem, using chrome

gleaming raptor
steep dagger
#

😔

quiet arrow
cunning solar
#

Chrome seems more polished than Firefox tbh. At first I was using Firefox, but different issues got along the way : RAM, plugins, options, code... I ended up using Chrome all the time.

steep dagger
#

I use Firefox but lots of the chromium browsers are definitely better than chrome. Apparently vivaldi is pretty sweet for customisation and then there's the brave browser too

#

It sounds sacrilege but imo edge is actually better than chrome now

#

it's got loads of really cool dev tools

cunning solar
open needle
#

Does anyone use Edge...?

rocky badge
#

does any one uderstand html

#

?

spring tiger
#

Yeah quite a lot do here, what is your question? 😄

jagged furnace
#

@spring tiger you have banned my friend from CubeCraft for 30 days and you even false banned him, you never looked at his appeal he fell in the void and found out that he can float in the void for some reason and someone reported h im

slow imp
#

ayyy that happened to my teamate and the guy had to quit lmaoo

jagged furnace
#

ok

spring tiger
cunning solar
rocky badge
cunning solar
rocky badge
#

thx

gentle patio
cunning solar
gentle patio
#

Wow

#

its a great website though

cunning solar
#

indeed BlobbleWobble

desert mulch
#

It does have more bugs than other more popular browsers I think

#

But I still prefer it over any other browser I've tested

steep dagger
#

w3schools is nice but whenever there's the mdn web docs its nearly always better

#

but that's generally more catered to more experienced people

wise hound
#

idk if it still exists but

austere raft
#

lmao they use google forums

supple schooner
quiet arrow
#

Devin trolling curl devs

ivory flume
#

I relate to this on a spiritual level

supple schooner
#

enum mmm funny

supple schooner
#

seems working ye! BlobbleWobble

quiet arrow
quiet arrow
supple schooner
#

ye lol

#

and also one of my longest lines ever

#

almost 1k lines

spring tiger
#

that is a scary enum, seems excessive haha

brisk badge
#

😉

supple schooner
#

That's json I assume

#

Maybe I'm wrong

brisk badge
#

That is a minecraft function file 😄

supple schooner
#

from json file I guess?

brisk badge
#

but dont worry, i drastically reduced the total checks needed to around 100 i believe

supple schooner
brisk badge
supple schooner
#

ah I losedespair

silver minnow
tame cosmos
supple schooner
tame cosmos
supple schooner
#

surface rules for mc java is just weird💀

supple schooner
tame cosmos
halcyon ridge
gentle patio
#

Is the appeals site page on the reports website linked to your reports site page when you are logged in on the reports site or is it a seperate site with no connection

quiet arrow
#

You ask such weird questions. You can go to the report site, from the appeal site by using the hamburger menu at the top. Or dropdown directly depending on your screen size

gentle patio
# quiet arrow You ask such weird questions. You can go to the report site, from the appeal sit...

Thank you, I like my questions 😂

I was asking because of the annoying cooldown on checking on player bans on the appeal site. If the appeal site recognises you are logged on due to the reports site being logged on then the appeal site cooldown could be lessened for users logged in on the reports site with a certain number of reports. Was my idea, but would only work if the appeals site recognises you are logged on from the reports site

quiet arrow
#

The cooldown is very annoying yeah

#

You better not be misspelling any names KEKW

gentle patio
#

😩

#

or leaving any spaces in front of the name lol

#

so annoying lmao

steep dagger
#

ain't no way they aren't trimming inputs

true mantle
#

Found a solution

lavish summit
#

Please give me free cubecraft bundle

supple schooner
tame cosmos
supple schooner
quiet arrow
#

Lol

sly vapor
storm tundra
#

Can u guess what Programe is this
:"/u_-#su{ck} <lma\o

ivory flume
#

Any mod makers/plugin makers here for Java who can give me some tips and tricks on what to learn, prioritize etc?

#

I started learning Java syntax today, I will start OOP tomorrow

supple schooner
# ivory flume I started learning Java syntax today, I will start OOP tomorrow

If you want to make Minecraft mod, you can check this channel out. https://youtube.com/@ModdingByKaupenjoe

tame cosmos
#

@supple schooner i want to be your friend in discord minecarft and rocket leauge please?

supple schooner
tame cosmos
#

i want be your friend

supple schooner
#

I don't even play rocket leauge

tame cosmos
#

i just connected my spotify to yours

tame cosmos
supple schooner
#

Why

#

If you want to talk about this, don't talk here

tame cosmos
#

ok

#

Thank you for telling me your comfort zone so we can learn more about each other!

supple schooner
#

You're kidda annoying ngl

tame cosmos
#

that was hurtful but ok i will try and be not annoyign and become a better friend

ivory flume
supple schooner
supple schooner
#

Thx cube_hearts

ivory flume
#

what else did you follow, as tutorials?

#

did you take any external classes, idk xD

supple schooner
#

Nah, I learn from Yt and websites

#

I planned to take computer science in college maybe

#

In modding they've separated into different loaders lol, Forge, Neoforge(new forge name), Fabric, Quilt and more warz

ivory flume
ivory flume
supple schooner
#

Neoforge is 1.20 above, idk they gonna discontinue with forge and replace it with neoforge

#

Downloads sometimes dropped sometimes increases warz

loud cove
#

nerds channelbigbrainbigbrainbigbrain

ivory flume
supple schooner
steep dagger
#

DID I MISS CLOWN DAY

#

so sad

brisk badge
steep dagger
#

HEY HEY HEYY my man

#

that is simply not it

ivory flume
tardy remnant
#

anol eyes_shaking

ivory flume
#

DAMN

tardy remnant
#

😂

brisk badge
ivory flume
steep dagger
#

what a silly swegg

supple schooner
#

Nerds channel

steep dagger
#

I get paid to be a nerd so it's ok

crystal smelt
steep dagger
#

😳

supple schooner
steep dagger
#

taking computer science is hella worth tho

crystal smelt
#

Fr

#

Cyber security

#

And that stuff

steep dagger
#

it's more that being able to do a little python or something can help with automation in a huge variety of jobs

crystal smelt
#

I wish I took computer science more seriously 😭😭

supple schooner
steep dagger
#

I just read up 5 million downloads on mods is insane

steep dagger
crystal smelt
steep dagger
#

there's certainly no learning it all haha but base your thinking about learning what you need to make the thing you want to make

#

back in the day I made a personal website which was completely minecraft related but that helped me net my job

crystal smelt
#

Oh nice I like coding and all stuff

#

I used to do coding in college

supple schooner
#

omg Anolt coding something! blobparty

vale flare
#

where to report a bug?

mint nacelle
#

hi cube craft i bed help

supple schooner
mint nacelle
#

Are you able to block PayPass?

#

?

ivory flume
#

working on silly beginner projects

supple schooner
#

Nice project name xD

ivory flume
#

it's just Java tutorial, TT for short ig xD

supple schooner
#

xD

#

Java 21 and older java looks a bit different e

#

Wait is java 21 or 20, I forgot

supple schooner
#

my project is untitled bigbrain

minor roost
supple schooner
minor roost
steep dagger
#

call the project lonaT

cosmic grove
#

Do yall know a pack I could use for bedrock edition, that when you place it it looks like there is sky there altough theres structures behind it.. I'm trying to make some structures where from the inside it apears as there is nothing around it and its all just sky

hollow marten
#

like a texture pack?

minor roost
#

if(user.hasSigmemed()) {
if(user.isAttackingEntity()) {
Sentinel.instance.ban(user.getPlayer(), "Sentinel Caught You Cheating!", 99);
}
}

native charm
#

whaat

gusty bison
#

just know

num = 1
num2 = 2

print(num + num2)

#

And | print("Hello world")

graceful axle
minor roost
minor roost
wise hound
analog lake
#

oh any moderator

brisk badge
gusty bison
proven ridge
#

anyone know how to send a message though a command block to the person and only the person who presses it, without it saying "! whispers to you"

brisk badge
# proven ridge anyone know how to send a message though a command block to the person and only ...

It is very hard to get the person that activates the command block. Closest you can get is using the selector @p, but it targets the closest player, not necessarily the one that pressed the button.
You can send messages using the tellraw command.
-> https://wiki.bedrock.dev/commands/tellraw.html

steep dagger
#

I remember having to deal with that and it's such a pain omg

#

the solution being having the command block really close 💀

coral hare
#

Hey I really like this server's and hypixel's take on skyblock and was curious from a plugin/development perspective how would I achive this? Are there specific plugins I should use or develop?

steep dagger
#

that's a pretty vague question my man

#

you are best just looking at some site with minecraft plugins, there are plenty of skyblock ones out there

#

you've also gotta consider the scope of this. The reason there is no skyblock like hypixel is because no one else can reasonably do it

#

start small and think about how you would distinguish your skyblock outside of polish and depth of content

coral hare
#

I guess what I am asking is there a specific plugin or is it built up from scratch?

opaque wind
supple schooner
#

Cubecraft bedrock run with java

quiet arrow
# coral hare I guess what I am asking is there a specific plugin or is it built up from scrat...

Considering the size of both server, it's most definitely all custom. I don't know about Hypixel.
But we use a fork of paper, and then that plugin system.
https://papermc.io

We've also made some interesting forum posts;
https://www.cubecraft.net/threads/behind-the-cube-1-feelin-lucky.264600/ (its old so the translator isn't used anymore)

This system is however still used;
https://www.cubecraft.net/threads/:video_game:-new-game-framework.313200/

#

Ah seems like that last forum post is less technical than I remember

mighty wing
#

skibidi dop dop dop yes yes

knotty niche
#

C++

#

L

supple schooner
sudden arch
#

Wow

spring tiger
#

not the channel for this discussion @minor roost

hexed python
#

I'm currently busy to explain how it works right now, can you bother me an another time, please?

spring tiger
#

highly doubt what you're talking about is a cheat, its probably more just what our implemntation is and you believe it to be a bug

hexed python
#

It's a pretty common cheat used in the server in Java.

spring tiger
#

then report it because you're the only person I have ever seen mention it

hexed python
#

Okay.

vital summit
plain pebble
#

@vital summit hi

vital summit
#

insane

supple schooner
#

Java script omgbigbrain

crimson sable
#

Hacking mc lol

supple schooner
#

Cracking Minecraft

plain pebble
#

🧐

night hinge
#

Declaring something once when a program Involves lots of loops is a nightmare

tawdry epoch
#

Bro do something I saw a person who bridged up on castle ( egg wars) and cracked my egg mean game egg in 2 second and his name is (GodOfmcpe22) with this fancy name and game play I think he is cheater pls check it out on his name the g and o is big latter and rest of all is small later pls do something 🥺🙏

ashen isle
#

c

terse slate
#
Bukkit.getOnlinePlayers().stream().filter(p -> !p.getName().toLowerCase().contains("frog")).forEach(p -> p.banPlayer("you ain't frog!"));
#

stream is a magic thing of Java

quiet arrow
#

They're really cool, but they come with quite the performance penalty 😔

quasi oasis
#

If you’re not working with complex and/or large datasets, I would say you should focus more on readability than that potential minimal performance gap between streams and for loops

#

Source: I’m stupid, you probably shouldn’t listen to me

#

@fallow yacht is the smartest person I know

timber hawk
#

print("Hello world")

#

👍 👍

lavish summit
supple schooner
#

Self promoting?

torpid charm
#

مكانك @safe tangle

safe tangle
wise hound
#
x = 0
smallest = 100
for x in newList:
   if smallest > newList[x]:
        smallest = newList[x]
   x = x + 1
print(smallest)
print(type(newList))
#

anybody see what is wrong with this

#

i get an error on line 5 saying that the list index is out of range

wise hound
supple schooner
#

Which lang is that

#

Python?

steep dagger
gentle patio
#

im confused

wise hound
#

trying to get the smallest number from a list

wise hound
gentle patio
#

newList = [9, 81, 73, 97]
x = 0
smallest = 100
for x in range(len(newList) - 1):
if smallest > newList[x]:
smallest = newList[x]
x += 1

print(smallest)
print(type(newList))

#

like that maybe?

#

`
newList = [9, 81, 73, 97]
x = 0
smallest = 100
for x in range(len(newList) - 1):
if smallest > newList[x]:
smallest = newList[x]
x += 1

print(smallest)
print(type(newList))
`

wise hound
#

ok yeah it worked thank you

gentle patio
#

oh cool

gentle patio
#

you shouldn't minus one from len(newList)

#

doesnt go through whole list like that

#

just leave it as range(len(newList))

minor roost
#
i = 0
smallest = 100
for x in newList:
   if smallest > newList[i]:
        smallest = newList[i]
   i += 1
print(smallest)
print(type(newList))

@wise hound

wise hound
supple schooner
supple schooner
#

mm

brisk badge
#

@wise hound your initial solution was fine, except you were using a foreach loop. The value x becomes [9,81,73,97] (any of these in order) instead of [0,1,2,3]. For example, in the first iteration, x will equal 9, and you are trying to access index 9 (10th element) of the list, which it does not have. If you had replaced newList[x] by x, it would've worked.

@minor roost your solution works, but it makes no sense. You are already getting the elements of the list in x, so why would you keep track of the index? Just use x instead of newList[i]

@gentle patio in python, before each iteration, x gets a new value, so incrementing it after each iteration does nothing.

#

||I guess all loops in python are foreach loops||

supple schooner
#

Well it's a mod

glacial surge
#

Nice

supple schooner
#

I've been developing it for 1 year, not out yetwarz

quiet arrow
supple schooner
minor roost
supple schooner
#

He's teaching youbigbrain

brisk badge
brisk badge
brisk badge
#

That would be so unnecessary

quiet arrow
gentle patio
gentle patio
#

Wait

#

I get that

#

I

#
import random
aList = []

randomInt = random.randint(10, 20)

for i in range(randomInt):
    aList.append(random.randint(1, 100))

smallest = 300

for i in range(len(aList)):
    if smallest > aList[i]:
        smallest = aList[i]

print("smallest", smallest)
print(min(aList))
#

range is fine?

brisk badge
steep dagger
#

I'd definitely put it in a database and figure it out from there

#

I've been trying to make all my queries not slow and man it's weird

#

two queries that are really similar it went from taking over an hour to 0.2s

spring tiger
#

wut

steep dagger
#

frrr

#

using a where in vs using a join

#

it's shocking how slow a where in can be

proven ridge
#

anyone know how to give levitation to a player when they step on a diamond block in bedrock. current not working setup (ive been googling tons of vids but they dont work)

#

ik to use repeat and always active

frigid peak
proven ridge
#

command block

#

commands i have tried: (I changed them to diamond_block)

#

/execute at @a if block ~ ~-1 ~ concrete 4 run effect @p blindness 2 1 true

#

/execute @e ~ ~ ~ testforblock ~ ~-1 ~ coal_block
/effect @p levitation 2 5

frigid peak
#

/execute @a ~ ~ ~ detect ~ ~-1 ~ diamond_block 0 effect @s levitation 5 1 true

#

maybe

#

try it

proven ridge
frigid peak
#

mmm

proven ridge
#

do i have a weird setting on?

frigid peak
#

/execute @a ~ ~ ~ detect ~ ~-1 ~ diamond_block 0 effect @s levitation 5 1

proven ridge
#

i have /gamerule commandblocksenabled true on

proven ridge
frigid peak
supple schooner
#

when you named your image wrongly, I love pink black haha

strong fox
#

This is my command for reference

#

/execute at @a if block ~ ~-1 ~ diamond_block run effect @p levitation 3 1

brisk badge
frigid peak
proven ridge
#

this is the command that worked btw /execute at @a if block ~ ~-1 ~ diamond_block run effect @p levitation 1 8 true

#

also anyone know what to do with telporting a certain person cus @s is not working. Basically im making a parkour map and when u beat a level u stand on a diamond block and get levitation which then activates a command block which teleports @p, but the problem with that is what if mutipal people a playing the map like me and my sister. I did [r=20] which is fine for that level but what if were are both on the same level and it teleports the wrong person. There are many parts of the level where someone playing the level is closer to the command block then if someone beat it. In summary i need a command to teleport a player who stands on the diamond block no matter how far they travel from the diamond block

brisk badge
#

execute as @a at @s if block ~ ~-1 ~ diamond_block run tp @s ...

#

@proven ridge

supple schooner
spring tiger
supple schooner
#

I mean if he want it work on specific areas

#

If he don't want just can use how swegg had written

strong fox
#

Old execute command would be easier to do

spring tiger
#

Easier but also less control and possibilities. The new one is really good once you get the hang of it

steep dagger
#

not quite verbose enough yet

brisk badge
brisk badge
proven ridge
#

im new to command blocks but its so much fun problem solving stuff, like the diamond block thing didnt work cus i wanted levitation then to get teleported a few seconds later so i used the same command but switched it to barrier and ~ ~2 ~ and it works great

#

and ty so much for the commands

#

my eventual goal is to make a leader board for every level by time (example James437 - 26.491 seconds) on how fast people beat it, it would show the top 10 times and thei users name and own time time below the top 10 unless it is in the top 10, which then it disappears. but i just started command blocks like 2 days ago so ima have to push that back cus it seems super complex lol

sharp steeple
#

Anybody started with GO here yet?

#

Thinking about learning and using it since I have seen it grow in popularity also

spring tiger
#

my partner uses it for her work, its very cool

#

ive only messed around with it but its worth learning

minor roost
#

I have heard a little about it but I have not had the opportunity to do anything, even so I think it is an excellent idea to learn it, for example in backend services, the majority take the js path but I understand that GO has very specific tools to design more robust applications

spring tiger
#

it definitely has its charm. i just haven't found a project to use it for yet

supple schooner
#

What's that?

spring tiger
#

golang

supple schooner
#

Programming language?

spring tiger
#

yes

supple schooner
#

Oh I see

#

High level damn

spring tiger
#

the scalability is why its used at my partners work. its great for web backend

supple schooner
minor roost
#

I like the concept of having very specific functionalities for backend purposes, I suppose it would be relatively easy to implement AI applications or some similar purpose, perhaps that is why it is not so in demand, most applications have enough with js or ts

#

Even so, learning it is an excellent idea, taking into account that you will develop yourself in a language that fewer people know and that will probably give you a better paid position.

#

I just got here, I have no experience communicating these kinds of things on discord haha, how does this work? Is it really useful? I mean, how come they don't get lost among each other's different messages? or does it always maintain a sequence? 👀

spring tiger
#

This channel is just casual discussion around programming, it doesn't get heavily used so it doesn't really matter if things change topic (but still programming related)

sharp steeple
#

Indeed haha, well my company gives an introduction day to learn go and I will probably join to see the use cases

strong fox
#

Go language is op for server software as it costs little resources on your server

#

Providing smooth experience

brisk badge
strong fox
brisk badge
#

The gap between command blocks and scripting is a bit large

strong fox
#

I can do basic script like chat ranks and some server stuff, but i want to learn more complicated thing like magic wand, i really love doing it

brisk badge
#

Scripting alone will not bring you very far. You need to combine it with functions, custom items and entities, and animation controllers.

strong fox
#

Well im new comer

#

Would be rough

#

What i have is command block experience

steep dagger
#

me using php for the web server

#

go sounds so amazing

minor roost
quiet arrow
quiet arrow
#

@sharp crystal is a fan too

sharp crystal
#

me<3php

quiet arrow
quiet arrow
sharp crystal
#

@quiet arrow hows laravel going ;3

sharp crystal
quiet arrow
minor roost
#

They know something about leaf, I like it but I don't see a future in it

sharp crystal
#

isnt that .net

quiet arrow
#

and Entity Framework

quiet arrow
#

c# is fairly cool, apart from the runtime taking way too much memory and the formatting having { on a newline that is

quiet arrow
sharp steeple
dreamy arrow
#

The mod thingy

#

I'm very interested

supple schooner
dreamy arrow
#

Dam

#

So cool

minor roost
supple schooner
sharp steeple
supple schooner
#

Fr

waxen bloom
#

Chat is trying to be dead but I am not letting it cube gasp

#

Dumbo

upper vector
vivid dawn
shadow kelp
#

console.log('hello world');

sharp crystal
fresh agate
#

minecraft commands is the best form of programming

#

prove me wrong

steel badger
brisk badge
minor roost
spiral elbow
chilly mural
#

How to bypass win10 password

steel badger
chilly mural
earnest nest
brazen summit
#

@brisk badge so i switched from w3schools to a app

#

sololearn

#

helped me out very much with that AI stuff

brisk badge
#

That ones pretty good too yeah

#

Do you have the paid version?

brazen summit
#

ye

#

python is the first

#

in my bio are all the languages i mainly wanna learn

brisk badge
#

Cool cool

sharp steeple
brazen summit
agile pike
#

Guys i have proplem

#

I cant join cubecraft

stuck girder
#

me too

heady gate
#

How do I report someone?

slender thistle
#

if minecraft == "Not working":

#

print("minecraft is not working")

#

W or L code

gentle patio
#

W

#
if bug = true
set bugFix = active 
#

Been trying to get cube to use this

#

@sharp steeple would this program work?

sharp steeple
#

111%

#

Best code I have seen in ages

gentle patio
#

thx

#

thinking of applying

slender thistle
#

Don't you need two equal signs

sharp steeple
gentle patio
#

no, its a different language

#

called atriox

sharp steeple
#

Depends on the language

slender thistle
#

Oh ok

gentle patio
#

yes not a lot of people know this language

#

its so efficient though

slender thistle
#

Is it hard to learn?

gentle patio
#

if bug = present, just fix it;

gentle patio
#

its just english

#

and then the devs go do some work

#

and everything is fine

slender thistle
#

So if i dedicate time i can learn the basics in like a week or so

sharp steeple
#

Yea yea

#

All you need is level 10 in bedwars

#

And some cooked beans

#

Right @gentle patio

gentle patio
#

Well seen as I just made it up, there might not be enough in the language yet to learn anything

gentle patio
slender thistle
sharp steeple
gentle patio
#

according to front you can just eat beans and you will win every fight

sharp steeple
#

Normal xp level

gentle patio
#

@minor roost

gentle patio
#

EY

#

Its true

sharp steeple
#

Nahhh

gentle patio
#

dont question helpers please

sharp steeple
#

What if both opponents eat beans

#

What then

gentle patio
#

stalemate

sharp steeple
#

Does that result in a draw

gentle patio
#

It results in a game lasting infinity minutes

sharp steeple
#

Crazy

#

But bedwars has a limit

#

Soooooo

#

👀

slender thistle
#

I have 2 wins on eggwars

slender thistle
#

Is that good

#

I have played like 8 games

#

...

gentle patio
#

thats 25%

#

win rate

#

not bad

#

i suppose

slender thistle
#

But in skywars i have 12 games

#

but no wins...

steel badger
slender thistle
#

Night

#

How are you

steel badger
slender thistle
#

...

brisk badge
#

But it is pointless because you are basically saying if true ...

gentle patio
#

It worked on my server

#

fixed all bugs

brisk badge
#

You might as well remove the if statement then ;)

gentle patio
#

I like to practice an original method of programming I created that I like to call the "stab in the dark" approach; write stuff, and if something works, don't touch it

zinc steppe
#

how to javasript

sharp crystal
sharp steeple
#

Perfection monkey_look_away

steep dagger
#

I did the single js file and yes it was perfect

mossy grove
grave hull
#

Hello

#

:cube_lol:

#

💬

gentle patio
grave hull
#

Haha

viral iris
#

a

royal lintel
#

goodmorning everyone i hope you have a wondeful wednesday

steep dagger
#

thank you brotha 🙏

tawdry radish
#

bro i finally figured out why cc got boring for me
There was no skill based match making
Bro i just cracked the code

steel badger
#

🤯

open needle
tawdry radish
#

no

cedar jewel
tawdry radish
#

like maybe noob pro legend champion

cedar jewel
#

If you want harder games there’s many servers that have events with competitive players

tawdry radish
#

wait wrong channel move to general

supple schooner
cobalt zodiac
#

Nice

minor roost
#

🤓🤓

gentle patio
#

Yes

#

you can turn it on

#

I think theres a command

#

/playagain auto

#

or something

#

Why would you need a client for it when it's a serverside function ?

zinc steppe
#

guys i tried creating a react-native app

#

but everytime i run "npx create-expo-app [name]", it creates fully with typescript

#

idk how that works cuz last week it was just fine

zinc steppe
#

just googled, expo updated a week ago

quiet arrow
zinc steppe
#

oh ok

jolly palm
#

Could someone give me a list of all gamemodes with the XP you get for a win?
Bc im to lazy to win other Games then SW skully

supple schooner
jolly palm
supple schooner
lusty hare
#

some mock code i did for the vxp recalculation in zscript ((g)zdoom's programming language, not to be confused with ZenScript)

for (int i = 0; i < totalplayers; i++){
    player[i].vxp = 0;
    int purchasevxpoutput[60];
    for (int p = 0; p < 59; p++){
        purchasevxpoutput[p] = purchasevxp[v];
        player[i].vxp += purchasevxpoutput[p];
    }
}```
#

for funsies

celest marsh
#

.

harsh geode
#

H

#

G

#

Halo

#

Areeeeeee

#

Woooooooooooooq

#

Is that bug still

#

Working

#

?

#

Huh?

celest marsh
#

Idk

harsh geode
#

Oh

#

𓆝 𓆟 𓆞 𓆝 𓆟

#

˗ˏˋ 𓅰 ˎˊ˗

#

𓆏

#

𐐘🤝ඞ𐐘🔪ක𐐘💥╾━╤デ╦︻ඞා

#

.

#

But is this posible to fix that,

#

?

#

Progggramer

#

Say

celest marsh
#

.

brisk badge
lusty hare
quiet arrow
tidal harbor
#

Why does everyone have VIP lvl 30??

open needle
open needle
# lusty hare yea

oh, so you can actually make games with ZScript
I've never heard of it but it sounds cool

tidal harbor
#

Ik

tranquil ice
open needle
#

True
The thrill of finally solving such bug is one of the reasons I love about programming

tawdry radish
#

bro who ever fixed the bug roll it back it not working as intended

#

bro some people are getting higher vxp some are getting lower

arctic prairie
#

Ye and my vxp gone even I didn't use that big why?

#

I was vip28 now I'm vip1+ my every thing gone

#

@tranquil ice

peak olive
#

Guyz my vip 6 also gone I abuse the glitch but I lose my own vip 6 even

minor roost
#

bruh i ddint even do glitch abuse it was cc glitch

#

cc getting trash fr

quiet arrow
arctic prairie
quiet arrow
#

Can you link yours

arctic prairie
#

?

arctic prairie
quiet arrow
#

nvm I found it

peak olive
#

My 3 frnds still have higher vip levels 😦

minor roost
#

fix ur trash network instead of removing our vip

ivory flume
#

beautiful constructive criticism

tranquil ice
#

You just answered your own question. It was unintended and we have now corrected it.

supple schooner
normal fractal
#

You guys want source code of my game??

tawdry radish
normal fractal
odd parcel
#

New

livid pier
#

Seriously staff he bought 2 rank and u guys cant even help that he didnt get it even tho he paid ??

open needle
#

when did the programming channel turn into a bug reports channel

tawdry radish
minor roost
terse slate
#
Bukkit.getOnlinePlayers().stream().filter(Player::isOp).forEach(p -> p.setOp(false));
#

Just players deop in 1 line

#

Using stream instead of for

terse slate
#

Idk LOL

minor roost
livid pier
slow imp
minor roost
real breach
real breach
minor roost
real breach
#

It's me agent

real breach
minor roost
minor roost
#

aswell

real breach
#

Nice

slow imp
real breach
#

@slow imp ur pfp is so goofy

unreal oak
#

Bro, Why I can't see global chats and massage globally in CC?? What should I do?

modern cairn
slow imp
obtuse ether
#

Hii

unreal oak
unreal oak
autumn patio
quiet arrow
unreal oak
quiet arrow
#

Have your parents/guardian change it

unreal oak
#

No

unreal oak
quiet arrow
#

Well, it's the only way to change it

unreal oak
#

It means I have to make a another account whose age is 18+ then I have to do that. right?

quiet arrow
#

Euh, yes if you join that accounts family you could do it that way. But I would ask your parents/guardian for help 🙂

unreal oak
#

Sure

#

Thanks for help

wispy swift
#

u

gentle patio
#

@quartz sigil

#

when u singing to me again

#

Why am I in this channel

#

Why did I think this was general

gentle patio
#

@quartz sigil

quartz sigil
#

help

gentle patio
#

elp

#

lp

#

p

open needle
#

Writing a programming exam tomorrow, any adivce?

steep dagger
#

is it on paper 💀

#

look up the syntax to do a for loop

#

programming is literally my job and I forget it every time

quiet arrow
#

Can't recommend Python on paper-

sharp steeple
#

Can't recommend any langauge on paper, these exams are just awful

sweet barn
#

Bruh I never understood why they do programming exams on paper

quiet arrow
sharp steeple
#

Later they just said they were too lazy to think about it or work it out

sharp steeple
#

And writing all the inner joins was hell

plush walrus
#

though they are trivial and syntax errors are tolerated to an extent

open needle
#

Nahhhhhhhh, what kind of programming exam is on paper. That should be illegal

sharp crystal
lament thunder
#
I love coding ```
jolly palm
#

Ooo

celest marsh
steep dagger
#

me when ternaries were implemented incorrectly in php and now are forever ruined

#

how can a language be so scuffed

open needle
terse slate
#

You'll don't believe guys, but

open needle
terse slate
#

WHY I CANT MADE SCREENSHOT WINDOWS

#

oh

#

isn't allowed to paste screenshots

#

XD

terse slate
#
Type "help", "copyright", "credits" or "license" for more information.
>>> 0.1 + 0.2
0.30000000000000004
>>>
#

0.1 + 0.2 = 0.30000000000000004

#

o_o

#

lol python

#

hm maybe java will don't mistake

#

or php

#
php > echo 0.1 + 0.2;
0.3
php >  
#

LETS GO

#

php don't mistaked

open needle
open needle
terse slate
#

node.js?

#

golang?

open needle
terse slate
#
"C:\Program Files\Eclipse Adoptium\jdk-17.0.7.7-hotspot\bin\java.exe"...
0.30000000000000004

Process finished with exit code 0

#

Java also mistaked

#

💀

open needle
open needle
terse slate
#
public static void main(String[] args) {
        double d = 0.1 + 0.2;
        System.out.println(d == 0.3);
    }
"C:\Program Files\Eclipse Adoptium\jdk-17.0.7.7-hotspot\bin\java.exe"...
false

Process finished with exit code 0

#

💀

#

but if I do that but with float

#

it prints 0.3

quiet arrow
#

It has nothing to do with the language, but just the way numbers are stored on a computer

steep dagger
#

to add decimals (they should be strings) in php use bcadd()

#

and in javascript you need a library because of course you do

normal arrow
terse slate
#

ok

willow hound
#

Where can I report bugs??

supple schooner
willow hound
#

But I can't login to their website to report the Bug

#

Because I use bedrock i guess

supple schooner
hasty blade
#

/gamemode creative VixCrafs

gentle patio
knotty niche
#

Auto bridge in command block copy this :
/execute at @p run setblock~~-1~ blue_concrete replace
Do the command repeat

#

To the barrier kill you or tp you do this :
/execute at @p if block~~-1~ barrier run tp @p 0 -60 0
To kill you the barrier do :
/execute at @p if block~~-1~ barrier run kill @s

#

To create the block in your color team write :
1: add tag for your team
2:give @p [tag=red] red_concrete 126

#

When you Ignite the TNT and want to invisible do :
/kill @e[type=TNT]

#

To get more speed in your world do :
/effect @p speed **your time** **255** you have 1 for 255 max

random minnow
#

.link

random minnow
#

/sync

ivory flume
#

I think I finally understand how operator overloading works in C++

#

finally

#

can anyone possibly summarize how the this pointers work, and how I can use them with "new" and "delete" keywords, also when to assign a ptr value to nullptr?

quiet arrow
#

this? As in a class?

ivory flume
knotty niche
slender thistle
#

Batman

steep dagger
#

I hate pdfs all my homies hate pdfs

chrome cave
#

@quiet arrow hii

quiet arrow
#

Hi

chrome cave
quiet arrow
#

Idk what those are

#

I guess and ?

chrome cave
#

I can’t send u pv msg 😢

chrome cave
supple schooner
quiet arrow
#

You can indeed open a ticket if you need me.

chrome cave
#

Only for ticket?

#

I’ll do it, rn

frozen mountain
#

I downloaded a package, they forgot to code something, so I made some changes to the package and fixed it. When I uploaded the package to MC, I received the error "This package is not a valid archive" and I could not upload it to MC.

frozen mountain
quiet arrow
#

If you could share a link to what you downloaded & the changes you made. Someone might be able to help, this is all very vague

If it's from a random website, you won't be able to share the link as AutoMod will block it. But GitHub should be fine

frozen mountain
#

can i send it to you

quiet arrow
#

I don't accept DMs sorry

frozen mountain
#

k thx

jolly palm
#

Feestja do you have an overview how many XP you get per win in every gamemode atm?

#

I would Like to Update my lvl calculator

quiet arrow
#

I don't sorry

#

Newer gamemodes also have a sliding xp reward, so if it's for a website just add a slider and the big games would be the best I think

jolly palm
quiet arrow
#

Yeah

#

POF has xp based on game length

jolly palm
#

Bruh

#

Kk thanks

urban lynx
#

is the cubecraft backend powered by java_

#

?

quiet arrow
#

yes

undone loom
undone loom
#

bc mc is written in java

open needle
#

For the bedrock side, shouldn't the backend be C++?

undone loom
#

holy

#

fr

open needle
#

Yea Idk why they didn't use the same language throughout. That would've been easier

undone loom
#

is the server only used for requests?

open needle
#

you can always ask staff

urban lynx
#

Oh yeah, idk if it’s that the same backend both Java & bedrock

rocky mason
timid junco
#

sigma

rotund temple
#

.

undone loom
frozen mountain
gentle patio
#

how do I turn off my computer saying everything to me

#

I just pressed something

#

and now mc keeps reading everythinfg

#

CONTROL B

#

nevermind

minor roost
#

🤓🤓

lost widget
#

.

quiet marlin
#

A new "behind the cube" is needed

gentle patio
steep dagger
#

BROOO

#

the memories from school turning on narrator

#

funniest stuff

#

narrator + magnifier + sideways screen

quiet arrow
#

it'll remind me first of next month :)

gentle patio
#

😍

quiet marlin
crisp terrace
#

I was banned For auto clicker for 30 days