Solve Write Permission Denied on Files Windows 7

2010
26
Mar

Windows 7 file attributes and earlier versions of windows such as XP or 98 is very different. The difference is notable if you use NTFS file system which has more security features.

On Windows 7 if you get "Write Permission Denied" on any file ,

  • Right Click > Properties
  • On the security tab, click on edit as highlighted in the screenshot below :
    Security Tab Solve Write Permission Denied
Read More

How to Prevent my Computer from going to sleep when I am running big process ?

2010
25
Mar

By default on Windows 7, the computer sleeps after 30 minutes. Usually power plans and options are more required on laptops, but desktops also do use this setting. This is bad if you want to run some process which has to run for a long time like downloading from the internet or running torrents or running huge scripts. If you leave your computer unattended the computer sleeps after 30 minutes. This interrupts the process.

In order to change the power settings, and to Prevent my Computer from going to sleep ,

  • Goto Control Panel\System and Security\Power Options
Read More

Free Light weight Social media sharing javascript for Facebook, Twitter, Stumble Upon, Digg and Reddit

2010
25
Mar

Social Media Buttons or buttons that help you share the content on bookmarking websites such as Stumble Upon, Reddit or Digg or social networking Websites such as Facebook or Twitter. Adding the buttons helps you to expose your content to a broader audience.
There are lots of social media button providers such as AddThis or ShareThis. I think it is overloaded with features that makes your page load slow as well as bring in unintentional 3rd party javascript code ( or flash tracker ) which runs on your blog.

Read More

Error Installing PERL modules "unrecognized command line option -fstack -protector"

2010
24
Mar
4

unrecognized command line option "-fstack-protector" error usually comes on Cygwin when installing PERL modules.
For example when installing the DBI module or DBD::MySQL perl module, the following error comes on cygwin :

cp lib/DBI/Gofer/Serializer/Base.pm blib/lib/DBI/Gofer/Serializer/Base.pm
cp dbipport.h blib/arch/auto/DBI/dbipport.h
cp lib/DBI/Gofer/Execute.pm blib/lib/DBI/Gofer/Execute.pm
cp lib/DBI/DBD.pm blib/lib/DBI/DBD.pm
cp lib/Win32/DBIODBC.pm blib/lib/Win32/DBIODBC.pm
cp lib/DBI/PurePerl.pm blib/lib/DBI/PurePerl.pm

Read More

Sprintf Function in Python

2010
21
Mar

The printf or sprintf function is used to format strings in PHP and C programming constructs. sprintf in php returns the formatted string whereas printf just prints the output.

$variable = sprintf("%d %s %d = %d",4,"+",5,9);
print $variable;
//OR
printf("%d %s %d = %d",4,"+",5,9);
 
//Both lines are identical.
//Prints 4 + 5 = 9

On python, sprintf is handled using an operator instead of function. The % operator on a string does formatting.

var = '%d %s %d = %d' % (4,'+',5,9)

Read More

Enable two finger flick Forward and Back in Synaptics

2010
19
Mar

Two finger flick is a gesture that is used to move forward and backword in applications such as photo viewer software or a browser. This is a feature similar to the one available in Mac which is two touch scrolling. This post describers how to enable two finger flick on Windows just like in Macintosh.

Two-Finger Flick

Read More

Solve "Cannot modify header information - headers already sent by *.php"

2010
17
Mar


Warning: Cannot modify header information - headers already sent by somefile.php (output started at somefile.php:###) in somefile.php on line ###

This Warning is shown by PHP when you use the header function to output headers or use the setcookie function to set cookies after any echo or content which is not inside PHP tag.

echo "Hello World";
header("Location: /redirect.php");

Hello World !!! 
<?php header("Location: /redirect.php");?>

Read More

Syndicate content