moneybookers



Sunday, September 12, 2010

Search Engine Optimization

  1. What are your thoughts on the direction of Web 2.0 technologies with regards to SEO?
  2. Can you write HTML code by hand?
  3. Could you briefly explain the PageRank algorithm?
  4. How you created any SEO tools either from scratch or pieced together from others?
  5. What do you think of PageRank?
  6. What do you think of using XML sitemaps?
  7. Give me a description of your general SEO experience.
  8. What SEO tools do you regularly use?
  9. Under what circumstances would you look to exclude pages from search engines using robots.txt vs meta robots tag?
  10. What areas do you think are currently the most important in organically ranking a site?
  11. Do you have experience in copywriting and can you provide some writing samples?
  12. Have you ever had something you've written reach the front-page of Digg? Sphinn? Or be Stumbled?
  13. Explain to me what META tags matter in today's world.
  14. Explain various steps that you would take to optimize a website?
  15. If the company whose site you've been working for has decided to move all of its content to a new domain, what steps would you take?
  16. Rate from 1 to 10, tell me the most important "on page" elements
  17. Review the code of past clients/company websites where SEO was performed.
  18. What do you think about link buying?
  19. What is Latent Semantic Analysis (LSI Indexing)?
  20. What is Phrase Based Indexing and Retrieval and what roles does it play?
  21. What is the difference between SEO and SEM?
  22. What kind of strategies do you normally implement for back links?
  23. What role does social media play in an SEO strategy?
  24. What things wouldn't you to do increase rankings because the risk of penalty is too high?
  25. What's the difference between PageRank and Toolbar PageRank?
  26. Why might you want to use nofollow on an internal link?

Tuesday, September 7, 2010

odesk php test

Question: given below is a small php script:
class person{
Function getSal()
{
.....
.....
.....
}
}
Class emp extends person{
funciton GetSal()
{
???
}
}
?>
The getSal() of emp has to behave exactly as getSal() of person .which of the folliwing lines of code would you use to replce the

????
a. perent:: getSal();
b. person:: getSal();
c. parent:: getSal;
d. person:: getSal;

Ans: D

Question
what would be the output of the following code?



$stg='good day';
$stg= ucwords($stg);
echo $stg;
?>

a. good day
b. GOOD DAY
c. Good Day
d None of the above
Ans: C
Question:

which of the following command line interface constant is not defined in the cli sapi?

a. STDIN
b. STDOUT
c. STDPRT
d STDERR

 Ans:C

Question:

if the session_cache_expire()is not set,then by default the session cache will expire after:

a. 1 hr
b. 2 hr
c. 3 hr
d 4 hr

Ans:C
Question:


Which of the following is not a correct way of commenting in php?


a. //php comment
b. /*php comment*/
c. #php comment
d /# php comment

Ans:D

PHP interview questions and answers

PHP interview questions and answers
1. What does a special set of tags do in PHP?
The output is displayed directly to the browser.
2. What the difference is between include and require?
It is how they handle failures. If the file is not found by require(), it will cause a fatal error and halt the execution of the script. If the file is not found by include(), a warning will be issued, but execution will continue.
3. I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?
PHP Interpreter treats numbers beginning with 0 as octal. Look at the similar PHP interview questions for more numeric problems.
4. Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?
In this example it wouldn’t matter, since the variable is all by itself, but if you were to print something like "{$a},000,000 mln dollars", then you definitely need to use the braces.
5. How do you define a constant?
Via define() directive, like
define ("MYCONSTANT", 100);
6. How do you pass a variable by value?
Just like in C++, put an ampersand in front of it, like $a = &$b
7. Will comparison of string "10" and integer 11 work in PHP?
Yes, internally PHP will cast everything to the integer type, so numbers 10 and 11 will be compared.
8. When are you supposed to use endif to end the conditional statement? - When the original if was followed by : and then the code block without braces.
9. Explain the ternary conditional operator in PHP? –
Expression preceding the ? is evaluated, if it’s true, then the expression preceding the : is executed, otherwise, the expression following : is executed.
10. How do I find out the number of parameters passed into function? func_num_args() function returns the number of parameters passed in.
11. If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b?
100, it’s a reference to existing variable.
12. What’s the difference between accessing a class method via -> and via ::?
:: is allowed to access methods that can perform static operations, i.e. those, which do not require object initialization.
13. Are objects passed by value or by reference?
Everything is passed by value.
14. How do you call a constructor for a parent class?
parent::constructor($value)

15. What’s the special meaning of __sleep and __wakeup?
__sleep returns the array of all the variables than need to be saved, while __wakeup retrieves them.
16. Why doesn’t the following code print the newline properly?
Because inside the single quotes the n character is not interpreted as newline, just as a sequence of two characters - and n.

17. Would you initialize your strings with single quotes or double quotes? Since the data inside the single-quoted string is not parsed for variable substitution, it’s always a better idea speed-wise to initialize a string with single quotes, unless you specifically need variable substitution.
18. How come the code works, but doesn’t for two-dimensional array of mine?
Any time you have an array with more than one dimension, complex parsing syntax is required. print "Contents: {$arr[1][2]}" would’ve worked.
19. What is the difference between characters 23 and x23?
The first one is octal 23, the second is hex 23.
20. With a heredoc syntax, do I get variable substitution inside the heredoc contents?
Yes.
21. I want to combine two variables together:
22. $var1 = 'Welcome to ';
23. $var2 = 'TechInterviews.com';
What will work faster? Code sample 1:
$var 3 = $var1.$var2;
Or code sample 2:
$var3 = "$var1$var2";
Both examples would provide the same result - $var3 equal to "Welcome to TechInterviews.com". However, Code Sample 1 will work significantly faster. Try it out with large sets of data (or via concatenating small sets a million times or so), and you will see that concatenation works significantly faster than variable substitution.
24. For printing out strings, there are echo, print and printf. Explain the differences. –
echo is the most primitive of them, and just outputs the contents following the construct to the screen. print is also a construct (so parentheses are optional when calling it), but it returns TRUE on successful output and FALSE if it was unable to print out the string. However, you can pass multiple parameters to echo, like:

