Showing posts with label Interview Questions and Answers. Show all posts
Showing posts with label Interview Questions and Answers. Show all posts

Friday 25 September 2015

Codeigniter Interview Questions for Experienced




Question: What is CodeIgniter?
Codeigniter is an open source framework for web application on PHP. It is loosely based on MVC pattern and it is similar to CakePHP.


Question: What is Stable version of CodeIgniter?
Version: 3.0.4,
Date January 13, 2016


Question: In Which language CodeIgniter is written?
PHP

Question: What are the features of codeigniter? Open source framework
Light Weight
CodeIgniter is Extensible
Full Featured database classes


Question: How to access config variable in codeigniter?
$this->config->item('variable name');


Question: How to unset session in codeigniter?
 $this->session->unsetuserdata('somename');;


Question: How do you get last insert id in codeigniter?
 $this->db->insertid();;


Question: How to print SQL statement in codeigniter model??
 $this->db->lastquery();;


Question: What are hooks in CodeIgniter?
CodeIgniter's Hooks feature provides a means to tap into and modify the inner workings of the framework without hacking the core files.
    $hook['pre_controller'] = array(
            'class'    => 'MyClass',
            'function' => 'Myfunction',
            'filename' => 'Myclass.php',
            'filepath' => 'hooks',
            'params'   => array('param1', 'param2', 'param3')
   );



Question: How to load model in CodeIgniter?
$this->load->model ('Model_Name');


Question: What helpers in CodeIgniter?
You can to execute below command.

RCPT To:
This identifies the receipient of the email message. This command can be repeated multiple times for a given message in order to deliver a single message to multiple receipients.






Question: What is offical Website URL?
http://www.codeigniter.com


Question: List out different types of hook in Codeigniter?
  1. post_controller_constructor
  2. pre_controller
  3. pre_sytem
  4. post_sytem
  5. cache_override
  6. display_override
  7. post_controller



Friday 18 September 2015

SMTP interview questions and answers

SMTP interview questions and answers



Question: Are email addresses case sensitive?
Yes, In email address before the @, are case senstive. So email address is case-sensitive.


Question: What is the meaning of return-path, reply-to and from?
From: <fromemail example.com="">
To: <you example.com="">
Reply-To: <replyto example.com="">
</replyto></you></fromemail>
Return-path: If email is failed to deliver OR bounced, then email will return to return-path.
Reply-to: If someone reply on email, then email will be goes to reply-to.
From: It denote from where which email-address came.


Question: What is the difference between ports 465 and 587?
Both are protocol.
465 is for SMTPS protocol, In this SSL encryption is started automatically before any SMTP level communication.
587 is for MSA protocol. SSL encryption may be started by STARTTLS command at SMTP level(if server supports). In this ISP does not filter server's EHLO reply.It helps to stop outgoing spam email.


Question: How to check if an email address exists without sending an email?
You can to execute below command.

RCPT TO: useremail@domain.com
This identifies the recipient of the email message. This command can be repeated multiple times for a given message in order to deliver a single message to multiple recipients.


Question: What are test email recipients?
OR
Which email address I can use for sending test email?

Following are testing email address
t11111@no-spam.ws
t11112@no-spam.ws
t11113@no-spam.ws
t11114@no-spam.ws
t11115@no-spam.ws

Check http://no-spam.ws/ for more email ids.


Question: How to check if smtp is working from commandline?
telnet {smtp_domain_name} {smtp_port}



Tuesday 15 September 2015

Apache Interview Questions and Answers

Apache Interview Questions and Answers

Question: What is Apache?
Apache is Web server application.


Question: What is use of Apache in Web Server?
Apache's role is all about communication over networks, and it uses the TCP/IP protocol (Transmission Control Protocol/Internet Protocol which allows devices with IP addresses within the same network to communicate with one another).


Question: From where Apache names comes?
The name "Apache" derives from the word "patchy" that the Apache developers used to describe early versions of their software development.


Question: What are feature of Apache?
Following are modules supported by Apache
  • mod_access, 
  • mod_auth, 
  • mod_digest, 
  • mod_auth_digest
  • Secure Sockets Layer 
  • Transport Layer Security support (mod_ssl), 
  • proxy module (mod_proxy)
  • URL rewriter (mod_rewrite)
  • custom log files (mod_log_config)
  • mod_ext_filter.



Question: Is Apache opensource?
Yes, It is


Question: Who is Initial Author of Apache?
Robert McCool


Question: In which language Apache is written?
'C' Language


Question: What is offical website of Apache?
httpd.apache.org


Question: Do I need Programming Skills to install Apache in my system?
No, You need not.

Thursday 20 August 2015

Magento interview questions and answers for experienced

Magento interview questions and answers for experienced


