This is default featured post 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured post 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured post 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured post 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured post 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Thursday, 12 September 2013

West Bengal SSC Notified for Lower Division Clerk/ Assistant (Group-C) Recruitment Examination-2013


West Bengal Staff Selection Commission invited application for recruitment to the posts of Lower Division Clerk/ Assistant (Group-C) Recruitment Examination-2013. The candidates eligible for the posts can apply through prescribed format before 13 September 2013.
Important Dates
Closing Date for Submission of Application Form: 13 September 2013
Details of Posts
  • Name of Post: Lower Division Clerk/Assistant (Group C)
  • Number of Posts: 3050 Posts
Detailed Advertisement

Sunday, 8 September 2013

Codeigniter objective interview question and answers

1).Code Igniter is a _____

a).Object Oriented Concept b).PHP Library without Web Server c).Application Development Framework d).Content Management System

2).Which of the following is not true about CodeIgniter

a).It is light weight b).It is fast c).It uses MVC d).It uses Delphi Modelling Techniques

3).The separation of logic and presentation can be seen in which of the following?

a).MVC approach b).Simpleton approach c).Master/Slave Model d).Semaphore Model

4).The urls generated by CodeIgniter are search-engine friendly and clean because they use

a).Query String approach b).Segment based approach c).Keyword based approach d). SEO based approach

5).One way to remove the index.php file in CodeIgniter is by using a

a).MVC file b).root file c)..htaccess file d).settings file

6).Which of the following cannot be used to extend CodeIgniter System
a).Library b).Helper c).System Hooks d).Jar files

7).The reason why CodeIgniter does not use a template engine is because
a).To reduce codebase b).To improve performance c).To reduce core files d).To reduce system files

8).Query string URLs cannot be used in CodeIgniter
a).True b).False c).Can be used in the latest version d). None

9).example.com/class/function/ID. The first segment in this example represents
a).Controller class b).Controller variable c).Library class d).Library variable

10).example.com/class/function/ID. The second segment in this example represents
a).Controller class b).Controller Function c).Library class d).Library Function

11).If you want a url like this, example.com/index.php/products/view/email.codeigniter what should you do?
a).Use a controller called do codeigniter b).Disable query strings
c).Use URL Suffix d). All of the above

12).In the url example.com/index.php/blog/ what is the controller name?
a).example b).index c).blog d).None

13).You usually save your controller in which of the following folder?
a).application/system/controllers b).application/controllers c).application d).application/helper

14).Your custom controller should
a).extend the child controller b). extend the super class c). extend the super controller d). extend the parent controller

15).In this url, example.com/index.php/products/shoes/sandals/123, shoes is
a).function b).controller name c).first variable d).None

16).To load a default controller what should you do?
a).Give the default controller name b).Always inherit the parent controller
c).specify this in application/config/routes.php d).Add a setting to application/config.php

17).The second segment of the URI typically determines
a).Which controller should be called b).which function in the controller gets called. C).which system library to load d).All of the above

18).If your controller contains a function named _remap() which of the following is true?
a).It will always get called regardless of what the URI contains. b).It overrides the normal behavior in which the URI determines which function to call c).CodeIgniter permits user to override normal behaviour through the use of the _remap() function d). All of the above

19).CodeIgniter has which output class that takes care of sending your final rendered data to the web browser automatically.
a).View class b).Output class c).Controller Class d).Routing Class


20).Which of the following is a private function in codeigniter?
a)._utility b).Utility c).utility_private d).private_utility

21).If you want to use a constructor in any of the Controllers, which of the following is necessary to achieve this?
a).parent::__construct(); b).child::__construct(); c).parent::controller(); d).super::controller()

22).Which of the following is a reserved name and hence cannot be used to name the controller:
a).CI_Base b).index c).Default d).All

23).A ____ is a web page or a page fragment like a header, footer etc
a).Controller b).Hook c).Teaser d).View

24).Which of the following is NOT true about Views?
a).views can flexibly be embedded within other views b).view must be loaded by a controller
c).views can be called directly d).views may or may not contain html

25).In the following, $this->load->view(‘name’); what does ‘name ‘ stand for?
a).config parameter b).view name c).parent view name d).controller class name

26). Which of the following is designed to work with information in your database?
a).Controller b).Model c).Sql Query d).Library

27).If you have a model class like this:
1
2
3
4
5
6
class User_model extends CI_Model
{    function __construct()
    {
        parent::__construct();
    }
}
What will be the file name when this class is saved as a model?
a).User_model b).user_model c).user_Model d).User_Model

28).If a model is located in a sub-folder like, application/models/blog/queries.php what is the right way to load this model?
a).$this->load->model(‘queries’);
b).$this->load->model(‘model/blog/queries’);
c).$this->load->model(‘blog/queries’);
d).$this->load->model(‘application/models/blog/queries’);

29).If you have a model called “Admissions”, what is the right way to access a function within this model if the model is assigned to a different object name like ‘fubar’?
a). $this->load->model(‘Admissions’, ‘fubar’); $this->fubar->function();
b). $this->load->model(‘Admissions’, ‘fubar’); $this->Admissions->function();
c). $this->load->model(‘Admissions’, ‘fubar’); $this->admin->function();
d). $this->load->model(‘Admissions’, ”); $this->fubar->function();

30).If you want to auto load a model what will you do?
a).Load it then and there using $this->load->model()
b).Load it when the parent model loads
c).Add the model to application/config/autoload.php
d).Remove the model from application/config/autoload.php

