Friday, February 6, 2015

Computer Science MCQ's

Computer Science MCQ's

http://www.indiabix.com/computer-science/computer-fundamentals/

http://www.indiabix.com/computer-science/networking/

Saturday, January 31, 2015

Submit ajax request on same page


if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest')
{
        //fun goes here.
}

Wednesday, January 28, 2015

Create a CSV File for a user in PHP

An improved version of the function from php.net

function download_csv_results($results, $name = NULL)
{
    if( ! $name)
    {
        $name = md5(uniqid() . microtime(TRUE) . mt_rand()). '.csv';
    }
    header('Content-Type: text/csv');
    header('Content-Disposition: attachment; filename='. $name);
    header('Pragma: no-cache');
    header("Expires: 0");
    $outstream = fopen("php://output", "w");
    fputcsv($outstream, array_keys($results[0])); //This will  include column headers
    foreach($results as $result)
    {
        fputcsv($outstream, $result);
    }
    fclose($outstream);
}

    require_once("yourdatabaseconnection.php");  //Include your database connection here
    $sql = mysql_query("SELECT * FROM your_table'") or die(mysql_error()); 


    if(mysql_num_rows($sql) > 0)
    {
        $results = array();
        while($rows = mysql_fetch_assoc($sql)){
            $results[] = $rows;   
        }

      //call your function here
       download_csv_results($results, 'your_file_name_here.csv');    }

Tuesday, January 20, 2015

Free jQuery/Javascript Data Grid Plugins

Sigma Grid

Sigma Grid Written in pure javascript, Sigma grid is an open source AJAX data grid for displaying and inline editing data in a scrollable and sortable table. It is very powerful yet  easy to use &  integrate with php, asp.net, jsp and RoR.
Sigma Ajax Grid -- Ajax editable data grid
Sigma Ajax Grid -- Ajax editable data grid

jQuery Grid

jqGrid is a grid component for ASP.NET & PHP based on the world’s most popular and flexible jQuery grid plugin jqGrid.
lexible jQuery grid plugin jqGrid
lexible jQuery grid plugin jqGrid

jqGridView

jqGridView is new, client-rich, XML-based, ajax grid plugin for jQuery library. jqGridView provides professional solution for representing and editing tabular data on the web. Carefully designed, with powerful script API, this editable DHTML grid is easy configurable with XML, and shows convincing results working with large amounts of data. jqGridView allows easy implementation of nice looking(managed through css). jqGridView is not platform-depending plug-in, it can be used with different web -programming platforms like: ASP .NET/ASP, PHP, JAVA, CGI scripts etc. jqGridView has hight bowser compatibility.

Ingrid

Ingrid is an unobtrusive jQuery component that adds datagrid behaviors (column resizing, paging, sorting, row and column styling, and more) to your tables. It’s easy to get started – read on below, or check out theExample Pages.
Ingrid is an unobtrusive jQuery component
Ingrid is an unobtrusive jQuery component

DataTable

DataTable is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhancement, which will add advanced interaction controls to any HTML table.
DataTables is a plug-in for the jQuery Javascript library
DataTables is a plug-in for the jQuery Javascript library

Slickgrid

Slickgrid Quite simply, SlickGrid is a JavaScript grid/spreadsheet component.
It is an advanced component and is going to be a bit more difficult to learn and configure, but once you realize its full potential, it will blow your mind!
Some highlights:
  • Adaptive virtual scrolling (handle hundreds of thousands of rows with extreme responsiveness)
  • Extremely fast rendering speed
  • Supports jQuery UI Themes
  • Background post-rendering for richer cells
  • Configurable & customizable
  • Full keyboard navigation
  • Column resize/reorder/show/hide
  • Column autosizing & force-fit
  • Pluggable cell formatters & editors
  • Support for editing and creating new rows.
  • Grouping, filtering, custom aggregators, and more!
  • Advanced detached & multi-field editors with undo/redo support.
  • “GlobalEditorLock” to manage concurrent edits in cases where multiple Views on a page can edit the same data.

TableSorter

Tablesorter is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell. It has many useful features including:
  • Multi-column sorting
  • Parsers for sorting text, URIs, integers, currency, floats, IP addresses, dates (ISO, long and short formats), time. Add your own easily
  • Support secondary “hidden” sorting (e.g., maintain alphabetical sort when sorting on other criteria)
  • Extensibility via widget system
  • Cross-browser: IE 6.0+, FF 2+, Safari 2.0+, Opera 9.0+
  • Small code size

