Somebody On Earth
@lightningrock
I have speedran minecraft in 38minutes on 1.16 with hard difficulty. I also make bad CSS.
I'm making a tic tac toe program, but when the board gets displayed, it seems to be glitched. When it try console.loging the board, it is fine, and wh
Bash
lightningrock I figured out the problem.
I was trying the reverse the board when calculating if a player won, but I didn't create a copy and it applied the reverse onto the actual board.1 year ago
0
blog generatorthingy https://replit.com/talk/share/thingy/144855
14
0
0
dynamic file thingy-a-ma-bob
idk what to call this thing
usage
put ur asciidoctor files in the pages folder.
go to /update to update the files, ma
Node.js
My code
item.split(",").slice(0, 2).join().split().concat(
item.split(",").slice(2)
);
Example
let item = '"First, Last", 0, 1, 2, 3, 4, 5, 6, 7, 8,
19wintersp This works:
let input = "'First, Last', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9";
const sep = ",";
let output = input.split(sep);
output[0] = output.shift() + sep + output[0];
console.log(output); // ["'First, Last'", " 0", " 1", " 2", " 3", " 4", " 5", " 6", " 7", " 8", " 9"]
Though I think you would prefer if sep was ", ".2 years ago
I want to create a express app, so I install express in the bash terminal with this: npm install express and then I do this: express -g. But it says t
Custom HTML Elements
Hello! In this tutorial I'll be showing you how to make your own custom elements! There are two different kinds of custom HTML e
HTML, CSS, JS
When I try to use repl.it's database in NodeJS, which I import on lines 8 and 9, it says the @replit/database modules wasn't found.
Error:
Error: Cann
Node.js
Coder100 you don't install packages?
ew
ctrl+shift+s
and then
npm i @replit/database
their upm rarely detects packages correctly.2 years ago
Does anyone want to help me with this project?
btfuss if you remove where you choose your background in the \33... then it will blend in with the terminal. looks a little better2 years ago
I have a NodeJS server with Express. I have a page that is routed at /blogpage/12202020. But when I go to it it gives me this error:
Error: Failed to
Node.js
Squirrel777 Ok change the folder name from public to views, then add the following code:
const bodyParser = require('body-parser');
app.set('view engine', 'ejs');
app.set('views', 'views');
app.use(express.static('views'));
app.use(bodyParser.urlencoded({ extended: true }));
That should work I think.2 years ago
Title ↑↑↑↑↑↑↑↑↑↑↑ ↑↑↑↑↑↑↑↑↑↑↑ ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ ↑↑↑↑↑↑↑↑↑
EpicGamer007 you need to configure the run button. all it is doing is running java Main. you need to configure the run button to say something like java Main [your number here] so what i would do, is create a .replit file. then add run="javac *.java; java Main [Your number here]"2 years ago
RYANTADIPARTHI To use math.pi you have to import it first.
import java.lang.Math.*;
then use Math.PI
here's a link to teach you more
https://study.com/academy/lesson/how-to-use-pi-constant-in-java.html2 years ago
Does anyone know a way to get a domain free? The domain ending doesn't matter, I just need my own domain to host my projects. Anyone know a solution?
HTML, CSS, JS
MocaCDeveloper Lol.
Let me tell you, I spent many many hours one day trying to find a free domain to host my website and long story short...99% of those websites say "free" but then when you proceed to claim the domain they always charge at least 20 bucks.
So, sadly, you cannot own a "free" domain. You're either gonna have to work with repl.co or pay for one.2 years ago
I'm currently working on a web development tutorial that I started on yesterday. I'm looking for collaborators. If you would like to help post your gi
HTML, CSS, JS
So I found this thing called GraphQL On repl.it, it's right here: https://repl.it/graphql, but what does it do and how do you use it? Also please igno
Coder100 Well, the thing is, we can't tell you, it's been abused too much...
The most I will tell you is set this as your headers:
{
"X-Requested-With": "mark as correct answer kthxbye"
}
`2 years ago
So @CatR3kd, how do you use .env files? I've seen lots of people use it, but I can't figure out how to use them. Could you help? Thanks.
CatR3kd @lightningrock I see this post is already answered, but @realTronsi got something wrong. Everything is correct, except you DO NOT Need to use dotenv! It's not necessary! Just to recap though:
Inside .env:
VAR_NAME=VALUE
Comment
Inside script.js:
console.log(process.env.VAR_NAME)
Will turn up with VALUE.
P.S. Please mark my post as the answer. Thanks!2 years ago
realTronsi They are environment files, and is usually used to stores keys and secrets. They are hidden from other users so it keeps private information safe.2 years ago
So I decided to start learning C++ today, and here's my first program! It's not much but if you could give me some tips, I would appreciate it.
C++
Just this weekend, there was a hackathon, TTK. It was on 18/23 - 19/23. Here is my submission for it. https://repl.it/@textAdventure/textAdventurePart
Python
Hi! So today I was very bored and I made something random. So its a meme website! I did it in only 8 min 54 sec! The coding part only took 2-3 min. xd
HTML, CSS, JS
I want to exit the repl, but when I use exit() it prints
repl process died unexpectedly:
How do I exit without it doing that? I am using python and ar
Python
Coder100 Yeah, that's whats supposed to happen, you called exit()
But, the best way to do it is:
def main():
add code here
main()
Now, to exit, just call return :D2 years ago
So I am making a text adventure, and I have functions in the part one repl that I would like to use in my part two repl. Is there any way to do that?
Coder100 No, you can't access another repl, why not just do something like:
print("go to part to here: [insert url]")
Yes, yes there is an API. https://repl.it/graphql, but I'm not going to tell you how to use it (it's PRIVATE and has been abused maybe once or twice)2 years ago
EpicGamer007 There is no way to get it to the part 2 repl other than just copying all the functions you need from the first to the second.2 years ago
I am making my personal website and I have a nav bar:
Home
Contact
Blog
Projects
As y
mwilki7 Edit: Nevermind, SixBeeps' ajax answer is much better
Old:
iframes seems to be a popular answer
https://stackoverflow.com/questions/12032664/load-a-html-page-within-another-html-page/12032764
Though you could use JavaScript to manually prepend that information to a page after it loads. All pages should load the same script if you want to do that.3 years ago
SixBeeps With pure HTML, this is not possible. Something like this is usually achieved through a server framework. In ASP.NET (The one I'm most familiar with) this is done through the Layout page, which contains things that persist throughout all pages (such as the navbar). So, either copy-paste the code everywhere or switch to a framework.3 years ago