Archive for December, 2009
Top 15 Interview Questions
Posted by gladwing in Question and Answers Friday, 18 December 2009 11:54 1 Comment
You should have answers prepared for these questions.
- Describe your ideal job and/or boss.
- Why are you looking for a job? Why are leaving your current position?
- What unique experience or qualifications separate you from other candidates?
- Tell me about yourself.
- What are your strengths and weaknesses?
- Describe some of your most important career accomplishments.
- What are your short-term/long-term goals?
- Describe a time when you were faced with a challenging situation and how you handled it.
- What are your salary requirements?
- Why are you interested in this position? Our company?
- What would your former boss/colleagues say about you?
- What are the best and worst aspects of your previous job?
- What do you know about our company?
- What motivates you? How do you motivate others?
- Are you willing to relocate?
Don’t forget to write a brief ‘Thank You’ note to the person or people who interviewed you. You may be the only candidate who performed this small courtesy!
AJAX Tutorials
This is a user-contributed list of AJAX tutorials for those new to Asynchronous JavaScript with or without XML. Feel free to leave a comment if you feel an important tutorial has been omitted.
- AJAX security – read about AJAX security issues and vulnerability postings
- jQuery plugins – a directory of plugins for jQuery.
- How jQuery works – a basic jQuery tutorial.
- Tutorial: AJAX Made Easy – On the heels of two very successful tutorials on creating a collapsible div and an animated sliding div, I’ve decided to write another. It seems my last few helped a number of programmers learn a simple trick, and hopefully this one will do the same.
- Efficient JavaScript code – Opera has one of the fastest and most efficient JavaScript engines of any browser, but when you have multiple User JavaScripts installed, it is important that they run efficiently to keep Opera’s performance as high as possible. Well written code will help to minimise the performance impact of User JavaScripts.
- Create a photo gallery using CSS – This sample chapter, taken from Sams Teach Yourself CSS in 10 Minutes, discusses how to create a photo gallery using a series of floated div elements.
- Developing PHP the Ajax way, Part 2: Back, Forward, Reload – A major challenge of Asynchronous JavaScript and XML (Ajax)-driven Web sites is the lack of a Back button. We will use JavaScript to create a history stack for the Ajax photo gallery built in Part 1 of this two-part “Developing PHP the Ajax way” series. This history stack will closely mirror the history utility found in Web browsers, and it will be used to provide Back, Forward, and Reload buttons for the application.
- 30 second AJAX tutorial – as simple as they get
- Ajax: What is it Good For? – sliding interface and image gallery code examples
- AJAX: Creating Huge Bookmarklets – A bookmarklet is a special piece of JavaScript code that can be dragged into a user’s link toolbar, and which later can be clicked on to implement cross-site behavior. People have done all sorts of cool stuff with it.
- AJAX Tutorial with Prototype – I wanted to give an example of a good use of AJAX, and at the same time keep it simple. So I thought a good example would be to build a zip code verifier. As soon as the person enters the zip code it makes a request to the server to see if the zip code is in the database, and returns the city and state.
- AJAX Tutorial from W3Schools – very basic one
- AJAX:Getting Started – from Mozilla Developer Center
- Guide to Using AJAX and XMLHttpRequest – Although the XMLHttpRequest object might sound complex and different from any other JavaScript object you have ever used, it really isn’t. A good way to think of the XMLHttpRequest object is as you would think of the JavaScript Image object. As we know, with the Image object you can dynamically specify a new URL for the image source without reloading the page. Similarly with the XMLHttpRequest object, you can dynamically specify a URL to get some server data without reloading the page.
- AJAX: Usable Interactivity with Remote Scripting – This article aims to give you an introduction to the foundations of remote scripting, in particular, the emerging XMLHttpRequest protocol. We’ll then walk through an example application that demonstrates how to implement that protocol, while creating a usable interface.
- Ajax Tutorial from HTMLSource – includes a guide to cross-browser AJAX
- Make an AJAX Website in Less than 10 Minutes – I’ve been toying around with AJAX apps and XMLHttpRequest but have wanted to put up a site that loads all of its content asynchronously. If you’re like me and you learn best from working with examples you’re only 10 minutes away from your first AJAX website.
- Make all your tables sortable with AJAX – While the web design community gradually moves away from using tables to lay out the structure of a page, tables really do have a vital use, their original use; they’re for laying out tabular data.
- Using Ajax with PHP and Sajax – For years, the goal of creating a truly responsive Web application was hampered by one simple fact of Web development: To change the information on part of a page, a user must reload the entire page. Not anymore. Thanks to asynchronous JavaScript and XML (Ajax), we can now request new content from the server and change just part of a page. This tutorial explains how to use Ajax with PHP and introduces the Simple Ajax Toolkit (Sajax), a tool written in PHP that lets you integrate server-side PHP with JavaScript that makes this work.
- Learn xajax in 10 Minutes – xajax is designed to be extremely easy to implement in both existing web applications as well as new projects.
- Nice forms with AJAX – Web forms. Everybody knows web forms. Each day we have to fill in some information in a web form, be it a simple login to your webmail application, an online purchase or signing up for a website. They are the basic (and pretty much the only) way of gathering information on the web.
- Submit a form with Ajax – for CakePHP
- Building a Drag-and-Drop Shopping Cart with AJAX – The rise of AJAX over the past several months has taken over the development world and breathed new life into the Web. Although these techniques have been possible for many years now, the maturity of Web standards like XHTML and CSS now make it a viable alternative that will be viewable by all but the oldest browsers.
- Drag & Drop Sortable Lists with JavaScript and CSS – self-explanatory
- Mastering Ajax: Advanced requests and responses in Ajax – For many Web developers, making simple requests and receiving simple responses is all they’ll ever need, but for developers who want to master Ajax, a complete understanding of HTTP status codes, ready states, and the XMLHttpRequest object is required. In this article, Brett McLaughlin will show you the different status codes and demonstrate how browsers handle each and he will showcase the lesser-used HTTP requests that you can make with Ajax.
- AJAX: Instant Tutorial – Simply put, AJAX allows you to make a call to an http server (typically an RSS feed or a webpage), get it’s content and load them into your existing page without having to refresh the whole page. This means that services like email don’t have to reload the whole page everytime you click a message, saving on bandwidth (loading the header/footer all over again) and making things more efficient.
- Mastering Ajax: Make asynchronous requests with JavaScript and Ajax – Most Web applications use a request/response model that gets an entire HTML page from the server. The result is a back-and-forth that usually involves clicking a button, waiting for the server, clicking another button, and then waiting some more. With Ajax and the XMLHttpRequest object, you can use a request/response model that never leaves users waiting for a server to respond. In this article, Brett McLaughlin shows you how to create XMLHttpRequest instances in a cross-browser way, construct and send requests, and respond to the server.
- Alternate Ajax Techniques – By now, nearly everyone who works in web development has heard of the term Ajax, which is simply a term to describe client-server communication achieved without reloading the current page. Most articles on Ajax have focused on using XMLHttp as the means to achieving such communication, but Ajax techniques aren’t limited to just XMLHttp. There are several other methods; we’ll explore some of the more common ones in this series of articles.
- Everything AJAX – relevant links
- 50 AJAX toolkits and frameworks – a great roundup
- YShout – a PHP+AJAX Shoutbox
- Easy AJAX inline text edit – As everybody knows, refreshing pages is so 1999. AJAX, DOM, whatever you call it makes it possible to let people edit a piece of text inline without having to use a submit button.
- Developing AJAX Applications the Easy Way – AJAX is the buzzword of the moment among web developers, so much so that you could be sick of introductions to AJAX by now (if that’s the case, skip down to “The Chat Web Page”). AJAX is a technology that is hotly debated from many angles, but it has stuck because it encapsulates something that is new from a user’s perspective. The functionally that is newly available to all web users is “in-page replacement”: the ability for a web page to change using data from a web server without totally redrawing itself. This functionality has been around in Mozilla and Internet Explorer for a while, but it is only recently that Safari and Konqueror users have been able to join in.
- The Dojo Toolkit in Practice – When you start to build an Ajax application, you quickly run into situations where you feel like you are reinventing the wheel. The XMLHttpRequest object is what a lot of developers jump on when they think about Ajax, but that is just the start, and is the easy part.
- prototype.js just for AJAX – prototype.js library is too large for just using AJAX. In its current version (1.4.0_pre10) it weighs 36KB and contains lots of other features that are most probably not needed when just dealing with AJAX.
- Google Web Toolkit – Google Web Toolkit (GWT) is a Java software development framework that makes writing AJAX applications like Google Maps and Gmail easy for developers who don’t speak browser quirks as a second language. Writing dynamic web applications today is a tedious and error-prone process; you spend 90% of your time working around subtle incompatibilities between web browsers and platforms, and JavaScript’s lack of modularity makes sharing, testing, and reusing AJAX components difficult and fragile.
- ASK – AJAX Source Kit – The thing with AJAX is that it needs JavaScript to work and a direct consequence surrounding its hype is that a lot of web sites have implemented it without catering to common usability and accessibility factors. This is something that has saddened me, and therefore I developed ASK – AJAX Source KIT to address that while at the same time offer a light-weight library to implement AJAX functionality without having to worry about web browser differences.
- AJAX validation on Rails – I wanted AJAX requests in Rails to result in error handling and message reporting that was at least as nice (and almost as easy) as doing the same thing without AJAX.
- Responsible asynchronous scripting – Asynchronous or remote scripting has been lurking in the background of web app development for quite some time now. Originally dependent on proprietary technology like Java applets, ActiveX and Flash or clever combinations of disparate technologies like images and cookies, native support for the XMLHttpRequest (XHR) object in modern browsers has made it easier than ever to make web apps more responsive and more like their desktop counterparts. This lower barrier to entry also makes it easier to make poor decisions and inappropriate use of a powerful technology.
- Ajax RSS reader – Learn how to build an Asynchronous JavaScript and XML (Ajax) Really Simple Syndication (RSS) reader, as well as a Web component that you can place on any Web site to look at the articles in the RSS feeds.
- Creating a MySQL connection with PHP/AJAX – In this tutorial I will explain how to open a mysql database connection using PHP and the all popular AJAX. The purpose of this article is to demonstrate how the XMLHttpRequest object works within php and the advantages of using it. This tutorial will be the first in a series of articles leading to the development of a fully functional dynamic web events application.
- Getting Started with Ajax – The DOM plays into Ajax in a number of ways. How you use the DOM depends a good deal on how you handle the content returned from the server. You can treat the conÂÂtent as simple text using the responseText property of the server response, or you can treat it as XML using responseXML. Assuming the content you pull back from the server is an (X)HTML snippet and you’ve gotten it as responseText, you could drop that content into a particular spot on the page using innerHTML. On the flip side, if the content you pull back is XML and you’ve gotten it as responseXML, you can traverse its DOM, cherry-picking or performing functions on the elements, attributes, and text nodes.
- Using Ajax from Perl – If you’re even remotely connected to web development, you can’t have failed to have heard of Ajax at some point in the last year. It probably sounded like the latest buzzword and was one of those things you stuck on the “must read up on later” pile. While it’s definitely a buzzword, it’s also quite a useful one.`
10 mistakes managers make during job interviews
Posted by gladwing in Question and Answers Friday, 18 December 2009 11:47 1 Comment
Hiring is one of the hardest parts of managing a team. A lot is riding on the initial meeting, and if you’re nervous or ill-prepared — or both — it can make you do strange things. The following mistakes are all too common, but they’re easy to avoid with some advance preparation
#1: You talk too much
When giving company background, watch out for the tendency to prattle on about your own job, personal feelings about the company, or life story. At the end of the conversation, you’ll be aflutter with self-satisfaction, and you’ll see the candidate in a rosy light — but you still won’t know anything about his or her ability to do the job.
#2: You gossip or swap war stories
Curb your desire to ask for dirt on the candidate’s current employer or trash talk other people in the industry. Not only does it cast a bad light on you and your company, but it’s a waste of time.
#3: You’re afraid to ask tough questions
Interviews are awkward for everyone, and it’s easy to over-empathize with a nervous candidate. It’s also common to throw softball questions at someone whom you like or who makes you feel comfortable. You’re better off asking everyone the same set of challenging questions — you might be surprised what they reveal. Often a Nervous Nellie will spring to life when given the chance to solve a problem or elaborate on a past success.
#4: You fall prey to the halo effect (or the horns effect)
If a candidate arrives dressed to kill, gives a firm handshake, and answers the first question perfectly, you might be tempted to check the imaginary “Hired!” box in your mind. But make sure you pay attention to all the answers and don’t be swayed by a first impression. Ditto for the reverse: The mumbler with the tattoos might have super powers that go undetected at first glance.
#5: You ask leading questions
Watch out for questions that telegraph to the applicant the answer you’re looking for. You won’t get honest responses from questions like, “You are familiar with Excel macros, aren’t you?”
#6: You invade their privacy
First of all, it’s illegal to delve too deeply into personal or lifestyle details. Second, it doesn’t help you find the best person for the job. Nix all questions about home life (“Do you have children?” “Do you think you’d quit if you got married?”), gender bias or sexual preference (“Do you get along well with other men?”), ethnic background (“That’s an unusual name, what nationality are you?”), age (“What year did you graduate from high school?”), and financials (“Do you own your home?”)
#7: You stress the candidate out
Some interviewers use high-pressure techniques designed to trap or fluster the applicant. While you do want to know how a candidate performs in a pinch, it’s almost impossible to re-create the same type of stressors an employee will encounter in the workplace. Moreover, if you do hire the person, he or she may not trust you because you launched the relationship on a rocky foundation.
#8: You cut it short
A series of interviews can eat up your whole day, so it’s tempting to keep them brief. But a quick meeting just doesn’t give you enough time to gauge a candidate’s responses and behavior. Judging candidates is nuanced work, and it relies on tracking lots of subtle inputs. An interview that runs 45 minutes to an hour increases your chances of getting a meaningful sample.
#9: You gravitate toward the center
If everyone you talk to feels like a “maybe,” that probably means you aren’t getting enough useful information — or you’re not assessing candidates honestly enough. Most “maybes” are really “no, thank yous.” (Face it: The candidate didn’t knock your socks off.) Likewise, if you think the person might be good for some role at some point in the future, he or she is really a “no.”
#10: You rate candidates against each other
Mediocre candidates may look like superstars when they follow a dud, but that doesn’t mean they’re the most qualified for the job. The person who comes in tomorrow may smoke all of them, but you won’t be able to tell if you rated mediocre candidates too highly in your notes. Evaluate each applicant on your established criteria — don’t grade on a curve.
PHP interview questions, Part 2
Posted by gladwing in Question and Answers Friday, 18 December 2009 11:42 4 Comments
- How can we repair a MySQL table?
- What are the advantages of stored procedures, triggers, indexes?
- What is the maximum length of a table name, database name, and fieldname in MySQL?
- How many values can the SET function of MySQL take?
- What are the other commands to know the structure of table using MySQL commands except explain command?
- How many tables will create when we create table, what are they?
- What is the purpose of the following files having extensions 1) .frm 2) .myd 3) .myi? What do these files contain?
- What is maximum size of a database in MySQL?
- Give the syntax of Grant and Revoke commands?
- Explain Normalization concept?
- How can we find the number of rows in a table using MySQL?
- How can we find the number of rows in a result set using PHP?
- How many ways we can we find the current date using MySQL?
- What are the advantages and disadvantages of Cascading Style Sheets?
- What type of inheritance that PHP supports?
- How can increase the performance of MySQL select query?
- The structure of table view buyers is as follows:
+----------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------+-------------+------+-----+---------+----------------+ | user_pri_id | int(15) | | PRI | NULL | auto_increment | | userid | varchar(10) | YES | | NULL | | +----------------+-------------+------+-----+---------+----------------+
the value of user_pri_id the last row 2345 then What will happen in the following conditions?
Condition1: Delete all the rows and insert another row then. What is the starting value for this auto incremented field user_pri_id ,
Condition2: Delete the last row(having the field value 2345) and insert another row then. What is the value for this auto incremented field user_pri_id - What are the advantages/disadvantages of MySQL and PHP?
- What is the difference between GROUP BY and ORDER BY in Sql?
- What is the difference between char and varchar data types?
- What is the functionality of md5 function in PHP?
- How can I load data from a text file into a table?
- How can we know the number of days between two given dates using MySQL?
- How can we know the number of days between two given dates using PHP?
- How can we change the name of a column of a table?
- How can we change the name and data type of a column of a table?
- What are the differences between drop a table and truncate a table?
- When you want to show some part of a text displayed on an HTML page in red font color, what different possibilities are there to do this? What are the advantages/disadvantages of these methods?
- When viewing an HTML page in a Browser, the Browser often keeps this page in its cache. What can be possible advantages/disadvantages of page caching? How can you prevent caching of a certain page (please give several alternate solutions)?
- What are the different methods of passing data or information between two calls of a web page? What are the advantages/disadvantages of these methods?
- An Apache web server is running on a Linux system. Suddenly, the web server delivers the pages very slow. How could you find out possible reasons for that (when using system commands, please specify their names)?
- What are the different ways to login to a remote server? Explain the means, advantages and disadvantages?
- Please give a regular expression (preferably Perl/PREG style), which can be used to identify the URL from within a HTML link tag. Example: The regular expression should match the tag <A HREF=”http://www.yoursite.com/”> and give the URL (”http://www.yoursite.com /”) as a return result. Tags should also be matched if they contain other attributes than the HREF attribute.
- A select query over a large table runs very slow because of the growing number of entries in that table. What different measures could be taken to improve speed?
- A company wants to store their invoices in a database. They already have their customers and articles in that database. Both customer and article are each identified by an unique integer value. Please create the SQL statements for creating the necessary table(s) for storing the invoices in a MySQL database. An invoice should hold information like invoice number, customer, date, article(s) and quantity etc.
- For the database from the previous question, please give an SQL query which returns the invoice number of all invoices which contain the article with the number “1234″. The query should be able to run under a MySQL 4.0 database.
- How would you backup and restore a big MySQL database? What are the advantages of the approach which you have taken over the others?
- Create a PHP web script with the following attributes: on start, three HTML form elements are shown: an string input field, a checkbox field, a dropdown/pull down list with 5 elements and a submit button. On submission, the form should be redisplayed (while remaining all options/inputs as the user has selected/entered them). Additionally, the selections/inputs of the user should be displayed in text. Please solve this without the use of any external libraries.
- What is MIME?
- What is PEAR in PHP?
- How can I use the COM components in PHP?
- How can I load the DLLs dynamically?
- How many ways we can give the output to a browser?
- How can we know that a session is started or not?
- What is the default session time in PHP and how can I change it?
- What changes I have to done in PHP.ini file for file uploading?
- What are the differences between MySQL_fetch_array(), MySQL_fetch_object(), MySQL_fetch_row()?
- How can I set a cron and how can i execute it in Unix, Linux, and windows?
- Steps for the payment gateway processing?
- How many ways I can register the variables into session?
- Explain different types of errors in PHP (i.e. arguments in errorreporting function)?
- How many ways I can redirect a PHP page?
- List out different arguments in PHP header function?
- What type of headers have to add in the mail function in which file a attached?
- What is the difference between <?PHP and <? And which is preferable?
- What are the differences between include() and include_once() functions?
- Describe the importance of database abstraction layers in PHP and database connection?
- Explain MySQL optimization?
- What is the difference between using copy() and move() function in PHP file uploading?
- What is the difference between Reply-to and Return-path in the headers of a mail function?
- Explain about Type Juggling in PHP?
- How can I get the only name of the current executing file?
- How can I embed a Java program in PHP file and what changes have to be done in PHP.ini file?
- How can I find what type of images that the PHP version supports?
- The table tbl_sites contains the following data:
----------------------------------------------------- Userid sitename country ------------------------------------------------------ 1 sureshbabu indian 2 PHPprogrammer andhra 3 PHP.net usa 4 PHPtalk.com germany 5 MySQL.com usa 6 sureshbabu canada 7 PHPbuddy.com pakistan 8. PHPtalk.com austria 9. PHPfreaks.com sourthafrica 10. PHPsupport.net russia 11. sureshbabu australia 12. sureshbabu nepal 13. PHPtalk.com italy
Write a select query that will displayed the duplicated site name and how many times it is duplicated? …
PHP interview questions , Part 1
Posted by gladwing in Question and Answers Friday, 18 December 2009 11:41 2 Comments
osted some detailed answers on his blog.
- What are the differences between Get and post methods in form submitting, give the case where we can use get and we can use post methods?
- Who is the father of PHP and explain the changes in PHP versions?
- How can we submit a form without a submit button?
- In how many ways we can retrieve the date in the result set of mysql using PHP?
- What is the difference between mysql_fetch_object and mysql_fetch_array?
- What is the difference between $message and $$message?
- How can we extract string ‘webbyinfo.com ‘ from a string ‘http://www.webbyinfo.com’ using regular expression of PHP?
- How can we create a database using PHP and mysql?
- What are the differences between require and include, include_once?
- Can we use include (”techinterviews.php”) two times in a PHP page “makeit.PHP”?
- What are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee(eno int(2),ename varchar(10)) ?
- Functions in IMAP, POP3 AND LDAP?
- How can I execute a PHP script using command line?
- Suppose your Zend engine supports the mode <? ?> Then how can u configure your PHP Zend engine to support <?PHP ?> mode ?
- Shopping cart online validation i.e. how can we configure Paypal, etc.?
- What is meant by nl2br()?
- Draw the architecture of Zend engine?
- What are the current versions of apache, PHP, and mysql?
- What are the reasons for selecting lamp (linux, apache, mysql, PHP) instead of combination of other software programmes, servers and operating systems?
- How can we encrypt and decrypt a data present in a mysql table using mysql?
- How can we encrypt the username and password using PHP?
- What are the features and advantages of object-oriented programming?
- What are the differences between procedure-oriented languages and object-oriented languages?
- What is the use of friend function?
- What are the differences between public, private, protected, static, transient, final and volatile?
- What are the different types of errors in PHP?
- What is the functionality of the function strstr and stristr?
- What are the differences between PHP 3 and PHP 4 and PHP 5?
- How can we convert asp pages to PHP pages?
- What is the functionality of the function htmlentities?
- How can we get second of the current time using date function?
- How can we convert the time zones using PHP?
- What is meant by urlencode and urldocode?
- What is the difference between the functions unlink and unset?
- How can we register the variables into a session?
- How can we get the properties (size, type, width, height) of an image using PHP image functions?
- How can we get the browser properties using PHP?
- What is the maximum size of a file that can be uploaded using PHP and how can we change this?
- How can we increase the execution time of a PHP script?
- How can we take a backup of a mysql table and how can we restore it. ?
- How can we optimize or increase the speed of a mysql select query?
- How many ways can we get the value of current session id?
- How can we destroy the session, how can we unset the variable of a session?
- How can we destroy the cookie?
- How many ways we can pass the variable through the navigation between the pages?
- What is the difference between ereg_replace() and eregi_replace()?
- What are the different functions in sorting an array?
- How can we know the count/number of elements of an array?
- What is the PHP predefined variable that tells the What types of images that PHP supports?
- How can I know that a variable is a number or not using a JavaScript?
- List out some tools through which we can draw E-R diagrams for mysql.
- How can I retrieve values from one database server and store them in other database server using PHP?
- List out the predefined classes in PHP?
- How can I make a script that can be bilanguage (supports English, German)?
- What are the difference between abstract class and interface?
- How can we send mail using JavaScript?