Tuesday, December 23, 2014


Ubuntu is one of the most popular forms of the Linux operating system. It is available for free, and will run on almost any computer. This guide will show you how to install Ubuntu by booting from a CD or within Windows itself.

Method 1 of 2: Installing From CD/DVD

  1. 1
    Download the Ubuntu ISO file. You can get the ISO file from the Ubuntu website. An ISO file is a CD image file that will need to be burned before you can use it. There are two options available from the Ubuntu website (you can also buy official Ubuntu CDs, which come in packs of 10):
    • 14.04 LTS has continuous updates and provides technical support. It is scheduled to be supported until April 2019. This option will give you the most compatibility with your existing hardware.
      Install Ubuntu Linux Step 1Bullet1.jpg
    • Ubuntu builds (not yet released) 14.10, 15.04, and 15.10 will come with limited support. They will have the newest features, though they may not work with all hardware. These releases are geared more towards experienced Linux users.
      Install Ubuntu Linux Step 1Bullet2.jpg
    • If you have a Windows 8 PC or a PC with UEFI firmware, download the 64-bit version of Ubuntu. Most older machines should download the 32-bit version.
      Install Ubuntu Linux Step 1Bullet3.jpg
    Ad
  2. Install Linux Step 1Bullet2.jpg
    2
    Burn the ISO file. Open up your burning program of choice. There are free and paid programs available that can burn an ISO to a CD or DVD.
  3. Install Linux Step 2Bullet3.jpg
    3
    Boot from the disc. Once you have finished burning the disc, restart your computer and choose to boot from the disc. You may have to change your boot preferences by hitting the Setup key while your computer is restarting. This is typically F12, F2, or Del.
  4. Install Ubuntu Linux Step 4 Version 2.jpg
    4
    Try Ubuntu before installing. Once you boot from the disc, you will be given the option to try Ubuntu without installing it. The operating system will run from the disc, and you will have a chance to explore the layout of the operating system.
    • Open the Examples folder to see how Ubuntu handles files and exploring the operating system.
      Install Ubuntu Linux Step 4Bullet1.jpg
    • Once you are done exploring, open the Install file on the desktop.
      Install Ubuntu Linux Step 4Bullet2.jpg
  5. Install Ubuntu Linux Step 5.jpg
    5
    Install Ubuntu. Your computer will need at least 4.5 GB of free space. You will want more than this if you want to install programs and create files. If you are installing on a laptop, make sure that it is connected to a power source, as installing can drain the battery faster than normal.
    • Check the “Download updates automatically” box, as well as the “Install this third-party software” box. The third-party software will allow you to play MP3 files as well as watch Flash video (such as YouTube).
      Install Ubuntu Linux Step 5Bullet1.jpg
  6. Install Ubuntu Linux Step 6.jpg
    6
    Set up the wireless connection. If your computer is not connected to the internet via Ethernet, you can configure your wireless connection in the next step.
    • If you didn’t have an internet connection in the previous step, hit the Back button after setting up the wireless connection so that you can enable automatic updates.
  7. 7
    Choose what to do with your existing operating system. If you have Windows installed on your system, you will be given a couple options on how you’d like to install Ubuntu. You can either install it alongside your previous Windows installation, or you can replace your Windows installation with Ubuntu.
    • If you install it alongside your old version of Windows, you will be given the option to choose your operating system each time you reboot your computer. Your Windows files and programs will remain untouched.
      Install Ubuntu Linux Step 7Bullet1.jpg
    • If you replace your installation of Windows with Ubuntu all of your Windows files, documents, and programs will be deleted.
      Install Ubuntu Linux Step 7Bullet2.jpg
  8. Install Ubuntu Linux Step 8.jpg
    8
    Set your partition size. If you are installing Ubuntu alongside Windows, you can use the slider to adjust how much space you would like to designate for Ubuntu. Remember that Ubuntu will take up about 4.5 GB when it is installed, so be sure to leave some extra space for programs and files.
    • Once you are satisfied with your settings, click Install Now.


      Install Ubuntu Linux Step 8Bullet1.jpg
  9. Install Ubuntu Linux Step 9.jpg
    9
    Choose your location. If you are connected to the internet, this should be done automatically. Verify that the timezone displayed is correct, and then click the Continue button.
  10. Install Ubuntu Linux Step 10 Version 2.jpg
    10
    Set your keyboard layout. You can choose from a list of options, or click the Detect Keyboard Layout button to have Ubuntu automatically pick the correct option.
  11. Install Ubuntu Linux Step 11 Version 2.jpg
    11
    Enter your login information. Enter your name, the name of the computer (which will be displayed on the network), choose a username, and come up with a password. You can choose to have Ubuntu automatically log you in, or require your username and password when it starts.
  12. Install Ubuntu Linux Step 12 Version 2.jpg
    12
    Wait for the installation process to complete. Once you choose your login info, the installation will begin. During setup, various tips for using Ubuntu will be displayed on the screen. Once it is finished, you will be prompted to restart the computer and Ubuntu will load.

