#development
1 messages ยท Page 74 of 1
What will cmd do with those when it needs only 1?
i wanna keep it as .bat file
rip
ok.. just . i will give up with it. it took me 3+ hours to get to that point
@rare dagger I can just make it return a single one :P
Errr idk man now i kinda feel confused
Cuz i wanted to keep it as 1 file only
so idk if it is worth
E:\FindProcess\FindProcess\bin\Debug>SET foo = FindProcess 4
E:\FindProcess\FindProcess\bin\Debug>
this works
but, idk how to get it out now
Explain me what do you want to do?
batch is wtf.
omg if i missline once then all text goes wrong
This one may help
Batch Script - Variables - There are two types of variables in batch files. One is for parameters which can be passed when the batch file is called and the other is done via the set comma
@rare dagger dont work https://i.imgur.com/hUPcosP.png
cystal@DESKTOP-E49ULUK MINGW64 /e/FindProcess/FindProcess/bin/Debug$ variable=$(./FindProcess.exe 4)
crystal@DESKTOP-E49ULUK MINGW64 /e/FindProcess/FindProcess/bin/Debug$ echo $variable
144
^ bash under windows
@rare dagger yeah it needs to run. not interpret as string
xD
idk how you do that on bat
bash is just $()
Err
yea... kinda weird. i think imma end it here
"FindProcess" is a valid CMD command?
Not on my 2 Windows 10 machines it isn't
set user=%username% works perfectly.
@empty sentinel it doesn't
@empty sentinelthat was from another example lol
I just whipped up a quick C# program that queries the management store directly
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Management;
using System.Text;
using System.Threading.Tasks;
namespace FindProcess {
class Program {
public static IEnumerable<Process> GetChildProcesses(Process process) {
var children = new List<Process>();
var mos = new ManagementObjectSearcher(
$"Select * From Win32_Process Where ParentProcessID={process.Id}");
foreach (var mo in mos.Get()) {
children.Add(Process.GetProcessById(Convert.ToInt32(mo["ProcessID"])));
}
return children;
}
static void Main(string[] args) {
var children = GetChildProcesses(Process.GetProcessById(int.Parse(args[0])));
foreach (var child in children) {
Console.WriteLine(child.Id);
}
}
}
}
Hello, is anyone anygood with databases and SQL?
if so what is wrong with this sql
SELECT StockName, Count() FROM Stock JOIN SaleStock ON SaleStock.StockID = Stock.StockID GROUP BY StockName ORDER BY count() DESC
I was being stupid my bad I'm new to this sorry.
You're not putting the column name inside the count's parentheses. That's whats causing the syntax error.
what is 250 Mbps unmetered* bandwidth
not metered
is it a good thing or bad thing since im looking at OVH Vps for Web Hosting
good since they don't charge your for data
although I heard OVH vps's kinda suck
im not looking for an expensive one tbh
my minecraft network is small
so do you think it would work fine for me?
@gusty ermine make sure you don't get the ones that have vCores
if you hog more than 35% of the CPU they will start sending angry emails
Uhh so in the latest "Dev Ring" insider update this just got updated... Iam vary confused.
Design this amazing Login/Sign-up form with CSS and JavaScript animations.
Watch the step by step tutorial on my channel.
https://youtu.be/eQgmsIy7nQ4
Design Login/Signup Form UI using HTML, CSS & JavaScript || Front-end Designs || Front-end web development UI #1
This is the first part of Front-end web development UI where we'll be designing various front-end pages using HTML, CSS, and JavaScript. If you also struggle designing front-end pages, then this series is for you.
In this part, we'l...
no spaces
wait wait is that titlebar by default like that
can anyone help me fix this? i have never programmed before and im trying to make a bot but keep getting this error
Uh... did you mean to type "client" or "clinet" in the highlighted parts? ๐
that was probably one problem, now it goes and says this
@sly vigil i think (not certain) that js wants semi colon when executing tasks
Oh god just noticed
You started commenting out a bunch of code but you never finished the comment
Thats the missing token
You need */ at the end of the code
Oh thx so much @next light
js is weird, semi-colons aren't mandatory, but imo it's good practice to avoid weird behaviors
yeah it was a while since i worked with js and now im doing lua and C# one of them not needing semi colon and the other demanding one
damit
lua is annoying sometime
but been working with it for 3 years now through roblox
everything is a table
once you understand how lua scopes its metatables, its quite easy to use
you can use them to create instances, and do object oriented programming
as well as functional programming
yeah doesnt mean they are the only way to go and because they are really confusing, i rather stay away from them
like I said, lua only knows one actual datatype, and that's the scoping context of the metatables
tf?
ok i think we are talking about different types of lua here
cause ive been working on different games using lua now for 3 years
pretty damn good at it
yeah even your regular scope is a meta table
xD
its just hidden
variables in the local scope are just records on that table
with the variable name as the key
yeah i cant really talk that much about metatables, dont know how to use them, how they work, what they do and stuff
lua is lua
different versions of lua
apparently you can do js or other languages to compile to lua for roblox
ah
Luau (lowercase u, /หlu.aส/) is a fast, small, safe, gradually typed embeddable scripting language derived from Lua. It is used by Roblox game developers to write game code, as well as by Roblox engineers to implement large parts of the user-facing application code as well as portions of the editor (Roblox Studio) as plugins.

