Jump to content

Truman

Members
  • Posts

    109
  • Joined

  • Last visited

Posts posted by Truman

  1. You won't find any tutorial explaining how to make that particular design. You're supposed to be able to build this using your understanding of HTML and CSS. In the CSS tutorial look up margins, padding, float, clear, positioning.

     

    If you have not even been able to begin this test then you still have a lot of learning to do.

    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.

    post-186999-0-81088300-1457110758_thumb.jpg

    • Like 1
  3. 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.

  4. 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.

  5. 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."

  6. 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);

  7. 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.

  8. 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?

  9.  

    All i did was add value to if condition calling function, that's it, and it worked fine!

    if (quarter(12) % 3 === 0 )

    but since you are using function again somewhere else i added value to another variable so i only need to adjust once, again it worked fine as it should.

    var value_to_mod = 12; if (quarter(value_to_mod) % 3 == 0) {console.log("The statement is true");} else {console.log("The statement is false");quarter(value_to_mod)}

    I suppose you are looking at the current console.log and not older previous logs?

    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?

  10. Are you saying this is wrong or right on what you expect?

     

    8/4 = 2 correct , now 2 % 3 is not equal to 0 so it is false.

     

    If you mean include in console log

     

    console.log("The statement is false "+quarter(8));

     

    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'?''

  11. 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 )
  12. 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...

    • Like 1
  13. Your function is correct however instead of passing arguments into your method call you are initializing a void function.function orangeCost(price) {var val = price * 5;console.log(val);};orangeCost(5);

    Thank you, this works...though I still don't understand why my solution was not accepted. This is a codeacademy problem.
  14. 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...

  15. You don't need </img>, you just need to put the closing angle bracket: <a href="about.htm"><img src="button.jpg"style="border:none"></a><a href="contact.htm"><img src="button.jpg"style="border:none"></a>

    Thanks a lot! You're right. <img> is one-side tag, this was my shame...
  16. Can you post some code?

    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...