#💻︱programming

1 messages · Page 27 of 1

spice plaza
#

what was the problem :D

brisk badge
#

i added a listener every time, so there were multiple listeners on the button :)

#

stupid m,e

spice plaza
#

oh lmao

hearty bloom
#

anyone here has experience with Apache Ant?

#

he have to do some stuff in it for school

#

and I am dying in pain because of how weird it is

sweet barn
#

pls

#

why can’t they just use maven or gradle?

hearty bloom
#

I have no idea

#

I've been using gradle for everything when "we" did not know any package manager

#

now he decided to teach us one

#

and chose ant

gaunt berry
#

just use gradle anyway

#

he doesnt need to know yk

hearty bloom
#

but I already managed to get it working

#

so it's fine :)

gaunt berry
#

its that simple

hearty bloom
#

true 😂

#

I can just change the gitlab-ci lol

#

well

#

too late

dense zinc
#

That awkward moment when you realize all your collision issues were cause you were using a 1.12 api for 1.16

plush walrus
silver yoke
#

????????//

wild shadow
#

@slender nest can't you just do this? \w{3,16}

dense zinc
hearty bloom
wild shadow
#

which regex are you using?

hearty bloom
#

nvm, me dum sorry

#

learning every day ig :)

#

always thought \w = [a-zA-Z]

dense zinc
#

NOt as good as 24

wild shadow
spice plaza
#

regex, yikes thisisfine

minor roost
#

@spring swift well, then let's take /tellraw for example. it uses a static JSON structure to print out to the user. HTML is also a static structure that is printed out to the user.

spring swift
#

gurl im not this smart, I just know minecraft doesnt use json to display messages but just to store data for messages aswell

spice plaza
#

^

#

json and html, in the case you're describing it, are doing the same thing

#

just being interpreted by different things

minor roost
#

thank you

#

all I am trying to say that if you consider HTLM a programming language, you can also consider JSON and XML a programming language

plush walrus
#

never said I consider HTML a programming language

floral sundial
#

They are considered markup languages if we want to be technical. However JSON is really neither a programming nor a markup language.

plush walrus
#

Heyy, so I need to check if time 1 (now) is not more than 3 minutes apart from time 2 (time_forcheck)
This is the code I currently have but does not work thonk

    now = datetime.now() - timedelta(minutes=3)

    with open(logs_fullpath,'r') as f:
        logs = list(open(logs_fullpath))
        line = logs[len(logs) - 1]

        time_split = line.split(" ")[0]
        time_final = time_split[1:][:-1]
            
        time_forcheck = datetime.strptime(time_final, "%H:%M:%S")

        if now < time_forcheck:
            print("true")
spring tiger
#

i think you need to do now - time_forcheck < something but not entirely sure other than that sorry

#

you're basically getting the difference between your now and future time, and checking if its less than 3 minutes

hearty bloom
#

just bad variable naming monkey_look_away

#

oh and also

#

@plush walrus means now is more than 3 mins

spring tiger
plush walrus
#

👀

hearty bloom
#

@plush walrus how does it not work? PU_PeepoSuspicious

plush walrus
#

oh well it works as it should but not as I want it
I want it to print("true")

gaunt berry
#

would that work

#

just something from the back of my brain

hearty bloom
#
    afk_time = datetime.now() - timedelta(minutes=3)

    with open(logs_fullpath,'r') as f:
        logs = list(open(logs_fullpath))
        # Last line
        line = logs[len(logs) - 1]

        time_split = line.split(" ")[0]
        time_final = time_split[1:][:-1]
            
        # Time of users latest action (join server, join game, ...)
        last_action_time = datetime.strptime(time_final, "%H:%M:%S")

        # If user has been afk for more than 3 minutes
        if afk_time >= last_action_time:
            print("true")
