#💻︱programming

1 messages · Page 29 of 1

indigo nacelle
#

Ok ok hear me out:

<!doctype python>

mighty fog
#

. jar

rancid trail
#

It's recommended to use git version control for any project, private or not. This way you can easily maintain changes and also try out different approaches to a problem using branches. Plus you can potentially share it, particularly handy if you decide to work together on a private project with a or multiple partners @small plank

small plank
#

I know

#

Im dev on GodlyNetwork

sage mauve
#

do you all think its worth it to start c++?
I already know Java, Python, and JavaScript

minor roost
#

Depends what for

#

If you:

  • have the time to;
  • find it interesting;
  • want to do a project in it;
  • need it for a certain feature/project;
  • just want to
    then yeah...go for it
#

But if you're learning it just to use it for one project & forget it straight after, you might be better off using a different language

torn briar
#

If you want to start getting stated with Java script then download grasshopper. It’s a great easy app for anyone who want to start.

wild shadow
#
int main()
{
    int a[4];
    
    printf("%p\n", a);
    printf("%p\n", &a);
    printf("%p\n", &a[0]);
    
    int *b = malloc(4 * sizeof(int));
    
    printf("%p\n", b);
    printf("%p\n", &b);
    printf("%p\n", &b[0]);

    return 0;
}```
Why are `a`, `&a`, and `&a[0]` equal to each other, but `&b` is not equal to `b` and `&b[0]`...
small plank
gloomy kayak
#

Dm me if u want to join a server thats developing a 2d game

#

If u want to help

spring tiger
# wild shadow ```c int main() { int a[4]; printf("%p\n", a); printf("%p\n", &...

"The array is created at compile time while with malloc memory is allocated during run time; unless you grab all the memory with one malloc but then there is no advantage to using malloc."
https://stackoverflow.com/questions/47956300/malloc-vs-array-in-c

rancid trail
# wild shadow ```c int main() { int a[4]; printf("%p\n", a); printf("%p\n", &...

I'm not 100% sure about C but in C++
(this you might already know)
when you pass an array to a function you're actually passing the pointer to the first element of the array, so arrays are always passed by reference, if you change something in the array within the function it will have changed globally>
But if you pass an array by reference like so &array as in your code, you're actually passing a pointer to the whole array of n elements.
What does this mean? Well if you're doing pointer logic and you add 1 to the memory address of array your address will have increased by sizeof(int) but if you add 1 to the memory address of &array your address will have increased by n*sizeof(int)

#

Check out the difference between array and &array here, you probably don't want to pass your arrays with an ampersand

wild shadow
rancid trail
#

Yep, basically

#

So if you type &array[0] you're basically saying "the first one in the array of arrays", if you wanted to access the first element of that array you'd have to write &array[0][0]

#

@wild shadow

wild shadow
wild shadow
rancid trail
#

Yes, you could just as well write array[0] then

wild shadow
#

ah thanks

rancid trail
#

Which you should probably always do

#

Unless you want to do something with indexed arrays

rancid trail
#

byte size is 4, 4 elements 4*4 = 16 + 1 byte

wild shadow
#

An int is 4 bytes, and an array of 4 ints is 4 * 4 = 16

rancid trail
#

Yeah and then you add 1 to that

#

so idk how you got to 0x1010

wild shadow
#
#include <stdio.h>

int main()
{
    int a[4];
    printf("%p\n", &a + 1);
    printf("%p\n", &a);

    return 0;
}```
#

I tested it out, and the difference between &a+1 and &a is always 16.

rancid trail
#

Oh okiii

#

my bad

#

Then it should be 0x0016 right

wild shadow
#

0x10

#

hexadecimal

rancid trail
#

Ohhh

wild shadow
#

0x16 is 22

rancid trail
#

Breh yeah 😂

#

Makes sense

rancid trail
#

Hope it helped 🙂

icy basin
#

hey

#

who can solve c++ lab introduction to programming pls

#

I'll pay

raven bane
#

Hey could you change the fact that you have to spend money to play with more than 4 of your friends we all want to play together but we can’t behind your pay wall 😕 therefore we have to leave people out and I don’t find that cool

rancid trail
dense zinc
#

Think I’m gonna get an internship at the IT department of an Elderly home

#

Cause all the other jobs I’m like a month too young for cause programming companies are bad

lusty pagoda
#

Here 99% of companies closed 🔐

small plank
#

Raam

#

🥴🥴🥴

gaunt berry
#

when you forget a semicolon

rancid trail
#

xd

#
+1 insertion
spice plaza
gaunt berry
#

i did

#

but github was like, yeah lets create a new commit for that

gaunt berry
#

what a pro

rancid trail
#
vector<uint8_t> Market::detChoices() const
{
  vector<uint8_t> stocks;
  double capital = detCapital();
  cerr << "detChoices" << endl;
  for (uint8_t p = 0; p < pow(2, n); p++) {
    cerr << "p: " << p << endl;
    if (detValueBitString(p) <= capital) {
      stocks.push_back(p);
    }
  }
  return stocks;
}
#

It prints detChoices on my screen but doesn't enter the for loop

#

This is my pow function

uint8_t pow(uint8_t x, uint8_t y)
{
  for (uint8_t i = 0; i < y; i++)
    x *= x;
  return x;
}
#

Does any1 see why it's not entering the for loop?

small hare
#

what language is this

rancid trail
#

c++

small hare
#

ok great because if this was javascript in some way or another i would not go to uni for it

rancid trail
#

lol

torpid surge
#

Hello

rancid trail
#

hi

torpid surge
#

U know c#

#

I need help with this

plush walrus
#

don't you just do 5,4 x 2.3?

gaunt berry
#

do 5.4d*2.3d

rancid trail
#

no but it's probably something like

double area(double x, double y) {
  return x*y;
}
torpid surge
gaunt berry
#

Console.WriteLine(length * width)

torpid surge
#

:/

#

Should i type Length = 5.4
Width = 2.3

#

?

gaunt berry
#

no

#

the length and width is defined by the Console.ReadLine()

#

you need to type the length and width in the console

torpid surge
#

Like this ?

#

Ok it worked

#

Thx man

gaunt berry
#

thats kinda not the point but it works too ig

minor roost
#

A programming place cool I just noticed it I started programming a week ago it’s fun

gaunt berry
#

it is

torpid surge
#

Can anyone slove this

hearty lodge
#

@torpid surge try:

Console.WriteLine(total % 7);```
signal drum
#

make sure you understand it

hearty lodge
#

yeah check dms

rancid trail
#

nvm found it

proper ocean
#

90-5

torpid surge
#

Can anyone help me

hearty bloom
craggy spindle
#

Programming?

gaunt berry
# torpid surge Can anyone help me
string name = Console.ReadLine();
string age = Console.ReadLine();
Console.WriteLine("Name: " + name);
Console.WriteLine("Age: " + age);```
hearty lodge
# torpid surge
int age = Int32.Parse(Console.ReadLine());
Console.WriteLine("Name: " + name);
Console.WriteLine("Age: " + age);```
gaunt berry
#

i think you have to convert the age back to string when outputting so itd be Console.WriteLine("Age: " + age.ToString());

#

thats why i didnt make it an int in the first place

spiral wasp
#

LOL, COULD SAY THE SAME MATE.

gaunt berry
#

aight

spiral wasp
#

Have fun raising exceptions with that Parse, mate.

minor roost
#

Hey do any of you know a good way to start learning coding I started a week ago but the thing is I have 0 experience in coding or scripting and the places I learn are to advanced for me

plush walrus
#

Well that depends, I would personally suggest Python @minor roost, you can check this link for some tutorials etc.

minor roost
rancid trail
#

By linking their account

minor roost
rancid trail
spice plaza
#

Python or JS are pretty good to start off with

spice plaza
#

nono

#

as in

#

programming language

minor roost
#

Oh

spice plaza
#

lmao

minor roost
#

Hmmm I wanna learn programming apps and games

spice plaza
#

might be worth starting with Javascript then

minor roost
spice plaza
#

cause then you have stuff like electron js

#

which can be used to make apps using web-based languages

gaunt berry
#

id go with c# if you want to make games

spice plaza
#

unity has a lot of online tutorials

minor roost
spice plaza
#

yeah

#

c#

gaunt berry
#

yes

spice plaza
#

tbh you can use unity to make apps too if you wanted to focus on one tool

gaunt berry
spice plaza
#

oh yeah it wouldn't be optimal

#

all comes down to if you want to make a game or a general app first

spice plaza
#

then unity + C# is a good option :)

#

again, lots of online tutorials with a bit of searching

minor roost
#

So you mean I go to unity and try their tutorials

spice plaza
#

mhmm blobparty

minor roost
#

My big bro is a tech and programming nerd I tried asking him but he ain’t a good teach

spice plaza
#

¯_(ツ)_/¯

minor roost
# spice plaza ¯\_(ツ)_/¯

He was like download visual studio and right after that he said well using system means we can use classes from system

spice plaza
#

yeah, really chucked you into the deep end there huh

#

getting visual studio downloaded is a first step though

#

once it's all linked up with unity, creating a script file within Unity should generate the necassary stuff to start off with

#

and any tutorials could be followed from there

minor roost
spice plaza
#

np :)

#

oh and

minor roost
spice plaza
#

I'm pretty sure there's a way to get free access to unity's own tutorials for free using an email associated with your school

#

so it might be worth looking around for that. I can't find where you get the license for that currently

#

oh wait

#

found it

minor roost
#

Whooo my school never it there is free tutorials though

spice plaza
spice plaza
#

the requirements

minor roost
spice plaza
#

aighty

#

good luck with the test ^^

minor roost
spice plaza
#

mc_bee👍

plush walrus
#

Wait what are the benefits of GitHub student pack?

spice plaza
plush walrus
#

What exactly, never heard of it

spice plaza
#

There's at least 3 free domains in there

#

free unity education (which includes plus iirc)

#

free jetbrains products

#

so like

plush walrus
#

:o

spice plaza
#

intellij, pycharm, rider

plush walrus
spice plaza
#

credit for azure and digital ocean

plush walrus
#

But damn, I'm gonna claim that

spice plaza
plush walrus
#

I'm sticking with vs code

#

:)

