#💻︱programming
1 messages · Page 29 of 1
. jar
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
do you all think its worth it to start c++?
I already know Java, Python, and JavaScript
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
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.
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]`...
https://github.com/AlwaysGetYou/SecretCore/blob/master/src/main/resources/todo.txt here is the todo list 😄
Contribute to AlwaysGetYou/SecretCore development by creating an account on GitHub.
"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
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
So TLDR: array is pointer to index 0 of the array, and &array is the pointer to the actual array?
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
and say &array = array = 0x1000,
then
&array + 1 = 0x1010
and
array + 1 = 0x1004 ?
presumably my arithmetic is correct
also, isn't this kinda redundant? the & and [0] cancel out, don't they?
Yes, you could just as well write array[0] then
ah thanks
Which you should probably always do
Unless you want to do something with indexed arrays
also I think you mean &array + 1 = 0x1020?
byte size is 4, 4 elements 4*4 = 16 + 1 byte
An int is 4 bytes, and an array of 4 ints is 4 * 4 = 16
#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.
Ohhh
0x16 is 22
Yes then this is completely correct
Hope it helped 🙂
cheater
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
This channel is dedicated to programming, if you want to make a suggestion or complaint you can do so on the forums; check the second link💡in #🔗︱helpful・info
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
At least you have programming companies
Here 99% of companies closed 🔐
when you forget a semicolon
why not just amend the fixes commit? xd
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?
what language is this
c++
ok great because if this was javascript in some way or another i would not go to uni for it
lol
Hello
hi
don't you just do 5,4 x 2.3?
do 5.4d*2.3d
no but it's probably something like
double area(double x, double y) {
return x*y;
}
Console.WriteLine(length * width)
no
the length and width is defined by the Console.ReadLine()
you need to type the length and width in the console
thats kinda not the point but it works too ig
A programming place cool I just noticed it I started programming a week ago it’s fun
it is
@torpid surge try:
Console.WriteLine(total % 7);```
make sure you understand it
Can u explain it ?
yeah check dms
anyone?
nvm found it
90-5
js is actually very similar to the example lol
Programming?
string name = Console.ReadLine();
string age = Console.ReadLine();
Console.WriteLine("Name: " + name);
Console.WriteLine("Age: " + age);```
Thx
int age = Int32.Parse(Console.ReadLine());
Console.WriteLine("Name: " + name);
Console.WriteLine("Age: " + age);```
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
USE Tryparse instead, be more all-case-inclusive. >:(
LOL, COULD SAY THE SAME MATE.
nah, you don't need to
aight
Have fun raising exceptions with that Parse, mate.
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
Well that depends, I would personally suggest Python @minor roost, you can check this link for some tutorials etc.
Thanks
😄
A question How does everyone get colored names on discord
By linking their account
Thanks
#🔗︱helpful・info first link ✈️
Have you got a language you're interested in specifically?
Python or JS are pretty good to start off with
English
Oh
lmao
Hmmm I wanna learn programming apps and games
might be worth starting with Javascript then
Maybe websites too as in html
cause then you have stuff like electron js
which can be used to make apps using web-based languages
id go with c# if you want to make games
You mean C sharp
yes
tbh you can use unity to make apps too if you wanted to focus on one tool
Ya I know about unity
Wouldnt recomnend it tho
oh yeah it wouldn't be optimal
all comes down to if you want to make a game or a general app first
then unity + C# is a good option :)
again, lots of online tutorials with a bit of searching
So you mean I go to unity and try their tutorials
mhmm 
My big bro is a tech and programming nerd I tried asking him but he ain’t a good teach
¯_(ツ)_/¯
He was like download visual studio and right after that he said well using system means we can use classes from system
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
Yeah thanks a lot bro. 😄
Ya
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
Whooo my school never it there is free tutorials though
https://education.github.com/pack <- Included in here
oh yeah mine doesn't either
the requirements
Hey I gota go study for my test tomorrow thanks btw I friend requested you accept if you want
Thanks and good luck with whatever your doing right now although I think your just chatting
👍
Wait what are the benefits of GitHub student pack?
a lot of free stuff
What exactly, never heard of it
There's at least 3 free domains in there
free unity education (which includes plus iirc)
free jetbrains products
so like
:o
intellij, pycharm, rider
not like I use those haha
credit for azure and digital ocean
But damn, I'm gonna claim that
they're pretty good :D
fair
oh yeah, it seems they add new perks every now and then
like there's some stuff in here that wasn't available 6 months ago

lol
Didn't know this was a thing, thanks!
Hey @plush walrus, that CubeCraft Discord RPC looks cool. Do you have any screenshots of it in action?
Found this one
Ye, it supports all stable miniganes, so like ew, se, among slimes etc
Nice
And well I kinda abondened the project but maybe I'll finish it some day
Yeah I saw haha

xd
asd
make it in js™️
Build a minecraft client that has RPC for CubeCraft
xd
Hihi
It's 5am what am I doing
That moment when you start to hear the birds outside
Yes
I can help if you like?
Would be good if there was a client that could handle all the major servers
Cause the current RPC mod for fabric is customizable but that's about it. Kinda static
is it possible to upload my api private on github and use it as a dependency ?
Check out jitpack, it’s exactly what you need
you can download files from a private repo afaik
are u sure?
yes
Well if it's yours then yes
im pretty sure
I think you can just do
git pull <link>
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
thats a option 😄
Sure
You just got banned by Sentinel - that's not good!
That’s not true, yes you can.
You have to setup a GitHub API key
And put it in your maven settings
Please stick to programming related content within this text channel. Thank you 😁
@small plank This might be your best bet unless you plan on working from multiple machines or working with others.
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.
Oooof can someone help me with my school for ict and computing lol srry for asking 😉
php
No problem
ooo php
im more of the java/c sharp guy
use ===, and also what are $args?
isn't it an array?
yep
Ty
and lemme see if php has switch
Yes
switch($args[0]) {
case "help":
//code that will be executed
}
yes
and I would recommend calling a method inside
or you could make use of user_call_function or something
Ok
Yeah this looks better
Does anyone know how to make a free server for bedrock?
download the software
run it
done
and if you need help, theres a readme file that explains everything
oof
@severe condor bus
No
hi
you've to specify which part of the array you want to compare xd
example if ($args[0] === "help") { code here }
of course you can do this too xd
Yes I forgot
Ty
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...
me when i forget to make a variable in a static class static:
Ik wel
Ik ook
Ik ook
lol
lol
:pingree: 😔
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#
outputting to where? console, string, array
wdym
Console.WriteLine?
ye
Like a Christmas tree?
for loop with a temporary string variable for adding each number and then substring off the final comma?
lemme go open an editor
with a " , " between them
on one line?
ye
aight just a sec then
what is comma tho
,
Console.WriteLine(string.Join(",", Enumerable.Range(1, 50)));
oh that's much cleaner
Stack overflow😂
Console.Write("1");
for (int number = 2; number <= 9; number++)
Console.Write(", {0}", number);
.
Only triples or including them on the same line?
triples
IEnumerable<int> numbers = Enumerable.Range(4, 50);
foreach(int num in numbers){
Console.WriteLine(num);
Console.WriteLine(num);
Console.WriteLine(num);
}
print the same numbers 3 times each number
would that work
Isn't it possible to type {0} multiple times next to each other
nvm thatd write it in every line
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...")


every programmer hates this trick
Easy
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
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

xD
Can someone translate this for me 01001011011001 and 10110100100110, I’m not an expert, and u guys are awesome.
Use online converters
Don’t know anything about programming so... how do y do that?
K and ´
Thanks
i know what you mean @torpid surge , console.writeline is out of my league too. 😔
Lmaooo
xd
https://www.reddit.com/r/discordapp/comments/nop0g1/yeah_discord_is_cool_and_all_but_can_it_run_doom/ new discord buttons be lookin smexy
Ye but
Console.WriteLine("Hello guys");
✋
sir, this is programming, not complaining about servers
i dont like server g730r it was a bad game
yk what i mean bungeecord28
ugh
smh my head
yes let's burn bungeecord28
i agree
@untold grail can we get some arson
calling in an airstrike
woohoo
👉 😎 👉
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#
oh microsoft <3_<3
yes we all love them
Program go brrrrr
wich programming language u guys suggest me to learn?
^
:o
It's not typescript, there is a javascript scripting api but most of the stuff is done through JSON data-driven files
Nice
pog
Finally flexing w coding :P
I won a PyCharm tshirt
And notebook
:o nice!
I created minecraft
I created You
Who are u
I have a doubt
Nvm Im mom
Why is hackers coming into my game
Its Cubecraft
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
Ok bro
hello this is the programming channel, it would be nice if you kept conversations about non-programming stuff in their respective channels thanks
Python is the only programme
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
Step number 1: Switch to Java
Step number 2: Code
Step 1: eliminate Toby
https://terapyte.github.io/PronExcluder/ i've made a software that overwrite the "hosts" file to block porn websites every time that you startup
my first serious creation
An interesting creation
uwu?
This is a pretty in depth guide @plush walrus https://programminghistorian.org/en/lessons/creating-apis-with-python-and-flask
I've used Python and Flask to make an API that tracks my plants moisture levels
:o cool, and thanks!
Can u run python on the server?
I can
static
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
alr, thx
Also p much any ssh connection will let you do sftp, less jank than echo over ssh lmao
and then theres me 

Apart from formatting, seems fine
meh formatting doesnt really matter
Putting { & } on new lines like that ew
Im never touching any code you ever write
lol
its the visual studio default
and yes i dont really like it either but its whatever
if you dont like it just change it lol
cba
¯_(ツ)_/¯
it doesnt affect me much so
Do you put them on the same line?
oh god what the
Nice
it actually looks kinda hot lol
it does
the brackets arent as visible which i kinda like
but you rely on tabs then which i doesnt like
😶
{ public property; constructor() {
this.property = 'value';
} public someFunction = () => {
for (let i in [1,2,3]) {
console.log(i);
} } }```
rate my code
/ban @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
No it hurts
+1
only if you start looking at the brackets
if you dont look at them it actually looks good
my brain can't handle this much of complicated language-
shush
it would look hot, if they didn't use ;}}} that's especially painful
i like brackets
;}}}
this
does that work or? because its deprecated.
Should work
Deprecated methods have a line through them no?
I think you're not catching a security exception
Or
It may be complaining because you're not storing the return of createNewFile (which isn't required)
intellij is annoying
what do u use then>
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
oki thank yoiiii
So you could actually write that in the if statement
if(!file.createNewFile()) {
console.log(This file already exists);
}
i want to die rn
Like French but slightly better, nothing is worse than the French
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
try pressing f11 maybe?
windowed is better anyway
☝️
did, same thing
why? isnt fullscreen better for fps?
well its a paint to set
and is just annoying
I thought that was the common opinion tbh
i have 2 monitors, 1 60hz and main 144hz, could that be a problem?
try it on both I guess
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
how do i make borderless windowed then?
isn't a thing for minecraft iirc
you can get a windowed fullscreen mod if you really want to
but those 20 pixels you lose dont really matter
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)
thats why i asked
does someone know how to decrypt bedrock server resource packs
not me 👀
aha
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
why not?
if he didnt care he wouldnt have encrypted it in the first place
The pack has always been encrypted, before the lobby icons.
lol
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
btw, fixed the problem, i updated windows -_-
cubes server rp is encrypted
you might be able to chuck it into intellij nevermind, this is new pog
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
thats the server resource pack which looks awful
ye it kinda does
When you say encrypted do you mean actually encrypted or is it obfuscated?
pretty sure 7zip comes with encryption feature
or password protection, whatever
tbf idk but sccording to mit its encrypted
probably just obfuscated tho since i can open the files
just finished my first post request api :D
😯
It is encrypted. The files names stay the same but the content is fully encrypted.
@quasi oasis ^
I implemented the encryption 😉
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
No, that won't happen but you should be able to override the texture in your own resource pack iirc
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
How did you define the textures in item_textures.json?
so the police wont arrest me the next morning? just want to make this extra sure xd
and yes i know i misspelled kit selector dont mind me
Fr it suxx!!!!
https://github.com/quartzexpressDEV/CubeIconReverter thats why i made this
making a forums post about it rn
I will give it a scathing review
@minor roost Please specify a song!
@minor roost Please specify a song!
@minor roost Please specify a song!
@gaunt berry lmao
This bot has 3 prefixes?1!2?2!2 omg epic
!ban @gaunt berry L
LMAOOOO
lol
I should make a bot that whenever someone says a message that doesn’t have the prefix it pings them and asks if they meant to use the prefix
That’d be peak humor
Let me do it for you😂
Making the most child friendly discord bot ever
With a super long and dumb message. I think that would annoy people enough.
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
do u use js for bots?
I do 🤡
JDA
Ooo
pro
J- JDA 🤮
at least it's not discord4j sheesh
Yes
Imagine not coding discord bots in css 🤡
I code discord bots in punch cards get on my level 😒
Yes
Does anyone know if JDA implemented slash commands and buttons? I think they did right?
they kinda did
@minor roost worked with it on our bot, maybe he can tell u some more about it
@arctic narwhal yeah I wanted to start a dc bot out of boredom because all my current projects have given me brain pain
Implementat some css 😏
@dense zinc
nah, but wait for a third pirty library
Coding a command will take ages
They should make something localhost ig
That’s an interesting way that they chose to implement it
"interesting" is an interesting choice of expressing it
eh, no thank you
If someone shows me one more cursed code image im boutta code ina shotgun to shoot you
*in a
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
I did it and after all, it was not that horrible
Not really into the new features, made a library for slash commands that didn't work out so I gave up
For Python there is one that works fine ig
It seems cool
But kinda pointless
But BUTTONS
Those seem useless too!
It’s like reactions but bigger
I still like working with reactions more
It looks better imo
I think the buttons are so ugly
They're blue
So you have to make a nice embed that matches it
Discord is fine as it is I don’t need more updates lmao but they keep coming
^
That's so true
What's the point of slash commands?
Like extending the /shrug etc?
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
I see the purpose and they’re cool, but they add no real functionality
It is, but a whole tab?
Exactly
They should be spending more time on moderation stuff tbh
Changing positions etc
Like all servers use moderation bots (except us for the longest time lmao)
Wow, thats kinda amazing tbh
And there’s no way to temp ban without a bot so it’s kinda crummy
It was all manual, I thought it was fine at the time but now with the bot I’m never going back
I understand tbh
How did you guys do it back then?
Instantly like a perm ban orrr?
In chat warnings then perm bans yeah
Anyway I should be off to bed, good talking to you!
TOO TRUE TO BE EVEN TRUE.
WHAT AN ABOMINABLE CREATION.
Thanks, pal.

can you n o t
:(
....
Legend
🤣
Again? xD
pong
@honest heath this channel is next 
can you not
again
what happened
me when the #💻︱programming 
LOL
guy spam pinging
Ping ?
just lock all channels 

ah yes
What happened??
Me when;
you do love people who fill the sad void in their heart by raiding discords
STOP
His name was gamer
._.
Or smt
ACTIVITY
ehm so whats going on?
YES
HERE WE GO AGAIN LMAO

FINALLY
he mass pinged guys
free server activity
can someone epxlain pls 😦
THIS CHANNEL IS GETTING WHAT IT DESERVES
LOL

@gaunt berry

oh thats confusing-
pog pog pog
xd
@gaunt berry
Ping?
u got pinged
Lol

now is the perfect time to advertise my program ngl
pls no more ping
@minor roost 
end this pain
:)
LMAO
Anyone wanna talk about ducks
omg translator
Why th am I getting pinged
How to program ducks?
It was someone mass pinging
they should spam #🔮︱nitro-plus・lounge ngl
Lol
imagine how hilarious that would be
const lol = require("ducks.js")
BBB
CCC
Let's move to #💬︱english・general please (:
no were discussing programming
Yeah
Ok
if you write your message into a box like this it looks like you are talking about programming
if you write your message into a box like this it looks like you are talking about programming
it doesnt
k
class cubeprogrammingchat{
const string = "yes it does";
}
This looks like a fun game to play
Ping
So that's meant to be JavaScript?
Ah
whatever you wanna call it
C# is good
yesh
it was called microsoft java back in the day
A guy who thinks he's cool using a selfbot
👋
Why do you like python
ME
cuz simple & ez to learn
I mean, there are a lot of disadvantages
It's the easiest beginning for the coding milestone
personally dont see one
Fact, but you should challenge yourself
Fact 2: KristN always challenges himself
I'd rather do something epic in Python than learning new language tbf
KristN
Well, if you would want to create a Minecraft plugin you need to know java.
dont wana do that
well I like how python is multipurpose
I think it's hard to switch language when you started with learning python
¯_(ツ)_/¯
thought abt it but meh
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.
ye I see your point
js is weird
Why?
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
what?
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.
<!doctype html>
im more on the nodejs side that the web dev side tho
You just have to use the function Promise#then() or run the code in an async function and use await.
Cool
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
yes ofc
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
This is not true. It’s not good to relay false information like that when someone says that are interesting in learning something new.
👀
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
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
Palombo, what AntiCheat does cubecraft have?
sentinel
I know
i know but what depency, NMS or
idk that one xd
We run a modified Spigot backend if that's what you're asking
yes
hi
hi?
I'm a anticheat developer for custom,
they pay me $400 a week for protection 😄 idk why but

I sure hope that code is just obfuscated and not the source 
yes its obfuscated 😄
thats not alot of money for an anticheat dev lol
but its ok for a smaller server ig
1k people
ye thats ok ig
$17 an hour ain’t bad
24 hours a week is really not bad
I can dream of that😂
Interesting
How do you get the rank of "comedian"?
hes a comedian 

By being a joke
(srry palombo but by having the role you walked right into that one..)

lol
You have to be funny
🥺
That is why Ben has it ^
x)
tell a joke
programming related though
it's #💻︱programming after all
You are funny?
Tell us a joke

Missing memes / jokes channel
Yes
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
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?
is contabo really good?
id say so
so hostgator probably isn't a great option
yea, i've already used hostgator and i had issues with folders
and i'm not even joking
i will go to namecheap then
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?
Just host it yourself 🤡 you'll learn about servers too
not a bad idea
^^
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
nice
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:
main.py- main file used to start the bot and load all cogs (extensions)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 , 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
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
ohh sounds cool, I will do that, thanks!