if you create a variable in lua, you can also access it by doing __index['variablename']
that's what i mean, that the entire scope, is just a metatable
as said, metatables are really confusing
and when you call a function, it pushes that metatable onto the stack
and adds the parameters.
this isnt "some version" of lua
this is how the language functions internally.
yeah im not gonna learn how they work here and now, if i ever do learn metatables, it will be during the day when i do some research
just saying, if you know how to use metatables yourself, it allows you write some powerful constructs
and makes writing more complicated systems easier.
im good
i got no need of metatables rn, maybe not ever
i do C# at school and probably gonna use C# when i start working and pretty sure C# doesnt have metatables
;-;
yea, because C# has a stack-heap memory model.
completely different from the way that lua handles this.
nothing that i can speak of as i got no clue what that is
anyway, imma head to the store, cya
;-;
Lua and C# are completely different things. They aren't even comparable.
C# is much much much more powerful.
Lua is powerful in other use cases, like embedding in other language, or as user addon in games or third party application since you don't even need a full fledged IDE just to write Lua and it's almost always sandboxed by other system
like you will definitely need IDE to write C#, you will forget all those long syntax and the required formatting
C# be like
using System;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
Lua be like
print("Hello World")
that comparison is kinda bad, all the C# stuff is boilerplate, as in any object oriented language
C# is meant for big complicated projects
Lua is a scripting language
yeah
learning C without an IDE is a good experience
for starters
just plain gcc
does anyone have experience with the linkedin API? im a bit confused as how the authentication works (apperantly with oAuth. But im a serverside noob)
drop your code here
have none. Dont know where to start its for a MagicMirror2 Module @hollow basalt
so uhh, start now
GET https://api.linkedin.com/v2/networkSizes/urn:li:organization:1234567?edgeType=CompanyFollowedByMember
Gives me an error saying i have not authenticated? how would i go ahead to do that?
I have allready gotten an clientID and secret but dont know where to put those
that sounded so familair, couldnt put my fingers on it
`import pygame
import time
#Color Settings
background = (46, 52, 64)
button = (100, 100, 255)
width = 800
height = 1000
fps = 60
win = pygame.display.set_mode((width, height))
win.fill(background)
pygame.display.flip()
def main():
state = 0 #0 = Picture, 1 = Main, 3 = Settings
landscape1 = pygame.image.load('landscape.png').convert()
landscape1.set_alpha(255)
win.blit(landscape1, (0,0))
pygame.display.flip()
inanim = False
clock = pygame.time.Clock()
run = True
while run:
clock.tick(fps)
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
elif event.type == pygame.KEYDOWN:
if event.key == pygame.K_w:
if state == 0:
if inanim == False:
inanim = True
landscape1.set_alpha(0)
pygame.display.flip()
print("send help")
time.sleep(1)
inanim = False
state = 1
pygame.quit()
if name == "main":
main()`
My janky code, when clicking w it prints out send help, but the oppacity does not change
I have probably offended every single python coder with my bad code
Can anyone help me decide on whether to learn common lisp or a scheme language like clojure or racket?
What's your purpose
i hate that random numbers are printing at the end
can't seem to find the problem, just added switch cases to have the function accept different parameters based on the user's input
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
things like writing basic CLI programs such like a cyclic redundancy check program
use haskell and regret your decisions
i was also thinking about haskell but im not sure if i would be able to adapt to it
At the end of the case statements you have a printf could that be why it is printing an additional int?
Also that function does not appear to return an int. Maybe I am just missing it.
why am i unable to install btrfs-tools from the ubuntu ppa?
Ububtu ppa?
Nevermind I remember what they are. Did you run sudo apt upgrade are you on an Ubuntu version supported by the ppa?
Some papa's only support an older version of ububtu for some reason.
sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.```
```bash
sudo apt install btrfs-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package btrfs-tools is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'btrfs-tools' has no installation candidate```
oh
i tried apt searching but doesnt return any results either
Would the package name be right?
yeah i searched google and it seems to be right
also gparted telling me to install it
Btrfs or B-Tree Filesystem is a modern copy-on-write filesystem for Linux that implements many advanced filesystem features, which is designed to support high performance and high-capacity storage systems. By going through this article, you will learn how to easily install, use, and get started with Btrfs on Ubuntu 20.04 LTS.
This suggests btrfs-progs then it should work.
i was able to successfully install btrfs-progs (enables creation of the btrfs file system) but gparted says i cant use it until i install btrfs-tools
unable to read contents of this file system!
ok let me try a reboot
might fix some issues
Also, I would not rely on a ppa for a system critical component like file system.
what do u recommend
also rebooted and it seems i still cant install it, but gparted's issue is gone now
Trying to stick to what the distro provides.
okay noted!
If you have a core component like that and you update you might have to reinstall.
oh i see
I have done that with graphics and it booted just fine, but the screen wouldn't do anything. The GPU drivers were installed from a ppa of some sort.
ah
Did it work?
yeah currently trying to move some files onto it
So I have a problem where I want to sort the result of f(n) where n is a large number - 2^32, maybe as high as 2^40. No problem, I'll just use an AVL tree and store the indexes in the tree. Now I want it to be fast, so I'll want to use C. And if I do it using a struct or objects you nearly quadruple your memory footprint, so I want to do this using an array. Should be no problem, that will have been written a hundred times before, there will be plenty of examples on stackexchange surely. Right?
Evidently, wrong.
yes - but that means more space in memory. Remember that 2^32 is already going to be 16GB as an array index; at 8 bytes per index it'd be 32GB
@pliant siren okay, and why in memory?
I mean, if you're indexing a large dataset like that, you sure native implementations like that are sufficient?
@pliant siren you could use a hashed array tree
with a pivot in the middle of your dataset
A HAT or any kind of HashTable is going to use vastly more memory than you ideally want to use.
Also, the intent is to generate a sorted list. A HAT won't give you that. You would still need to sort each column, and then mergesort that, which is exactly why an AVL tree is ideal - you end up with a data structure which is already sorted and ready to traverse.
As I said - I want to sort f(n) for n=0...(2^x)-1
essentially what I want to do is calculate f(x), then in the avl tree store x. Every time you do a comparison function, you would have to re-compute f(x) for the current value and every node as you traverse the tree. This is because f(x) is a 256 byte value.
Does anyone know how to get a systemd timer to wake a system from the shutdown state?

sudo sh -c "echo 0 > /sys/class/rtc/rtc0/wakealarm"
sudo sh -c "echo `date '+%s' -d '+ 10 minutes'` > /sys/class/rtc/rtc0/wakealarm"
sudo shutdown -h now
The first command clears the rtc, then the second sets the timeout 10 minutes in the future, then it shutdown. After 10 min from setting the timeout the computer wakes up.
I found this: Not officially supported by ACPI, but it usually works when looking at rtcwake manual page.
You could just use the sudo rtcwake -m off -s 600 to do the same as the previous shell code.
hmm fair enough
ok, what about, which do you think is better for a beginner
like I'm just looking for something that lets me push my commits to my github repo from linux, and maybe swap branches
everything else regarding merging and issue tracking and whatnot I'll just do on the site
@nocturne galleon git cli is the way to go
I use my IDE for actually comitting code
but being proficient with the CLI, means you can use git in any situation
most noobs that I see use Sourcetree, but sourcetree completely breaks down on larger repositories
if you try load the linux kernel git repo with Sourcetree, it explodes
source tree also doesnt know how to rebase properly
and if there's a mismatch with the repository, it just crashes
i learned git before these GUI got popular
CLi is still the best choice
Learn Git CLI. All the GUIs I've used are limited and the GitHub CLI will tie you to GitHub, so you won't know what to do if there's a project on GitLab or other alternative Git services
ouch ... so it wasn't actual bug in the software
https://twitter.com/ocornut/status/1383002610790174721
i found this https://github.com/indraai/IndraMind wtf is it? pls @ or dm.
the first file they import in .src looks like some sort of self made/hosted AI modules
but i hate JS with a passion so im not reading a single line more
cool, thanks for the info.
i made a website
the html files worked with my custom font
but not when i uploaded everything to my host
i even put the font on a cdn which usally helps when local files aren't being found
but no luck
it would be helpful if you supplied code
@font-face { font-family: Chunk; src: url('Chunk.TTF'); }```
doesn't work
works locally opening the file in browser
but not on the web
are you need not
yes
<h2 style="font-size: 37px; font-family: Chunk;">```
aww
ok
just using my brothers laptop lol since im not home and im fixing his website
he used to post sometimes here
ill leave
staff
plz no ban
what's your host
sparkedhost
cheapest
$2/m
ive used them before
dk why the host would be the issue here
it's running cpanel btw
i just uploaded everything to public_html
๐ฉ
the file was named .ttf
not .TTF
i guess it's not case sensitive locally
sigh
everytime this kinda stupid thing happens
@hollow basalt dont keep searching incase you didn't see
I'd say that the git cli is better since it has better integration with ides and vim(via fugitive)
I somehow wrote this without being tired or drunk
i think i'm just bad
(^ is the XOR operator here, and A XOR A some number A will always equal zero lol)
hah
wdym by don't work
what do you want them to do
@midnight wind when i click i dont get redirected
nothing happens
the click animation does go tho
nvm i got it
I did foobar level 1
๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐
IK the first one was pretty easy but still
kinda proud
hiya. im not sure if this is really the best place for it but looks similar...? i have a school coding project due tomorrow and im terrible at coding...all i need help with is a username and password system for 2 users to start a dice rolling game so itll probably be very simple for most of you. if anyone has 5/10 minutes to try and help me please dm me so i can send you screenshots of it thanks
did you not pay attention during class? :P
Hi All, long time listener, first time caller ๐ Decided to join in the see what the fuss is all about. My topic of discussion today is Raspberry Pi Development and e-ink screens and bank savings tracker (I'm from the UK - so ยฃ's and bank accounts and not checking accounts LOL).
I have been working on many things over the years. But my most recent is a python3 app that will look at your savings goal for a specific UK bank and display the progress on an attached eInk screen.
๐ฅ
@hollow basalt idk what else to day
but sounding the alarm 1 day before assignment is due..
it's not like I'm disagreeing
sounds like poor planning
my teachers a little bit useless lmao
yeah but that is besides the point
if your assignment is due tomorrow, and you dont have a thing to show for... that's poor planning on your part
dropping the problem in a public channel, hoping for someone else to do it is... not really honorable
i said ive done most of it? ive done 350 lines of code that i ahevnt been tought and really struggled with and asked for advice on how to do one small thing that would probably be about 10 lines worth? i dont see whats so bad about that?
also this was meant to be due at the end of may but last week when i wasnt in school due to illness my teacher told everyone it was due sooner and its only because one of my friends asked how i was finding it that i found out about the deadline
it's better to just ask that specific question about those 10 lines than to try to have people pity help you over your poor planning
well 24/31 of the students parents in my class have complained about her, weve only had 2 months of teaching from her in entire school year and have had no lessons about coding at all in school, so maybe its just bad circumstances but i didnt know how to do the task well. i had it operartional and it did 8/9 objectives well, however i didnt know how to complete the final stage, and even when i did find it online i wasnt sure how to integrate it into my program. all i did was ask for some guidance but sorry?
i dont think its poor planning if its out of my control? and i wasnt trying to get pity i was trying to get advice?
no it absolutely is. you're trying to get someone to dedicate their time in DMs in which they are obligated to help, by asking a very generic question that can involve any one of hudnreds of techniques or technologies or languages or structures, and then saying you need it done urgently or else you'll fail this assignment
you were suggesting that i was being dumb and relying on others to do the work for me, when in reality ive tried and havent been able to so i was just proving that shes not the most helpful
ive done it now but ty
Then why ask for someone to dedicate their time in DMs in which they are obligated to answer every question that you still haven't asked or clarified, rather than simply phrasing your supposedly simple question so that anyone with a decent understanding can answer it in passing
well it took 4 hours to learn a tiny bit rather than 10 minutes of someone telling me what i needed to learn but yeah i guess. cheers
i outlined the problem and context well enough that i thought most decent coders could at least think of something thatd help of the top of their head. as it happens id done the login system for user 1, so was gonna ask for advice about how do do user 2 in a similar style but yeah i suppose
The issue with asking for generic DM help is that I personally consider myself a great programmer in a lot of areas, and I help people all the time and invite people to DM me with questions. However, if i do the same to you without knowing wth you're actually doing, you could be working in some popular language or framework that I don't personally know well, like Java, React, TypeScript, etc. Then since I already offered you help, I am basically just led to googling the same exact things you have to google, which basically just leads to me telling you what to put in the search bar
The actual situation is rarely relevant. What's more relevant are the requirements and constraints you have. What technologies are you using? How are clients connected? What does the server look like? etc
Anyway, it seems like you've solved the issue, so good job. In the future, be as specific as possible when searching for help so that people can actually help you without having to poke your brain for all the details ๐
well yeah i guess but i didnt have all the info thatd have been helpful and this is my first time coding anything more than like 5 lines so hadnt fully considered that
yeah haha. sorry and thanks lol
yeah i understood about 3 words of that sorry...
This language looks suspiciously like Java but isn't lol 
I rarely work on customer or end-user facing code
I mostly do embedded and hardware stuff
lately been working on various encryption stuff on FPGAs
I've even come to hate server code too
Basically any code that has to interact with user input, i'm out
All the fun is taken out of programming when you have to think of the 30 million ways a user can fuck up a text form
Then you get things like this https://twitter.com/RachelTrue/status/1365461618977476610?s=20
Notice her last name is True
๐
Iol
reminds me of a person who changed their name to NULL
and all of a sudden they had hundreds of tickets
and fines
lol i love that story
@last ingot anyways, i find embedded and hardware development far more interesting because I think the problems are hard and engaging and you don't have to deal with nearly as much fuss
embedded programming is cool
I could probably find similar enjoyment in large-scale deployment stuff like distributed databases and region caching schemes and whatnot, however that just wasn't the path i took naturally so i'm a bit far removed from the skills needed for that
Things like kubernetes
yeah basically
embedded is fun because of the restricted nature of it @last ingot , you really have to think outside the box sometimes to be able to get something done
trick is, everything should be as stateless as possible
and all database and/or storage is done somewhere else
not in kubernetes
Like, I was responsible at some point for improving the code that would record a bunch of stuff in the event of a total system crash
However it was way too big compared to the size of the flash space available, we have like 15MB reserved for this purpose and the total size to record was like 70MB
i ended up implementing memory compression to take it down to 3MB and sped up the process from a few minutes to 15 seconds
what was interesting was because it's a crash scenario, you can't use any sort of dynamic memory/heap, remote function calls, kernel calls, etc. So i had to basically do everything on the stack. I had to modify the compression algorithm to support some preallocated memory and inline as much as possible
what algo did you use
LZ4
there was already an implementation of it on the device so it was a clear answer there lol
and another useful property was that it can be used as a stream of data, without having to analyze the entire thing first
Someone knows C lang?
yes
maybee
Anyone with a working wsl2+vscode+electron+react setup that can help me get it up and running?
its possible they only have a windows machine and dont have real vm permissions or dont want to set one up
ok so I got a class restaurant and I got a class foods. everytime you add a food in the constructor for foods an instance of the class restaurant gets created so the food that you created under class foods can also be added to the list of foods which is in class restaurant. My question is how do I do if possible: I write a food with certain parameters in class foods and these parameters get recorded for this food in class restaurant but I call the food pizza(because I am adding pizza). Is there a way to get that name and record the food in the restaurant class but with the same name without putting the value into another variable first and then putting that variable into the restaurant. Can I directly use the food name I created for class foods in main?
example
I mean I know I can do it with input by the user console read stuff but can I do it like this directly in code by referencing?
like I write a bunch of foods and when I start the program they all automatically get recorded in the restaurant without me having to put them in manually
and r.Foods is a list
https://paste.mod.gg/ewexeyotan.cs
c#
Since I'd rather not use my laptop since my desktop is way more comfortable to do stuff on. Also, I'll be using this at my internship later on, and the work laptop I've got doesn't handle VMs good.
You could dual-boot with linux right?
Not allowed to... Anyhow, seems I've gotten it running by using chocolatey to install nodejs. It does however fail when trying to build... 'build' is not recognized as an internal or external command, operable program or batch file. following this: https://medium.com/@brockhoff/using-electron-with-react-the-basics-e93f9761f86f
No worries. Not so familiar with react or electron but was asked to test some stuff
pretty decent with js thou xD
@native helm try npm run build
hmm.. Running into an issue. I'm fetching from an AWS S3 ListBucket, looping through until I've fetched all items (10.000+) but it fetches some of them multiple times. Doing something like this:
async function getAllItems() {
var marker = "";
var done = false;
var items = {};
do {
var chunk = await fetchItems(marker);
// looping through the items fetching the values I want
if (undefined !== chunk["ListBucketResult"]["NextMarker"]) {
marker = chunk["ListBucketResult"]["NextMarker"];
}else{
marker = ""; done = true;
}
} while (done === false);
}
fetchItems is an async function that uses node-fetch to get the XML, and fast-xml-parser to convert it to json.
.
I'm pretty the 2 equal signs and the ! Suppose to be spaced out from each other by 1 space not put together
can I put image as a background on a whole table column(which includes three rows) and the background is one image it starts on the first row and ends on the third but is only on the second column?
I tried putting every cell of the second column in a class and then do the background for that class but then the image starts again on each cell and I want it to start once and end once not have it start again for each cell
code https://paste.mod.gg/ozerabuxux.xml

is it live data? could it be that that whole array shifts because data was inserted somewhere.
Hello, I'm having some issues making a HTTP 1.1 server and I was hoping someone would be able to help me. I am trying to serve a video file to the client (firefox) so I respond with a 200 OK and start reading and sending the file, if I don't do anything this works fine and get me through the entire video. If I try to seek/scrub at all through the video firefox then closes the connection, and sends a new request with a range header, the thing is this range is always the last 29 KB or so of data from the video file. I respond with this data and then firefox never requests any more data so once the original buffer of video runs out the video freezes and won't play even if I try and scrub back to content it's already played. Any ideas?
here are the actual headers https://pastebin.com/rNSHB4qs
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
so I played around with my code a bit and made it so it sends 2 MiB chunks at a time now and made it multithreaded where each connection gets its own thread. I think making it multithreaded fixed it since I had to restructure the code and I suspect it was having issues keeping the connection alive and was getting blocked by a waiting accept() function where now each thread doesn't have to wait for that it waits on read() instead
hi, im making a website and the css isnt working even though the items has the same class name
html
<ul class="App-nav">
<li class="Nav">Home</li>
<li class="Nav">All Products</li>
<li class="Nav">About me</li>
<li class="Nav">Shopping Cart</li>
</ul>
css
.App-nav {
margin: 0;
padding: 0;
list-style-type: none;
}
.Nav {
display: inline-block;
}```
game dev friend tells me GMS2 can compile her game to ubuntu if she had a distro installed; i've been planning to install an archlinux-based distro myself, so i'm wondering if i could get her a native linux version of her game
would i be able to compile it with my own copy and licence of GMS2 through manjaro, despite it ostensibly being for ubuntu?
@calm venture never seen restrictions for software on a specific distro
usually, you compile your software against your kernel headers
and then it will run just fine
ubuntu-specific just means hat you get a debian package you can install.
if I download a full clone of my old repository, is there a way to view the actual commits and issues if I reupload? or was that only a github thing
maybe I can view commit messages but just not issues?
Did you load the css
Commits are the whole reason git exists
So yes of course
Issues on the other hand are a specific thing github made iirc
idk how but it works now
aaah ok
Nah, not live data, it's actually a few days old, so it's kinda solved by using the API for the more up-to-date data. Didn't know of that API at the time xD
by live data i ment, was it continiuosly updated. but its good that you found the way to solve it.
No, it's periodically updated, so every few days it gets a batch with all updates since last time. In general it doesn't need to get updated more than maybe once a month or so.
got it; thanks
is this channel for software only or is hardware stuff ok too
both
ok poggers - back in like 2 weeks
That dank momment when you abandon your project to play minecraft with da bois
what program is that?
oooh
Yeah i have one of those xD
But I mostly use git
so I dont see the site too often
well github really is just a git server
with just a little on top
Yeah I set up a website's source and some game projects there, but I havent poked at the gui too much
Maybe you forgot the ./ in your link @abstract lichen
Yess GitHub and GitLab are great
Team GitLab here tho lol
alpha beta pruning isn't helping at all. All the time is spent creating the tree. The evaluation of the tree doesn't take much time at all so the alpha beta pruning isn't making it faster at all
can you tell me a simple function or way to sort an array alphabetically?
I don't want advanced complicated algorithms just a simple method or something
c#
I don't really do much programming these days, but stackoverflow has answers to most simple questions. Whether the answers are "correct" is a whole other story. Also, do keep in mind that most teachers know people turn to sites like this for help, so don't just copy paste the code unless you can also explain how it works if asked.
https://stackoverflow.com/questions/16636554/sorting-an-array-alphabetically-in-c-sharp
yeah thanks I did it by the Linq method
I'm currently working on similar problems... but the array is of size 2^32 and the data that needs sorting is 256 bytes long ๐
Fortunately, the data is deterministic so there's some speedups you can use.
the color screan
The green led turns off too
what os are you using
Raspbian
is it stuck on that screen?
Yeah itโs still there
try re flashing your os, you might have corrupted your sd card
Alright ty
thats probably a hdmi overscan issue
Recursively printing
pstree
``` to the terminal from python
You might have been able to extract the kernel files and copy them over to your PI sd card to get the PI to boot up.
Most Linux distributions keep a few older kernel so that it can boot to an older kernel if the newer one wasn't installed correctly. I have 32 kernel images on one machine.
32?!?
geez
idk whether this is better suited for #crypto-currency or here, but
has anyone built a cryptocurrency before?
i mean, fully functioning with p2p netowoking and all
(literally all the tutorials on youtube just build a blockchain and call then call it a day. usually dont even save things as files or anything either)
Does anyone know how to make the magic mirror custom?
Is there a tool to safely run TFTP flashing for routers and not be like ages old ? (I know about tftp2.exe, etc. but they are not that friendly for less technical people)
I think a more user-friendlier tool would actually get more people to be customizing their home router.
I'd be willing to write one myself if there would be no good alternatives already and I wasn't able to find one yet.
Any suggestions ?
Hey guys, I'm searching how to make a discord bot that can start a program on my computer. Is it possible ?
of course it's possible
I learned python yesterday so it's new for me, but cool ! Thanks for the info !
it's pretty simple tough
hey just a quick question can you use => as string splitter? For some reason in my task it says that the input has to be done like this
c#
What would be a good free c# ide
Vim?
Emacs?
Nano?
Never mind I do not use IDE's as much as I should.
Maybe Visual Studios or Visual Studio Code.
vs code
learnt it IN A DAY?!?
vim emacs and nano arent IDEs
theyre text editors
.
Yes and no, it depends. If the bot runs off of your PC, then it is as simple as using a function most fitting your usecase from the subprocess library (E.g.: subprocess.run or subprocess.popen + subprocess.communicate to get its output)
If it ran on a server somewhere, it would be dangerous to try and execute something on your PC
@umbral saffron Visual studio community edition
Visual Studio code is just a lightweight text editor
but if you are going to develop and debug .NET apps, you need regular VS
Vim and emacs could likely be modified to function like a IDE.
You can 100% develop and debug .NET Core apps in Visual Studio code. It was at one point just a light weight text editor, it is a full blown IDE at this point. It doesn't have all the features of "Visual Studio" but it has what "most" people need.
@warm sleet if you add the right extensions for what you need, vsc has as much, if not more functionality then vs. there are just many more extensions, and less stock functions.
I find vim enough for simple projects, but once I work on more in depth stuff where I may not, for example, remember function names and such...
Yeah VSC has evolved SO MUCH over the last few years. I am a software architect / engineer at a .NET shop. I uninstalled visual studio proper a long time ago and never looked back.
Extensions in VSC are so powerful.
only problem i had with it is that debugging embedded systems can be a bit buggy or just randomly fail on start, and i think that is just a problem with my debugger's server.
Yeah - every once in a while I will run into a bug with an extension, - you tell them about the bug - and its usually fixed pretty quickly
If you find a bug wtih Visual Studio though - good luck getting that fixed ๐
I've seen this one
It's a classic
Isn't azure data studio just a vsc extension?
I know it is its own download, but I thought I remember that being started as an extension and then they decided to just offer it as a standa lone - but it uses the same core code
i don't know, i mainly use google's services.
Ah, its not anything related to azure - its just a light weight replacement for Sql management studio
The naming is dumb ๐
?
It "was" an extension but they broke it out into its own full fledged app, that is basically VSC for databases, with its own extensions lol
so its built on the same platform - I wish they had more db engine support - but its pretty nice and super light weight (and cross platform)
i use this when i'm on the go on a phone with termux: https://github.com/cdr/code-server
Nice, I tried using AWS code in the browser thing
it was horrible
lol
Do not recommend.
still waiting on that github codespace beta thing.........
I have it available?
github 2077 ? anyone wanna subscribe?
been waiting for a response since.... last year probably
ah maybe because I'm a student and therefore have pro?
no, but they say it's a closed beta. maybe your institution got access?
ยฏ_(ใ)_/ยฏ
look at this lol
i said "i sure do love the word out of stock"
With Plugins you can make them better than 69% of IDEs
I like how I understand just enough computer science to get this
I had the good fortune of being interviewed on caches the day of, ie 30 minutes after my final on computer architecture ๐
Epic
lmao ye for sure
n i c e btw
Wanna develop games?
Start today. Develop browser games easily.
This is the very first video of my Game development series using JavaScript.
Hope you like it ๐
Develop JavaScript games.
This is very first Tutorial of game development series..
https://youtu.be/2sMcvCLd5PI
Build a Memory Game using JavaScript, HTML5 & CSS || JavaScript Game development Series || Part-I
In this video, we will be developing the amazing Memory Game using HTML, CSS and JavaScript. We will see how we can add various levels to the game and maintain the users score as well.
This is the very first part of the JavaScript Game development...
One liner + taking a screen shot by using their phone...
Is something really open source, if no one wants the source?
Technically . . .. . . . . .
yes
ew cringe
I would have taken a normal screen shot but I made this on a school computer so
but I guess that just makes it funnier in a massochistic kind of way
isn't your case of the class off
Like ReactionRoles > reactionRoles
I prefer camelCase
Did you come from C# or something
Can't say I've heard a lot about that
it's incredibly obscure
Just be wary people will likely slate you for naming your classes that way in Java from what I've experienced
really?
yup
why? it literally doesn't affect anything
Something something readability something
as long as it doesn't start with a special character or number, right?
Class names should be nouns, in mixed case with the first letter of each internal word capitalized. Try to keep your class names simple and descriptive. Use whole words-avoid acronyms and abbreviations (unless the abbreviation is much more widely used than the long form, such as URL or HTML).
but it's a part of a minecraft server where they luse minecraft blocks to represent events, actions, if statements, etc. it's actually quite powerful for what it is. So don't be confused if you can't look it up online lol
Lmfao fair enough, I make Minecraft mods in my spare time
nice
I'd actually recommend checking out the server, it is very very intuitive and easy to learn as well as not dumbed down for experts
also lots of doctor who stuff
I used to be, but they took it off netflix before I ever had the chance to finish it
I was on the 12th doctor, too
outside the us? i recommend getting britbox or use bbc american if so
anyways, i worry we're taking this channel off topic
yeah
pls press ctrl alt L while this class is focused
I've always wanted to make minecraft plugins and mods
but hc is a great substitute while I learn actual java
plus it also has a player base so you can get people to play your game like, immediately
which is cool
cool
forge and fabric modding for mc isnt too hard
once you know the basics of java tho
yeah I've created very very simple mods
oh do you by any chance know how to do guild specific stuff on discord bots?
yeah
I was planning on looking it up later today lol but you seem to know what you're doing so I thought I might ask
I learn better from a person than a wall of text
well, i never looked into sharding discord bots (creating a instance per guild)
but for a basic approach if you dont expect your bot to be used in a load of servers is to just check the server id of the message
well I ask because I'm currently working on a bot, but I wanna make it so all the reaction roles and such aren't hard coded
and afaik there's no way to save a variable after a restart
or name a variable the ID of a guild (which by the way would be SO useful)
save to disk
oh my god you can do that?
oh this opens so many possibilities lol
oh, to be a novice java developer in an oversaturated discord bot market
public static String lttDiscordID = "375436620578684930";
@Override
public void onMessageReceived(@NotNull MessageReceivedEvent event) {
Message message = event.getMessage();
if(!message.isFromGuild()) return; //Guild messages only
if(message.getGuild().getId().equals(lttDiscordID)){ //Is Ltt Discord?
// Do something
}
}```
How to only do something in one specific guild
I would not know that as I don't have your code in front of me and you asked how to do guild specific things o.O
but save to disk does what i want it to so
glad to have been of help then lmao
I think you just want to save both the message ID and role ID for the reaction message to disk
thanks lol
Then when someone reacts to that message read from db
^^
However im not sure how the Java lib works, but the nodejs one doesn't receive the events after it has been restarted
Just something to keep in mind
finna learn how to make a database today B)))
sql aint too hard to learn
Use lots of hot glue.
is that an IR transmitter? how do you intend to have it on your arm and still keep it pointed at the drone? @umbral saffron
If I mount it on my arm with the LEDs sticking out then I just turn my arm and itโs pointing at the drone
I recommend using a database (like MySQL/other variants), it takes a little more time to learn than json but it's so much more reliable if you're going to be reading/writing many times
Anyone here know how to use unity and mind helping me fast?
PSA: Any of you who use github, check out the chinese website CSDN for your code. Even if your code is free, someone else is able to make money from it by posting it on this website. I know it may seem unimportant, but I don't read chinese and I also can't use WeChat to report the offending listing.
Are you talking about persisting a little bit of program state between restarts?
sqlite is amazing but may also be overkill. I'd start with serializing an object to a text file ๐
It all depends. Sqlite is fine if one can also afford to loose the information stored inside due to unrecoverable corruption (SQLite isn't, unlike a full fat RDBMS, very corruption resistant).
Serialized objects are also fine, just depends on how much one needs to perform operations with the data before loading it. Stuff like filtering
Honestly SQLite is much more corruption tolerant than you give it credit for.
Sudden poweroff's not that big of a deal, multiple applications accessing it simultaneously is safe as of version 3 with any vaguely modern operating operating system.
It's certainly more tolerant than serialised objects with no extra precautions, which handles neither of these safely.
Faster, too, as you don't have to load, edit and rewrite the lot for every change.
If you want corruption tolerance you should back your data up regularly. A "full fat RDBMS" will not save you from data loss if the disks it lives on die.
if your dataset is smaller than 1MB, you can just serialize it to json or xml
if you need more flexibility, try YAML
if you have a large dataset, consider a middleware database
@inner wraith its not multithreaded.
That's SQLites biggest problem
it doesn't scale.
it only really finds its use as configuration storage on embedded devices like in mobile apps
pretty sure that sqlite also doesnt enforce constraints, and doesn't have any transactions because of it being singlethreaded
so yes, data corruption can certainly still happen from application faults, if transactions are not properly committed. They can also not be corrected because there is no transaction log which can be used to rebuild the database in case of a fault.
Oh I'm perfectly aware that it doesn't scale for writes.
It actually does scale for reads btw (up to disk performance).
But the requirement was small, and simple.
It is vastly better than JSON, XML or YAML for the stated purpose because you don't have to deserialise and reserialise the lot on every update.
You mentioning threading is bizarre. Threads are not the issue, you can have multiple threads with SQlite... It just has to lock the file on disk for writes, putting a cap on write performance.
@warm sleet
Do any of you know anything about making oscilloscope software?
SQlite is fine for workloads small enough that you can afford to just do a regular data dump. We recently moved an app that's running on a 1GB SQLite DB from a VM to a kube cluster and for a variety of reasons the performance became so bad I've had to migrate the whole app to MySQL.
Yes. It's a LOT of data to store. Don't do it.
Hey guys. I got an SQL/EF Core 5 question for y'all:
I have a table Users, a table Games and a table Images.
Can I set EF Core 5 is such a way that both, user and games have a 1to1 relationship with images?
I dont want to have separate GameImages and UserImages tables.
edit: nvm figured it out.
You know how 8k cameras have crazy high data rates to store data? Well, oscilloscopes are like that.
Aw, and here I was hoping to make a cool effect to use with my live stream setup.
If you just want to sample it and plot an image it can be fine. But consider how many data points you need to sample and record if you're trying to represent say, a digital signal running at even 40MHz.
I take it the average video editing rig isn't going to be sufficient, then
It's not so problematic if it's just a continuous repetitive signal you're trying ot represent, but if you're trying to actually look for and measure changes in that wave? That's when you get in to crazy territory.
If all you want to do is ignore abberations and outliers, it's fine. But if you're talking the kind of oscilloscipe and equipment you might use for diagnostics? There's a reason they're expensive.
Well as I said I just want to make a cool visual to use on my Twitch stream
Nothing diagnostic about it, heh
But if that's the kind of quality it takes to make a nice visual, then I suppose I'll have to explore other ideas for the visual
Yeah, By the time you're trying to scale an application in a cluster out it's definitely time to use something else.
are you familiar with how normal databases do locking to prevent conflicts? SQLite canโt do that
File locks render the DB effectively sequential access only
Also, reads are not fast, because SQLite requires file loading per connection, which is not at all like how normal databases work (where the DB reads to memory, amortized read across all apps)
It uses filesystem locking, also yes completely aware of all of this
(Do people here think I'm suggesting Google switch their search engine databases over to SQLite or something?)

Nope, just pointing out why talking about concurrency isnโt odd?
This was in regards to someone wanting to store a bit of state per guild for a Discord bot. And concurrency != multithreading, which they claimed was impossible.
SQLite is also not very corruption safeโIโve had DBs randomly corrupt without recovery over a weekend for no reason, it also has poor handling of malformed data, which can brick tables and are annoying to recover from (since SQLite doesnโt enforce column types)
The proposed alternative was serializing JSON.
SQLite is just CSVs, so not much different
Iโm being emphatic ๐
Iโm very familiar with SQLite, as someone who inherited a fairly critical app which uses it at work
Note: donโt let non engineers build stuff
I've seen some really stupid stuff when people with idea of how to plan a system out just bolt things on ad-hoc until every query takes a few minutes.
Current workplace has this issue bad.
Just inherited 3 systems with this problem about 2 months ago and I'm slowly cleaning up one of them because their solution was using BigQuery as a timeseries database (oh but we'll change historical events sometimes and break it).
Oh god
Please do not use BigQuery as a general-purpose database!
Ugh, Iโve had teams do something kinda similarโthey used SyBase IQ for everything
โ ๏ธ
It currently has ~50 small clients and costs $3k a month or so in query costs.
You pay per gigabyte scanned when you run a query.
Table's now partitioned on timestamp, so per-client report costs scale with the global data ingest size rather than with all data ever, so hooray.
You have 100 same-size clients rather than 50? All queries now cost double.
TLDR: When making software that scales to infinity in the cloud, make sure you actually think about what would happen if it did.
This was just a single node - it was just that the performance of the disks on the kube cluster was far slower than when we had it on SSDs on the VMs.
Good man.
You got my point.
lol
what???
Pretty easy question i suppose but i dont know anyone who could answer it:
Is PHP dead? i have an option between HTML/CSS course vs a PHP one.
They say at the school that PHP one is pretty easy but i don't want to learn something i wont have full value of if its going down the drain.
from what i know php is more similar in use case to something like python or node js
id personally recommend node or python over php, but you should take that html/css course regardless
@celest imp
Thanks for input @spring pond. similar answer from what i've gotten on other places, so guess il go CSS then php if time allows it.
To be clear, HTML/CSS are not programming languages
I mean i've already finished C# and starting python in 3 weeks. have to expand due to points to get in to another school. rather learn something IT wise instead of History of bangladesh or something.
If you're looking at maximizing utility, I'd probably do the html/css thing if you're not yet very familiar with them. It's something that just about all major web tech stacks have in common. Take any frontend framework, any backend framework, and they're probably producing HTML and CSS. Even if they have you build the UI out of some other primitives, it's good to understand what is happening in the browser.
Yeah makes sense. I've marked myself for HTML/CSS now and having PHP as backup/future one unless something else pops up.
due to Distance EDU right now here its a bit finicky to get into to some courses so i take what i can ๐
with kids a job house and wife, Not much time left sadly
need the course points as well to have it as a valid excuse to cut down worktime for moneeys
anyone up for a c++ problem?
i may or may not be an idiot
cout << "Digite o " << numDeInput << " numero : \n";
cin >> ntemp;
if (numDeInput == 1)
{
break;
}
else
{
input[numDeInput] = ntemp;// guarda o valor digitado no local x do array
numDeInput++;
}//os numeros 1 ,2,3,4 estao no array input
}
numD1 = input[0];
numD2 = input[1];
in this code on line 3 if i have it ==1 it never stores on the [1] position.
if i have it to ==2, aks for the input 3 times and only then saves it to [1]
i cant for the life of me figure out why
supposed to ask for two inputs and save them to [0] and [1]
quick question, where did you learn C++, I have been learning C# making discord bots ect. but am limited to what i can do
C++ seems to be better for communicating with games so wondering where you learnt
im at a point if i dont know if im being very stupid. or something is borked
i know the feeling
I learnt from embedded programming
still learning
i spend 4 hours filtering a list earlier.... yes i was being stupid ๐
what do you mean by this?
code on microcontrollers
stuff like Arduino
ohhhh i see
thats pretty cool
i would like to get to that stage at some point just gotta change jobs first
full stack web dev seems like the best option
So I've got a 7* 6 2D array (width* height) in python. Say if I have a particular array index like [5][4], how can I return the positive and negative diagonals as separate lists?
Yeah im planning to make a plugin for a game to output information which can be handled with a bot
possibly expand it to allow more people to get involved with developing plugins for the game without having to learn C++ by allowing them to access all the data via the C++ plugin
thats the plan anyways xD
think I will need it tbh ๐
@bot.command()
async def wanted(ctx, user:discord.Member = (None)):
if user==None:
user = ctx.author
wanted = Image.open("wanted.jpg")
asset = user.avatar_url_as(size=128)
data = BytesIO(await asset.read())
pfp = Image.open(data)
pfp = pfp.resize((284,284))
wanted.paste(pfp, (88,229))
wanted.save("profile.jpg")
await ctx.send(file=discord.File("profile.jpg"))
Poggas
Anyone know how to get Visual Studio code to be aware of Angular concepts?
I've created some components, and now wish to have syntax completion when doing string interpolation
I added the Angular Extension Pack, though I still do not interpolation with autocomplete.
Like, inside the .html?
Anyone here know how to port a linux application to macOS (ie. re-compile an app for macOS)?
Do I just have follow the compile instructions?
@nocturne galleon any app specifically?
@hallow pilot Yeah. But I concluded it was caching. Restarting the editor suddenly made it work.
Specifically "Ryujinx" but I confirmed with someone that it would build, as for working well, I have to see if MoltenVK works/improves the experience a little bit
@nocturne galleon Its .NET Core
Yup
Yeah so that probably runs fine on macOS
Alr, Thanks
You need this
Thank you but I already installed it
fair
Still having problems?
@rotund harness well, just lack of autocomplete in my component templates
it doesn't immediately recognize functions that I created
I'm used to using WebStorm
but my employer does not pay for this sadly enough
really miss my IDE :(
The MDN Web Docs site provides information about Open Web technologies including HTML, CSS, and APIs for both Web sites and progressive web apps.
what are you having trouble understanding
Learn JavaScript Promises in 100 seconds, then follow my new IG account for even more content https://www.instagram.com/fireship_dev/
Reference MDN https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
#javascript #100SecondsOfCode
Upgrade to Fireship PRO at https://fireship.io/pro
Use code lORhwXd2 for 25% ...
for promisses specifically
I reccomend to use async/await for more readable code
which is just synatic sugar on top of promisses
The await is over! Learn how to make your JavaScript Promise code beautiful and concise with async-await https://github.com/codediodeio/async-await-pro-tips
Jake Archibald's Talk: https://youtu.be/cCOL7MC4Pl0
Demos with Angular: https://www.youtube.com/channel/UCYFd7Qy93YP7gPERnxP545A
@unkempt sonnet
Iโm trying to use an old psvr for a project, and Iโm trying to connect it to my Mac
The only thing Iโve found is MacMorpheus
Has anyone used it? I need help setting it up
@unkempt sonnet the solution: do not use plain javascript
typescript has a whole language construct for async code, and it takes out all the crap that javascript does
async functions, which you can await for
async functions return promises, which you can either wait for, or callback
typescript has this built into the language, so you don't need to declare promises, it automatically wraps them
async getSomething(): Promise<string> { }
you can then wait for: const something = await getSomething()
if you don't use await, it will return immediately and set something to a promise of type string.
so does js
js has async/await
I am learning ts though
for the types and everything
and checking
just started yesterday learning the concepts. Going to redo a discord bot I'm making to TS
the hardest part is the beggining since I want to keep it maintainable
so like, do I keep each command in it's own object?
do I do this
do I do that
basically it's a bot that takes info from this API
caches it in redis
and you can do things like this
what I have trouble with though is the caching of the actual embeds since they have classes and you can't serlize them. So for now I just turned off caching for the embeds and just did the api requests
and on the other hand I need classes for the embed since I need to add the In <time>
I just need to redesign how I do it
@midnight wind the trick with loose functionality you'd want to put in a class otherwise, is to use constants with functions in them
so const myfunction = () => { //body }
you can import these from any other location
without needing a class instance
yeah that's what I was thinking
what I was also thinking is to just cache the data, but then when it's retrived from cache and deserlized it will tag on methods
this mess..
If someone wants to do a paid commission to make 2 Youtube chat commands (with API's inside of them) send me a message. $30 USD for re-making these 2 commands from Twitch over to Youtube.
I'll send you all the documentation and API related stuff, so yeah let me know
Lol that's some discount software development ๐
Do you already have a bot in the youtube chat thing?
Yeah, I feel like asking a dev to do something for 30$ is more insulting then just asking them to do it for free. You probably would be better off with something like "Anyone available / willing to help with some youtube bot? I have it working in twitch but want it working in youtube."
That being said, might be students in here - that just want something to do - who knows :/
I'm not asking someone to make a bot. It's just two commands in nightbot.
You plug in variables to read a YouTube chat api in both examples. You're not programming a new bot, just creating two commands within http://nightbot.tv
Ah, okay, that makes more sense. It's making a new nightbot command, within nightbot, using their syntax. Not general-purpose code in a general-purpose bot.
Their docs describe integrations that pull information from a bunch of third-party sources, including Twitch, PSN, etc.. but I don't see anything about YouTube: https://docs.nightbot.tv/commands/variableslist
For the nightbot stuff mentioned above you would be using URLFetch to read/output stuff from a Youtube API
https://docs.nightbot.tv/variables/urlfetch
https://developers.google.com/youtube/v3/live/docs
yea, kinda
sure
widget?
There's embeds
but those are just fancy messages
not really iirc
afaik there is no โlive updateโ functionality for discord
really all you have is updating the message
do you know how to disable the auto bracket-new-line in vscode c++?
identify the plugin responsible, and see if it has any settings you can change?
I haven't used it in a while, but it looks like the plugin respects .clang_format
Have a go yourself if you haven't before paying someone $30
I did. Couldn't figure out any of it. I'm just a streamer, not an api... person. Makes me seem like an idiot but yeah
@sand kayak are you looking for a program to stream to youtube?
its just a bit annoying to configure, because these kind of network thingies are very strict, can't mess up :3
and nomenclature is always a bit confusing if you dont work with it
@warm sleet im looking for someone to make two commands within nightbot (http://nightbot.tv) that pull data from YouTube api's
mh. not really my world
No that's fair. I'll have a look for you.
The next questions I'd try to answer are 1) does youtube even have equivalent APIs, and 2) is the nightbot http client capable of talking to them (which may mean multiple requests, authentication headers, etc.)
Just want to show of a pic of a synth i'm working on โค๏ธ
He's prlly reusing the same code
Yeah, you want promises. What you're asking for is basically what makes javascript ugly and difficult to use compared with other languages.
async is contagious. afaik there's not a great way to get back to synchronous. so you have to let msg = await getID(); , which means you need to be in an async function, which means that needs to be async, all the way up to your entry point
What kind of execution environment? (web browser? node.js?)
I'm having trouble understanding this prompt from my textbook "Declare an array of three pointers to functions and invoke the appropriate
function based on an index value passed in as an argument.". can someone clarify what pointers to functions mean?
Callbacks
msgID would be a promise value. What you want is let magID = await getID(); but that wouldn't work if it is not in a asyc function. What else you can do is this js let msgID; getID().then((id)=>{msgID = id})
They lower would work ona top-level
Async/await is just a wrapper around the function().then.then.finally.catch syntax
But async await is much more readable than promise chains
does anyone know how to use an if statment along with an else if to play sound
with a list of numbers associated
this is js btw
switch?
wdym?
what does that mean?
The switch statement evaluates
an expression,
matching the expression's value to a case clause, and executes statements associated
with that case, as well as statements in cases that follow
the matching case.
I work in code.org because my school makes me
I don't think that statment is in code.org
its javascript
besides i dont think our teacher expects us to know what that is
so? say you learning it^
ig well thanks for the help
I have no clue as to why Euler's Number is being used in this codepen
https://codepen.io/Alca/pen/BZbPrE
its a clock
language? (C?)
yes
lots of calls to discord api
I think there is a limit
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
Proud of my team for getting a new version of our game out today
Yeah, it's in the C language
void (*fun_ptr_arr[])(int, int) = {add, subtract, multiply};
Once you understand the concept, but never remember the syntax, then there's https://goshdarnfunctionpointers.com/
Gosh Darn Function Pointers: Examples for declaring function pointers in C
Does anyone code here and if so what software do you recommend. I've finished a couple ap computer classes over java and I wanted to code over the summer(doesn't have to specifically be for java). I've used visual studio but I've heard people trash it so I was wondering if there were better alternatives
I personally use Atom. Atom is more than enough for me lol
but for java, you may want to use Jet Brain's IntelliJ IDEA
notepad++ is alright, but please don't use normal notepad 
Interested in other languages? Or just more tools to Java with
monke
yeah im kinda looking to dip my toes into a couple languages
Whatever language(s) you choose, I'd recommend https://exercism.io/ for a series of small exercises to work through.
I wish I'd been exposed to functional programming earlier when I was learning. (maybe try F# or Clojure)
alright thanks, Ill take a look at it
@brisk sparrow IDEA Community edition
Download the latest version of IntelliJ IDEA for Windows, macOS or Linux.
hard to beat that IDE
If you are looking for a java IDE, look no further
Its hands down the best one on the market
I've been using ultimate for the last 8 years now, and I cannot really go without it anymore
@hollow basalt the ultimate version can also be used for web development, python, node, etc
i do use it for that
plugins are free for the ultimate version
spring
ew
ehh, it's what the work needs
I know IDEA integrates with spring
sooo
but that doesn't fix the shittyness that is spring.

my new workplace uses spring for everything
must be fun
and they have a "micro"-service for OAuth2 tokens

time to migrate to boot
no
for even more lel
Time to migrate to Spark
Spark Framework - Create web applications in Java rapidly. Spark is a micro web framework that lets you focus on writing your code, not boilerplate code.
You really do not need much for a tiny rest service
spark is nice especially kotlin
yeaaa
i see that sparked your interest
private static TemplateViewRoute createCall(final Method method,
final Object provider,
final boolean login) {
return (request, response) -> {
try {
if (login && !session(request).login()) {
LoginHelper.login(request, response);
return null;
}
return (ModelAndView) method.invoke(provider, request, response);
} catch (IllegalAccessException | InvocationTargetException e) {
throw new InternalServerErrorException(e);
}
};
}
@hollow basalt pretty neat ^
this takes a service method, and service object instance
and a boolean if the user is logged in or not
it generates a function
yikes, that code makes me feel like I'm using js
that handles the request
@hollow basalt the entire route resolving is done with lambdas
it wraps the target method
@hollow basalt yeah but the thing is
route discovery is done through reflection
I scan types by annotation
and register them in a list
(ModelAndView) method.invoke(provider, request, response);
this is a reflective method invocation
this.getClass().getMethod("foo").invoke(this, "hello world");
I also use reflection in spring, but tbh. i don't like it that much
@hollow basalt its the one thing that makes OO powerful lol
reflection.
@hollow basalt lol route discovery: https://i.imgur.com/1Y5bkwB.png
yikes
"lambdas for simple"
first part filters classes from service classes
the second part
Arrays.stream(p.getDeclaredMethods())
.filter(m -> m.isAnnotationPresent(GET.class))
.forEach(m -> {
String mPath = "";
if (m.isAnnotationPresent(Path.class)) {
mPath = m.getAnnotation(Path.class).value();
}
m.setAccessible(true);
route.addRoute(
new Tuple<>(
RequestMethod.GET, combinePath(path, mPath)
),
createCall(m, object, m.isAnnotationPresent(RequiresLogin.class))
);
});
goes over each method of that service class
checks if it has a GET annotation
then it checks for a path (class and method can define a path)
idk man, do you like the annotation more?
@hollow basalt well thats the thing
that getRoutes() method
returns a list of elements that can be app.register()'ed
i kinda like "explicitly" doing it, than being wowed with the magic of "it just works"
@hollow basalt well.
idk
@Path("status")
public class StatusController {
@GET
@Path("service")
@RequiresLogin
public ModelAndView getServiceStatus(Request request, Response response) {
Map<String, Object> models = new HashMap<>();
ServiceAPIClient client = session(request).getClient();
models.put("services", client.getStatus().getService());
models.put("servers", client.getServers().getServer());
models.put("page", "Status");
models.put("page_desc", "Services");
return new ModelAndView(models, "status/service");
}
}
I think this is pretty nicely done ^
this is the code it 'reflects' over
this registers a GET to /status/service
-> @RequiresLogin , your auth middleware i assume
@hollow basalt that's actually a JavaEE annotation
but yes, I implement its functionality
and that's why I don't usually program in java