Question: What is Magento?
Magento is an e-commerce platform created on open source technology, which provides online merchants with an exceptional flexibility. Magento is CMS which control content, look and functionality of their e-commerce store. It is one of the best CMS known for ecommerce website.


Question: What architecture is used by Magento?
MVC which means Model-View-Controller.


Question: What are the different edition of Magento?
  1. Magento Community Edition
  2. Magento Enterprise Edition
  3. Magento Professional Edition
  4. Magento .go



Question: What are the different features of Magento?
  1. User Management
  2. Customer Management
  3. Product Management
  4. Order Management
  5. Payment Management
  6. Site Management
  7. Search engine optimization
  8. International Support



Question: How we can enhance the Magento performance?
  1. Disable the Magento log
  2. Disable any un-used modules
  3. Magento Caching
  4. Enable Gzip compression
  5. Optimize your image
  6. Optimize your Server
  7. Use a Content Delivery Network (CDN)
  8. USE Gzip Components
  9. Put Stylesheets at the Top (CSS Files in head tag)
  10. Put Scripts at the Bottom (Js files in footer)
  11. Avoid CSS Expressions (e.g 100/2)

Look: http://www.web-technology-experts-notes.in/2013/10/14-steps-to-reduce-the-loading-time-of-website.html


Question: Which technology does mangento use?
Zend Framework (PHP), MySQL/MySQLI, CSS, javaScript and HTML


Question:In Which language, mangento is written?
PHP


Question:What is initial Release date of magento?
March 31, 2008


Question:What is initial Release date of magento?
Version: 1.9.1.1 Dated May 1, 2015


Question: What type of web application we create in Magento?
Shopping Cart Software


Question: What is the difference between Mage::getSingletone() and Mage::getModel() in Magento?
Mage::getSingletone(): finds for an existing object if not then create that a newobject but Mage::getModel() always creates a new object.


Question: What is EAV in Magento?
Full form of EAV is Entity–attribute–value model.
EAV is a data model to data model to describe entities.
In EAV data are stored in different smaller tables rather than storing in a single table.
For Example
Product name is stored in catalog_product_entity_varchar table.
Product id is stored in catalog_product_entity_int table.
Product price is stored in catalog_product_entity_decimal table.


Question: How does Magento ORM works?
ORM full form is Object Relational Mapping.
ORM is a programming technique which is used to convert different types of data to Objects and vice versa
. ORM is shown as Model (based on Zend Framework’s Zend_Db_Adapter), which further breaks down to two types of Models.
a. simple
b. EAV Model


Question: What is folder/file structure of Magento?
What is folder/file structure of Magento



Question: What are different Modules of Magento?
Core Modules
Community Modules
Commercial Modules


Question:How to add an external javascript/css file in Magento? ?
Add Css File
<action method="addCss"><stylesheet>css/yourstyle.css</stylesheet></action>
Add jS File
<action method="addJs"><script>js/yourfile.js</script></action>



Question: How to change the theme for login user?
if(Mage::getSingleton('customer/session')-&gt;isLoggedIn()):
Mage::getDesign()-&gt;setPackageName('package_name')-&gt;setTheme('themename');
endif;


Question: How to run Custom Query in Magento ?
$db = Mage::getSingleton('core/resource')-&gt;getConnection('core_write');
$result=$db-&gt;query('SELECT * FROM users where id=4');




Saturday 30 May 2015

Frontend Interview Questions and Answers for experienced

Front end Interview Questions and Answers for experienced












Question: How can you declare a class in Javascript?
In javascript, classes declare is quite different from C++, PHP and java.
Following are three different ways to declare the javascript.
1. Class using function as a constructor
function Person(name) {  
    this.name = name;
}

/* Create an Object an object */
var person = new Person("Web Technology experts Notes");  
person.name; // Web Technology experts Notes


2. Class Literal notation
var person = {  
    name: "",
    setName: function(name) {
        this.name = name;
    }
}
person.setName("Web Technology experts Notes");  
person.name; // Web Technology experts Notes


3. Singleton through a function
var person = new function() {  
    this.setName = function(name) {
        this.name = name;
    }
    this.printData = function() {
        return this.name;
    }
}
person.setName("Rafael");  
console.log(person.printData()); // Web Technology experts Notes


Question: What is Difference between null and undefined?
NULL is object
undefined is a datatype
console.log(null);  
console.log(undefined);



Question: How can you add a method to a already defined class?
using prototype you can achieve the same.
function Person(name) {  
    this.name = name;
}
Person.prototype.newfunction = function() {  
    console.debug("new function is called.");
}

//create an object
var person = new Person("Web Technology");
// Calling the new method  
person.newfunction(); // new function is called.



Question: What is Sass?
Sass is the modern way of doing CSS.
Sass works with variables, nested syntax and mathematical operations


