Jump to content

Truman

Members
  • Posts

    109
  • Joined

  • Last visited

Everything posted by Truman

  1. Actually, I did the test today. The thing is that I thought that " converting" means something else and it is actually only describing what I see on picture. So you can lock this theme because there was a conceptual misunderstanding. It's my fault.
  2. I have a test to solve and one of the tasks is to convert an image to html and css. I did all other tasks but never faced with this before. I'm not looking for you to write me a code, just to direct me where I can learn this. Take a look at the attached file, that's a work I have to do. I ran through html and css tutorials on w3school but didn't see anything similar.
  3. Truman

    PHP problems

    I have a question - when I make two or more instances in a class do I use one function construct_ or one for each instances?
  4. Truman

    PHP problems

    I did what you asked me to but again it says "Oops, try again. The random output you printed from your name should be a letter." so the problem is not in character position, it's about content of output.
  5. Truman

    PHP problems

    I wrote this code: $name = "milos"; $length = strlen($name); print rand(0, $length); $subs = substr($name, rand(0, $length), 1); echo $subs; from some reason it doesn't work.
  6. Truman

    PHP problems

    In one of my previous efforts this is what I wrote: $name = "milos"; $length = strlen($name); print rand(0, $length); I don't know how and why should I use a random number with substring. For previous code I receive a message "The random output you printed from your name should be a letter."
  7. Truman

    PHP problems

    Yes, I know how those functions work but I hit a snag. This is one of the solutions that I've tried but it doesn't work: $name = "milos"; $sub0 = substr($name, 0); $sub1 = substr($name, 1); $sub2 = substr($name, 2); $sub3 = substr($name, 3); $sub4 = substr($name, 4); print rand($sub0, $sub4);
  8. Truman

    PHP problems

    Hi, I was hoping that you could help we with this problem. First, I need to make $name variable with my name. After that, using knowledge of strlen(string), rand(min, max), and substr(string, start, length) I need to print a random character from my name. It's a codeacademy problem. So it shouldn't be a number, only one of letters of my name.
  9. Hi guys, I practised building site in WordPress by doing it on virtual WAMP server. Now, I want to tranfer that site to byet.host but I have a problem. Before this I already built one site on byet server so I already have an account and url. This is what I did: I used FileZilla to transfer those WordPress files to old byethost account. But url now does not work, I guess because I need also a database that I used building a site on WAMP server. Can you please give me a hand, how to transfer my WordPress site from wamp to real server?
  10. This code is correct, says codeacademy, but the thing is that in previous problems we first defined functions which is not a case here. That's why this surprises me because I used different syntax. I didn't even know that this is possibly. I have a lot more to learn...or I simply don't get the methodology that this site uses... by the way, you didn't define quarter here. It's supposed to be n / 4. The way you did it divides 12 with 3 and the remaining is 0. Setting of this problem demands that we define quarter as n that is divided by 4. Or quarter is already a javascript method so I don't have to write formula n / 4?
  11. davej, keep in mind that I am supposed to solve codeacademy.com problem ( try yourself: https://www.codecademy.com/courses/javascript-beginner-en-6LzGd/1/3?curriculum_id=506324b3a7dffd00020bf661) and that I'm taking their course. So when I paste your complex code it says that's it is incorrect.
  12. Well, now I'm completely lost. When I use value 12 it gives me false. Would you be so kind to just show me the whole code?
  13. When I put quarter(12) it gives me: The statement is false3 I don't know why is that so because 12/4 = 3 and 3%3 is 0. The statement should be true... Also, I receive a note: ''Oops, try again. Did you remember to call quarter() inside the if statement with a value that would cause it to print 'The statement is true'?''
  14. Just to make sure that I understand this - templates for web sites are built in php?
  15. OK, so I should put for example number(4), but where should I place it? By the way, quarter(8) brings "The statement is false 2"
  16. Here I come again with another one:Define a function called quarter which has a parameter called number.This function returns a value equal to one quarter of the parameter. (i.e. number / 4;)Call the function inside the if statement's condition (and put in a parameter value!) such that "The statement is true" is printed to the console.and my code is: var quarter = function(number) {return number/4;}if (quarter() % 3 === 0 ) {console.log("The statement is true");} else {console.log("The statement is false");quarter(8)} when I call my function with parametar 8 it ejects 2. I don't know how to activate this part: if (quarter() % 3 === 0 )
  17. Thank you both, this was useful. After finishing my WP course I will go to php, and maybe keep learning some js by myself.
  18. Thank you! Now I get it, I thought that the problem might be in the first or second line of my code but it's actually only the last one.
  19. I month ago I started learning javascript. A couple of days ago I started attending WordPress course ( I want to become a freelancer - WP developer).A lecturer on this course told me that if I want to be WP expert it is better for me to learn PHP because templates are made with that language.Now, I'm a bit confused. Should my priority be javascript or php?I would appreciate opinions...
  20. Thank you, this works...though I still don't understand why my solution was not accepted. This is a codeacademy problem.
  21. I'm practising js on an another site and I do not know how to solve this problem. It's simple and I wrote a code, but it doesn't work.-You are a creature of habit. Every week you buy 5 oranges. But orange prices keep changing!You want to declare a function that calculates the cost of buying 5 oranges.You then want to calculate the cost of the 5 all together.Write a function that does this called orangeCost().It should take a parameter that is the cost of an orange, and multiply it by 5.It should log the result of the multiplication to the console.Call the function where oranges each cost 5 dollars.-and this is a code that I wrote:var orangeCost = function(price) {var val = price * 5;console.log(val);};orangeCost = (5);I could use some help...
  22. Thanks a lot! You're right. <img> is one-side tag, this was my shame...
  23. It didn't work, but thanks anyhow. I tried with </img>...
  24. I tried to attach file, but for some reason it didn't work. I'm pasting code for the whole page:<!DOCTYPE HTML><html><head><title>Sign-up for e-mail specials</title><style>#header {background-image: url(greenleaves.jpg); padding: 10px; color: white}</style></head><body><div id="header"><h1 class="pagetitle">The Garden Company</h1><h5 class="tagline"><i>Helping your garden grow since 1975<i></h5></div><nav><hr><p style="font-family: Arial, Helvetica, sans-serif; color: black; font-style: normal; margin:0px"><a class="buttonlink" href="index.htm"><img src="button.jpg" alt="">Home</a><a href="tips.htm"><img src="button.jpg" style="border:none"></a><a href="problems.htm"><img src="button.jpg" style="border:none"></a><a href="products.htm"><img src="button.jpg" style="border:none"></a><a href="about.htm"><img src="button.jpg"style="border:none"</a><a href="contact.htm"><img src="button.jpg"style="border:none"</a></p><hr></nav><h3 font-style="normal">Sign-up for E-mail Specials</h3><table><form method="post" action="mailto:miloshman2004@yahoo.com" enctype="text/plain"><tr><td>Name</td><td><input type="text" name="Name" size="30" maxlength="50" requierd></td><tr><td>E-mail address</td><td><input type="email" name="E-mail address"></td></tr><tr><td>State:</td><td><select name="state"><optgroup label="Europe"><option>Spain</option><option>Slovakia</option><option>France</option></optgroup><optgroup label="America"><option>SAD</option><option>Canada</option></optgroup></select></td></tr><tr><td>Level of gardening expertise:</td><td><input type="radio" name="level" value="Beginner">Beginner<br><input type="radio" name="level" value="Intermediate">Intermediate<br><input type="radio" name="level" value="Expert">Expert<br><input type="radio" name="level" value="Pro">Professional<br></td></tr><tr><td></td><td><input type=checkbox" name="partner" value="Yes" checked="checked">Yes, I would also like to receive coupons and offers from other gardening-related companies.</td></tr><tr><textarea name="comments" rows="5" cols="60"></textarea></tr><tr><input type="submit"><input type="reset" value="clear"></tr></form></table><hr><p class="copyright">Copyright ©2012 The Garden ™<br>No material may be reproduced without written permission<br><a href="mailto:webmaster@contoso.com?subject=Question/Comment" title="webmaster@contoso.com" style="color: black; text-decoration:none">Contact the <del>Webmaster</del><b>Master Gardener<b></a></p></body></html>
×
×
  • Create New...