I am new to coding. I am making a quiz maker and I was wondering how can I edit a file using code so like :
They write the question name and it edits the file quiz1/quiz.html and change the question code
If you create a new html file everytime that someone need it, you will have a lot of html files and it is not recommendable.
I would have a single html file and, in this file, call the questions in a form with PHP. This questions and answers could be saved in a MySQL Database easily.
This video is an example that how you could do it. In the same way, you could develop it with others languages like java, python, js, etc.
https://www.youtube.com/watch?v=i0yamXyN4wM
I hope this could be helpful!
Open the file in notepad or another text editor. You can change the code and save.
Alternatively you need to use a code editor such as PHP storm, Notepad++, Sublime Text 3, etc.
Related
I am trying to copy code from an email into a a Web page file. I would like the file to have functionality.
I tried copying it directly into a new Sublime file but the colors did not appear as if I had typed it in. When I right clicked background, no open in browser option appeared. I am experimenting with code snippets in blogs and having problems pasting code with functionality in tact. Is this an extension omission ?
Thanks
Sublime will copy plain text, a wysiwyg html editor will copy the markup. If you want to get the markup, do 'show original' (gmail) or whatever your client has as an equivalent. The original will have the markup and can be copied into Sublime. Hope that helps.
I'm new to html/css/js/php and i'm trying to create a site.I started working my html/css on a simple editor (Sublime-i know not the best idea),but in the meanwhile i started using PHP Storm. In order to get the pages i have made i copied the html content from Sublime and i pasted them in a new PHP file in PHP Storm (i did the same with the css). It turned out that transition went horrible and when i preview it is completely distrorted. Any ideas on what could have been so terribly wrong?
I had this issue before when I was trying to decide what to use sublime, phpstorm, and komodo edit. You need to copy the code across into a new .html or .php file. I can't recall which one does it but the file extension has something different that stops it.
In a .txt file, I can hold down the "Option" button and select one or more columns.
Is there an equivalent for grabbing column information on a web page?
I am currently copying-and-pasting the website material into a .txt file, and then started to wonder if that step could be eliminated.
I'm not sure if I understand the question, but maybe this information will help anyways.
If you are just looking for a client tool, the following should be helpful (in chrome): https://chrome.google.com/webstore/detail/columncopy/lapbbfoohlcmlbdaakldmmallcbcbpjb
If you are looking to add a copy button to a web page that will copy text maybe the following will help How to create "Copy" button?
Good luck!
If it's data in an HTML <table> you can copy it and paste it into an Excel file. That should make it a lot easier to grab by columns.
Paul Irish gave some amazing insight on web tooling this time during googleio 2013. So he was presenting some slides that had been parsed into html from a markdown source i.e a .md file.
However one thing that surprised me was when he edited the source markdown for the slides in the chrome dev tools sources panel and then hit refresh, the .md automatically compiled again into the html to be output on the browser. Now I understand that the changes he made to the markdown file in the chrome dev tools were made also on his local file saved on the computer, but how did the markdown file automatically get converted into the html file upon save and refreshing the browser?
I am a complete beginner with markdown and I would really like to have this functionality. Any help is deeply appreciated
The whole purpose of markdown is that it is both human readable and machine readable. It is designed to be converted to HTML.
Depending on the language you are using, there are markdown parsers that create HTML for you.
For example, for PHP.
So, as an example, to have your server show the contents of say, homepage.md, your index.php file could have something like this:
$filename = $_GET['file'];
$content = markdown( file_get_contents( "path_to_markdown/{$filename}.md" ) );
print $content;
And, to see it in your browser you would go to example.com/?file=homepage
I will do my best to answer this.
HTML Mark down is a shorthand syntax that can be interpreted by a web browser to format or render the page in html.
this is taken from Stack Overflow.
eg
The syntax is based on the way email programs
usually do quotations. You don't need to hard-wrap
the paragraphs in your blockquotes, but it looks much nicer if you do. Depends how lazy you feel.
So, like converting from a file in notepad ++ from text to html. The file will be formatted using the basic rules of that particular syntax.
It also must be remembered, that programs are not mind readers. If the mark down code is not valid, neither will the corresponding html code. Just as saving a text file that is "supposed" to be formatted in html. It won't save as a working html file if the syntax is incorrect.
Also, markdown is not a total replacement for real code. It cannot cover the breadth and depth of the true coding language. I could liken it to pseudocode, but that is more of a lateral example.
In answer to your latest comment, If a second file is created from a first file (and the format is altered) -( in this case from mark down to html) - If the first file is then edited, without overwriting the changes into the second file, it cannot expect to be altered.
This is a good link a fellow SO gave me:
https://stackoverflow.com/editing-help
Please feel free to edit, if I have made an error.
I haven't tried this extension for Chrome but it seems to automatically render markdown (.md) files in Chrome.
https://chrome.google.com/webstore/detail/markdown-preview/jmchmkecamhbiokiopfpnfgbidieafmd?hl=en
In Firefox, I use the following extension for the same functionality.
https://addons.mozilla.org/en-US/firefox/addon/markdown-viewer/
No need for a separate .html file, just save the text file with .md extension and open it in the browser.
Hope that helps.
In Word 2003 one can save as WEB PAGE and get document translatted into HTML coding.
You can use VIEW and see SOURCE CODE to get the HTML coding for that file.
In Word 2007 you can save as web page but I can't find how you VIEW the source code that was created with it.
What you need to do is right-click on the file and select Open With... and use notepad to view the HTML.
Shield your eyes; it's ugly, ugly code.
EDIT: To alleviate some of the bloat and make things more legible, I suggest http://textism.com/wordcleaner/ - I've had pretty good results with it in the past, but it only works for files up to 20kb.
For SO bonus points, check out Jeff's C# code here: Cleaning Word's Nasty HTML.
You can also change the extension of the .docx to zip, then view the contents. A .docx file is actually a zip file with several .xml files inside... but that probably won't give you what you're looking for.
If you've only got a simple HTML page (I can't imagine it being much more than that if it was wrote in Word) you can just view the source in your browser.