Blogs

How to get last n number of commit log from svn

Use log command with -l option to limit showing the transaction.

svn log -l 5 https://repourl/configs/

This example shows last 5 transactions happened in configs directory.

How to change the number of concurrency threads in MySQL

To change the number of concurrency threads in MySQL

Open my.cnf and set the innodb_thread_concurrency.

innodb_thread_concurrency = 20

it allow 20 concurrent threads.

To set this to unlimited
innodb_thread_concurrency = 0

How to change the Max connection in MySQL

To change the mysql max connections

open my.cnf and change max_connections to the required number of connections.

For example: To set maximum 300 connections

max_connections = 300

If you don't know where the my.cnf exists in Linux/Unix box, use find command.

find / -name my.cnf

How to create item list in drupal 7

$listItem = array('Drupal6','Drupal7');

theme_item_list(array('items'=>$listItem,'title'=>'', 'type'=>'ul', 'attributes'=>array('class' => 'dlist')))

Converting the attributes from drupal 6 to drupal 7

Drupal 6:

$form['start_date'] = array(
'#type' => 'textfield',
'#title' => t('Tution Start Date'),
'#default_value' => '',
'#size' => 11,
'#attributes' => array('class' => 'tut_datepicker')
);

drupal 7:

$form['start_date'] = array(
'#type' => 'textfield',
'#title' => t('Tution Start Date'),
'#default_value' => '',
'#size' => 11,
'#attributes' => array('class' => array('tut_datepicker'))
);

How to use the jquery datepicker in drupal 7

tution_module.js

jQuery(document).ready(function(){
   $(".tut_datepicker").datepicker({
   dateFormat: "mm-dd-yyyy",
   });
});

tution.module
$form['start_date'] = array(
   '#type' => 'textfield',
   '#title' => t('Tution Start Date'),
   '#default_value' => '',
   '#size' => 11,
   '#attributes' => array('class' => array('tut_datepicker'))
);

$form['#attached']['js'] = array(
   drupal_get_path('module', 'tution') . '/tution_module.js' => array(
     'type' => 'file',
   ),
);

Syndicate content