spice plaza
#

fair

spice plaza
#

like there's some stuff in here that wasn't available 6 months ago

plush walrus
#

Ohhh, I see

#

Thanks!

spice plaza
celest cosmos
#

lol

rancid trail
#

Hey @plush walrus, that CubeCraft Discord RPC looks cool. Do you have any screenshots of it in action?

rancid trail
#

Ooh looks neato

#

So it works for all the minigames too?

plush walrus
#

Ye, it supports all stable miniganes, so like ew, se, among slimes etc

rancid trail
#

Nice

plush walrus
#

And well I kinda abondened the project but maybe I'll finish it some day

rancid trail
#

Yeah I saw haha

plush walrus
rancid trail
#

xd

minor roost
#

asd

dense zinc
#

@plush walrus would you mind if i stole ur idea

#

and made it in java

gaunt berry
#

make it in js™️

rancid trail
#

xd

dense zinc
#

i could

#

BUT

#

that's more work

rancid trail
#

Hihi

#

It's 5am what am I doing

#

That moment when you start to hear the birds outside

dense zinc
#

yw

rancid trail
#

Yes

#

Good idea

dense zinc
#

Oh

#

Wrong answer

plush walrus
#

No

#

I'll finish it some day

sharp crystal
spice plaza
#

Cause the current RPC mod for fabric is customizable but that's about it. Kinda static