Question: How to improve the performance of page from Frontend?

  • Use sprite images
  • Javascripts should be at the bottom of the page
  • Ensure parallel requests
  • Compress images
  • Browser Caching



Question: What is XHTML?
XHTML is an HTML that follows the XML rules.


Question: Why Recommended external CSS or Javascript versus inline?
1. Hard to maintain the Inline JS/CSS.
2. Inline js/css load slower.
3. No caching benefits in Inline JS/CSS.


Question: Why do we need to use W3C standard code?
W3C standards are to ensure cross-platform compatibility and more compact file sizes.


Question: What is lazy loading?
Lazy loading is a design pattern commonly used in computer field.
Lazy loading is loading code only once user needs it.


Question: What is the difference between HTML elements and tags?
HTML elements communicate to the browser how to render text.
Aftr that they are surrounded by angular brackets <> they form HTML tags.


Question: What does DOCTYPE mean?
DOCTYPE tells the browser which type of HTML is used in current webpage.


Question: Tell the name of few new tags in HTML5?
datalist, datetime, output, keygen, date, month, week, time, number, range, email, and url.


Question: What is the purpose of the z-index and how is it used?
The z-index helps specify the positioned elements that may overlap one another.
z-index can take following values.
Auto: Sets the order equal to its parents.
Number: Set Orders the Number specified.
Initial: Sets this property to its default value which is zero.
Inherit: Inherits from parent element.


Question: List the main CSS style sheet properties?
  • Background
  • Text
  • Font
  • List
  • Outline
  • Margin
  • Border
  • Padding
  • Table



Question: What are some of the new features and properties in CSS3? Box model
  • New Web fonts
  • Rounded corners
  • Box Shadows, 
  • Transform property
  • Border Images
  • Text Shadows
  • New Color schemes
  • Multi-column layout
  • New Pseudo-classes
  • New Gradients



Wednesday 13 May 2015

Team Leader Interview Questions

  • Tell me about yourself?
  • What are your biggest strengths?
  • Why did you leave your last job?
  • What are your career goals?
  • Why do you want to work here?
  • What is your greatest weakness?
  • What do co-workers say about you?
  • How can you handle it when the boss is wrong?
  • Whoever else learned out of your mistakes
  • What courses do you taking part in?
  • What qualifications do you have beyond academics that qualify you t o make a successful transition into business?
  • How can you handle challenging? Give a good example.
  • Maybe you have designed a mistake?
  • What you would do if two of your team were arguing over how to complete a task?
  • What steps do you take to motivate your team?
  • Why do you want this job?
  • What is the biggest challenge you have faced in work in the past 12 months?
  • What do you know about the centre/company/role?
  • How would your team/manager describe you?
  • What is your biggest achievement?
  • What have you done to promote great customer service?
  • How do you manage change?
  • What was your reason for leaving?
  • Give me an example of how you have dealt with an under-performing team member in the past.
  • Can you give me an example of a time when you had to motivate and develop a team in a challenging work environment?
  • What are your strengths and weaknesses?
  • Tell me about a difficult obstacle you had to overcome recently at work? How did you overcome this?
  • What steps you follow to complete project successfully?

Tuesday 28 April 2015

Android Interview Questions and Answers for fresher and Experienced

Android Interview Questions and Answers for fresher and Experienced


Question: What is Android?
Android an open-source operating system used for smartphones and tablet.


Question: How to start anroid development?
1. Download Android Studio.
2. Download the latest SDK tools and platforms.
3. Create a Project(Application) with Android Studio.
4. Now Running Your Application.
5. Install an editor for development (I am using eclipse editor for development).


Question: What main components of Android application?
1. Activities: They dictate the UI and handle the user interaction to the screen.
2. Services: They handle background processing associated with an application.
3. Broadcast Receivers: They handle communication between Android OS and applications.v 4. Content Providers: They handle data and database management stuff.


Question: What is Intent? What are two different type of Intent?
Intent means "intention" to do an action.
Question: Difference between px, sp, dip, dpi and pt in Android?
px is one pixel. px is corresponds to actual pixels on the screen.
sp is scale-independent pixels. SP is like the dp unit, but it is also scaled by the user's font size preference.
dip is Density-independent pixels.
dpi is Dots per inches.
pt is points.


Question: How to Close/hide the Android Soft Keyboard?
Hide the virtual keyboard using the InputMethodManager.


Question: How to Lazy load of images in ListView in Android?
You can use droidQuery.
$.with(myView).image(url);



Question: How to get unique Android device ID?
Settings.Secure#ANDROID_ID 
Will return unique Android device ID.


Question: How to get screen dimensions in pixels in Andorid Devices?
int screenHeight = getResources().getDisplayMetrics().heightPixels;
int screenWidth = getResources().getDisplayMetrics().widthPixels; 



Question: How do I center text horizontally and vertically in a TextView in Android?
<textview android:gravity="center" android:layout_height="fill_parent" android:layout_width="fill_parent" android:text="@string/username"></textview>



