Thursday, October 4, 2012

Mic not working on Ubuntu 12.04

reinstall/install PulseAudio Volume Control (pavucontrol) (volume control tool (mixer) for the PulseAudio sound server)

sudo apt-get update
sudo apt-get install pavucontrol

Wednesday, July 4, 2012

Authenticating HTTP access to website


1) Edit .htaccess file as follows:

Order Deny,Allow
Satisfy All

# BASIC BLOCK - Note you may need AuthDigestFile instead of AuthUserFile
AuthType Basic
AuthName "Auth Name" #e.g.protected by apache
AuthUserFile physical path to .htpasswd file  #e.g. C:/xampp/htdocs/~/.htpasswd
Require user username

2) Use following command to generate .htpasswd file
htpasswd -c .htpasswd username

3) Place .htaccess file in the directory which needs authentication access

Tuesday, April 3, 2012

Useful for getting the Table View Cell height containing Text

-(CGFloat)labelHeightForText:(NSString *)text

{

   CGFloat constrainedSize = 231.0; //or any other size

   UIFont *font = [UIFont fontWithName:@"Helvetica" size:17.0];

   CGSize textSize = [text sizeWithFont:font 

                      constrainedToSize:CGSizeMake(constrainedSize, CGFLOAT_MAX)

                          lineBreakMode:UILineBreakModeWordWrap];

   return textSize.height;

}

Thursday, March 22, 2012

Script to delete .svn

find . -name ".svn" -type d -exec rm -rf {} \;

Friday, September 2, 2011

Fedora Installation

While installing Fedora by creating dual boot, you may get a error saying could not allocate space for requested partitions:not enough space left to create partition even when you have free 'unallocated space'.
Make sure that you can still create primary partitions (max. 4 primary partitions allowed). Create extended partition and create root, /boot partitions as logical partitions within that. (max. one extended partition allowed). If you already have a extended partition, create free space within that.

  • A swap partition (at least 256 MB) - Depending on RAM
  • /boot partition (250MB) - contains the operating system kernel (which allows your system to boot Fedora), along with files used during the bootstrap process.
  • root partition (3-5GB) - The / (or root) partition is the top of the directory structure.
 For more info on this
http://docs.fedoraproject.org/en-US/Fedora/13/html/Installation_Guide/s2-diskpartrecommend-x86.html