Nikhil M.
@dfnk
Just coding because why not?
https://dfnk.repl.co/
I was hosting my discord bot on Heroku and after sometime it went down and said something about $PORT bind? Could I have some help on why this is not
RYANTADIPARTHI hmm, if it shuts down, then that's their problem. maybe try it again, and if it does it again, host it somewhere else.2 years ago
AloeBest Hosting it on Repl.it ensures it online 24/7 if done properly. I recommend moving it here.2 years ago
I was building a new website (I am using JWT) and I was wondering if someone comes to my site how can I automatically make them send the bearer token
How could I find the id of a guild in discordjs when someone speaks in it?
How can I do document.querySelectorAll('section') in jQuery?
Coder100 $("section")
that's it!
It will automatically change for all of the elements like:
$('section').html("hi")
`2 years ago
EpicGamer007 im not sure but im pretty sure you can do $("#your-div") to get it. it uses css accessors to access dom elements i think2 years ago
How can I get a sections id in jquery, like:
how can I get the id?
how can I save data in my express session?
app.get('/', (req, res) => {
req.session.save /* then some variable */ = 10;
res.send('saved');
});
`
techde app.use(session({
token : yourtokenvalue,
key : 'test',
proxy : 'true',
store : new MemcachedStore({
hosts: ['127.0.0.1:11211'], //this should be where your Memcached server is running
secret: 'memcached-secret-key' // Optionally use transparent encryption for memcache session data
})
}));
Credits to:https://stackoverflow.com/questions/47200350/save-data-in-express-session2 years ago
is there a way for my app to tell when the tab has been closed?
Coder100 window.addEventListener('beforeunload', function (e) {
// Cancel the event
e.preventDefault(); // If you prevent default behavior in Mozilla Firefox prompt will always be shown
// Chrome requires returnValue to be set
e.returnValue = '';
});
read more
and more2 years ago
my repl intellisense is not working for Nodejs is anyone else experiencing this problem?
Coder100 Try reloading, intellisense is buggy. Also, for some reason, in some files it doesn't show at all
Report this to bugs!
Justice for the js devs! Python is overrated2 years ago
Bookie0 hi,
Screen Shot 2020-10-15 at 10.21.22 AM
code intelligence should work in nodeJS, make sure its turned on:
go to settings, scroll down a bit, make sure Code Intelligence is Turned On.
Screen Shot 2020-10-15 at 10.21.47 AM
if it still does not work, must be a bug, in that case you can report it here ;)2 years ago
RayhanADev This is probably just a small problem that should be fixed by reloading the page and/or clearing browser cache. Let me know how it goes!2 years ago
How do I make my html, css, js site refresh itself with a functions? Like document.refresh()?
How would I change a image into bytes, with html and javascript?
Bookie0 actually i found some sites (really Javascript):
https://stackoverflow.com/questions/9258932/how-to-convert-image-to-byte-array-using-javascript-only-to-store-image-on-sql-s
https://forums.asp.net/t/1726390.aspx?convert+image+to+byte+array+in+javascript3 years ago
Bookie0 hi,
idk but this might help?
https://stackoverflow.com/questions/3801275/how-to-convert-image-to-byte-array
https://www.programcreek.com/2009/02/java-convert-image-to-byte-array-convert-byte-array-to-image/
https://www.tutorialspoint.com/How-to-convert-Image-to-Byte-Array-in-java
hope this helps! =)3 years ago
What do you use a `` element in html?
mwilki7 They are mathematical equations to draw shapes.
Since mathematical equations are independent of screen resolution, they'll look sharp in any aspect ratio.
Pictures are dependent on screen resolution (since they are made up of pixels) so they'll become more blocky the more you zoom in. This is not the case for svg shapes.3 years ago
coderash svg's are images that can be infinitely scalable and therefore are never blurry. Very useful for modern websites!3 years ago
I was wondering how I could make a Dockerfile with more that one FROM
FROM node
FROM nginx
is there a way to make them both in my image not just ngin
I was trying an actions which would build my app using Webpack, though when I run it no build folder comes up. I was asking since when I directly use
How would I become a moderator and content creator on repl.it?
enderbob23 To become a content creator, you have to make tutorials good enuogh for the repl.it team.9 months ago
Bookie0 I think you become content creator by writing good tutorials.
For mod, I think you have to report a lot of people I heard (for a reason), be present on repl talk a lot, and be a contributor3 years ago
Hi, I was wondering how to import this I believe it is not working because node is not installed, how would I do that?
HTML, CSS, JS
RohilPatel Nodejs needs to be the language. Repl isn't very friendly with that. This is simply your web browser on a website. Go to repl.it > create new repl > select languages > Node.js3 years ago
Scoder12 Hi, go to the languages page and select "NodeJS" instead. Or if you really want to use the browser research webpack.3 years ago
Pickle is a module in python that can save data locally!
let's start by importing this module, import pickle:
then lest make a variable x = 10.
Now