31).When a model is loaded
a).it is connected automatically to your database.
b).it does NOT connect automatically to your database.
c).it connects to database if you have set the config file properly
d).it connects ONLY if persistent connection is enabled

32). In the following database connectivity settings for a model, which of the following config is invalid?
1
2
3
4
5
6
7
8
9
10
$config['hostname'] = "localhost";
$config['username'] = "myusername";
$config['password'] = "mypassword";
$config['database'] = "mydatabase";
$config['dbdriver'] = "mysql";
$config['dbprefix'] = "";
$config['pconnect'] = FALSE;
$config['db_debug'] = TRUE;
$config['shared_pool_size'] = '200M';
$this->load->model('Model_name', '', $config);
a).$config['hostname']
b).$config['username']
c).$config['pconnect']
d).$config['shared_pool_size']
Answers to the above questions:
1
2
3
4
5
6
7
8
9
10
C
D
A
B
C
D
B
B
A
B
11
12
13
14
15
16
17
18
19
20
C
C
B
D
A
C
A
D
B
A
21
22
23
24
25
26
27
28
29
30
A
D
D
C
B
B
B
C
A
C
31
32








B
D








Codeigniter Interview questions and answers part2

5. Explain Codeigniter File Structure.

When you download Codeigniter you will see the following folder structure :-•    application
o    cache
o    Config
o    Controllers
o    core
o    errors
o    helpers
o    hooks
o    language
o    libraries
o    logs
o    models
o    thirdparty
o    views


•    system
o    core
o    database
o    fonts
o    helpers
o    language
o    libraries


6. Explain Application Flow Chart in codeigniter.

Application flow chart from Codeigniter documentaion
1. The index.php serves as the front controller, initializing the base resources needed to run CodeIgniter.
2. The Router examines the HTTP request to determine what should be done with it.
3. If a cache file exists, it is sent directly to the browser, bypassing the normal system execution.
4. Security. Before the application controller is loaded, the HTTP request and any user submitted data is filtered for security.
5. The Controller loads the model, core libraries, helpers, and any other resources needed to process the specific request.
6. The finalized View is rendered then sent to the web browser to be seen. If caching is enabled, the view is cached first so that on subsequent requests it can be served.


 7. Explain MVC in Codeigniter.

Model–View–Controller (MVC) is an architecture that separates the representation of information from the user’s interaction with it.




cakephp mvc

Controller:- The Controller serves as an intermediary between the Model, the View. controller mediates input, converting it to commands for the model or view.
Model:-The Model represents your data structures. Typically your model classes will contain functions that help you retrieve, insert, and update information in your database.The model consists of application data and business rules.
View:-The View is the information that is being presented to a user. A View will normally be a web page.A view can be any output representation of data.
For more detail understanding MVC please read this article What is MVC(Model-View-Controller) Architecture.


8. What are the 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.How ever you like to cause some action to take place at a particular stage in the execution process.
he hooks feature can be globally enabled/disabled by setting the following item in the application/config/config.php file:
$config['enable_hooks'] = TRUE;
Hooks are defined in application/config/hooks.php file.For example
view source
print?
1    $hook['pre_controller'] = array(
2    'class'    => 'MyClass',
3    'function' => 'Myfunction',
4    'filename' => 'Myclass.php',
5    'filepath' => 'hooks',
6    'params'   => array('test', 'test1', 'webs')
7    );


9. How you will add or load an model in codeigniter.

Models will typically be loaded and called from within your controller functions. To load a model you will use the following function:
view source
print?
1    $this->load->model('Model_name');

 
10. What are the helpers in codeigniter.

Helpers, as the name suggests, help you with tasks. Each helper file is simply a collection of functions in a particular category.There are URL Helpers, that assist in creating links, there are Form Helpers that help you create form elements, Text Helpers perform various text formatting routines, Cookie Helpers set and read cookies, File Helpers help you deal with files, etc.
Loading a helper file is quite simple using the following function:
view source
print?
1    $this->load->helper('name');

Codeigniter Interview question and answers part 1

1. What is codeigniter?

Codeigniter is open source , web application framework.Its is for building websites using php.Codeigniter is loosely based on MVC pattern.Most simple framework in php , which is you will easily learn.Its mostly known for its speed as compare to other frameworks in php.
 

Its goal is to enable you to develop projects much faster than you could if you were writing code from scratch, by providing a rich set of libraries for commonly needed tasks, as well as a simple interface and logical structure to access these libraries.

2. When and who developed codeigniter?
 The first public version of CodeIgniter was released on February 28, 2006.


3. What is current version of codeigniter?
 version 2.1.3 was released October 8, 2012.The development version of codeigniter 3.0-dev was release on October 20, 2011.Preview version 3.0-dev, is certified open source software licensed with the Open Software License.

4. What are the features of codeigniter.?

1. Codeigniter is free to use,its an open source framework.
2. Its light weight.The core system requires only a few very small libraries.Not like other frameworks that require heavy file libraries.
3. CodeIgniter is Fast.Its faster than any other framework in php.
4. The URLs generated by CodeIgniter are clean and search-engine friendly.You will change any url to what ever you want from files.
5. CodeIgniter is Extensible.The system can be easily extended through the use of your own libraries, helpers, or through class extensions or system hooks.
6. CodeIgniter Uses MVC(Model View Controller) which allows great separation between logic and presentation.
7. CodeIgniter requires nearly zero configuration,does not require you to use the command line,not forced to learn a templating language.
8. Full Featured database classes with support for several platforms,Security and XSS Filtering,Error Logging.

Twitter Delicious Facebook Digg Stumbleupon Favorites More