nmohamm Posted May 18, 2010 Share Posted May 18, 2010 Please can anyone help me with the following 8 questions?! Need answers for an application I'm creating with a friend!! Really appreciate it!! 1. Using PHP, determine whether the method 'happy_days' exists in the class Test. class Test{ public function happy_days(){ return null; } } Answer: 2. Extract and add together the numeric values from the string $var $var = '{"val_a":7,"val_b":5,"val_c":4,"val_d":6,"val_e":5}'; Answer: 3. Finish the following class to print "Person->name has been frogged" when the following is executed on a Person object: print $person; class Person{ private $name = ''; public function __construct($name){ $this->name = $name; } } $person = new Person('john'); print $person; // john has been frogged . . . Answer: 4. create a function to replace all instances of 'test' with 'frog' within the values of the following array $test = array('key1'=>'test1', 'key2'=>'value2', 'key3'=>array('test','test1','test2')); Answer: 5. Get a list of filename and filepaths with the extension '.png' in the following directory structure, your solution should allow further files and directories to be added at any point in the tree: - folder - test1.png - test2.png - untitled.txt - subfolder - test3.png - untitled1.txt Answer: 6. Edit the following html/javascript so that when a user submits the form, the element with id #container is updated with the value from #name <form action="" method="post" name="form_name" id="form_name"> <fieldset> <label for="your_name">Enter Name</label> <input type="text" name="your_name" id="your_name" /> <input type="submit" /> </fieldset> </form> Answer: 7. Create javascript so that the following methods produce the output listed next it. circle = new Circle(); console.log(circle.get_area()); // 3.141592653589793 circle.set_radius(10); console.log(circle.get_area()); // 314.1592653589793 console.log(circle); // the radius of my circle is 10 and it's area is 314.1592653589793 Answer: 8. Using JQuery fetch the latest 5 tweets and list them inside the dom element identified by #twitter and link them to the original tweet. <div id="twitter"></div> <script type="text/javascript"> var twitter_json_feed = "http://twitter.com/statuses/user_timeline/15074090.json?count=5&callback=?"; var twitter_user = "frogtrade"; </script> Answer: Quote Link to comment https://forums.phpfreaks.com/topic/202203-need-answers-help-anybody-php5-and-javascript/ Share on other sites More sharing options...
Philip Posted May 18, 2010 Share Posted May 18, 2010 Uhh, we're not here to do your homework. Quote Link to comment https://forums.phpfreaks.com/topic/202203-need-answers-help-anybody-php5-and-javascript/#findComment-1060300 Share on other sites More sharing options...
nmohamm Posted May 18, 2010 Author Share Posted May 18, 2010 Oh come on please!! Its not much to ask!! I have faith in experts like you please!! Quote Link to comment https://forums.phpfreaks.com/topic/202203-need-answers-help-anybody-php5-and-javascript/#findComment-1060302 Share on other sites More sharing options...
.josh Posted May 18, 2010 Share Posted May 18, 2010 How can you rightfully judge whether something is too much to ask unless you know how to do it already and are just being lazy? Seriously dude, computer classes are not required courses. If you're just gonna have someone else do your work, why signup for it in the first place? We are here to help people learn. You don't learn by having others do stuff for you. Quote Link to comment https://forums.phpfreaks.com/topic/202203-need-answers-help-anybody-php5-and-javascript/#findComment-1060306 Share on other sites More sharing options...
nmohamm Posted May 18, 2010 Author Share Posted May 18, 2010 How can you rightfully judge whether something is too much to ask unless you know how to do it already and are just being lazy? Seriously dude, computer classes are not required courses. If you're just gonna have someone else do your work, why signup for it in the first place? We are here to help people learn. You don't learn by having others do stuff for you. I understand Dude, just was wondering even a little help i'd appreciate it. I am learning PHP5 BUT if anyone can give me some help or pointers i'd appreciate it... Quote Link to comment https://forums.phpfreaks.com/topic/202203-need-answers-help-anybody-php5-and-javascript/#findComment-1060309 Share on other sites More sharing options...
.josh Posted May 18, 2010 Share Posted May 18, 2010 well then explain what exactly you are having issues with, what you've tried, etc... because all I see is "please fill in the blanks for my homework assignment". Quote Link to comment https://forums.phpfreaks.com/topic/202203-need-answers-help-anybody-php5-and-javascript/#findComment-1060310 Share on other sites More sharing options...
nmohamm Posted May 18, 2010 Author Share Posted May 18, 2010 Close thread please. Quote Link to comment https://forums.phpfreaks.com/topic/202203-need-answers-help-anybody-php5-and-javascript/#findComment-1060313 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.