rancid trail
#

Mmm

#

That'd be good indeed

gusty veldt
#

1000100001001110000011

#

Cose

small plank
#

is it possible to upload my api private on github and use it as a dependency ?

spice plaza
#

I mean

#

you could just use a built jar of it as a dependency

quasi oasis
small plank
#

yea but if my project private is

#

i cant use jitpack

gaunt berry
#

you can download files from a private repo afaik

small plank
#

are u sure?

gaunt berry
#

yes

plush walrus
#

Well if it's yours then yes

gaunt berry
#

im pretty sure

plush walrus
#

I think you can just do
git pull <link>

sweet barn
#

Well making your api accessible through maven/gradle kinda defeats the point if you’re wanting to keep it private xd

#

I’d suggest publishing it to your local maven repo in that case

small plank
#

thats a option 😄

shadow haven
#

Helo

#

can you help me make my plugin very good?

dense zinc
shadow haven
#

unban on cubecraft pls

#

sentinel banned me

#

my ping > 1000

dense zinc
quasi oasis
#

You have to setup a GitHub API key

#

And put it in your maven settings

quasi oasis
quasi oasis
#

I suppose even if you are working from multiple machines you could just pull the repo and then deploy it to your local maven repo. That’s a few extra steps though and you’d probably run into problems of outdated code.

dense zinc
#

Anyone know of any working Discord RPC api's for Java?

#

nvm found one i think works

plush walrus
#

👀

minor roost
#

Oooof can someone help me with my school for ict and computing lol srry for asking 😉

steep crest
#

Hey

#

Can I do:

gaunt berry
#

you can do everything

#

almost

steep crest
#
if($args == "help") {
    // code that will be executed
}
#

@gaunt berry

gaunt berry
#

what language

#

and what do you want it to do

steep crest
gaunt berry
#

o

#

im no good in php sorry lol

steep crest
#

No problem

hearty bloom
#

ooo php

gaunt berry
#

im more of the java/c sharp guy

hearty bloom
#

isn't it an array?

steep crest
#

I forgot I must put $args[0]

#

Not $args

hearty bloom
#

yep

steep crest
#

Ty

hearty bloom
#

and lemme see if php has switch

steep crest
#
switch($args[0]) {
                case "help":
                    //code that will be executed
            }
hearty bloom
#

and I would recommend calling a method inside

#

or you could make use of user_call_function or something

steep crest
#

Ok

rancid trail
hushed bone
#

Does anyone know how to make a free server for bedrock?

gaunt berry
#

download the software

#

run it

#

done

#

and if you need help, theres a readme file that explains everything

upbeat sigil
#

oof

languid flame
#

@severe condor bus

severe condor
#

STOPPP

#

What do you mean?

#

Are you trying to speak Dutch? @languid flame

languid flame
#

No

true sable
#

hi

quiet marlin
#

lol

#

hi clau

#

what are you doing here mate?

quiet marlin
#

example if ($args[0] === "help") { code here }

quiet marlin
hearty bloom
#

when you spend 2 weeks trying to fix an issue with GitLab CI/CD and after all that time of trying out different ssh keys, different approaches, ... you just realize you used a protected variable on a unprotected branch...

gaunt berry
#

me when i forget to make a variable in a static class static:

tiny shale
#

Ik ook

main pasture
#

Ik ook

wild shadow
hearty bloom
#

lol

half portal
lusty pagoda
#

:pingree: 😔

torpid surge
#

hey

#

guys

#

how to do a program

#

printing on the screen numbers 4,5,6,....50

#

and then triple the numbers

#

4,4,4,5,5,5,6,6,6......,50,50,50

#

c#

gaunt berry
#

outputting to where? console, string, array

torpid surge
#

wdym

minor roost
#

Console.WriteLine?

torpid surge
#

ye

gaunt berry
#

what do you want the output to be

#

aight 1 sec

minor roost
#

Like a Christmas tree?

torpid surge
#

no

#

like

#

1,2,3,4,5,6,7,8.........,50

#

prints the numbers 1-50 with (,)

spice plaza
#

for loop with a temporary string variable for adding each number and then substring off the final comma?

torpid surge
#

oh man

#

its hard to understand in english

spice plaza
#

lemme go open an editor

torpid surge
#

print numbers from 1 - 50

#

ok ?

spice plaza
#

yes

#

with a comma inbetween em?

torpid surge
#

with a " , " between them

spice plaza
#

on one line?

torpid surge
#

ye

spice plaza
#

aight just a sec then

torpid surge
#

what is comma tho

spice plaza
#

,

torpid surge
#

oh

#

xD

minor roost
#

Console.WriteLine(string.Join(",", Enumerable.Range(1, 50)));

