hacker

Gav Hern

@GavHern (81)
Hobbyist. I write in HTML, CSS, JS, Python, C#, C++, and a bit of Java; seeking to learn more.
What's your favorite thing about Repl.it? What about your least favorite?
posted to Ask by katyadee

It's honestly the best Chromebook supported IDE and I love that repl.it simulates the experience you'd have on a regular IDE. Multiplayer is another great thing, web-based anything never does a good job at two people on the same project but repl.it pulled it off pretty well.

Bring Back Timmy!!!
posted to Ask by RaunakvirBhulla

This is a very interesting coding question, I will say.

Multi Page Website
posted to Ask by K1NGBOSS

Yes! You're going to want to create multiple HTML files. If you don't know how to do that:

Now, to allow the user to switch between files, we are going to use hyperlinks. This is using the <a> tag. It will look like this:

<a href="YOURFILENAME.html">My Link</a>

This will add "My Link" to your page as a link that you can click to redirect to "YOURFILENAME.html".

The rest of this is a bit more advanced if you're just trying to add more files.

Keep in mind that if you would like to use folders, you'll have to do href="foldername/filename.html" to tell the browser to go to the folder.

If you want to link from inside a folder to something out of a folder, use href="../filename.html". The .. will go back a folder. (If you're in folder1/folder2/page.html you will leave folder2 and go back to folder1)

Hope this clears it all up for you! Consider marking this as the answer if it helped!

⌨️ HyperTyper: Ultimate Typing Test ⌨️
posted to Share by PYer

I personally find that it is nicer when, if you screw up, you can keep going rather than get stuck on the letter. it feels unnatural and I should have to hit backspace. Incredible job though!

How did I get the hacker plan?
posted to Ask by AbirHaque

Did you enter any game jams/ contests/ etc.?

What line of code describes you best? 🤔
posted to Ask by katyadee

plain and simple:

pass

How is tech culture different in the U.S. different from other countries?
posted to Ask by katyadee

Living in silicon valley, tech is way more mainstream here. All of the big tech companies are here so you basically see tech no matter where you are. I'm not sure how this relates to other parts of the world but it definitely is impressive how far we've come.

I need help with folders
posted to Ask by FaCe_crazykid05

This is a problem that most people run into. If you do ../filename it will look for a file in the previous folder. Add the .. to go back a folder. You can always use multiple ..s, for example ../../../filename.

JavaScript Inputs
posted to Ask by MattyB10
Is there a way to remove the ".html" extension with .htaccess using repl.it?
posted to Ask by GavHern

@a5rocks I've tried my code on GitHub pages and it works fine. Any info on where I could learn to use flask or Express for this

Files don't update after being edited via code.
posted to Ask by LukeZeller

note to @LukeZeller you can turn on explorer mode by clicking on your account name on the far right of the navigation bar at the top, then go to account, then expand the "roles" tab, and check the "explorer" box.

I need help with folders
posted to Ask by FaCe_crazykid05

@FaCe_crazykid05 No worries!

Repl.it Mobile App MVP
posted to Announcements by Kognise

@Kognise Sounds great! Looking at the screenshots, this looks amazing! Best of luck dude! (Some of my game dev buddies say the App Store is a bit of a pain to work with, idk)

Repl.it Mobile App MVP
posted to Announcements by Kognise

@Kognise Do you plan on it or is iOS out of the question?

HTML
posted to Share by LukaAndrocec

You can link to other pages with the <a> tag. This creates a clickable link that will redirect the user to a different page when they click it.

It should look like this:

<a href="https://www.repl.it">Text displayed on the page</a>

This will add text that says "Text displayed on the page" that will link to https://www.repl.it

Weekly Repls #34
posted to Announcements by 21natzil

@Deacon_Cronin I like this more...

PHP - Make all requests to certain directory point to one PHP file
posted to Ask by GavHern

I've found a solution now if you have apache. Make a .htaccess and put

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?dir=$1 [L,QSA]

This will run index.php and pass the path of the request as the dir parameter.

JS: Least clunky way to dynamically append complex elements to the DOM?
posted to Ask by GavHern

@SixBeeps front end javascript, gonna edit the post to clarify that

JS: Least clunky way to dynamically append complex elements to the DOM?
posted to Ask by GavHern

@Highwayman Then you have to await for the file to load... but it does get me thinking that you can just replace all the line breaks with \n and then put it in a string. The \n wont do anything to your dom content but the string can then be put back into another file and you keep your line breaks/ formatting..

JS: Least clunky way to dynamically append complex elements to the DOM?
posted to Ask by GavHern

@ironblockhd Yeah this is currently the best method I can think of.. I'm gonna wait to see if anyone points out either some genius method or someone points out a library that makes it super easy, but this might be best answer..

JS: Least clunky way to dynamically append complex elements to the DOM?
posted to Ask by GavHern

@SixBeeps my concern with using strings is that, if I have a lot of markup, the string gets quite long and its difficult to go back and make edits... I'll think about it.

Keep nodejs repl always running?
posted to Ask by GavHern

@TheForArkLD to go below 5 min you need to pay..

Keep nodejs repl always running?
posted to Ask by GavHern

@TheForArkLD this is what the settings say... I have the same for multiple bots and they all go offline after some time..

#BJGJ HappyChat™
posted to Share by sugarfi
[PHP] How to redirect all outgoing requests to a different address
posted to Ask by GavHern

@AdCharity I'm new to server-side stuff and PHP seemed to be the simplest to me... Where should I go to learn node.js?