Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Thank you for taking the time reading this!
A quick disclaimer, I have never coded anything in my life!
I know some basics terms so you can communicate your response without defining them.
Anyways, my project is a simple game.
You press [START]
You hear a "random" word
You have a type-in box,
if you fill it right you get +5 points and get a random word .... and so on.
You fill it wrong, you lose immediately [gameover]
Although, I would deeply appreciate to code the whole game, for some of you it is relatively simple - I wish to do it myself for the learning experience and sense of accomplishment!
For now, I only need a push in the right direction.
I aim to use it on my tablet or phone (both run android)
Best,
haz
You should start by learning the fundamentals of JavaScript and HTML (should also learn CSS if you want the app to look nice). There are many sites (other than SO) that have multiple tutorials and/or full documentation (i.e. MDN, W3Schools). You could also use online teaching platforms for that.
Here are a couple of things you should consider after getting a grasp of the basic concepts:
When do you want to check if the user inserted the right input (timer, on enter, a submit button)?
Where will the sounds be stored and how will you retrieve them (a collection of sounds of files, a database with a server, a single big sound file containing all of the words)?
Regardless of how you store the sounds you will need a way to map text to the sound and the random number (Math.random()) to one of the two.
Finally create a JavaScript function that resets the text and gets a new word every time the user gets the word right or when the initial start button is clicked.
Once you reach any questions on the actual coding, search for the problem in SO (odds are it has been asked before). If you can't find an answer to your question create a new question (you should read How to ask first).
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I want to code a website, showing 7 elements: one image (that will be changing), and 6 buttons (left, right, up, down, backwards, forwards), as shown in this example
The website should be able to "read" a 6 column file, which will have the following format example
with:
"ind_img_x" being the index for image x (numeric index)
"url_img_x" being the string containing the web address for image x
The file will control which image will appear accordingly with the button that is pressed.
For example: if the image displayed is "img_2", and the user press the "down" button, then the website will show the image 77452, and wait for the next button to be pressed.
The file will be rather big, able to contain several million lines (for example 10 million lines).
I should be able to update the file from time to time.
The web site will have to be able to get each image from the web (by means of the url in the file) The url data may consists of strings of large length. And the website has to be able to read these long strings and urls.
Would somebody please give me some advice about the best web developing language to use?
Do you think I'll be able to drop the file into the server as a text file, and ask the web site to read it each time, or will I have to put the data in a database?
I look forward to any advice that you guys may have,
Thank you!
Simplest way would be to use a webhosting service and parse the file with JavaScript. Especially because you said you already have JavaScript knowledge.
I would also suggest you to use CSV files: https://en.wikipedia.org/wiki/Comma-separated_values
Edit: When you have millions of lines you should use a database and use Nodejs libraries to connect to the database. Files are only recommended for small sets of data.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I’m working on a school project. It’s got to be done in about 10 weeks so I’ve got plenty of time to go about it. I’m very new to javascript so that explains why I’ve got so much time given for it. I’ve laid out a concept I feel passionate about and want to do it.
What I want from you guys are pointers, ideas or advice on what I should look into, maybe to do with specific functions or whatever, I’ll take any advice based on this concept.
The concept:
The project is a single page that shows a graphical design of the solar system. Planets that spin around the sun and there are two or three interactive options that I have to program.
They are:
When you click on the sun, the sun turns into a black hole that pulls on the revolving planets and they get drawn into the black hole with a nice little animation effect.
When you doubleclick on the sun, the sun disappears and the revolving planets are free from orbit and just float into outer space, outside of the canvas of the screen.
What would you say I should look into to realise this project. Again, I’m very new to javascript so that explains my asking. Thank you.
My first piece of advice is do not delay starting the project. Especially if you're new javascript (or programming in general, as sounds like might be the case?).
Besides that, there are a couple of things I can tell you're going to want to look at:
DOM events/event handlers
jQuery is a really spectacular javastript library that you will almost definitely want to use.
d3 is another library you may find helpful for your animations/drawings.
You may also find canvas helpful for drawing and animation.
Hopefully this points you in the right direction to start out.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
This is probably a simple question, but I'm struggling with this.
Basically, how to browse in a database, as the user is typing something?
For example, in a website such as https://www.doesthedogdie.com/, how do they do it to show all the movies beggining with the string of characters you're typing, as you're typing it?
I guess javascript is involved?
It's called autocomplete
Please do some googling next time yourself.
You can use jQuery autocomplete or Bootstrap typeahead to achieve this.
Hope this helps
My personal preference on how to make these kind of systems is fairly awkward, yet it seems to work just fine for me without requiring too much client-side scripting.I use ASP.NET's Page_Load event to save all content in a SQL database into an XML file. Then, when the user enters some text into the field, I make a hidden div class underneath it unhidden to display filtered results from the XML document. This way, you can update the SQL database at any time fairly simply to add new records which should be listed on the website.This is server-side scripting, which I prefer to client-side because the user can disable features and mess around with it to view your code which is something I personally hate.I hope this helps you somewhat.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I'm working on a web-shop with a personalize function. The web-shop is going to sell prints. Before customers goes to check out, they will be able to customize their product/print with just changing custom text on the designs. I know their is many different web2print solutions. I'm thinking about using Adobe's Scene7 web to print solution. It's a service and will cost money, so I rather do something more simple.
The thing is that most web2print solutions are so advanced with so many edit options. I just want to have limited rows of text to customize.
So my idea was to make the designs in html and css. With a basic background image and text on top of the background image. When the customer is done filling in the form for the text and clicks order. The web pages makes the html-css coded customised design and makes it to an image that gets mounted on high resolution printable pdf.
There is many web to pdf solutions, but the problem is that they doesn't seem to make an exact flat copy of what's shown in the design. I want this to work server side.
In my head this doesn't seem so advanced, maby i'm missing something?
I know css and html good, I can also handle javascript and some php. But i'm also open to learn new languages and programming skills to get this to work.
Thanks!
Use SVG which is the standard vector format (can be resized without loss in quality) and will look the same across implementations.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Let me preface by saying I do apologise if this is off-topic, I just want to get some pointers on where to head with this.
I desperately want to be good at programming, I'm a 28 year old designer and want to head in a more technical direction but I'm really struggling. My goals are to work ideally with Ruby/Rails or similar with the ability to build full apps.
I've been using HTML/CSS as a designer for years so that's fine, but I've spent the last three months learning JavaScript and I just can't seem to actually make stuff with it. I've read multiple books, been through CodeAcademy and I get it, I understand the syntax, patterns and such when it's presented before me, but when it comes to actually making something happen on my own, I draw a blank. Tried making a quiz, can't even work out where to begin.
Seriously, the most exciting thing I can do is validate one form field or something. It's been 3 months, I feel like I should be way further in than this, otherwise I'm never going to get into Rails or any other language.
Any ideas?
Thanks
Learn some server side programming and then the javascript will more likely fall into place as you will find a real use for it. Start simple, like creating a page that lists items from a single table in a database. That will get you the basics, then start adding some frills using javascript, like sorting the columns, deleting rows, etc.
Good luck and don't give up!
Pete