Question:What is the difference between match_parent and fill_parent?
Both are same thing and are different name in different API version.
match_parent means view should be as big as its parent (minus padding. This name is used in less than API Level 7.
fill_parent means view should be as big as its parent (minus padding). This constant is deprecated starting from API Level 8 and is replaced by match_parent.


Question: Is there a way to get the source code from an APK file?
http://stackoverflow.com/questions/3593420/is-there-a-way-to-get-the-source-code-from-an-apk-file


Question: How to set Standard Android Button with a different color?
button.getBackground().setColorFilter(new LightingColorFilter(0xFFFFFFFF, 0xFFAA0000));



Question: How to disable landscape mode in Android?
Open AndroidManifest.xml file and set following.
android:screenOrientation="sensorPortait"



Question: How can I open a URL in Android's web browser from my application?
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.web-technology-experts-notes.in/2015/04/to-whom-does-pci-compliance-need-to-apply.html"));
startActivity(browserIntent);



Question: How do you install an APK file in the Android emulator?
http://stackoverflow.com/questions/3480201/how-do-you-install-an-apk-file-in-the-android-emulator


Question: How to Converting pixels to dp and vise versa?
public static float dpFromPx(final Context context, final float px) {
    return px / context.getResources().getDisplayMetrics().density;
}



Question: Can we display HTML in TextView? If yes, then How?
Yes, we can display HTML.
myTextView.setText(Html.fromHtml("<h2>
Web Technology</h2>
This is testing

"));



Question: How to put a border around an android textview?
<textview android:background="@drawable/back" android:text="Some text"></textview>


Thursday 9 April 2015

Htaccess interview Questions and Answers for fresher and experienced

Htaccess interview Questions and Answers for fresher and experienced



Question: How to redirect http to https?
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]


Question: How to redirect http:// to https://www?
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]


Question: How to redirect non-www to www ?
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]


Question: How to redirect all pages to newdomain?
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^olddomain\.com$ [NC]
RewriteRule ^(.*)$ http://newdomain.com [R=301,L]


Question: What is meaning of R & L flag in htaccess?
htacces R flag causes a HTTP redirect to be issued to the browser and 301 means its permanent redirect.
htaccess L fag causes to stop processing the rule set, if the rule matches, no further rules will be processed.
Also we can set more than 2 flags in brackets []
More flags


Question: How to redirect homepage to another Website?
Redirect / http://www.web-technology-experts-notes.in/


Question: How to redirect to another directory within same domain?
Redirect /olddir /newdir


Question: How to set environment in .htaccess?
SetEnv APPLICATION_ENV development


Question: How to set the php config variables in .htaccess?
php_value upload_max_filesize 32M


Question: How to set display_error off in .htaccess?
php_flag display_errors off
php_flag display_startup_errors off


Question: How to block few IP address?
order allow,deny
deny from xxx.xxx.xxx.xxx #specify a specific address
allow from all


Question: How to redirect to error/404.html when 404 errors comes?
ErrorDocument 400 error/404.html


Queston: How to set the caching for javascript/images/css?
ExpiresActive On
ExpiresByType application/javascript "now plus 3 day"
ExpiresByType application/x-javascript "now plus 3 day"
ExpiresByType image/jpg "now plus 1 week"
ExpiresByType image/jpeg "now plus 1 week"
ExpiresByType image/png "now plus 1 week"
ExpiresByType image/pjpeg "now plus 1 week"
ExpiresByType image/gif "now plus 1 week"
ExpiresByType text/css "now plus 3 day"


Question: what is meaning of 301, 302, 400, 401, 403, 404 and 500 error codes?
301 - Permanent movement
302 - Temporary movement
400 - Bad request
401 - Authorization Required
403 - Forbidden
404 - Page Not Found
500 - Internal Server Error


Question: How does RewriteBase works in .htaccess?
It is used to set a base URL for your rewrites rules.
RewriteEngine On
RewriteBase /~new/


By setting the RewriteBase there in htaccess, you make the relative path come off the RewriteBase parameter.


Question: How to create Subdomains on the fly using .htaccess?
for this, you have set the virtual host
Follow the following steps.
Step 1: Create a wildcard DNS entry
*.domain.com.   3600  A  127.0.0.1

Step 2: Setup the Virtual Host, in vhost file.

<virtualhost> DocumentRoot "E:\wamp\www\myproject" ServerName myproject.domain.com <directory myproject="" wamp="" www=""> AllowOverride All Order allow,deny Allow from all </directory> </virtualhost>

Step 3: Now write your all codes in in Document Root path i.e.E:\wamp\www\myproject
Step 4: Done, now you can access with myproject.domain.com


Question: Do i need to restart the apache after chnages in .htaccess?
No,