Method 2 of 2: Using the Windows Installer

  1. Install Ubuntu Linux Step 13.jpg
    1
    Download the installer from the Ubuntu website. If your browser prompts you, select Run, Save, or Open. The Windows installer is not compatible with Windows 8. You must use the method in the previous section.
    • The Windows installer will install Ubuntu alongside Windows. Your files and programs will not be affected. When you reboot your computer, you will be able to choose which operating system you would like to load.
      Install Ubuntu Linux Step 13Bullet1.jpg
  2. Install Ubuntu Linux Step 14.jpg
    2
    Choose your username and password. Once you run the installer, you will be presented with the configuration menu. Choose your new Ubuntu username and password.
    • You can also change the size of the Ubuntu installation. A larger installation will give your Linux operating system more space to install programs and add files, but this will take away from the free space that Windows has access to.
      Install Ubuntu Linux Step 14Bullet1.jpg
    • You can choose your Desktop environment. The three most common are:
      Install Ubuntu Linux Step 14Bullet2.jpg
      • Ubuntu (the most popular) has Unity, a unique and intuitive desktop environment.
      • Kubuntu has KDE which resembles Windows
      • Xubuntu uses Xface, which is faster and good for PCs that are 2-3 years old.
      • Lubuntu uses LXDE, and can be used with very old PCs or netbooks with as little as 512MB of RAM.
  3. Install Ubuntu Linux Step 15.jpg
    3
    Click Install to start. The installer will begin downloading the files necessary to install Ubuntu on your computer. Installation will happen automatically.
    • Downloading the files can take a significant amount of time depending on your internet connection. You can use your computer while the files download in the background.
      Install Ubuntu Linux Step 15Bullet1.jpg
  4. Install Ubuntu Linux Step 16.jpg
    4
    Restart your computer. Once the installation is complete, you will be given the option to reboot now or later. When you reboot, you will see a new menu before Windows starts that allows you to choose between Windows and Ubuntu.
Note: Original Source: http://www.wikihow.com/Install-Ubuntu-Linux

IF YOU WANT TO INSTALL ON CUSTOM DRIVE THEN SKIP STEP 7 & 8 AND FOLLOW THESE STEPS:

You should install Ubuntu on a separate partition so that you won't lose any data. The most important thing is you should create a separate partition for Ubuntu manually, and you should select it while installing Ubuntu.
First create a separate partition for Ubuntu while running Windows (like a partition with more than 10 GB). Also create a small partition for the swap partition (size is equal to your RAM size).
  • You should know the partition sizes you created so that you can identify them easily while installing Ubuntu.
See the below images - I picked them by googling so they won't be same as yours (like partition sizes and number of partitions).
The second important thing is while installing Ubuntu select "Something else".
Enter image description here
It will allow you to select your manually created partition to install Ubuntu onto it.
Now select and edit the partition you created for Ubuntu. Be careful in selecting. Check twice that you selected the correct partition, not some other partition as you may lose data like before.
Enter image description here
Select the format partition, use as mount point as shown in the image. The size is up to you.
After that, select the swap partition, and edit it as shown in the image (size is your choice).
Enter image description here
After that select the "Device for boot loader installation" at the bottom and select the one with /dev/sda at the beginning.
Enter image description here
Now you can select "install now" at the right bottom.
It seems lengthy, but it's really easy once you know this installation.

Sunday, November 23, 2014

List for some common Linux commands