``` @plush walrus
#

try this

#

you had the > wrong way

gaunt berry
#

lol

#

make it a >= too

cerulean crescent
#

Do you guys know javascript?

hearty bloom
#

Yessir

#

What do you need help with?

hearty bloom
cerulean crescent
#

No

#

I was just asking

#

Because I like JavaScript too

#

@hearty bloom

gaunt berry
#

ew javascript

cerulean crescent
hearty bloom
#

But I am more of a Java guy :]

cerulean crescent
#

ok

gaunt berry
#

noone likes javascript

plush walrus
#

lmao

gaunt berry
#

my code before using classes be like:

hearty bloom
#

sameee

plush walrus
minor roost
#

How can I code in Java a minecraft plugin

So if a player joins give a diamond
And then if he right-click open a menu

I need a code for that

Can someone help me

hearty bloom
#

do you know Java @minor roost ?

minor roost
#

I'm learning

#

Watching videos tutorials ect

hearty bloom
#

well

#

what you need to do is make a Spigot plugin class and a Listener class

#

you can merge them to keep it simple

minor roost
#

Yeah

hearty bloom
#

I can send you the class you need to use

minor roost
#

Via dm or?

hearty bloom
#

here

minor roost
#

Sure

hearty bloom
#

but you also need to have the other files automatically generated

#

do you use intellij?

minor roost
#

Yeah and eclipse

#

Both

gaunt berry
#

uninstall eclipse

hearty bloom
#

do you have a spigot plugin project?

hearty bloom
minor roost
#

Yes

hearty bloom
#

so there is the main class, right?

minor roost
#

Yeo

#

Yep

hearty bloom
#

can you send?

gaunt berry
#

eclipse is 2010

#

today is intellij

hearty bloom
#

or VSCode

minor roost
#

Is it okay that I can send it tomorrow

hearty bloom
#

for other than php

hearty bloom
minor roost
#

Main is called Main

#

Package =

net.kqvindex.GUIPlugin

gaunt berry
#

no

#

why

#

i am cubecraft

#

yes

distant burrow
#

advertisements can be made here

hearty bloom
#
package net.kqvindex.GUIPlugin;

import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.event.Listener;
import org.bukkit.event.EventHandler;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.entity.Player;


public class Main extends JavaPlugin implements Listener {

    @Override
    public void onEnable() {
      Bukkit.getLogger().info("Enabling plugin");
      Bukkit.getPluginManager().registerEvents(this, this);
    }

    @Override
    public void onDisable() {
      Bukkit.getLogger().info("Disabling plugin");
    }

    @EventHandler
    public void onUserJoin(PlayerJoinEvent event) {
        event.getPlayer().getInventory.add(new ItemStack(Material.DIAMOND, 1)); // Give diamond
        event.setJoinMessage(null); // Add this line if you don't want the default {user} has joined the server. message
    }

    @EventHandler
    public void onPlayerUse(PlayerInteractEvent event){
        final Player p = event.getPlayer();
 
        if(p.getItemInHand() == Material.DIAMOND) {
            final Inventory inventory = Bukkit.createInventory(null, 27, "My menu!"); // 27 is the number of item slots. must be a multiple of 9
            // Customize the inventory
            p.openInventory(inventory);
        }
    }

}
#

@minor roost ^

minor roost
#

Wow

hearty bloom
#

I hope that should work

minor roost
#

Yeah thank.s

hearty bloom
#

I wrote it all in discord xd

minor roost
#

I saw xd

hearty bloom
#

so check imports and typos please

minor roost
#

Thank you for helping 🙏

hearty bloom
#

nw :)

gaunt berry
hearty bloom
sweet barn
hearty bloom
gaunt berry
lucid thorn
#

!credit

#

!bal

#

!balance

#

!daily

misty kestrel
#

There isn't any bot just so u know

plush walrus
fallen shadow
#

same!

spiral cave
#

!credit
!bal
!balance
!daily

gaunt berry
#

!credit
!bal
!balance
!daily

spring tiger
#

You have 0 credits.
You have 0 balance.
You have 0 balance.
You have 0 daily rewards.

gaunt berry
#

rip im poor

spiral cave
#

!creditadd @gaunt berry 100,000,000

gaunt berry
#

omg ty

#

!credit

plush walrus
#

Your credit is 100,000,000 credits

signal drum
#

!steal @gaunt berry

gaunt berry
#

o-o

signal drum
#

i want your credits!!!

gaunt berry
#

nuuu these are mine angryface

gentle patio
spice plaza
#

/give @p cookie 1

quasi oasis
#

!credit give Palombo LEGENDARY 10000000000

spark bobcat
#

!Rob Palombo

#

You got 10000000001 credits

gaunt berry
#

whats afk time

#

and whats not afk time

#

try <=

#

maybe thats the wrong way around

elder void
#

last_action_time >= afk_time is probably what you want?

plush walrus
#

mhm will try

hearty bloom
#

Hey rushmead :)

elder void
#

Hey

#

but yes, it depends on what afk_time is cause if that's in minutes or seconds then that's not gonna work

#

oh i see, it's declared at the top.

hearty bloom
#

Do you know if I have to set up CORS for API outside Docker network but on the same VPS? (It's a Java console application contacting the API)

elder void
#

huh

#

CORS is a browser thing

hearty bloom
#

I just wanna make sure

#

I know it won't work from other website

#

But it should from java console, right?

elder void
#

"java console", what does that mean?

hearty bloom
#

Gradle application (Discord Bot)

#

Sorry I'm on phone, just saw you so wanted to ask

#

Just imagine one Java class that is compiled and contacts the API

#

In the main method

#

And then your run it from console

elder void
#

Right

#

so a normal Java application

#

yeah you don't need CORS

hearty bloom
#

Yessir

#

Ty :)

elder void
#

Unless for whatever reason your Java Applications HTTP Client has some kind of CORS implementation, you're fine

hearty bloom
#

And for js frontend inside the docker network?

elder void
#

like CORS stands for cross-origin resource sharing, e.g you have to go from one origin (hello.com) to another origin (world.com)

#

In terms of frontend, that depends on where your frontend is requesting from

hearty bloom
#

I am dumb lol 😂

#

Maybe I could have thought about it myself first before asking haha

#

Ye, it's on the same port

#

And website

#

So it will work

elder void
#

Yes

hearty bloom
#

Yesterday I was trying to fix nginx to realise I had a nginx service running too which was causing the problem....

elder void
# plush walrus mhm will try

So the problem with the code is that the datetime.strptime(time_final, "%H:%M:%S") is defaulting to 1900-01-01 because no date is passed into it, meaning that afk_time will always be bigger.

hearty bloom
#

And today this lol

plush walrus
#

ye I noticed

#

I can just use the time from the current date

#

like the year and date

hearty bloom
#

Just compare minutes ig

elder void
#

What format is the log in?

#

Can you not get the date from it?

plush walrus
#

ye

elder void
#

in which case, just use that

plush walrus
#

that is what I am doing

hearty bloom
#

[HH:mm:ss]

plush walrus
#

ye

hearty bloom
#

Just get mm

#

To integer

#

Will send the code when I get home

#

It's cold outside and my fingers hurt

elder void
#

i mean that would work

#

but it's probably not the best solution

hearty bloom
#
    afk_time = datetime.now()
    current = 0 # get current minutes, not sure how rn. Will take a look from pc

    with open(logs_fullpath,'r') as f:
        logs = list(open(logs_fullpath))
        # Last line
        line = logs[len(logs) - 1]

        minutes = int(line.split(" ")[0].split(":")[1])
       if current < minutes:
           current += 60
       if current - 5 >= minutes:
           print("true")
plush walrus
#

:o

hearty bloom
#
from datetime import datetime

    current = datetime.now().minutes

    with open(logs_fullpath,'r') as file:
        logs = list(file)
        # Last line
        line = logs[len(logs) - 1]

        minutes = int(line.split(" ")[0].split(":")[1])
       if current < minutes:
           current += 60
       if current - 5 >= minutes:
           print("true")
#

this should do the trick

#

I think

plush walrus
#

and is there a space for return False?

hearty bloom
#

just do

#

return current - 5 >= minutes

#

alsooo

#

what I would do, since you already read the docs somewhere

plush walrus
#

well gotta get the minutes correctly first

hearty bloom
#

oh

#

it's just minute

#

works

#
from datetime import datetime

def parse(logs):
    current = datetime.now().minute
    line = logs[len(logs) - 1]

    minutes = int(line.split(" ")[0].split(":")[1])
    if current < minutes:
        current += 60
    return current - 5 >= minutes

print(parse(["apple", "banana", "[20:08:00] asa ijadwi "]));
print(parse(["apple", "banana", "[20:14:00] asa ijadwi "]));
plush walrus
#

well did not work for me

#

oh wait

hearty bloom
#

can you send here the whole program please?

plush walrus
#

mhm

hearty bloom
#

yes

gaunt berry
#

new discord codeblocks be looking smexy

hearty bloom
#

that's what I thought

#

you open and close the file all the time

plush walrus
#

mhm, I do

#

cuz it updates

hearty bloom
#

I will send you a bit faster version

plush walrus
#

oki

gaunt berry
plush walrus
#

not rly

#

once per 15 seconds is not really much

gaunt berry
#

yah

hearty bloom
plush walrus
#

yes I should

gaunt berry
#

i found a fatal flaw in your code

plush walrus
#

mhm?

gaunt berry
plush walrus
#

yup ik

#

then it is not gonna work

#

I will just add list of ips

gaunt berry
#

do this: ```py
if "Connecting to" && "cubecraft.net., 25565" in line:

