Enable contrast version

Tutor profile: Steven W.

Inactive
Steven W.
Senior Developer at Google
Tutor Satisfaction Guarantee

Questions

Subject: Web Development

TutorMe
Question:

How do I make an HTML element repeat N times?

Inactive
Steven W.
Answer:

It depends on the framework you're using, but generally each framework has a different way of doing it. For example, Angular provides the `*ngFor="let item of array"` directive, which can be added to an element to create a copy of it for each item in an array. Meanwhile, in react you would surround the HTML to repeat in a standard JavaScript for loop. The simplest way to do it without a framework is to use JavaScript to append HTML elements directly to the element. So, e.g. you'd use something like this inside of a for loop: document.getElementById("parent").append("<div>My Content</div>")

Subject: Machine Learning

TutorMe
Question:

How can I input text data into a neural network?

Inactive
Steven W.
Answer:

One of the most common ways to input text data into a neural network is to represent each word as a different number, then to use "One-Hot Encoding" to convert that number into a form that a neural network can understand. To one-hot encode a number $$X$$, you simply create a long vector where every value is 0, except for the value at position $$X$$. So for example, you could say "Cat" is 1, "Dog" is 2, and so on. After one-hot encoding, "Cat" would be $$[ 1, 0, 0, \cdots, 0 ]$$ and "Dog" would be $$[ 0, 1, 0, \cdots, 0 ]$$, and so on.

Subject: Java Programming

TutorMe
Question:

Why is everyone so worried about immutability in Java?

Inactive
Steven W.
Answer:

Immutable data structures are really useful in parallel code. They make it easier to share data between multiple threads, because it prevents each thread from touching the other thread's data. Imagine if you were a cook trying to flavor a dish. If someone kept randomly adding things to the meal after you tasted it, it'd be much harder to figure out which spices were needed make the meal taste good because the meal keeps changing. With an immutable meal, it would be much easier to plan which spices to use, because neither you nor anybody else could modify the meal while you were planning the spices.

Contact tutor

Send a message explaining your
needs and Steven will reply soon.
Contact Steven

Request lesson

Ready now? Request a lesson.
Start Lesson

FAQs

What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Lesson" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.
BEST IN CLASS SINCE 2015
TutorMe homepage
Made in California by Zovio
© 2013 - 2022 TutorMe, LLC
High Contrast Mode
On
Off