and it will output the string "Welcome to TechInterviews!" print does not take multiple parameters. It is also generally argued that echo is faster, but usually the speed advantage is negligible, and might not be there for future versions of PHP. printf is a function, not a construct, and allows such advantages as formatted output, but it’s the slowest way to print out data out of echo, print and printf.
25. I am writing an application in PHP that outputs a printable version of driving directions. It contains some long sentences, and I am a neat freak, and would like to make sure that no line exceeds 50 characters. How do I accomplish that with PHP? –
On large strings that need to be formatted according to some length specifications, use wordwrap() or chunk_split().
26. What’s the output of the ucwords function in this example?
27. $formatted = ucwords("TECHINTERVIEWS IS COLLECTION OF INTERVIEW QUESTIONS");
print $formatted;
What will be printed is TECHINTERVIEWS IS COLLECTION OF INTERVIEW QUESTIONS.
ucwords() makes every first letter of every word capital, but it does not lower-case anything else. To avoid this, and get a properly formatted string, it’s worth using strtolower() first.
28. What’s the difference between htmlentities() and htmlspecialchars()? - htmlspecialchars only takes care of <, >, single quote ‘, double quote " and ampersand.
htmlentities translates all occurrences of character sequences that have different meaning in HTML.
29. What’s the difference between md5(), crc32() and sha1() crypto on PHP? - The major difference is the length of the hash generated. CRC32 is, evidently, 32 bits, while sha1() returns a 128 bit value, and md5() returns a 160 bit value. This is important when avoiding collisions.
30. So if md5() generates the most secure hash, why would you ever use the less secure crc32() and sha1()?
Crypto usage in PHP is simple, but that doesn’t mean it’s free. First off, depending on the data that you’re encrypting, you might have reasons to store a 32-bit value in the database instead of the 160-bit value to save on space. Second, the more secure the crypto is, the longer is the computation time to deliver the hash value. A high volume site might be significantly slowed down, if frequent md5() generation is required.
31. How do you match the character ^ at the beginning of the string? –
^^

Saturday, September 4, 2010

odesk javascript solution

JavaScript Test Solution

1. What’s relationship between JavaScript and ECMAScript? -
ECMAScript is yet another name for JavaScript (other names include LiveScript).
The current JavaScript that you see supported in browsers is ECMAScript revision 3.
2. What are JavaScript types? -
Number, String, Boolean, Function, Object, Null, Undefined.
3. How do you convert numbers between different bases in JavaScript? -
Use the parseInt() function, that takes a string as the first parameter, and the base as
a second parameter. So to convert hexadecimal 3F to decimal, use parseInt ("3F", 16);
4. What does isNaN function do? -
Return true if the argument is not a number.
5. What is negative infinity? -
It’s a number in JavaScript, derived by dividing negative number by zero.

6. What boolean operators does JavaScript support? -
&&, || and !
7. What does "1"+2+4 evaluate to? -
Since 1 is a string, everything is a string, so the result is 124.
8. How about 2+5+"8"? -
Since 2 and 5 are integers, this is number arithmetic, since 8 is a string, it’s concatenation,
so 78 is the result.
9. What looping structures are there in JavaScript? -
for, while, do-while loops, but no foreach.
10. How do you create a new object in JavaScript? -
var obj = new Object(); or var obj = {};
11. How do you assign object properties? -
obj["age"] = 17 or obj.age = 17.
12. What’s a way to append a value to an array? -
arr[arr.length] = value;
13. What is this keyword? -
It refers to the current object.

oDesk Readiness test answers

oDesk Readiness test answers


Q no 1: If you have not done so please download and install the oDesk Team application. With the client running right click on the oDesk Team icon in the system tray (or doc for Mac users). Which of the following options is listed first? Note that you do NOT have to log into any actual Team Room to answer this question.

A: TeamRoom..


Q 2
: Which of the following actions are NOT allowed when applying to job openings?

A: All of the above

Q:3
'How does feedback work on oDesk?'

A: All of the above


Q4
: Which of the following break the oDesk user agreement?

A: All of the above

Q5: Which of the following is true of your oDesk timelog?

A: All of the above

Q6
: Which of the following statements about the oDesk Team application are true?

A: All of the above

Q7
: What do you need to do to ensure guaranteed payment on hourly jobs?

A: All of the above


Q8
: Which of the following statements are correct about oDesk fees?

A: All of the above

Q9
: Buyers set weekly limits on hourly assignments, how do these work?

A: All of the above

Q10
: How does oDesk's dispute resolution policy for work?

A: All of the above


Q11
: Can I start my own company on oDesk?

A: Yes! oDesk allows you to build and manage a team of workers, colleagues and collaborators. You can even subcontract other workers on oDesk to other customers oDesk (and take a cut).