torpid surge
#

i havent learned this yet

#

:/

spice plaza
#

oh that's much cleaner

torpid surge
#

close to this lvl

#

for (int i = 1; i <= 50; i++)

minor roost
torpid surge
#

what happened ?

minor roost
torpid surge
#

pro

#

nice

#

ok

#

how to print the number 3 times

torpid surge
minor roost
#

Only triples or including them on the same line?

torpid surge
#

triples

gaunt berry
#
IEnumerable<int> numbers = Enumerable.Range(4, 50);
foreach(int num in numbers){
  Console.WriteLine(num);
  Console.WriteLine(num);
  Console.WriteLine(num);
}
torpid surge
#

print the same numbers 3 times each number

gaunt berry
#

would that work

minor roost
gaunt berry
spice plaza
#

so wait

#

you need

#

1,1,1,2,2,2,3,3,3...

#

up to 50?

gaunt berry
#

Console.WriteLine("1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,8,8,8,9,9,9,10,10,10,11,11,11,12,12,12,13,13,13,14,14,14,15,15,15,16,16,16...")

spice plaza
gaunt berry
#

every programmer hates this trick

spice plaza
#
string temp = "";

for(int i = 1; i <= 50; i++) // Loop through each number
{
    for (int loop = 0; loop < 3; loop++)
    {
        // Add the number and a comma to the end of the temp string
        temp += i + ","; 
    }
}

// Cut off the final character (a comma)
Console.WriteLine(temp.Substring(0, temp.Length - 1)); 
#

not the best way but it gets it done with loops