List for some common Linux commands:
  • A
    • adduser: Add a user to the system
    • addgroup: Add a group to the system
    • alias: Create an alias •
    • apropos: Search Help manual pages (man -k)
    • apt-get: Search for and install software packages (Debian/Ubuntu)
    • aptitude: Search for and install software packages (Debian/Ubuntu)
    • aspell: Spell Checker
    • awk: Find and Replace text, database sort/validate/index
  • B
    • basename: Strip directory and suffix from filenames
    • bash: GNU Bourne-Again SHell
    • bc: Arbitrary precision calculator language
    • bg: Send to background
    • break: Exit from a loop •
    • builtin: Run a shell builtin
    • bzip2: Compress or decompress named file(s)
  • C
    • cal: Display a calendar
    • case: Conditionally perform a command
    • cat: Display the contents of a file
    • cd: Change Directory
    • cfdisk: Partition table manipulator for Linux
    • chgrp: Change group ownership
    • chmod: Change access permissions
    • chown: Change file owner and group
    • chroot: Run a command with a different root directory
    • chkconfig: System services (runlevel)
    • cksum: Print CRC checksum and byte counts
    • clear: Clear terminal screen
    • cmp: Compare two files
    • comm: Compare two sorted files line by line
    • command: Run a command - ignoring shell functions •
    • continue: Resume the next iteration of a loop •
    • cp: Copy one or more files to another location
    • cron: Daemon to execute scheduled commands
    • crontab: Schedule a command to run at a later time
    • csplit: Split a file into context-determined pieces
    • cut: Divide a file into several parts
  • D
    • date: Display or change the date & time
    • dc: Desk Calculator
    • dd: Convert and copy a file, write disk headers, boot records
    • ddrescue: Data recovery tool
    • declare: Declare variables and give them attributes •
    • df: Display free disk space
    • diff: Display the differences between two files
    • diff3: Show differences among three files
    • dig: DNS lookup
    • dir: Briefly list directory contents
    • dircolors: Colour setup for "ls"
    • dirname: Convert a full pathname to just a path
    • dirs: Display list of remembered directories
    • dmesg: Print kernel & driver messages
    • du: Estimate file space usage
  • E
    • echo: Display message on screen •
    • egrep: Search file(s) for lines that match an extended expression
    • eject: Eject removable media
    • enable: Enable and disable builtin shell commands •
    • env: Environment variables
    • ethtool: Ethernet card settings
    • eval: Evaluate several commands/arguments
    • exec: Execute a command
    • exit: Exit the shell
    • expect: Automate arbitrary applications accessed over a terminal
    • expand: Convert tabs to spaces
    • export: Set an environment variable
    • expr: Evaluate expressions
  • F
    • false: Do nothing, unsuccessfully
    • fdformat: Low-level format a floppy disk
    • fdisk: Partition table manipulator for Linux
    • fg: Send job to foreground
    • fgrep: Search file(s) for lines that match a fixed string
    • file: Determine file type
    • find: Search for files that meet a desired criteria
    • fmt: Reformat paragraph text
    • fold: Wrap text to fit a specified width.
    • for: Expand words, and execute commands
    • format: Format disks or tapes
    • free: Display memory usage
    • fsck: File system consistency check and repair
    • ftp: File Transfer Protocol
    • function: Define Function Macros
    • fuser: Identify/kill the process that is accessing a file
  • G
    • gawk: Find and Replace text within file(s)
    • getopts: Parse positional parameters
    • grep: Search file(s) for lines that match a given pattern
    • groups: Print group names a user is in
    • gzip: Compress or decompress named file(s)
  • H
    • hash: Remember the full pathname of a name argument
    • head: Output the first part of file(s)
    • help: Display help for a built-in command •
    • history: Command History
    • hostname: Print or set system name
  • I
    • id: Print user and group id's
    • if: Conditionally perform a command
    • ifconfig: Configure a network interface
    • ifdown: Stop a network interface
    • ifup: Start a network interface up
    • import: Capture an X server screen and save the image to file
    • install: Copy files and set attributes
  • J
    • jobs: List active jobs •
    • join: Join lines on a common field
  • K
    • kill: Stop a process from running
    • killall: Kill processes by name
  • L
    • less: Display output one screen at a time
    • let: Perform arithmetic on shell variables •
    • ln: Make links between files
    • local: Create variables •
    • locate: Find files
    • logname: Print current login name
    • logout: Exit a login shell •
    • look: Display lines beginning with a given string
    • lpc: Line printer control program
    • lpr: Off line print
    • lprint: Print a file
    • lprintd: Abort a print job
    • lprintq: List the print queue
    • lprm: Remove jobs from the print queue
    • ls: List information about file(s)
    • lsof: List open files
  • M
    • make: Recompile a group of programs
    • man: Help manual
    • mkdir: Create new folder(s)
    • mkfifo: Make FIFOs (named pipes)
    • mkisofs: Create an hybrid ISO9660/JOLIET/HFS filesystem
    • mknod: Make block or character special files
    • more: Display output one screen at a time
    • mount: Mount a file system
    • mtools: Manipulate MS-DOS files
    • mtr: Network diagnostics (traceroute/ping)
    • mv: Move or rename files or directories
    • mmv: Mass Move and rename (files)
  • N
    • netstat: Networking information
    • nice: Set the priority of a command or job
    • nl: Number lines and write files
    • nohup: Run a command immune to hangups
    • notify-send: Send desktop notifications
    • nslookup: Query Internet name servers interactively
  • O
    • open: Open a file in its default application
    • op: Operator access
  • P
    • passwd: Modify a user password
    • paste: Merge lines of files
    • pathchk: Check file name portability
    • ping: Test a network connection
    • pkill: Stop processes from running
    • popd: Restore the previous value of the current directory
    • pr: Prepare files for printing
    • printcap: Printer capability database
    • printenv: Print environment variables
    • printf: Format and print data •
    • ps: Process status
    • pushd: Save and then change the current directory
    • pwd: Print Working Directory
  • Q
    • quota: Display disk usage and limits
    • quotacheck: Scan a file system for disk usage
    • quotactl: Set disk quotas
  • R
    • ram: ram disk device
    • rcp: Copy files between two machines
    • read: Read a line from standard input •
    • readarray: Read from stdin into an array variable •
    • readonly: Mark variables/functions as readonly
    • reboot: Reboot the system
    • rename: Rename files
    • renice: Alter priority of running processes
    • remsync: Synchronize remote files via email
    • return: Exit a shell function
    • rev: Reverse lines of a file
    • rm: Remove files
    • rmdir: Remove folder(s)
    • rsync: Remote file copy (Synchronize file trees)
  • S
    • screen: Multiplex terminal, run remote shells via ssh
    • scp: Secure copy (remote file copy)
    • sdiff: Merge two files interactively
    • sed: Stream Editor
    • select: Accept keyboard input
    • seq: Print numeric sequences
    • set: Manipulate shell variables and functions
    • sftp: Secure File Transfer Program
    • shift: Shift positional parameters
    • shopt: Shell Options
    • shutdown: Shutdown or restart linux
    • sleep: Delay for a specified time
    • slocate: Find files
    • sort: Sort text files
    • source: Run commands from a file
    • split: Split a file into fixed-size pieces
    • ssh: Secure Shell client (remote login program)
    • strace: Trace system calls and signals
    • su: Substitute user identity
    • sudo: Execute a command as another user
    • sum: Print a checksum for a file
    • suspend: Suspend execution of this shell •
    • symlink: Make a new name for a file
    • sync: Synchronize data on disk with memory
  • T
    • tail: Output the last part of files
    • tar: Tape Archiver
    • tee: Redirect output to multiple files
    • test: Evaluate a conditional expression
    • time: Measure Program running time
    • times: User and system times
    • touch: Change file timestamps
    • top: List processes running on the system
    • traceroute: Trace Route to Host
    • trap: Run a command when a signal is set(bourne)
    • tr: Translate, squeeze, and/or delete characters
    • true: Do nothing, successfully
    • tsort: Topological sort
    • tty: Print filename of terminal on stdin
    • type: Describe a command •
  • U
    • ulimit: Limit user resources •
    • umask: Users file creation mask
    • umount: Unmount a device
    • unalias: Remove an alias •
    • uname: Print system information
    • unexpand: Convert spaces to tabs
    • uniq: Uniquify files
    • units: Convert units from one scale to another
    • unset: Remove variable or function names
    • unshar: Unpack shell archive scripts
    • until: Execute commands (until error)
    • useradd: Create new user account
    • usermod: Modify user account
    • users: List users currently logged in
    • uuencode: Encode a binary file
    • uudecode: Decode a file created by uuencode
  • V
    • v: Verbosely list directory contents ("ls -l -b")
    • vdir: Verbosely list directory contents ("ls -l -b")
    • vi: Text Editor
    • vmstat: Report virtual memory statistics
  • W
    • watch: Execute/display a program periodically
    • wc: Print byte, word, and line counts
    • whereis: Search the user's $path, man pages and source files for a program
    • which: Search the user's $path for a program file
    • while: Execute commands
    • who: Print all usernames currently logged in
    • whoami: Print the current user id and name (`id -un')
    • Wget: Retrieve web pages or files via HTTP, HTTPS or FTP
    • write: Send a message to another user
  • X and onwaard
    • xargs: Execute utility, passing constructed argument list(s)
    • xdg-open: Open a file or URL in the user's preferred application.
    • yes: Print a string until interrupted
    • .: Run a command script in the current shell. ### allows you to remark or comment without disturbing the Terminal.

Codeigniter interview questions and answers

1- What is codeigniter? 
CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications.
2- What are the features of codeigniter?
  1. Codeigniter is free to use,its an open source framework.
  2. Model-View-Controller Based System.
  3. Extremely Light Weight.
  4. Full Featured database classes with support for several platforms..
  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. Excelent documentation.
  7. Full Featured database classes with support for several platforms,Security and XSS Filtering,Error Logging.
3- Explain Codeigniter File Structure?
following are the folder structure :-
  • application
    • cache
    • Config
    • Controllers
    • core
    • errors
    • helpers
    • hooks
    • language
    • libraries
    • logs
    • models
    • thirdparty
    • views
  • system
    • core
    • database
    • fonts
    • helpers
    • language
    • libraries
4- Explain Application Flow Chart in codeigniter?
The following graphic illustrates how data flows throughout the system:
CodeIgniter application flow
  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.
5- Explain MVC in Codeigniter?
CodeIgniter is based on the Model-View-Controller development pattern. MVC is a software approach that separates application logic from presentation. In practice, it permits your web pages to contain minimal scripting since the presentation is separate from the PHP scripting.
  • 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 View is the information that is being presented to a user.
    A View will normally be a web page, but in CodeIgniter, a view can also be a page fragment like a header or footer. It can also be an RSS page, or any other type of "page".
  • The Controller serves as an intermediary between the Model, the View, and any other resources needed to process the HTTP request and generate a web page.
6- 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. When CodeIgniter runs it follows a specific execution process, diagramed in the Application Flow page. There may be instances, however, where you'd like to cause some action to take place at a particular stage in the execution process. For example, you might want to run a script right before your controllers get loaded, or right after, or you might want to trigger one of your own scripts in some other location.
The hooks feature can be globally enabled/disabled by setting the following item in the application/config/config.php file:
$config['enablehooks'] = TRUE;
7. How you will load an model in codeigniter?
$this->load->model('Modelname');
8- 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 Helpershelp you deal with files, etc.
Unlike most other systems in CodeIgniter, Helpers are not written in an Object Oriented format. They are simple, procedural functions. Each helper function performs one specific task, with no dependence on other functions.
Loading a helper file is quite simple using the following function:
$this->load->helper('name');
9- How you will use or add codeigniter libraries?
When we use the term "Libraries" we are normally referring to the classes that are located in the libraries directory and described in the Class Reference of this user guide. In this case, however, we will instead describe how you can create your own libraries within your application/libraries directory in order to maintain separation between your local resources and the global framework resources.
10. How you will work with error handling in codeigniter?
CodeIgniter lets you build error reporting into your applications using the functions described below. In addition, it has an error logging class that permits error and debugging messages to be saved as text files.
showerror('message' [, int $statuscode= 500 ] )
This function will display the error message supplied to it using template application/errors/errorgeneral.php.
show404('page' [, 'logerror'])

This function will display the 404 error message supplied to it using template application/errors/error404.php.
logmessage('level', 'message')

This function lets you write messages to your log files. You must supply one of three "levels" in the first parameter, indicating what type of message it is (debug, error, info), with the message itself in the second parameter.

Note: This article is taken from "http://www.programmerdesk.com/blog/detail/33/Codeigniter-interview-questions-and-answers#.VHGxcouUfkU" 

How to change the PHP version for subfolders or subdomains

  How to change the PHP version for subfolders or subdomains Setting a specific PHP version for a specific websites, subfolders or subdomain...