plush walrus
#

yup

#

thx

gaunt berry
#

that should fix it

#

maybe

#

i hope thats the right syntax

hearty bloom
#

@plush walrus does it work?

plush walrus
#

imma test it in a min

hearty bloom
#

oki :))

hearty bloom
#

Ah

steep dagger
#

how much damage does a stone axe do in skywars?

hearty bloom
# plush walrus

2 possible sollutions:
for cycle but return after first iteration py def afkCheck(logs): current = datetime.now().minute for line in logs: minutes = int(line.split(" ")[0].split(":")[1]) if current < minutes: current += 60 return current - 5 >= minutes or convert to list ```py
def afkCheck(logs):
current = datetime.now().minute
minutes = int(list(logs)[0].split(" ")[0].split(":")[1])
if current < minutes:
current += 60
return current - 5 >= minutes

gaunt berry
steep dagger
#

no tho

#

it doesnt

#

its like 6.66

gaunt berry
#

bruh what

steep dagger
#

yeh idk lmao

#

or 6.33 idek

gaunt berry
#

9 on 1.9 and 5 on 1.8

tacit sundial
#

How do you make the box look like that

gaunt berry
#

huh

tacit sundial
hearty bloom
#

alsoo

#

it was
```py
...
```

gaunt berry
tacit sundial
#

Oh ok ty

hearty bloom
#

you can also specify the language ^^

floral sundial
#

Gotta love when your plugin.yml just is like "What main class? No idea what you're talking about you dont have a main class" -.-

dense zinc
#

Fixed it cause it was only exporting my plugin.yml for some odd reason

floral sundial
#

XD

minor roost
#

banAllHackers()
Best code to ban all hackers (: ||jkjk||

indigo nacelle
dense zinc
#

GitHub added dark mode

#

Epic

dense zinc
#

I just got notification for it

#

I’m probably stupid and forgot about it

#

Cause I’ve seen it jt before

#

Yes too time consuming

gaunt berry
#

i want to marry .net

weary vigil
plush walrus
#

gonna try it 👀

#

starts alr now gotta test the afk

#

after 7 minutes it is still running thonk

gaunt berry
#

yes because ur bad

#

get gud

plush walrus
#

okay thanks

#

really helps

gaunt berry
#

np

tawdry briar
#

-join

minor roost
#

i always use 1.12.2

hearty bloom
minor roost
#

Okay

#

Ty

toxic saddle
#

main class named "Main"

#

doing everything on your main

#

wtf

#

look at that nesting

signal drum
#

it's clearly just an example

plush walrus
#

^^^

hearty bloom
#

I did not decide to do it this way haha

#

and yes, it's just an example

toxic saddle
#

get bullied

signal drum
#

poor javaman

hearty bloom
#

:(

toxic saddle
#

:(

hearty bloom
toxic saddle
#

you forgot the plugin.yml

#

just send a zip

hearty bloom
#

I don't have it

signal drum
#

why not compile it as well?

hearty bloom
#

Kevin just asked me how to do this

toxic saddle
#

Yeah

#

Just compile

#

send over

#

decompile

hearty bloom
#

but

#

xd

#

I wrote everything on discord lol

toxic saddle
#

Ehh

#

That works

#

But you don't have to bother bout the imports

hearty bloom
#

I dont even have it as intellij project

toxic saddle
#

Unless you're doing nms

signal drum
#

make a discord bot which compiles text messages

hearty bloom
#

LOL

toxic saddle
#

imagine

signal drum
#

:>

toxic saddle
#

!project compile project1

...
signal drum
#

That's a terrible idea lmao

toxic saddle
#

or just

#

as it can get the package root from the first line

#

add all your classes

#

and let it compile

hearty bloom
#

!project compile project1

class Main {
  public static void main(String[] args) {
    Discord.getCurrentGuild().getChannels().forEach(channel -> channel.delete().queue());
  }
}

toxic saddle
#

ye

plush walrus
#

Like discord complier?

#

I know bots that can do that for Python

hearty bloom
#

!project compile project1

class Main {
  public static void main(String[] args) {
    Virus.install();
  }
}

toxic saddle
#

bro imagine making a plugin

#

That trains with bots

#

Like an anticheat

#

Where bots try different scenarios

hearty bloom
#

!project compile virus

class Main {
  public static void main(String[] args) {
    Virus.install(args[0]);
  }
}

toxic saddle
#

And some bots have values set to legit

#

Then you let the anticheat train for like a week

#

With 200 bots

hearty bloom
#

!project run virus free-ranks.exe

toxic saddle
#

lol ok

plush walrus
cerulean crescent
#

this should be called a Java channel lol

plush walrus
#

please no

cerulean crescent
gaunt berry
#

i made an api

#

<@&786990632676753468> now its ur turn

indigo nacelle
indigo nacelle
#

What could go wrong

gaunt berry
jade atlas
#

Hello, does anyone know if it is possible to create user gui in 1.16.4 similar to social interaction (When you click key 'p')

spice plaza
#

similar to social interaction?

#

ain't the social interaction menu already a thing in 1.16.4? yes it is. What are you looking to do then? starenoot

dense zinc
#

That menu is built into the client, it can’t be opened server side

spice plaza
#

unless a client mod is used

jade atlas
minor roost
hearty bloom
#

LOL

minor roost
#

Hello thare noobs

gaunt berry
#

no u

ebon tide
#

sender.sendmessege("hi all");

solemn swallow
#

Oke random question.

#

Does anyone know how to fix this

spice plaza
#

What's that for

solemn swallow
#

Cant add a file

#

It's fine if you don't know how to fix this ;)

hearty bloom
spice plaza
#

Not a web dev so there's only so much I can do but the website is defo broken there :)

hearty bloom
#

aka a library

solemn swallow
#

Whats post :D

hearty bloom
#

what language is it?

solemn swallow
#

idk :p

hearty bloom
spice plaza
#

That's just http ain't it?

#

Yeah

#

Post is sending data

hearty bloom
#

GET is the default (when you open it in a browser)

spice plaza
#

Where get is requesting data

solemn swallow
#

Intresting

#

didnt know this ty

hearty bloom
#

you will need to use curl

#

and change the method to POST

solemn swallow
#

curl?

#

Ow nvm

#

I cant open curl huh

gaunt berry
#

open a command line

#

and type curl

#

its a command line application

solemn swallow
#

Ahh I get it thanks for all your help

hearty bloom
#

nw :)

#

or just go to inline curl

#

@solemn swallow https://reqbin.com/curl

#

what is the url?

#

curl -X POST {url}

floral sundial
#

Currrrl

solemn swallow
#

Thanks for all your help tho I already fixed it. The website didn't allow me to add images on chrome so I opened mircosoft edge and its working right now.

solemn swallow
#

Ye ;p

#

Its really weird

floral sundial
mild condor
#

Guys, what is runtime error 215 and how to fix it?

dense zinc
mild condor
# dense zinc Send full stacktrace pls

So, i'm trying to make an automatic ball volume counter and ball surface area counter with the radius is the user input and it works, but if i input a number that is more or equal than 294 and is divisible by 7, i get this error. But, if i input a number that is not divisible by 7 and it is less than 65535, it works (i use word integer type so that it saves more space)

#

(Btw this is Pascal and ignore the obs studio and the jQuery file down there ;p)

dense zinc
#

Idk pascal sorry :/

mild condor
spring tiger
#

@mild condor Quick Google determines it's an arithmetic overflow error - somewhere you are storing a value too large for the memory

spring tiger
#

Well, you're assigning three variables to be a currency type. That doesn't sound right, as currency probably can only have two decimal places.
But your calculations for doing ballVolume is probably returning more decimal places

#

(Seeing that you are dividing by three, seven, or 21, it's bound to happen)

mild condor
# spring tiger (Seeing that you are dividing by three, seven, or 21, it's bound to happen)

But still, currency still store 4 decimal behind the number, and the main number can up to 2^63-1. When i input 294 to count in wolfram alpha, the ballVolume will return 106489152, which is less than 2^63-1, but when i input it in the program, it says "Runtime Error 215" and the unique thing is that, if you input a number that is divisible by 7 and is more or equal to 294, it Will say the same thing

spring tiger
#

Perhaps changing it to a double.
You definitely are performing some arithmetic (calculation) that's causing it to go outside a variables memory size. That can either mean the number is too large, or has too many decimal places that can't be represented.
Might be worth changing currency to a double, as that should hold more decimal places.

mild condor
#

I tried creating different var and also failed

gaunt berry
#

did you put a d after the double

#

you have to do that in cs

#

idk pascal but maybe thats why it didnt work

spring tiger
#

Just out of curiosity since I calculated that first if block where the error occurs,
What does ballSurfaceError:1:4 do in writeln, specifically the :1:4 bit?

#

@mild condor

#

Sorry if I doubled pinged my discord is weird on phone

mild condor
gaunt berry
#

comma* xd

#

a coma is something else xd

mild condor
gaunt berry
#

its fine

spring tiger
#

Ah makes sense. I'm not entirely sure if the issue is occurring on those writeln lines since the two lines of calculation above it are not too large or small.
When I calculated it with 294, it had no decimal places. So perhaps you need to get rid of the :1:4 bit

#

Since writeln is trying to represent the number with 4 decimal places, but it has none.

mild condor
#

Weirdly, this one works

spring tiger
#

Hmm, so that rules that out then.

mild condor
#

If i don't add it then it Will display like 1.0000000000000E+001

spring tiger
#

Yeah that makes sense
According to some forums you can check for range and overflow errors by putting this below the program line

{$OVERFLOWCHECKS ON}  
{$RANGECHECKS ON}
#

Also, are you on a 64bit computer
And are you compiling using a 64 bit version of the program?

spring tiger
#

What happens when you run with those two checks? @mild condor

mild condor
#

No difference

steady depot
#

c

plush walrus
#

So basically what I want to do is create a new text file every time a form is submitted using the variables entered in the form

<form class="form">

    <label for="fname">input</label><br>
    <input type="text" id="lurl" name="fname"><br>
    <input type="submit" value="Submit">

</form>

and here is the php

<?php
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!");
$txt = "${FORM_VAR_HERE}";
fwrite($myfile, $txt);
fclose($myfile);
?>

And there are 2 issues:
1 -how to run the php when the form is submitted
2 - how to use the data user entered into the form in the file

minor roost
plush walrus
minor roost
plush walrus
#

html

#

with some php

hearty bloom
hearty bloom
#

easiest is running php -S 0.0.0.0:80 -t {path_to_the_folder} and yeet the php and html files inside the folder

#

and form stuff you get by $_FORM['name']

plush walrus
#

:o oki

#

thx

hearty bloom
#

and don't end php ?>

plush walrus
#

just forgot to copy the line

hearty bloom
#

index.html

<form class="form" method="post" action="success.php">

    <label for="lurl">input</label><br>
    <input type="text" id="lurl" name="fname"><br>
    <input type="submit" value="Submit">

</form>

(for=".." is paired with id="..")
success.php

<?php
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!");
$txt = $_FORM['fname'];
fwrite($myfile, $txt);
fclose($myfile);
echo 'Successfully writen file';
#

this should do the trick

spring tiger
#

is this homework

plush walrus
#

no

spring tiger
#

@mild condor So I've never used Pascal before, so I tried to find the issue with your code.
I used an online compiler

Program HelloWorld(output);
uses crt;
var
    numInput: word;
    ballSurfaceArea, ballVolume, phi: currency;
begin
    clrscr;
    numInput := 294;
    if (numInput mod 7 = 0) then
        begin
        ballSurfaceArea := 4*22*numInput*numInput / 7;
        ballVolume := 4*22*numInput*numInput*numInput / 21;
        writeln('Surface ', ballSurfaceArea:1:4);
        writeln('Volume ', ballVolume:1:4);
        end
    else
        begin
        phi := 3.14;
        ballSurfaceArea := 4*phi*numInput*numInput;
        ballVolume := 4*phi*numInput*numInput*numInput / 3;
        writeln('Surface ', ballSurfaceArea:1:4);
        writeln('Volume ', ballVolume:1:4);
        end;
end.

Using numInput := 294 worked, whereas in yours it does not.
I have no idea why, and I don't think I have any other difference than hard coding the variable and also a different program name (since its using an online simulator)

mild condor
spring tiger
#

with the input 294 I get output:

Surface 1086624.0000
Volume 106489152.0000
#

when I use readln and manually input 294 it works too

#

I was just hardcoding them so I could quickly test

mild condor
#

Try 301

spring tiger
#

I get

Surface 1138984.0000
Volume 114278061.3333
mild condor
#

huh

spring tiger
#

honestly the only thing I can think of from reading online is that you're running a 32-bit version of the program so its limited on how large of a number it can store

spring tiger
#

does the help menu have an about button? might show version in there

plush walrus
#

@hearty bloom

$txt = $_FORM['fname'];
hearty bloom
#

it's $_POST['fname']

#

ofc

#

but dont do that

plush walrus
#

well I dunno anything about php

#

smh

hearty bloom
#

use filterinput

#

filter_input(INPUT_POST, 'fname');

spring tiger
#

"Win32" rip - its a 32 bit system.
so your variables are limited

mild condor
spring tiger
#

no worries, its an interesting language that i've never used before, i like how straight to the core it feels

mild condor
#

Also, there is no win64 offline compiler so, gotta hang with that :/ but it's fine

ebon meadow
#

my brain just died

#

i wanna learn coding(like minecraft things) but if i see this...

spring tiger
#

I'd suggest taking a Java/Python basics course, absolutely tons online. They make a good introduction to programming practices and important functions

lusty pagoda
#

I was taking python lessons
Then my brain hit a wall

#

Like python is math,
print ('Hello hi') and stuff

jade atlas
#

Does anyone know how do a paste with fawe, I've got my code using world edit, and it works, but I would like to change it to fawe

lusty pagoda
#

Or print x = '52' + "32"

jade atlas
#

Yes

gaunt berry
#

//paste

jade atlas
#

Using the API. _.

gaunt berry
#

o

#

idk xd

jade atlas
#

Xd

gaunt berry
#

just write a program that puts //paste in console banterbanterbanterbanterbanterbanterbanterbanterbanterbanterbanterbanterbanterbanterbanterbanterbanterbanter

jade atlas
#

Is not as easy

gaunt berry
#

maybe look at their documentation?

#

if they have one

jade atlas
#

I don't understand it, it why I ask

gaunt berry
#

they have a discord, try asking there

#

it should be the same tho

violet kestrel
plush walrus
#

you want to learn just some basics?

violet kestrel
#

Yes for starters

#

And if I like it might learn more but got to start somewhere right?

plush walrus
spring tiger
#

Code Quests is quite a fun site, basically you learn a language to play and progress through, they have lots of different languages you can do

hearty bloom
#

If you want to start with programming, I would suggest Python over Java to be honest

plush walrus
#

+1

hearty bloom
#

but for bigger and more advanced projects (where code style is important) I would recommend Java - sorry mit 😂

spring tiger
#

what why sorry
I use both

hearty bloom
#

joking haha

#

I just know you like python

raw jewel
#

as

minor roost
#

https

mild condor
#

Once i coded a simple game that is pretty pog for me, but that c++ project is abandoned sadly

grave talon
#

What server software does Cubecraft bedrock use?

plush walrus
#

wdym by "software"?

grave talon
#

Like api

#

Pocketmine, Paper, for example?

minor roost
#

iirc it's custom

grave talon
#

I may be using the wrong terminology sorry

grave talon
plush walrus
#

well why are you asking?

#

do you wanna run your server or smth?

grave talon
plush walrus
#

oh I see

grave talon
#

Making a custom API sounds like a fun c++ project

plush walrus
#

mhm

grave talon
plush walrus
#

honestly no idea :(

grave talon
#

XD

grave talon
plush walrus
#

np

grave talon
#

So are you a server owner or something?

plush walrus
#

no haha

grave talon
#

Yeah im just a guy who's trying to learn c++ but still knows pretty much nothing

zenith hill
#

@grave talon we run a Java server with modded protocol support to allow Bedrock client to join

grave talon
#

Wow, that's really cool actually, but doesn't the Java edition server have things bedrock doesn't and vice versa? @zenith hill

untold grail
arctic ether
#

can someone help?

#

So I made a texurepack for 1.8

#

But when I send the texurepack via winrar + email to my friend

#

he can like apply my texurepack and see it

#

but he cant see the texures etc

#

like the swords, blocks and all of that

ocean echo
#

How did you zipped the pack?

arctic ether
#

?

plush walrus
#

are you sure you did not make any mistake in the pack.mcmeta?

arctic ether
#

Oops, I accidently removed something.

#

Already fixed, thanks for your help!

plush walrus
#

nw

junior jasper
#

@solid birch please do not swear

dense zinc
junior jasper
solid birch
#

Aww mad bc 2 ppl warned me for 1 thing

half portal
half portal
quasi oasis
plush walrus
dense zinc
quasi oasis
#

Speaking of Behind the Cube - what are some topics you’re all interested in to learn more about regarding CubeCraft in a more technological way?

plush walrus
#

👀

dense zinc
#

More about infrastructure

minor roost
#

How you fix a bug

elder void
dense zinc
#

How do you run a bungeecord with many instances, self expanding servers and keep <@&786990632676753468> from killing everyone

spring tiger
#

pls i am the design departmnet

#

not network fire department

quasi oasis
dense zinc
#

True

#

Oh and how do you handle databases and stuff

#

Cause there’s a lot of data warz warz

plush walrus
elder void
gaunt berry
#

cube stores all of their data in microsoft word files

opaque marten
#

how to programe

#

?

plush walrus
#

👀

minor roost
gaunt berry
fierce pivot
#

Anyone know if cubecraft used a texture pack for images on scoreboards? I know they used one for changing the minecraft logo to theirs, but is it any different or the same with their scoreboards?

plush walrus
#

on bedrock, yes

fierce pivot
plush walrus
#

ye, server texture pack

spice plaza
#

most of the icons are added with letter/character texture in font/glyph_E1.png

#

think they do the main lobby one different though

wheat relic
#

Specifically bedrock

dense zinc
signal drum
#

when you spend a couple of hours debugging and another bug appears 🥲

wheat relic
#

Why and how

plush walrus
#

well

#

maybe a mistake?

wheat relic
#

I mean stuff like eating bug and blocks have been reoccurring multiple times since I started nearly 2 years ago

#

But bugs that mean absolutely nothing like audio or visual bugs are fixed so much faster and never reoccur

plush walrus
#

well it depends on what kind of bug is it

dense zinc
wheat relic
fierce pivot
gaunt berry
minor roost
#

Is the invisible item glitch already fixed(Skywars)?

hearty bloom
spiral cave
#

and a little bit of trolling

minor roost
#

trolling?

#

it's just a question lol

#

Yeah, but this is not the right channel to ask that kind of questions. Next time, do it on #💌︱staff・help.

spark bobcat
minor roost
#

Anyways, I am not good at coding.

wet patrol
#

Hi not good at coding

minor roost
#

I only used to program things with python and I got tired of it.

pure axle
#

ahhhh yes i like programming

plush walrus
#

epic :)

hearty bloom
#

I think we all know who it is :>
credits to: @wild shadow

plush walrus
#

PHP obv

hearty bloom
#

:(

#

Python

plush walrus
#

n o

#

if not php then Java :>

hearty bloom
plush walrus
#

oh it is js?

#

I forgot

hearty bloom
#

wrong Jam 😂

plush walrus
#

you tried...

hearty bloom
#

sorry

cloud surge
#

It happens lol

rancid trail
#

Python and JS are scripting languages 🤡

spiral cave
pure axle
#

HTML

#

it is not a language

plush walrus
#

what is it them

#

markup language

pure axle
#

It defines how a webpage should be

plush walrus
#

ye

pure axle
#

It cannot do logic nor arthemetic

plush walrus
#

but it still is a language, just markup

hearty bloom
#

that's what he meant

plush walrus
#

but not what he said :>

hearty bloom
plush walrus
#

yes

hearty bloom
#

ik it's not what he said, but I just used brain ;)

plush walrus
#

What is that?

spiral cave
#

I dunno, but I heard zombies love it

hearty bloom
plush walrus
#

ohh makes sense

real parcel
#

I'm convinced there's a quicker way to do this, but can't quite put my finger on it.

correctOne = "no"
correctTwo = "no"
while correctOne == "no":
    passwordOne = input("Enter the password:")
    if passwordOne.lower() == "compass":
        correctOne = "yes"
        print(" nultaOa,'ohmng vseecayet .eio  g")
        while correctTwo == "no":
            passwordTwo = input("Enter the second password:")
            if passwordTwo.lower() == "twenty":
                correctTwo = "yes"
                print("vnl tiiIltdImYeelgosntl e io   e  t  hrpsudwtttp.wga,re'oeo ho ier o.")
                print("Until next time.")
            else:
                print("Try again.")
    else:
        print("Try again.")
plush walrus
#

and what are you attempting to do?

real parcel
#

just read thru it lmao

#

tldr it's a double layer password system

plush walrus
#

ye I noticed that

#

I can try to make it shorter if you want

#

cuz I am pro 🧢

real parcel
#

please do 😛

plush walrus
#

gotta be faster than Maj

#

smh

#

majksa stop tryharding >:(

minor roost
#

.,............,m,.;l;l;;|

hearty bloom
#
firstPassword = "pass1"
secondPassword = "pass2"
while True:
    if firstPassword == input("Enter the password:"):
        if secondPassword == input("Enter the second password:"):
            # Successfully logged in
            print("Until next time.")
            break
    print("Try again.")
plush walrus
#

I ALMOST HAD IT

#

:(

hearty bloom
#

xd

#

bad

plush walrus
#

MEAN

real parcel
#

thx lol

hearty bloom
#

np :)

plush walrus
#

rule number 1. never thank Maj

hearty bloom
real parcel
#

no thx lol

plush walrus
#

jk ly

hearty bloom
#

lol

grave talon
#

This is python right? I don't get why you used strings instead of booleans in the first example

plush walrus
#

+1

hearty bloom
#

+2

ivory flume
#

+3

grave talon
#

Um

#

Wot

#

....?

plush walrus
#

I just, agreed

grave talon
#

Ohhh

#

So what languages do you guys do?

knotty mica
#

4+

gentle patio
#

+5

primal sigil
#

+6

hearty bloom
brisk badge
#

python bad

plush walrus
brisk badge
#

pmw

candid patio
#

+7

mild condor
torpid crypt
hearty bloom
astral hinge
gaunt berry
warm oriole
#

we all probably waiting for a cc stats api

spice plaza
#

java, c#, and python

dense zinc
warm oriole
#

ur a mod do something

#

become a dev and make the api

#

ez

dense zinc
minor roost
#

Oh yes

#

I am the Cappytan now

warm oriole
#

sad no api noises

spice plaza
minor roost
quartz panther
#

Hello

dense solar
#
String greetingresponse = "Hello!"
steady void
#

hello

dense zinc
brisk badge
#

thats mean @dense zinc

#

i wouldnt say you mean nothing either

#

you hurt his feelings

signal drum
#

aww

plush walrus
#

Bedrock player in a nutshell:

import time

def complain():
  print("Can you finally fix the knockback")
  time.sleep(60)
  complain()

complain()

no hate btw

dense solar
#
public void onCorrectionAsked(CorrectionEvent playerthataskednicely originalreceiver){
  new FixedGreeting("Hello!")
  .color(ChatColor.GOLD)
  .send(playerthataskednicely, originalreceiver);
}
#

I don't know java

#

and this is how bucket sends messages

#

I think

astral hinge
#

var hello = "hello";
var world = "world";
document.write(hello + " " + world);

gaunt berry
#

Its just not public yet

warm oriole
gaunt berry
#

they dont have a way for authentication

#

yet

warm oriole
#

this isnt even the hard part

#

is it?

gaunt berry
#

they want to use passport/keycloak for authentication

#

and since the api isnt a particularly high priority project, we gotta wait

warm oriole
#

welp

hearty bloom
#

But I am just guessing - coz I don't have inside on what's happening with that API

gaunt berry
#

ben only said the only thing holding them back is the authentication

untold grail
#

Authentication was a prerequisite to beginning work, not release :P

plush walrus
#

👀

untold grail
#

I think I've said this a few times in this channel and others but a) we don't have anyone with time to work on a public API right now and b) we're waiting for some other internal things to be done first

quasi oasis
urban shore
#

Can someone help me?

plush walrus
#

👀

urban shore
#

I am using this API

#

I want put an image to a button

#

But when I write the URL

#

Doesn't appear on the button :(

plush walrus
#

sorry dude, don't know how to make plugins at all

urban shore
#

No problem

plush walrus
#

wait

#

that is-

#

not an mc plugin nvm haha

urban shore
#

I don't understand you

#

Is a mcpe api

#

For pocketmine

spice plaza
gaunt berry
#

thats enough proof for me to believe theres an api

quasi oasis
gaunt berry
#

i genuinely thought there was an api tho, ben talked about it a while ago

#

i must have misunderstood smth

untold grail
hearty bloom
#

omg itz ben

untold grail
#

When we have something we'll let you know but wild speculation doesn't really help anyone xD

hearty bloom
#

omg yet another ben

spring tiger
hearty bloom
#

hi bens :)

spice plaza
dense zinc
#

@untold grail I know what the api does

#

It api’s

#

Youre welcome everyone! rainbowcat

quasi oasis
gaunt berry
spice plaza
twin jetty
#

Can i talk to a developer privatly??

quasi oasis
junior imp
#

yo any dev in here for bedrock ccraft please try to disable autoclick

stray pendant
#

yo can eny one tell tiesonic on beedrock 1 to unmute me

quasi oasis
signal drum
#

n o

spice plaza
#

make sure you've got .png at the end of the URL (Or just add the file extension in general, I think it needs to be a png though)

small hare
#

Looool I'm in an online session about a new uni degree programme I want to do: programming, the professor literally said "Comic Sans no can do"

plush walrus
#

Comic Sans 🥺

small hare
#

my god he's talking about Discord bots

#

i'm definitely going to sign up for this

plush walrus
#

YES

#

YOU SHOULD

hearty bloom
#

and if you need help, message me :)

plush walrus
#

ew discord js 🤢

small hare
plush walrus
#

but I agree, Discord bots are really fun to do

hearty bloom
small hare
#

This degree programme focuses on HTML, JavaScript, CSS and also a bit on TypeScript, Python, PHP, Sql, Sas, etc.

small hare
ancient fractal
hearty bloom
ancient fractal
#

^

plush walrus
#

sus

#

:>

ancient fractal
#

sql is very easy as its kinda like a sentence and uses english words

small hare
#

My main concern is just that while it all sounds fun to me, I'm scared that I might not have the skills to understand all those languages. While they are pretty similar in a way where if you understand the basic logic behind them, you'll have an easier time understanding all coding languages in general, I'm just scared that I won't understand the basics lol

hearty bloom
# small hare How'd u go about learning all those

I mean, I just learnt JS (JavaScript) for some basic knowledge. then added PHP and Python and at the end learnt Java. Once you know Java and Python, you are pretty much able to understand all normal langauges

ancient fractal
hearty bloom
#

but I started learning 8 years ago sooo 😂

small hare
#

I'm interested because with Minecraft I already do commands - I know it's not real coding but it's coding within Minecraft where you also need logical thinking.

hearty bloom
#

and I am self-taught, so you should be faster

small hare
#

Well it would take 2 years lol

#

That's what I'm scared about

hearty bloom
#

if the teacher is good, 2 years is enough

ancient fractal
#

considering you already know how to think logically with command blocks, programming will be an easy jump for you ngl

small hare
#

teachers* obviously multiple teachers, we'd also get courses like business & e-commerce, computer systems, basic front end, advanced front end, internships etc

hearty bloom
#

basic front end, advanced front end
front end can be advanced? PU_PeepoSuspicious 😂

small hare
hearty bloom
small hare
#

Also another main concern aside from logic thinking that I might not have - math. My mom works in IT and she says she had to learn very complex math while she was studying (30 years ago)

ancient fractal
ancient fractal
#

really aint needed

hearty bloom
#

or like, depends what do you want to focus on

small hare
#

What programming languages are you learning though Dronade

hearty bloom
#

but for web development it doesn't matter

small hare
#

Well, this degree also focuses a bit on back end I think? Python, PHP, Sql, Sass,..

ancient fractal
#

java is my main one that i use for uni, then i know python, javascript, basic web dev stuff, and SQL

#

and learning ruby rn and then gonna try C++

ancient fractal
small hare
#

sure i'm still in the online info session - so will probably be another 30 or so minutes.

ancient fractal
#

sure sure

hearty bloom
#

@small hare you should learn this coding langauge:

++++++++++[>+++++++>++++++++++>+++>+<<<<
-]>++.>+.+++++++..+++.>++.<<++++++++++++
+++.>.+++.------.--------.>+.>.
ancient fractal
#

ew

ancient fractal
#

there is some weird programming languages lol

ancient fractal
#

moo is my favourite, but the one i hate but weirdly admire is whitespace

plush walrus
#

:(

hearty bloom
ancient fractal
#

that reminds me i gotta update my languages on my website lol

small hare
#

LOL

#

@hearty bloom That is hilarious

ancient fractal
#

cba to load up bootstrap tho just gonna edit the text on github lol

hearty bloom
ancient fractal
#

big brain

hearty bloom
#

if you learn that

#

you can do anything

small hare
#

really?

#

on it

#

what programming language is in this channel description? @hearty bloom

ancient fractal
#

java

small hare
#

like java minecraft

#

omg im so smart i'm going to be such a pro programmer

#

y'all got nothing on me

ancient fractal
#

it broke the formatting and ive realised there's a spelling error despair

small hare
#

whats this

ancient fractal
#

github

minor roost
#

What is good noob

spice plaza
#

👍rainbowsheep👍

dense zinc
#

Imagine not knowing Swift what a loser

hearty bloom
#

L

dense zinc
#

I MADE Java

hearty bloom
devout verge
#

Only the best dev team on this server

misty kestrel
#

U can appeal

devout verge
#

Did

misty kestrel
#

Trust me none anticheat on any server will be perfect

devout verge
#

We saw a dude fly like they where in creative with 10 block reach play for 3 games with no ban

misty kestrel
#

Then it possible was a client that bypasses Sentinel

#

So it won't ban...

#

The bypass will get probably patched, but pretty sure on bedrock its even more harder

#

Then on Java

devout verge
#

Ah yes the legit fly hacker

sweet barn
#

Again, no anticheat is perfect. Best you can do is report the person cheating so the bypasses can be patched as well as open an appeal with as much info as possible so the false ban can be looked in to 🙂

astral hinge
#

ok

minor roost
gaunt berry
#

and abusing bugs is against the rules anyway so like

devout verge
#

Ok I'll tell him he isn't allowed to place blocks

gaunt berry
#

jumping on ghostblocks looks like airjump or fly

#

for other players

#

and the anticheat

devout verge
#

How do I see what is and what isn't q ghost block

gaunt berry
#

ur creating ghostblocks by placing above the build limit

#

ghostblocks are blocks that got desynced

devout verge
#

Again tell me how I can check

gaunt berry
#

and they only exist on your client

#

right click a block

#

if it disappears

#

its a ghostblock

devout verge
#

So what ur saying is every block I see I should right click

#

That's what it sounds like

gaunt berry
#

no dont create ghost blocks in the first place

spice plaza
gaunt berry
#

dont build above the build limit

devout verge
#

How do I no do that without show coords

gaunt berry
#

look in chat

devout verge
#

I mute chat

spice plaza
#

and if the block disappears-

devout verge
gaunt berry
spice plaza
#

in the video up there

#

you can see the blocks disappearing

devout verge
#

@gaunt berry that's not me playing

gaunt berry
#

why u complaining then

devout verge
#

Its me friend and when I said that you ignored me

#

Because the anticheat lost us our winstreaks

gaunt berry
#

tbh u deserved it

devout verge
#

Why tho

gaunt berry
#

bugabusers are annoying and its against the rules

devout verge
#

Ok that's not my problem

gaunt berry
#

no its ur friends problem

devout verge
#

So why did I deserve to loose my streak then?

gaunt berry
#

because you lost a game????

#

xd

#

thats the point of winstreaks

devout verge
#

I lost a game because the anticheat kicked me out of it

#

The server killed the streak not me

spice plaza
#

is this even programming related at this point starenoot

gaunt berry
#

no

ivory flume
plush walrus