#development
1 messages Β· Page 29 of 1
???
from my experience people who start with C kind of stick to that for a long time
If you do that, you're problem isn't C
because they have to deal with things that should be abstract
for example a set data type
It's most likely lack of motivation or stupidity
Which would result in a worse scenario with Python
when writing a program, you shouldn't need to implement set by yourself every time
Because now they can suddenly do enough to cause some damage
yes, you should know what happens in the background
@hasty sail we're not at the point of writing a program
We're still at the point of learning
yes
That's literally code monkey
no it is not
Able to build solutions
yes
Literally code monkey
you are quite stupid if you think that
I have learned C for ~1h and I know more about what happens in the background than people who started learning from how some abstractions are built
If you think that building solutions is the important part of programming, you are either still learning or a code monkey
Almost anyone can learn to do that
almost, yes
but it is not that common to write actual effective solutions and write clean code
solving problems effectively and cleanly is the key
That's the key to building software
Not good software
But software
And cost effective software
yes, good software
That's where code monkeys are good
good software is scaleable, extensible, flexible, effective
They can build something that works and maybe look into the future a bit
or you are just sad that codemonkeys can actually do something
Code monkeys are important though?
Code monkeys are the majority of what is wanted
And the majority of programmers
I haven't seen anyone who I would classify as a code monkey by your description
???
maybe I just haven't worked with any of them then
You yourself have literally seem to have that mentality
It's not bad, there's just a difference between learning to program to make things and learning to program to learn things
you can take a look at my github if you want to
I don't care about your code
This whole conversation is basically "Wtf"
Practically applying ideas with code is pretty straight forward
Once you have worked out how to solve a problem programmatically
yeah, I can't be bothered to explain things to you anymore π
You haven't explained a single thing lol
I really can't stand web development, backend OR frontend.
I'm trying to implement online multiplayer in my game, and allow players to host their own servers. I'd also like to allow players to log into ONE account and have that be the way to authenticate with a server - nothing else.
So I have a webserver and a REST API that handles logins and stuff like that and both the client and the server talk with it to query user information
client logs in sending a username/password pair over SSL to the server, server checks it, let's em in, and sends back a user token. Client sends the user token with all requests to the game servers, and the game server uses it to get the user ID which is then used to look for save data and other content on the game server for that user.
Only thing is, this backend API that actually HANDLES user logins is insanely annoying to program and use.
And coding the HTML/JS frontend is even worse
because JS just...gahh. I hate it.
If anyone could recommend a free, open-source solution that does what I need to achieve this...it'd be greatly appreciated
What do you use as your backend ? NodeJS ? Or some other language/framework ?
I use C#. I wrote my own HTTP server to handle the incoming requests
my current setup is a CentOS 7 server with nginx that handles things like SSL and simply uses a reverse proxy to forward inbound requests to the API running on a different port and not visible to the outside world
so when you go to https://watercolorgames.net/api/whatever, your request goes from your PC to the nginx proxy which is how you get SSL, and the nginx proxy forwards it to the API's webserver which actually handles the request
though I'm thinking of making it so Discord handles authentication for the game servers
and killing off this API entirely and using the nginx reverse proxy to point to apache+php which will host something like phpbb or drupal
The main issue now is how does one get OAuth2 (through discord's APIs) to throw the token back at you when the user's logged in so that the token can be accepted by the game client right then and there without you having to copy the token from a web browser into the game (like I've seen some programs do)
This redirect from your web browser to an app is simple, the callback url for your auth form simply redirects to a basic web server running on the app that gets the callback call and then do some stuff with it.
oh god, if you want speed (for a realtime game) please dont use apache + php
To simplify this login nightmare, you could use a auth library. I tried to find one for C# but I didn't found anything useful. The only auth library that I know is Passport.JS for node, maybe search for C# equivalent.
And Nginx can do PHP. You don't need Apache for this.
btw, what you're trying to do is basically implement your own OAuth2 server
there are libs/apis for that
hence, doing it with your own server or doing it with discord would be exactly the same thing
as far as the client - private server are concerned
@small escarp the apache+php thing wouldn't be used by the game
it'd be the website lol
well, if you're running them in the same machine, they are using the same resources
also I'm aware nginx can do php but it's insanely hard and annoying to configure compared to Apache.
Unless someone wants to configure it to work properly for me based on what community frontend I decide to use then I'm using apache
Not that much, just install php-fpm and then just look at a site config. It just 5 lines of config file to add
I mean I've gotten it to at least try to use php
but certain CMS software wouldn't work properly in nginx
gotta love those digitalocean tutorials
yep I use em a lot
but there's one that goes over how to set up vnc
don't follow it directly unless you're really cautious about shutting down the vnc server when you're not using it.
What are those CMS that require Apache?
The server they make you install...
it limits your password...
to a max of 8 characters...
and I forgot to turn off the vnc server...
and someone was able to VERY EASILY brute-force their way in
and trashed the server
and I accidentally left my Discord open on the server (was using it to get around school restrictions, mwahahaha)
so they tried to break up with my boyfriend using it too
and leaked ssh credentials and shit on my discord guild
all while I was asleep
Luckily the guys who did it are incredibly memified and hated in my community so everyone pitched in to help recover everything that was damaged
and why did the server had a graphical interface at all?
(and why did the server have personal ssh credentials to begin with)
@small escarp Because I wanted to get around my school blocking Discord, and without writing a bot you can't use Discord through SSH.
these same guys who hacked me actually hacked PowerPoint OS Network (look it up)
also, note that servers are typically based on non-preemptive kernels
so they make awful "interactive computers"
I run CentOS now (before, I ran Ubuntu) with SELinux and not a single password in sight below 50 characters.
(Also the SSH credentials they leaked were for an account THEY created which had sudo privileges on that server.)
(Anyone could have used them to totally raid it.)
(But instead one of the people on my guild logged in and shut the entire thing down and reported the incident to another one of our sysops who was awake at the time)
I wonder what software the LTT forums use
...and now easy it is to customize/theme
not easy at all
I need some help with some basic terminology
I have a PHP class with a list of directories I am importing files from and exporting to a diffrent directory
public $sassInDirectory; public $sassOutDirectory; public $jsInDirectory; public $jsOutDirectory;
Can I create an array and call it something like public $workspacePaths;
Or what should I even name that array
Because what I plan to do is have this class then itterate over each directory and then create the directory if it does not yet exist
Does that make sense to do?
I'm not good with JS, how would I go about extracting the value of access_token from this URL?
http://localhost:3254/itch_callback#access_token=my_itchio_token_you_no_getsies
are you using just plain js or some framework?
plain JS.
I want the code to be as compact as possible because it's embedded into a tiny C# webserver that just waits for an OAuth2 callback, grabs the token, and brings it into the game I'm working on
regex?
usually I'd parse the url on the server-side but itch.io decided to put the token after the # character in the url and the browser doesn't send that part of the url to the server
I uh also don't know regex lol
You could try a window.location.hash but it only works when you are on the actual page. (if script is loaded from the same url)
If not, you will have to use regex.
ahh it'll be embedded in the html of the returned response so I should be fine
so just extract the hash and send to the server through ajax - bam.
var token = window.location.hash.match('(#access_token=)(.+)')
thank you π
that code seems to have broken
because when the token was sent to the server it came in as that
(see the _token value under Locals)
For those of you using JSON.net -- this is a very cool tool https://app.quicktype.io/#l=cs
@nocturne galleon Is that an API or MVC project? :U
looks like WebSockets
Oh...
Never used them, and probably never will in the foreseeable future.
WebSockets are cool, but Microsoft doesn't have a good standard for them IMO. Nobody has corrected me yet tho
I need to look into Monogame after finding out that it can make 3D games, I'd only seen 2D games up til now.
Eh, I guess I'll stick with Unity.
@proper saddle it's not either
I wrote my own webserver
embedded into my game
for the sole purpose of accepting an OAuth2 callback
also yes it can do 3D
but it's WAY harder
To the point where I'll be using UE4 if I ever decide to do 3D.
Does anyone know any good and free website/mobile app UI designer? I know Adobe XD but it's not free
Windows or Mac?
https://designer.io/
It's multiplatform (even available from the web), paid equivalent are better tho (Sketch or Adobe XD).
You're welcome !
Poi
Working on an app π
how about not making peoples browser mine your bitcoins? @karmic sinew
@untold flame maybe check into this?
hm?
he posted a link to a site that he claims is a game he made, but it has a trojan (javascript) that makes the clients computer mine cryptocurrency for him
tldr the site is infected
Have proof? I'm testing it out and my CPU is fine. not showing any higher usage than normal
im familier with coinhive and all that
i posted a screenshot
ah i see the FAQ now
but the user is not informed immediately asfter opening the link and just starts doing it
from what I can tell it only starts when you "opt in" with the checkbox? I'll remove the link for now and if they put it up again I'll ask them to put a warning
as you can see from my screenshot i got the popup immediately after opening the link
funnily enough i can't get it to start taxing my system.
well I checked the web and some people have trouble removing it
i assume that it just scanned the code and saw the call to coinhive. thats how most anti-miners do it
all good now though π thanks for tagging me
thx for looking into it
It only starts once you accept it. Anti viruses see the js includes in the page and get angry
Iβm planning on moving it to a separate page so users who donβt opt in wonβt see the warning
New experiment https://bbsspace.neocities.org
a friend of mine has done quite a bit of coding and developing over the past fast few years, but only in java, c# and the occasional bit of python. now, he got a commodore 64 and wanted to do some serious codeing on it, not just BASIC. i advised him assembler, but told him its quite far from OOP programming...............
the next day he came to me, asking how to make a class and how to give it methods....
i laughed my ass off
told him to be carefull with what he asks bare metal programmers
shame these bare metal programmers you speak of are backwards asf and cant make anything useful
True that
@karmic sinew that's fine. Might want to post a more obvious warning.
im also planning on using Adsense once they approve me
Anyone know how to make two css grids so that there would be two collumns and two rows
So like this:
___________
| | |
|____|____|
| | |
|____|____|
like 30 seconds lol
What do you guys think of this design? Using bootstrap but made some changes to it. This UI shows the admin all the website competition submissions.
Pretty decent
___________
| | |
|____|____|
| | |
|____|____|
That guy: "Python's where it's at! You can do almost anything with it!"
Me: Fuck off
I refuse to use python
die hard π I like it
To my own detriment
You really hate yourself to learn C π
I respect that.
It's a real man's language
I don't wanna judge other people for using languages with more abstraction
I'm personally not comfortable blindly depending on something that's actually very complex
I want to at least sort of know how it works
Makes sense
I remember in Electronics class in high school. The teacher always said that you can confidently say "this is how a radio works" instead of "it works fine"
I think a lot of people miss that these days. Ask questions, learn more, wonder, imagine. You know what I mean?
I'm not sure
I think what you're describing is a very new and modern way of thinking
relatively
It was always the special types who thought about things. Regular people didn't really bother with it
You know... The Newtons and the Descartes of the world
I don't think thinking scientifically has ever been something for your average person
Trending #off-topic
I will only use a library when I am convinced I'll either never be able to code it (or shouldn't, think crypto) or if I'm certain I would be able to code it if I had the time.
At least that's what I've been trying to do
Not going to claim it's productive
But I have managed to do some cool things
And I've learned a lot from it
I don't really have any experience with developing applications that are suited for general audiences.
I don't want to go up levels before I've been to rock bottom... I'm basically just slowly digging down and I want to work my way back up.
One of the goals I've set is to at some point be able to type out a program byte for byte, no linker, no compiler, just instructions typed in as bytes and a manually created PE header. It would probably call a function like MessageBoxA saying "Hello World!". I'd love to be able to do that
It's totally pointless and nobody who doesn't understand it will be impressed by it but I still think it would be cool to be able to do it.
Anyone looking at it would think to themselves "Wow you've achieved literally nothing". But I would disagree.
I'm just ranting at this point
Anyone got some thoughts on that rant?
I get the feeling @whole quail would get where I'm coming from
hope you are testing all your implementations π
As long as you understand what you're doing and can seperate learning from actual development for a client
If you like learning
Learn everything you want
There's never going to be harm in learning too much
It sounds like a good goal too
It's nothing too crazy and it's achievable while also letting you learn a lot
I'd hire the guy who wants to learn about things over a guy who learns a standard and follows it strictly
For high level positions
For low level positions you don't need good developers
Average or mediocore devs are fine for the majority of things
And it's fine to not be an above average developer
But if you want to bring something special and make a difference you've got to do things that make you irreplacable
Like spending 10 years of your life learning things that might seem unnecessary so that you can give a unique aspect to your work
The things I'm doing atm I couldn't ever do without spending years doing that seemingly unnecessary stuff I did. Because of that I'm able to build a service that is so unique it hasn't been explored much if at all.
Pace yourself though. Learning all the languages at once won't get you anywhere
tries writing C# in a JRE enviroment
If you're in a hurry you're not learning for learning, you're learning to do something
if you truly want to learn because of learning, then you should learn haskell
haskell is a plus in any resume just because of it, no need to apply it anywhere, it just says a lot about you
There's no harm in learning older languages
Actually quite helpful when learning about more general comp science to look back at history because the present is so god damn complicated now compared to decades ago
the harm is that time is finite
you can only learn so much
concepts from functional and object oriented languages are more interesting, useful and mentally challenging
also, there is somuch more to software dev than writing code
project management, team building, testing, verification, etc.
that is another set of challenges a sw should master if they want to work in the industry in a great role
also, expressive languages make development easier, not more complicated π hence leaving room to make more complex systems
Concurrency is a blessing and a curse
:S
so code that needs to be tested...(?)
that typically means they are doing it wrong
if you don't like tests, you should join us at machine learning
every bug is a regularizer
40-50 lines of code..... ouch! that can never be good, in any context
yes, but it takes experience to see it
sadly, not every lead has it
c#?
those are awful
you should screenshot them and send them to WTF
(if legal)
a research lab
- startup
saving whales
ever heard of Sandi Matz's rules? https://robots.thoughtbot.com/sandi-metz-rules-for-developers
Back in January, Sandi Metz introduced her rules for developers in a Ruby...
(no, in Chile)
they are quite harsh (and it's for Ruby so, context...) but they are decent guidelines
even if I don't follow them, thinking about them sometimes helps simplify things
@warm frigate "this function looks simliar to 2-3 others, make it one function; with 10 params"
Never. Do. This.
Yes, the sentiment is correct. You should convert your common logic into private routines/functions. Seperation of concerns after all.
Just make everything static and you'll be fine. Access the code from all sections of the environment π
Converting large portions of logic is creating a large concern alone, and seperating too small a portion creates too much work to maintain.
And TriggeredNerd, that's just a waste of memory. Accessors are a thing to avoid that.
Yeah I was joking lol
To be fair, the first thing I ever wrote as part of my actual career did and still does that. Shit's pretty fast, but it doesn't do much anyway. Only facing like max 2 users a day.
Yeah same. Minecraft plugins with all public static function was a terrible idea. Memory leaks like crazy
I use a fair amount of static methods in plugins .-.
Never had a memory leak issue with any of them
It's that or I'm putting the same like 5 methods in every single class lol
At least they're protected 99% of the time rather than public, so they're a little safer
I know nodeJS run on raspbian easily
I used it for an IT project when i joined my it school
And I think python should do just fine also
I have a raspberry pi zero W btw
(I mean, unless you want like that python version that it doesn't have because python is complicated...)
@solid horizon it's a console.
(you asked for "any idea" π )
I'm going to not write "because you made it do that" and instead do other stuff, good luck!
i dont see how?
also i made it remove the key from the dict and its still there
omg i think i found it
yup...
@lilac dove raspberry pi is literally described as a python machine often lol
Because of its large out of the box support for it
I scrolled up a bit and read people talking about "memory leaks" in the context of Java... Isn't the whole point of java not to have to worry about memory management? Garbo collector and such? I thought they eliminated memory leaks from programmer error.
That's a misconception
It can only remove what it thinks you aren't using
If you do really stupid shit you can get really stupid results
@whole quail how do you install
@lilac dove ?
Python 2 and 3 are installed by default along with a lot of other really helpful tools with raspian
^ on anything debian based
Are full python installs included with debian?
Yes
I thought they were limited
Nope
I've always had to install a bunch of stuff to get full functionality on servers
@lilac dove are you trying to do something specific with it?
That should be super easy to do
I can make the code but to host on a server
Just install raspian, get any dependencies, copy the files over and run
Where will i get Discord.py and cmd to do pip install Discord and to get a ide and Python it self
?!?
It's probably called terminal and you just use pip like on windows but be careful with capitals
Where will i get dependencies
pip or as source files most likely
And a ide?
idle is probably installed
Where will i actully get Python
It comes with raspian
Everything should be there for you already so you only have to do minimal setup if any
It's why they're used in education so much
Ok
I have no idea what works with what
Where will i buy a raspberry Pi Zero
No idea
Where you get yours?
Getting a raspberry pi online is a good bet
There's a list of places you can buy it on their website
I haven't touched my raspberry pi b since, well not long after the raspberry pi b was released
I just haven't had too many uses for it
For my uses, a raspberry pi isn't even enough
lol I have boxes of old computer gear and many old servers lying around
So if I need something local I dig up one of those
Otherwise I just host it remotely
Lol
For local things, a virtual machine helps
lol I have many many vm's
That's boring
"Minceraft"
oh hey it's 7coil
ayy
i abandoned the project
oh
lost motivation, as i do with everything
const clean = (html) => {
const $ = cheerio.load(html);
$('*').each((i, element) => {
Object.keys(element.attribs)
.filter(attribute => attribute.startsWith('on'))
.forEach((attribute) => {
$(element).removeAttr(attribute);
});
});
$('script').remove();
return $.html();
};
a brilliant use of jquery
it's also kinda inefficient
also can adobe flash run scripts?
If someone does use flash, it's not going to get cleaned
I mean, sure, remove all <object>s too for good measure.
I posted this question on the forums, but wanted to see what you guys think: I need an idea for the final course in my Comp Sci major. It has to be roughly 4000 lines of code (dumb, I know), object oriented, and relatively complex. So far all I'm interested in doing is a discord-like chatroom or some sort of stock market + cryptocurrency price ticker that'll try to actively suggest what to buy based on news articles from the web
Anyone in here good at Matlab?
@swift niche a self-hosted discord clone doesn't look like a bad idea
I'm good at porting systems from ugly closed platforms into vibrant open source languages :]
what do you need to do inMatlab?
lul wut?
Does this even matter?
It's just an app that uses an API call.
And it's only there for Bootstrap.
you can mark it as not relevant if you're sure.
github tells you about all vulnerabilites in your dependencies. It's up to you to review what your required actions to mitigate the vulnerability are.
It's just updating Jquery from the looks of it, not too hard. :U
I wish even a quarter of my problems could be solved with so :/
:/
SSH tries to connect to server with password even after adding the pubkey to the server
How the hell do I fix this?
I think it might be the SSH client caching the login type?
maybe the ssh client can't find the private key from your machine?
Which client are you using? @torn remnant
you can but not all the faces
lets try enabling culling
nope. it removes the top and bottom faces without decreasing render times
if anything it went up 5-10 ms
VBO's, culling, and making sure you don't specify vertices for faces you don't see.
I'm just praying you're not using immediate mode
immediate mode?
You using OGL?
yup
glBegin()
well opengl using OpenTK in C#
there's your issue
Basically what glBegin and glEnd do is they upload the vertex data from system memory to the GPU every frame
Not efficient at all
If you want to use openGL properly you should use Vertex Buffer Objects
They store the vertices of the object on the GPU itself
So you only have to call one function to draw your geometry
For static geometry that's great
well i dont have a GUI yet
Why were you drawing 16384 cubes?
I'm not familiar with openTK
but IIRC glVertex, glColor, glBegin and glEnd are all deprecated
Which basically means they may or may not be supported in future GPU's
There you go
Uh well actually looks like that note is just referring to the argument type
'Use PrimitiveType overload instead'
So the library you're using may not consider glBegin deprecated
Just carry on what you're doing
switching to PrimitiveType increased rendering time by 50 ms
Β―_(γ)_/Β―
glBegin is horrible
Don't use it
but glBegin is the most basic
VBO's are harder to use
For beginners
^ that's a good reference
If you're starting out
Though they don't use C#
So you may encounter samples that don't make sense
That's an array of floats
In this case it stores a 2d triangle
x1,y1,x2,y2,x3,y3
Yeah, that's immediate mode sadly
would it be possible to store all these in a single array?
Sure
Ehm... honestly you might just want to stick with immediate mode for some time...
It's hard to explain
Your code needs to be completely restructured to use VBO's
It won't be that easy
If you were to use a VBO you'd first generate all the vertices in the world and upload them to the GPU all at once
wait hmmm
just rolled back my code
anything i could do here?
hm lemme try smth
Your performance won't get any better when you keep using immediate mode.
There's some very hard limits to what you can do with immediate mode
:/
It's part of the reason why minecraft splits up it's terrain into chunks.
It's so it can update only a single chunk and so it doesn't have to upload everything else as well
And another important thing that minecraft does is that it doesn't generate vertices for blocks that are partly obscured
i dont have any blocks underneath just yet
If you had for example a tower, instead of drawing a bunch of stacked boxes it would just draw a beam.
The sides of which would still be made of squares mind you.
It just wouldn't draw all of the squares that would be "inside" the tower of blocks
That's what happens when you change the collection inside an iteration
You can't remove any elements from "bs" while in that foreach loop
i didnt change bs
Strange
do you remove anything from bs inside that loop?
nope
oh wait wrong func
the function its calling is the same as this, but with double x = block.X; double y = block.Y; double z = block.Z; right above it
Have you considered doing something like renderCube(block.X,block.Y,block.Z);?
that way you don't need to have duplicates
so like
renderCube(block.X,block.Y,block.Z);
}```
thats pretty much my old code
hold on lemme push to github
during runtime i only modify bsarr
sorry if some of it looks messy as hell
you're storing the blocks as a list and you then convert that list to an array using ToArray
I think that makes it convert the List<Block> bsarr variable to an array every frame
And then it throws that array away again
So......
that's not good
well i mean bsarr is being updated off-thread
Yes, but you're accessing it through List.ToArray()
"Copies the elements of the List<T> to a new array"
Oh that sounds like a good idea
ever used it?
yeah
ill dm you my id and pass
PHP probably costs the world countless unneccessary millions in server costs and helps to destroy the environment```
lol
Anyone who knows python wants to help me out with my homework
I've done the actual coding part of my homework
This bit is just some how remembering crap the teacher didn't teach
Ping me if anyone decides to answer π
9 - functions?
7.comment
- switching? but.... it doesnt really fit the question because switch can have many more than two options
6.debug
- Debug
@timber violet im pretty sure its something like ExampleBoolean ? "hi" : "bye"
thatas the terneary operator
at least thats its name in java
thats what i was thinking as well
i was using this site to help me a bit http://www.wordplays.com/crossword-helper
How does a crossword puzzle even help
Maybe if the clues were better it'd make sense
It seems really forced
yea well, thats school
- Down is actually selection
An if statement is a selection statement for example
@nocturne galleon
i think thats all the answers then
Wut? Unity doesn't update from the client?! 
Thanks :)
This was the next it of the homework it works great just looks horrible
Pro Tip: Don't install Unity via Visual Studio!
i guess the next thing @nocturne galleon is learning is not to trust any input from a user π
try:
#Code
except:
#code
But that's kind of an advanced topic. :U
And it requires more resources than a regular conditional statement.
Five word horror story:
@proper saddle i agree with the unity thing
@whole quail in windows32 parlance, a number can be of many types, but a word is always unsigned 16bit int
in cpus, word is the natural unit of size for data
nowadays, 32 or 64 bits
@small escarp I know
π
That was the joke
That is a number more of a word than a word if it can fit in a word
oh
Since he said "Five word horror story" and counted "3" as a word
Which obviously fits into a word
I hadn't seen the previous message xD
But seriously
Is "3" a word
It's a character but that doesn't mean it can't be a word, eg "I" or "a"
Well it fits in a word
And twelve thousand four hundred and thirty five is 7 words or 6?
missed the and
Really everything is relevant to development if you think about it long enough
Lol
I was right
Only person in my class who was even able to do the homework on python
You mean only person in the class that could ask someone else to do the homework? Lol jk
lel
ever had that happen to you guys ?
have an idea, make it work, be happy that you made it work
but then realise how bad whatever you used to make it is for the job ?
cus thats how I feel right now
but its completly unusable due to excel having to load about 1000 graphs and do the math
Wtf is that
What am I missing?
I forgot to delete the file when doing npm install..

Nevermind, that didn't fix it either. ;-;
Does anyone know how to proxy ip in nginx
Do you mean nginx be the handler of request to a backend apache or similar server?
Hey does anyone know anything about the noteblockAPI for bukkit minecraft?
Hola
got a python question
I'm making a theoretical database like kinda an AI kinda thing
and my friend this this thing where the user can create a new local account for the theoretical database
and they typed in there user password and stuff like that
and it would save as a text file in the same folder as the python
and when they restarted typed existing
and typed the user and pass they created
it would work
He gave me a clue
f = open or f = create
uh
@empty dune thanks for the interest, already got it
Noice
Heyeyeyey I need help in Unity
I have a mesh of a character I want to upload into VR chat
Everything is fine
except the character is nude under the clotches
I can edit the textures no problem but does unity have an integrated mesh editor? I'd like to just edit the model but I can't figure out how without having to reimport it into unity
(if not then Ill scrap it and get something safe to upload)
OK nevermind, found a plugin that might do the job
What is redis
@ionic hull http://redis.io
tfw gotta learn how to do async FIFO in js kek
Guys, I wanted to ask that what language should I learn for game development? C# or Java
Of the two, C#
okay, thanks
C++ or C#, in that order of priority, though C++ is harder
oh!
@magic kelp It is async/await https://github.com/Sugarcoated/Fondant/blob/master/src/Actionables/Queue.js
Is octets French for Bytes
^
A byte will be 8 bits almost always
But it's important to remember that it's not always the case
Octet > Bytes
Bits > Bits
Then you just have to make sure that you are looking at MB (megabytes) or Mb (Megabit). A lot of french ISP tell Internet speed in Mbps/Gbps, I've heard some people complaining about not having this speed when they download something (Like 12MB/s (or 12Mo/s) instead of 100Mbps) because they didn't understand the difference between both and because most of softwares gives a MB/s speed instead of Mbps speed.
I've been learning ReactJS, fun stuff. :V
Anyone have some solid resources for learning C# and .NET?
100x this
Same with hard drive sizes
Uwotm8 why don't I get 2TB when I buy a 2TB disk!? Must be formatting lol
Turns out windows displays TiB instead of TB
I've seen people leaving bad reviews on a drive being like: "You shouldn't buy large drives because you lose more storage."
or: "Where's the 60GB you promised me!? I only got X!"
Let the clowns have their small drives, leave the bigger ones for the rest of us.
When people expect to get 500 Megabytes per second lol
Why am I only getting 62.5!?!?!?! that's BS!
I'd love that, in need of some serious network card tuning at home.... Or just Linus the damn thing and 10GBe and be done with it.
Yeah the best I managed at home was 270/65 or so.
My speedtest is basically the meme image.
"guys want only one thing and it's disgusting"
My plan is a 100/40 VDSL, I don't get close to that download. Getting a solid 60Mbps though, so it's still better than 90% of the country I suppose
That sounds pretty decent
I managed to pull just shy of 10TB down for a month and it was still very much usable the whole time XD
Yeah no data caps here either
I wanted to see if it was truly 'unlimited'
Getting off-topic
Just a tad
Dayum
I was seeding some work backups, uploaded 1.5TB a week or so it seemed for 3 weeks
When I first got my internet I asked a friend if I could try to boot him
He's still on VDSL
Apparently he got the yellow triangle next to his network adapter
β
anyone familiar with physics collisions here?
@graceful silo Team Treehouse? But that's not free... :/
There's Microsoft Virtual Academy, but that'll only teach you the basics.
lol my internet is really good when it's working
90Mbps
In NZ
Rurally
Wirelessly
And I have 99,350mΒ² wifi coverage at my property
Upload I can never actually measure accurately
But it's good enough
ugh i wish i still lived in new zealand, the internet is so much better than uk internet
Does anyone know of libraries for C, C++, or Python that handle reading and parsing webpages? I'm trying to read stuff from Ars Technica with their API and have the program understand what the article says
almost like a neural network
List of things you don't need a nueral network for: Almost everything including that
Just find keywords in the data and do some matching
I'm trying to have this program read articles about companies with stocks or cryptocurrencies, then use those articles to plot why something may have gone up or down in price
So if an article says "crash" and "rise" in it, I don't want it to misread the article's "meaning"
You're gonna need a lot of resources to get any meaningful results
And if you have the resources to do it you should already know how to do it
It's not something you can just do without a lot of resources
Try a smaller project first
lol was hoping someone had built a library I utilize
thanks for the info! I guess I'll figure something else out
Even if there's a library to help, it's not going to do any good for you
Just do some data matching with words
Scrape a lot of websites, and get the latest stock
Once you have a lot of data you can start thinking about neural networks
beautifulsoup is a python scraper, but from that to "AI that reads an article and figures out the meaning" there's a hundred years of research
for the latter, if you don't already have some very strong ideas about how to go about it, the project is way too big
I fuess the most I really need is to be able to read and understand the article's title
because something that says "Bitcoin on the rise again after the crash" would need to be read as a "positive", while "Bitcoin crashes after recent rise" would need to be read as "negative"
so I'm looking for something that can do that
@small escarp I'm planning on using beautifulsoup for sites that don't have API's, it's damn amazing
@ionic hull I can probably pull every article I'd need from Yahoo Finance, Ars Technica, and maybe even Robinhood, I just gotta parse it π
I 110% agree with @small escarp
You can just do some keyword stuff to get most of what you want
But doing it with AI is really difficult if you don't already know how to do it
my internet so frustrating because my server slot gets 10gbps (more like 2gbps though realistically) and my home connection to ftp from it is only 50/12 mbps
@small escarp @whole quail know of any particularly good keyword search libraries in C, C++, or Python? I don't mind writing my own, but it's definitely preferable to have something already out there that I can modify
@nocturne galleon are you using ethernet on both ends? This is probably a question for the Networking chat lol
@nocturne galleon you sure your home connection is equally fast though? you can only transfer at the lowest speed limit of the 2
yeah thats what i mean my home internet is 50/12 and my server slot is 10000/10000
so server normally downloads a big file at around 250MB/s and my home internet maxes out at 5MB/s
anyway sorry for typing in wrong subdiscord
I found out about this last night at a .Net meetup of all things. https://github.com/tc39/ecma262
Anyone know of decent css grid code to do a 2x2 or 4x4
@winged zodiac Try looking for Flexbox Grid
hi guys, this isn t really dev but how do you delete a nagios user on debian?
Is it a nagios user or a linux user?
did you use htpasswd to create the user then?
yep
so i need to find the file ? π€
check /usr/local/nagios/etc/htpasswd.users
try /usr/local/
cat that file and see if there are users in there.
okie
...
i m stupid
i created it with the passwd file in the command so it was obviously where i put it -_-
I was just about to ask what you used in the htpasswd command
but you had already found it
so i have another problem
i can't reload nagios3 and the service won't start when i start debian
it tells me to checkl journalctl -xn or systemctl status nagios3.service and when i do i can see "failed to start LSB: nagios host/service/network monitorinf and management system"
but i found nothing with this and i don't know what to do
@zinc briar if you still can't start it try nagios -v /etc/nagios.cfg (correct the path if needed .. just a guess)
This should check your configs and report errors
Normally it should report the line number er element that's wrong
it says cannot open the file for reading so nothing
Then check the path for the config file .. could also be like /etc/nagios3/nagios.cfg
now it says there is "invalid object definition type 'hostgroups' in file <path>/hostgroups_nagios2.cfg which is a file created by the system
so it indicates the line but i can't see what's wrong
check brackets and stuff for the group that is in and around the line that throws the error
I don't know if there are brackets. I am just guessing.
i removed a "s" at hostgroups and it's okay but still can't load nagios
ow
it looks like it may work
oh damn it works YES
thank you @empty dune @calm oriole
Nice π
\o/ π
i was about to kill myself it was so much destroying my nuts
lul
I've gotten points off on projects for putting braces on the same line
Honestly I prefer same line, but I don't get mad about newline
{
kill(programmer);
}
else {
reward(programmer);
}```
Or even better
```if (programmer.isBad()
kill(programmer);
else
reward(programmer);```
when I started out, I preferred same line
but I always ended up adding an extra blank line in functions (not in ifs) [if I remember correctly it was to make documentation comments at the top of the function more easily readable]
The reality is it's personal preference it makes zero difference to the compiler
Next line is such a waste of space
so eventually I said fuck it and filled the extra blank line with the brace
so new line for functions and classes (and documentable things), same line for everything else π
in any case, I have no issues with brace positioning
but please use braces.... always
I always put documentation above the function
those dangling ifs always end up in freaking bugs when someone adds an extra line
and forgets to include the new braces
I only use braces when needed.
yes, I typically use doc before function, but some languages prefer it the other wway around
gotta follow those guidelines
Why waste space and time doing
System.out.println("Cats are better than dogs.");
}```
when you could just do
```if (cats < dogs)
System.out.println("Incorrect.");```
Sure it's only one line (or two if you're bad), but it can add up
Copy and pasting is a bit easier with brackets
I hate trying to copy python code, it always messes up
because this
if (cats < dogs)
System.out.println("Incorrect.")
then becomes (a thousand commits later)
if (cats < dogs)
System.out.println("Incorrect.")
throw new Exception("False premise!!! Catz are equal to D0GS!!")
and everything catches fire when production starts raising a fucking exception which shouldn't be raised xP
Well, certainly one issue you'll run into is the missing semicolons lol
If you need more than one line in the statement, then slap some brackety bois on there, otherwise, meh
That's fair,
Everyone has their own preferences
My preference is the absence of any and all comments 
The less I comment, the bigger of a fuck you I say to anyone trying to read my code xD
I did something similar to my teachers... I would try to fit as much as I could into one line
Crazy lambdas and stuff
Write every program on one line
Exactly
the best one-liner
write very bad Java and add a note at the end which reads "It's in Whitespace, the programming language"
var a = (programmer.isBad()) ? kill(programmer) : reward(programmer);
a;
That works too. Probably could skip the parenthesis around programmer.isBad()
It makes it more readable IMO.
you have a type inference error
kill will return a Corpse, but reward will return a Money
return (programmer.isBad()) ? kill(programmer) : reward(programmer);
Console.WriteLine((programmer.isBad()) ? kill(programmer) : reward(programmer));
.
Not 100% sure if this is the right place to ask, but is anyone here experienced in autohotkey scripting?
Tarran"s macro keyboards strockes at distance
Whitespaceβ’
Whitespace uses only whitespace characters (space, tab, and return), ignoring all other characters. This is the reverse of many traditional languages, which do not distinguish between different whitespace characters, treating tab and space the same. It also allows Whitespace programs to be hidden in the source code of programs in languages like C.
Hi, how can we see line per line with the command && ls on debian? cause i'm looking for something (i don't know the exact name of the file) but there are so much files that i can't see all of them
i mean, i see only the end of the list because i can't go up to see other out-of screen stuff
You mean a command that is like *something* && ls ?
i mean whatever it's okay
Use the Find command from the Linux command line to locate files in a file system
You could test for filenames that could be the one you search
Or just use ls | more to be able to scroll to a next page with spacebar
Better explained here : https://superuser.com/questions/682128/list-files-of-folder-page-by-page-with-ls-command
Can somebody plz help me Im trying to make a galerry but I cant get one working
What language/framework ?
html/css NO CSS-GRID
Use bootstrap
Does anyone here have experience using g_mass_storage on linux?
I'm trying to use a pi zero to create a virtual USB using g_mass_storage
that's alright
but having issues mounting it inside of pi
like I can mount it, but it doesn't correlate to what's on the 'USB'
I've been following Page 55 of this: https://www.raspberrypi.org/magpi-issues/MagPi60.pdf, but don't want the exact config
how did you copy the contents into the virtual drive?
Could anyone help me with a Python project i have been working on for a while. Dm me if you can please!
how can I remove an item in an array, not just make it null or empty (in JS)
@small escarp Thanks, i think i figured out what i need to do now
Let's say that I have html table that has 8 table headers. How would you guys show the table on mobile devices? Because it's not going to look good on mobile devices with the table full width. Or should I try to find another solution to show content of the big table
im going to assume you want it readable ? :p
yes, that's correct
it would depend on the data you want to show, depends on how you could transform it i guess
multiple tabs for each column would work
if its 1 row of data, you could just make it like a list
however im guessing its not that
Yeah, it has multiple rows (fetched from mysql database)
on the other hand, even on a mobile device, people can still scroll π
i personally dont mind scrolling across a table of data like that on a call phone
cell *
if I don't find any other good solutions I'm going to make it so that user has to scroll the table
another option, again its all based on use case, you could remove columns of "non required" data the smaller the page gets
as an example, you might have Firstname|Lastname|Email|Telephone|Address but you can remove some of the columns and show only the most required data
with an option to expand and make it scrollable
the table has user information:
ID|Firstname|Lastname|Email|Username|Telephone|User creation date| buttons for deleting and changing user information
That's a good point, I could in theory leave out some cells.
if thats the case, then my recommendation (based on it sounds like an admin section for a site)
would be to reduce the number of columns, and make them clickable to take you to a user information page with your buttons
I didn't think about that but I believe that your suggestion might be the best solution. I will reduce the number of columns and make the rows clickable (and when the row is clicked then forward to user information page). Thanks a lot! (and yeah it is admin section for a site)
no worries, im sure there are plenty of other solutions also, its just what works best / is easily doable for yourself. That would just be what i personally would do for a similar use case.
also, swipe to delete/edit/more details is a common interface in mobile
@small escarp should I then use javascript to listen for swiping?
it all depends on the complexity you're willing to go with for this particular project
(and yes, you would use javascript, usually a gesture library)
i like that idea myself too
it does like dave said depend on complexity / time restrictions / known how etc to determine how much effort you want to put in
where i work we have some tight deadlines so i dont get the benefit sometimes of doing things how i would like, and just get it functional and working π
im also not a FE development, im more of a BE / DB person
I'm not very familiar with JavaScript gesture libraries. Let's say that I would like to have delete option when swiping from right to left and edit option when swiping from left to right. What would be good JavaScript gesture library that I could take a look at? Time isn't big problem because this is a school project and we have plenty of time left
recommends the ominous vanilla.js for simple swipes. But else https://www.npmjs.com/package/hammerjs is pretty neat and broadly used.
Thanks I will take look at those two options!
@nocturne tusk vanilla.js is an community joke to say "just javascript"
(and raw DOM APIs, yes)
in the sense that people use too many frameworks to solve simple problems