gaunt berry
#
int[] numbers = Enumerable.Range(1, 50).ToArray();
string output;
foreach (int num in numbers){
  if (Array.IndexOf(numbers, num) == numbers.Length){
    output = output + num;
  }else{
  for (int i = 0; i < 3; i++){
    output = output + num + ", "
    }
  }
Console.WriteLine(output);
#

this should theoretically work

torpid surge
gaunt berry
#

thats actually way cleaner

#

teach me ur ways

spice plaza
torpid surge
#

xD

old pawn
#

Can someone translate this for me 01001011011001 and 10110100100110, I’m not an expert, and u guys are awesome.

old pawn
#

Don’t know anything about programming so... how do y do that?

old pawn
#

Thanks

karmic igloo
plush walrus
#

Lmaooo

rancid trail
#

xd

gaunt berry
plush walrus
#

Ye but

spice plaza
#

excuse me what

#

doom running off slash commands

dark path
#

Console.WriteLine("Hello guys");

minor roost
#

narrow epoch
#

Rip server

#

Chests are gone

#

From Skywars

gaunt berry
#

sir, this is programming, not complaining about servers

gentle patio
#

i dont like server g730r it was a bad game

#

yk what i mean bungeecord28

#

ugh

#

smh my head

spice plaza
#

yes let's burn bungeecord28

gaunt berry
#

i agree

spice plaza
#

@untold grail can we get some arson

untold grail
#

calling in an airstrike

gentle patio
#

woohoo

spice plaza
#

👉 😎 👉

gaunt berry
#

i love how visual studio doesnt let me make an empty project for .net in c#

#

theres .net in f# and visual basic

#

but not c#

spice plaza
#

oh microsoft <3_<3

gaunt berry
#

yes we all love them

gloomy hawk
#

Program go brrrrr

zinc steppe
#

wich programming language u guys suggest me to learn?

rancid trail
#

Depends

#

What kind of things would you like / be interested in to make?

dense zinc
#

^

zinc steppe
#

something related with minecraft

#

so prob java

#

but i also think phyton is cool

spice plaza
#

java for modding minecraft

#

but typescript for scripting on bedrock iirc

zinc steppe
#

:o

spring tiger
#

It's not typescript, there is a javascript scripting api but most of the stuff is done through JSON data-driven files

sharp crystal
#

ayoo, got a free license for intellij

#

/ jetbrains

minor roost
#

Nice

spice plaza
#

pog

sharp crystal
#

Finally flexing w coding :P

wild shadow
#

And notebook

sharp crystal
#

:o nice!

minor roost
#

I created minecraft

minor roost
#

Who are u

#

I have a doubt

#

Nvm Im mom

#

Why is hackers coming into my game

minor roost
#

Everybody hacking

#

They are not getting banned

#

Yes

#

Do u teach python

#

I learn python

#

Can u teach me also

#

I don’t know any

#

Just use codehs

indigo nacelle
#

print(“hello world”)

#

And that’s the entirety of python

minor roost
#

Ok bro

gaunt berry
#

hello this is the programming channel, it would be nice if you kept conversations about non-programming stuff in their respective channels thanks

languid flame
#

Python is the only programme

plush walrus
#

so I wanted to ask what is the easier way to make an "api" with python and webserver.

I have a json file on webserver that I want to update let's say every minute using a python script, so what is the easier/best way to do it.
The only thing I did is simply connect with ssh and then echo data into the json file but that does not look like the best way to do it

dense zinc
#

Step number 1: Switch to Java
Step number 2: Code

plush walrus
grand yew
#

my first serious creation

spring tiger
#

I've used Python and Flask to make an API that tracks my plants moisture levels

plush walrus
#

:o cool, and thanks!

graceful ginkgo
plush walrus
graceful ginkgo
#

What kinda web server are you running now?

#

Php or smth/just static file

plush walrus
#

static

graceful ginkgo
#

Then you can use the guide mitgloba linked or write a python script and run that as a cron, latter would be better performance wise, former would be better for expansion

plush walrus
#

alr, thx

graceful ginkgo
#

Also p much any ssh connection will let you do sftp, less jank than echo over ssh lmao

gaunt berry
#

and then theres me monkey_lookmonkey_look_away

graceful ginkgo
#

Apart from formatting, seems fine

gaunt berry
#

meh formatting doesnt really matter

graceful ginkgo
#

Putting { & } on new lines like that ew

graceful ginkgo
gaunt berry
#

lol

gaunt berry
#

and yes i dont really like it either but its whatever

graceful ginkgo
#

if you dont like it just change it lol

gaunt berry
#

cba

graceful ginkgo
#

¯_(ツ)_/¯

gaunt berry
#

it doesnt affect me much so

minor roost
graceful ginkgo
#

yes

#

New line is only acceptable for classes & methods

rancid trail
#

Who cares

#

As long as you don't do this:

gaunt berry
#

oh god what the

minor roost
#

Nice

hearty bloom
gaunt berry
#

it does

#

the brackets arent as visible which i kinda like

#

but you rely on tabs then which i doesnt like

quiet marlin
graceful ginkgo
#
{   public property; constructor() {  
        this.property = 'value';
}   public someFunction = () => {
    for (let i in [1,2,3]) {
        console.log(i);
}   }   }```
#

rate my code

gaunt berry
#

/ban @graceful ginkgo

graceful ginkgo
#

I do sometimes write code thats similair to the cursed brackets one tho, except abusing not having to use brackets for a single line in some languages

dense zinc
signal drum
gaunt berry
#

if you dont look at them it actually looks good

lusty pagoda
#

my brain can't handle this much of complicated language-

hearty bloom
# signal drum +1

shush
it would look hot, if they didn't use ;}}} that's especially painful

signal drum
#

i like brackets

lusty pagoda
#

;}}}

small plank
#

does that work or? because its deprecated.

spice plaza
#

Should work

spring tiger
#

Deprecated methods have a line through them no?
I think you're not catching a security exception

spice plaza
#

Or

#

It may be complaining because you're not storing the return of createNewFile (which isn't required)

#

intellij is annoying

small plank
#

what do u use then>

spring tiger
#

from looking online https://www.geeksforgeeks.org/file-createnewfile-method-in-java-with-examples/
the method returns a boolean, so you don't need the !file.exists() bit
createNewFile() returns true if the file was made, or false if the file already exists

small plank
#

oki thank yoiiii

rancid trail
#

So you could actually write that in the if statement

#
if(!file.createNewFile()) {
  console.log(This file already exists);
}
unborn siren
languid flame
elfin matrix
#

not a programming question, but i cant play fullscreen MC for some reason, i can play in widowed just fine thought. I updated my drivers, unistall the game fully (including on %appdata%) and nothing, i get a black screen when i fullgreen, i found nothing of use online, con someone help?

#

in 1.16.5

plush walrus
#

try pressing f11 maybe?

gaunt berry
#

windowed is better anyway

plush walrus
#

☝️

rancid trail
#

^^

elfin matrix
elfin matrix
gaunt berry
#

not really

#

if you have a second monitor it doesnt help at all

elfin matrix
#

well its a paint to set

gaunt berry
#

and is just annoying

spice plaza
elfin matrix
#

i have 2 monitors, 1 60hz and main 144hz, could that be a problem?

spice plaza
#

try it on both I guess

gaunt berry
#

no but fullscreen doesnt increase fps if you have more than 1 monitor

#

so it doesnt matter

#

play in windowed mode that way you can tab out of mc without it closing to taskbar

elfin matrix
#

how do i make borderless windowed then?

spice plaza
#

isn't a thing for minecraft iirc

gaunt berry
#

you can get a windowed fullscreen mod if you really want to

#

but those 20 pixels you lose dont really matter

elfin matrix
#

oh, and the reason i deleted MC to begin with, is cuz, i couldn't get 144hz on MC anymore (randomly, after 6 mouths since i got the 144hz monitor)

elfin matrix
gaunt berry
#

does someone know how to decrypt bedrock server resource packs

rancid trail
#

not me 👀

gaunt berry
#

wanna make a program that revertes the new items

#

they look horrible

rancid trail
#

aha

gaunt berry
#

but id need to decrypt the rp for that first

#

and encrypt it later back

#

i wanna make it open source but story probably wouldnt like it i made the textures open source with it

rancid trail
#

why not?

gaunt berry
#

if he didnt care he wouldnt have encrypted it in the first place

rancid trail
#

hmm

#

Guess so lol

spring tiger
#

The pack has always been encrypted, before the lobby icons.

gaunt berry
#

yes ik

#

i wonder how long itd take to bruteforce it

hearty bloom
gaunt berry
#

tbf i should probably just ask story if he can give me the decrypted version so i can edit it and encrypt it again but wheres the fun then

elfin matrix
#

btw, fixed the problem, i updated windows -_-

spice plaza
#

wdym decrypt

#

It if's a weird zip

gaunt berry
#

cubes server rp is encrypted

spice plaza
#

you might be able to chuck it into intellij nevermind, this is new pog

gaunt berry
#

ok i fixed the rp, now i need a way to encrypt it so i can publish it without getting sued

#

does someone by any chance know how to encrypt it

latent nacelle
#

why does this show for me and i have no texture pack?

gaunt berry
#

thats the server resource pack which looks awful

latent nacelle
#

ye it kinda does

quasi oasis
wild shadow
#

or password protection, whatever

gaunt berry
#

probably just obfuscated tho since i can open the files

sharp crystal
#

just finished my first post request api :D

minor roost
#

😯

tranquil ice
gaunt berry
#

@quasi oasis ^

tranquil ice
#

I implemented the encryption 😉

gaunt berry
#

luckily for me tho i still have tho old version that isnt encrypted so i can just use that version

#

not sure if i can publish it tho without getting in trouble which is kind of a problem

tranquil ice
#

No, that won't happen but you should be able to override the texture in your own resource pack iirc

gaunt berry
#

nop it doesnt overwrite it

#

i need to replace the cached server pack with the modified version

#

that way it works

#

otherwise its just a missing texture

tranquil ice
#

How did you define the textures in item_textures.json?

gaunt berry
#

this is my item textures file

gaunt berry
gaunt berry
#

and yes i know i misspelled kit selector dont mind me

minor roost
gaunt berry
#

making a forums post about it rn

languid flame
#

I will give it a scathing review

minor roost
#

!play

#

-play

#

?play

gaunt berry
#

@minor roost Please specify a song!

#

@minor roost Please specify a song!

#

@minor roost Please specify a song!

dense zinc
#

@gaunt berry lmao

signal drum
#

This bot has 3 prefixes?1!2?2!2 omg epic

hearty bloom
#

!ban @gaunt berry L

minor roost
#

LMAOOOO

plush walrus
#

!help ban

#

😳

quiet marlin
#

lol

dense zinc
#

That’d be peak humor

sharp crystal
#

Making the most child friendly discord bot ever

signal drum
red spruce
#

lol

#

i found a little glitch on the server texture

#

if i enable the registry

#

it gave me an error

#

its an error with particle json egg splat

rancid trail
#

I do 🤡

dense zinc
warm oriole
#

Ooo

hearty bloom
plush walrus
spice plaza
#

at least it's not discord4j sheesh

rancid trail
#

Wait

#

JDA is a Java API

#

lol

#

xD

dense zinc
sharp crystal
#

Imagine not coding discord bots in css 🤡

rancid trail
dense zinc
tame pawn
#

Wait someone showed this already 7290_SataniaLaugh

dense zinc
#

Does anyone know if JDA implemented slash commands and buttons? I think they did right?

arctic narwhal
#

they kinda did

#

@minor roost worked with it on our bot, maybe he can tell u some more about it

dense zinc
#

@arctic narwhal yeah I wanted to start a dc bot out of boredom because all my current projects have given me brain pain

arctic narwhal
#

@dense zinc

sharp crystal
#

nah, but wait for a third pirty library

#

Coding a command will take ages

#

They should make something localhost ig

dense zinc
#

That’s an interesting way that they chose to implement it

arctic narwhal
#

"interesting" is an interesting choice of expressing it

dense zinc
#

Someone should make a pull request and just fix it

#

Not me tho y’all have fun

arctic narwhal
#

eh, no thank you

unborn siren
#

If someone shows me one more cursed code image im boutta code ina shotgun to shoot you

#

*in a

plush walrus
#

Ye well it kinds sucks, but you can just kick and reinvite your bot to bypass the global commands cache. And once you set up the commands, it's pretty cool

sharp crystal
#

AND slash commands are limited

#

if I'm not wrong

plush walrus
#

I did it and after all, it was not that horrible

sharp crystal
#

Not really into the new features, made a library for slash commands that didn't work out so I gave up

plush walrus
#

For Python there is one that works fine ig

sharp crystal
#

For js too, but I don't really like it

#

There are like 100 xD

dense zinc
#

It seems cool

#

But kinda pointless

#

But BUTTONS

#

Those seem useless too!

#

It’s like reactions but bigger

sharp crystal
#

I still like working with reactions more

dense zinc
#

It looks better imo

sharp crystal
#

I think the buttons are so ugly

#

They're blue

#

So you have to make a nice embed that matches it

dense zinc
#

Discord is fine as it is I don’t need more updates lmao but they keep coming

sharp crystal
#

That's so true

#

What's the point of slash commands?

#

Like extending the /shrug etc?

dense zinc
#

Who’s idea was it to move the mentions tab on mobile, does stage discovery really need a whole tab? It should switch places it looks so bad with mentions in the search

dense zinc
sharp crystal
#

Why eveen stage discovery

#

For a regular discord user it's useless

dense zinc
#

It’s a fun feature

#

I’ve used it

#

But I use mentions a LOT more

sharp crystal
#

It is, but a whole tab?

dense zinc
#

Exactly

sharp crystal
#

It would be even better if you can edit it yourself

#

"Edit bar"

dense zinc
#

They should be spending more time on moderation stuff tbh

sharp crystal
#

Changing positions etc

dense zinc
#

Like all servers use moderation bots (except us for the longest time lmao)

sharp crystal
#

Wow, thats kinda amazing tbh

dense zinc
#

And there’s no way to temp ban without a bot so it’s kinda crummy

dense zinc
sharp crystal
#

How did you guys do it back then?

#

Instantly like a perm ban orrr?

dense zinc
#

Anyway I should be off to bed, good talking to you!

sharp crystal
#

Goodnight :) Sweet dreams :)

#

It was nice to talk to you too!

spiral wasp
#

WHAT AN ABOMINABLE CREATION.

gaunt berry
plush walrus
vivid willow
#

can you n o t

severe condor
#

:(

gentle patio
#

....

quiet arrow
#

Legend

dry oriole
#

🤣

cobalt leaf
#

Again? xD

dawn parcel
#

pong

vivid willow
#

@honest heath this channel is next KEKW

minor roost
#

can you not

rain shale
#

again

dawn parcel
#

what happened

plush walrus
viscid nimbus
#

LOL

vivid willow
#

guy spam pinging

vague oar
#

Ping ?

cobalt leaf
#

just lock all channels banter

dry oriole
vivid willow
#

ah yes

tight trench
#

What happened??

final cloak
#

Me when;

compact tide
#

you do love people who fill the sad void in their heart by raiding discords

torn bison
#

STOP

vale rampart
#

His name was gamer

torn bison
#

TAGGING

#

FFS

thorn knot
#

._.

vale rampart
#

Or smt

gaunt berry
#

ACTIVITY

gleaming zenith
#

ehm so whats going on?

gaunt berry
#

YES

fresh coral
#

HERE WE GO AGAIN LMAO

vivid willow
#

its just a random guy

#

and yes

tame pawn
gaunt berry
#

FINALLY

viscid nimbus
#

he mass pinged guys

vivid willow
#

free server activity

gleaming zenith
#

can someone epxlain pls 😦

gaunt berry
#

THIS CHANNEL IS GETTING WHAT IT DESERVES

gleaming zenith
gentle patio
dry oriole
cerulean moss
#

@gaunt berry

final cloak
cerulean moss
#

oh thats confusing-

coarse cloud
#

pog pog pog

gaunt berry
#

xd

gleaming zenith
#

@gaunt berry

slim obsidian
#

Ping?

solemn swallow
oblique tree
#

Lol

gleaming zenith
gaunt berry
#

now is the perfect time to advertise my program ngl

gentle patio
#

Ping

#

Pong

dreamy crater
#

pls no more ping

gleaming zenith
#

@minor roost ping

dreamy crater
#

end this pain

solemn swallow
gray spade
#

Anyone wanna talk about ducks

gleaming zenith
#

omg translator

atomic rover
#

Why th am I getting pinged

gentle patio
gentle patio
gaunt berry
gentle patio
gaunt berry
#

imagine how hilarious that would be

kind osprey
#

const lol = require("ducks.js")

gleaming zenith
#

BBB

gaunt berry
#

CCC

ivory flume
gaunt berry
#

no were discussing programming

kind osprey
#

Yeah

gentle patio
#

Ok

gleaming zenith
#

if you write your message into a box like this it looks like you are talking about programming

gentle patio
#

if you write your message into a box like this it looks like you are talking about programming

plush walrus
#

it doesnt

cerulean moss
#

k

gentle patio
#

I like to program

#

I like the language c+++++-

gaunt berry
#
class cubeprogrammingchat{
const string = "yes it does";
}
gentle patio
restive kestrel
#

Ping

gentle patio
#

No u?

#

@restive kestrel

#

Pong

restive kestrel
#

:whyy:

#

damn it

#

i cant use other servers emojia

grizzled pagoda
gaunt berry
#

cs

#

c#

#

csharp

grizzled pagoda
#

Ah

gaunt berry
#

whatever you wanna call it

grizzled pagoda
#

C# is good

gaunt berry
#

yesh

grizzled pagoda
#

Never used C#

#

However, I do know it looks like Java

gaunt berry
#

it was called microsoft java back in the day

grizzled pagoda
#

A guy who thinks he's cool using a selfbot

grizzled pagoda
#

Who likes python?

plush walrus
grizzled pagoda
#

Why do you like python

dawn parcel
plush walrus
#

cuz simple & ez to learn

grizzled pagoda
#

I mean, there are a lot of disadvantages

lusty pagoda
plush walrus
#

personally dont see one

grizzled pagoda
lusty pagoda
#

Fact 2: KristN always challenges himself

plush walrus
#

I'd rather do something epic in Python than learning new language tbf

lusty pagoda
#

KristN

grizzled pagoda
#

Well, if you would want to create a Minecraft plugin you need to know java.

plush walrus
#

dont wana do that

grizzled pagoda
#

Frontend development

#

JavaScript ^

plush walrus
#

well I like how python is multipurpose

grizzled pagoda
#

I think it's hard to switch language when you started with learning python

plush walrus
#

¯_(ツ)_/¯

grizzled pagoda
#

I'd recommend you to learn JavaScript

#

It's also easy to use

plush walrus
grizzled pagoda
#

Because it's useful for many things. If you want to develop for work it's useful to know multiple languages. JavaScript is one of the most popular ones.

#

You can also use it for various thing.

plush walrus
#

ye I see your point

gaunt berry
#

js is weird

grizzled pagoda
#

Why?

gaunt berry
#

you need to use promises for basically everything that needs to be done in order

#

which i dont like

#

no pls no

#

why

#

@honest heath pls linked only chat thanks

lusty pagoda
#

what?

gaunt berry
#

anyway

#

we were talking about js being weird

grizzled pagoda
#

Yeah, you have to get used to it. However, if you use discord.js to create a bot you don't have to use promises that much. Also for web development you'd only need it if you're fetching data from another website.

lusty pagoda
#

<!doctype html>

gaunt berry
#

im more on the nodejs side that the web dev side tho

grizzled pagoda
#

You just have to use the function Promise#then() or run the code in an async function and use await.

grizzled pagoda
#

Yea for backend you need to fetch a lot

#

But as I said, you just need to get used to it

#

Just like you did when learning the syntax of python

gaunt berry
#

yes ofc

grizzled pagoda
#

What is cool about python, you can run code on your computer to give mouse inputs etc.

#

That's probably the only thing I like about it

gentle patio
#

Hi

#

Wrong channel

#

Programming

#

👀

quasi oasis
plush walrus
#

👀

quasi oasis
#

That’s a very broad false statement that I could see getting very confusing for someone who isn’t familiar with JavaScript or programming in general

gaunt berry
#

but the guy i was talking to is familiar with js?

#

also, everything ive done in js needed atleast 1 promise

#

and thats only my first impression/pov

#

and keep in mind that we probably do different stuff, i for example do alot with apis and files that need to be downloaded and processed

small plank
#

Palombo, what AntiCheat does cubecraft have?

gaunt berry
#

sentinel

small plank
#

I know

small plank
gaunt berry
#

idk that one xd

quasi oasis
small plank
#

yes

quiet marlin
#

hi

small plank
#

hi?

small plank
quiet marlin
spice plaza
#

I sure hope that code is just obfuscated and not the source starenoot

small plank
#

yes its obfuscated 😄

gaunt berry
#

but its ok for a smaller server ig

small plank
#

1k people

gaunt berry
#

ye thats ok ig

small plank
#

but its $400 a week

#

so thats $1200 a month

#

for 24 hours a week working

dense zinc
#

$17 an hour ain’t bad

gaunt berry
#

24 hours a week is really not bad

sharp crystal
#

I can dream of that😂

dense zinc
#

@minor roost Hi

#

How do you host your bot

dense zinc
#

Any good hosts?

dense zinc
#

Interesting

quiet marlin
gaunt berry
#

hes a comedian banter

quiet marlin
torpid crypt
quasi oasis
gentle patio
#

x)

signal drum
#

programming related though

quiet marlin
#

Tell us a joke

#

Missing memes / jokes channel

dense zinc
rancid trail
#

Yo, does anyone here have experience with lowdb?
I'm building a random chat website and I think I need a small db for a queue where I store my websocket ID's so I can link two clients
Was looking for an opinion about this idea / alternative ideas maybe 🙂

#

ok I'm not gonna use a db for a live queue, sounds like a bad plan

grand yew
#

what is the best affordable web host?

#

if someone says me wix i'm going to kill myself

gaunt berry
#

weebly

#

youre in my mods folder lol

grand yew
#

oh my god this is disgusting

#

i remember when hostinger was free with no ads

#

i'm trying to learn how everything works, so i would use everything, from a static website to something related do dbs

#

where is this from tho?

gaunt berry
#

id recommend a vserver at contabo

#

it cheap and gud

grand yew
#

is contabo really good?

gaunt berry
#

id say so

grand yew
#

so hostgator probably isn't a great option

gaunt berry
#

youd have to set everything up yourself tho

#

but you can do whatever you want on it

grand yew
#

yea, i've already used hostgator and i had issues with folders

#

and i'm not even joking

#

i will go to namecheap then

rancid trail
#

Yeah, that's why I don't want to save them to a db, cuz that's way too intense

#

How would you go about establishing a connection between two clients then though?

rancid trail
grand yew
#

not a bad idea

rancid trail
#

^^

grand yew
#

that's cool! i tried to host myself a website and some gameservers, they worked but due to my isp i couldn't open the ports and make the whole thing public

#

yes

#

i was just stupid

#

there is no reason at all

#

i'll try to host a website in my google cloud trial vm

#

yea

#

same broo

#

for me, the best part of learning is finding a lot of ways to fix issues

#

that's amazing! i've never experienced it because i'm currently learning, but helping people is always awesome

grand yew
#

nice

rancid trail
#

Ye I like that too

#

:P

plush walrus
#

ok so as I talked about the API here some time ago, I am now working on it but I have a slight issue.
I have 3 files:

  1. main.py - main file used to start the bot and load all cogs (extensions)
  2. api_data.py - a file with functions I call from the webserver to get some statistics, this file has to be a Cog because I need to access the client object to return the statistics
from discord.ext import commands

class ApiData(commands.Cog):

    def __init__(self, client):
        self.client = client

    def get_guild_count(self):
        return len(self.client.guilds)

def setup(client):
    client.add_cog(ApiData(client))``` 

3) `webserver.py` - separate file to run the webserver, calls functions from `api_data.py`
```py
import flask
# ...  other imports

app = flask.Flask(__name__)
ipc_client = ipc.Client(secret_key = "Disconym")

@app.route('/api/guilds', methods=['GET'])
def api_guilds():
    member_count = api_data.ApiData.get_guild_count() # Issue here
    
    return jsonify(member_count)```
The line with "Issue here" comment is basically where the issue is ![bigbrain](https://cdn.discordapp.com/emojis/821737220812963901.webp?size=128 "bigbrain"), in order to call the function in `api_data.py`, I need to pass self and client object which I do not have in the webserver file so if anyone could help pls lol
spring tiger
#

It looks like you're trying to get a class variable/method rather than an instance variable/method

You need to get the ApIdata instance from the bot to get the information. Though your setup isn't really ideal
I'd suggest to have the discord bot regularly update a file/db with the data you want to track, and then have your web server read from that file /db

plush walrus
#

ohh sounds cool, I will do that, thanks!