Author Archives: prabin t p

About prabin t p

Connect with me on Google+

Linux Commands For Files And Directory Operations

Share on TwitterDigg This

Linux command to print name of current/working directory. pwd – Shows what directory (folder) you are in. Linux command to change directory. suppose we have several data directories /home/games/puzzle. cd – change directory   cd puzzle – Moves down from … Continue reading

Drupal7 Form Hidden Field ID Attribute Not Found

Share on TwitterDigg This

Created a form hidden input it does not found the attribute ‘id’. $form[’userid’]= array( ‘#type’ => ‘hidden’, ‘#title’ => t(’Name’), ); Normally this input form have id=’edit-userid’. In D7 RC1, this input doesn’t have any atribute id. Add id attribute … Continue reading

Saving Session Data to a Database in Codeigniter

Share on TwitterDigg This

A session ID is stored in a cookie. If a hacker can steal that ID, he can pretend to be someone else, because a session is identified by it’s ID When session data is stored in a database, every time … Continue reading

db_select Joining A Subquery In Drupal 7

Share on TwitterDigg This

To join the subquery in drupal 7 using db_select function.First we need to create subquery object.Then call this subquery as table.Refer the below code… <?php // Create a subquery, which is just a normal query object. $subquery = db_select(’test_task’, ‘tt’); … Continue reading

db_select Multiple join Drupal 7

Share on TwitterDigg This

Here is example for join multiple table using drupal db_select function $query = db_select(’eventbook_event_rsvp’, ‘r’); $query->innerJoin(’eventbook_event_party’, ‘p’, ‘p.id = r.party_id’); $query->innerJoin(’eventbook_event_group’, ‘g’, ‘g.id = p.group_id’); $stat = $query ->fields(’r',array(’name’,'invite_date’,'response’)) ->fields(’p',array(’party_name’)) ->fields(’g',array(’name’)) ->condition(’event_nid’, $nid) ->orderBy(’name’, ‘ASC’) ->extend(’PagerDefault’) ->execute();

jquery filter() example

Share on TwitterDigg This

jQuery filter function is used to select the items or your elements from a set of elements, by using the selector or the function’s. filter( selector ) jquery filter using selector expression $("div").filter("#selected_id").css(’background-color’, ‘blue’); or <ul> <li>list item 1</li> <li>list … Continue reading

SessionStorage Object in HTML5

Share on TwitterDigg This

In HTML5 sessionStorage The sessionStorage object stores the data for current session. The data is deleted when the user closes the browser window Creating sessionStorage in HTML5 Creating sessionStorage just need to call sessionStorage object like below we are storing … Continue reading

How to Play Audio And Video Using HTML5

Share on TwitterDigg This

We can display audio using the tag as shown below: <audio controls=“controls”> <source src=“test.mp3″ type=“audio/mp3″ /> </audio> We can display video using the tag as shown below: HTML5 video example   <video width=“320″ height=“240″ controls=“controls”> <source src=“test.mp4″ type=“video/mp4″ /> </video>

LocalStorage in HTML5

Share on TwitterDigg This

Local storage with cookies Before HTML5 LocalStores was done with cookies. Cookies are not very good for large amounts of data They are passed on by every request to the server It was very slow and in-effective. In HTML5 LocalStorage … Continue reading

Twitter Bootstrap tutorial – Get Start

Share on TwitterDigg This

Twitter Bootstrap is popular framework for building HTML, CSS and JavaScript front-ends, both for the desktop browser and for mobile.Bootstrap includes a number of components, plugins, controls, styles and more to make it easier to quickly build attractive looking and … Continue reading