Posts filed under ‘General’

JQuery: Showing a progress image while processing background task

I thought to write a simple example to show a progress bar or a gif image showing a that a task is happening at the background using a jquery function.

i) Include jquery script file in the header section and the following code in the head

<script language="javascript">
$(document).ready(function(){
    $('#progress').hide();
    $("#main a.bgdiv").click(function(){
        $("#progress").show("slow");
        $("body").load($(this).attr('href'));
        return false;
    });
});
</script>

(more…)

June 11, 2009 at 7:59 pm 1 comment

cakePHP: Session enabled messages using Session->setFlash

There are different ways to flash or publish the messages for a user action. Usability plays a major role in determining how the navigation pattern for a web application takes place.

  • publishing the outcome of user action on the same page
  • designing a single page to flash all success, error, warning, notice level messages
  • designing a separate page for each message that gets published for the user

To read more on CakePHP refer …

June 9, 2009 at 10:31 pm Leave a comment

PHP: Fatal error: Maximum execution time of 30 seconds exceeded

This error happens when the execution time of the PHP script exceeds the time limit for program execution in Php.ini file.

By default the timer is set to 30 seconds in php.ini and you can track the time limit by tracing for ‘max_execution_time’ directive in php.ini.

Read more to know the solution »

May 28, 2009 at 9:07 pm Leave a comment

What is a Third-party cookie?

Third party cookies are the cookies that are served by sites other than the site that you are visiting.

For example, Ad serving companies serve their cookies to your computer when you visit a particular site to track which Ads were served, their relevancy to the content where the Ads get published and other such details in addition to keeping track of the user preferences.

May 24, 2009 at 8:55 pm Leave a comment

Box model bug in IE, Firefox

Box model bug in IE, Firefox

Display the below versions of the file in IE, Firefox and check the difference in display. Note the css styling used in Sample A and Sample B HTML coding.

When defining the width of the “div” layer it is essential that you need to consider the padding, margin, border size given to each element. As different browser versions have different ways of interpreting these values we need to cascade the width from the parent element to child layer if we were destined to use width for restricting the boundary of the element. (more…)

April 8, 2009 at 6:40 pm Leave a comment

Install ActiveState Perl on Ubuntu

Install Perl from ActiveState on Ubuntu machine

I prefer ActiveState download for a beginner to have a Perl installation with compiled libraries for immediate execution of various Perl programs. You can grab a copy based on your OS from

http://www.activestate.com/activeperl/downloads/

Download the x86 .deb file for easy installation of ActivePerl on Ubuntu. (more…)

March 30, 2009 at 7:43 pm Leave a comment

Network Time Protocol – NTP in Ubuntu

Network Time Protocol – NTP in Ubuntu

NTP is a TCP/IP protocol which helps synchronising time over a network. A client requests the current time from a server (identified , and uses it to set its own clock.

The following article on Ubuntu help guide will get you started on setting the NTP protocol
https://help.ubuntu.com/7.10/server/C/NTP.html (more…)

March 27, 2009 at 7:25 pm Leave a comment

How to delete user or group in ubuntu?

Ubuntu: Delete group or user in Ubuntu

Delete a user in Ubuntu
sudo userdel -r <username>

Delete a group in ubuntu
sudo groupdel <groupname>

March 25, 2009 at 6:31 pm Leave a comment

Simple ways to Disable Context Menu in Browser

How to disable context menu and hence disable Browser Back button?

In programmers life, there comes a situation where he/she had to disable the browser back button functionality or the back button feature on the context menu (the menu that appears when users right click on the browser content).

A simple way to disable Context Menu in browsers will be to use javascript as follows …

<html>
<head><title>How to disable content menu Back button?</title></head>
<body onContextMenu="javascript: return false;">
<h1>Sample Text</h1>
<span style="font-size: 1.5em;">Check the CSS of this styling in the source file</span>
</body>
</html>

CSS related hint: I have used font size of 1.5em to emphasize on how “em” (the “M” space) can be used to increase the font size of the texts relatively.

March 5, 2009 at 10:49 pm Leave a comment

PHP4 Vs. PHP5 – What is New in PHP5? – Part 1

In PHP5, Zend engine has been rewritten to accomodate the new object oriented concepts. To start with, I will write on some functions that have been added to PHP5’s bag.

~ The access modifiers public/private/protected are introduced for methods and properties.

~ __construct() is used now instead of the function names in the name of the classes which makes it a uniform way of access

~ __destruct() function is now introduced which will run when an object is destroyed. In PHP5, Zend engine has been rewritten to accomodate the new object oriented concepts. To start with, I will write on some functions that have been added to PHP5’s bag.

~ The access modifiers public/private/protected are introduced for methods and properties.

~ __construct() is used now instead of the function names in the name of the classes which makes it a uniform way of access

~ __destruct() function is now introduced which will run when an object is destroyed

To read more about this article, please click here

February 15, 2009 at 6:05 pm Leave a comment

Older Posts


May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Blog Stats

  • 26,383 hits