Sunday, June 24, 2012

shebang/hashbang and Single Page Interface Good or Bad

We have noticed long URLs including # or #! in twitter and facebook. Actually # is known as The fragment identifier introduced by a hash mark # is the optional last part of a URL for a document,It is typically used to identify a portion of that document.
# behavior depends on document MIME type like in PDF, it acts in different manner.

The reason that Facebook and other Javascript-driven applications use this because they want to make pages indexable, bookmarkable and support the back button without reloading the entire page from the server. This technique is called Single Page Interface which is based on JavaScript routing.
When we use #! then it will be considered "AJAX crawlable." So suppose url is /ajax.html#!key=value then it temporarily become /ajax.html?_escaped_fragment_=key=value this is happening because
Hash fragments are never (by specification) sent to the server as part of an HTTP request so crawler needs some way to let your server know that it wants the content for the URL with #.
And server, on the other hand, needs to know that it has to return an HTML snapshot, rather than the normal page sent to the browser. Here snapshot is all the content that appears on the page after the JavaScript has been executed.

Other Uses except AJAX
In pagination we can use #!. URLs like blog/topic/page/1 and blog/topic/page/2 etc can appear as duplicate content and google doesn't like that so maybe in this case we make hashbangs be better or just a robots no index on any page that is a pagination of another page.

Other benefit to this technique is loading page content through AJAX and then injecting it into the current DOM can be much faster than loading a new page. In addition to the speed increase, further tricks like loading certain portions in the background can be performed under the programmer's control.

Issues

With hashbang URLs, the browser needs to download an HTML page, download and execute some JavaScript, recognize the hashbang path (which is only visible to the browser), then fetch and render the content for that URL. So By removing it,we can reduce the page load time it takes.


Spiders and search indexers can and do sometimes implement JavaScript runtimes. However, even in this case there’s no well recognised way to say ‘this is a redirect’ or ‘this content is not found’ in a way that non-humans will understand.

Also code will be not maintainable unless we use some modular kind of code at front-end side (Java Script ) otherwise it will be very hard to adopt further enhancements and support existing code. 

Solution

location.hash was a way for AJAX applications to get back button and bookmarking support.

HTML 5 now introduce with pushState. it provides a way to change the URL displayed in the browser through JavaScript without reloading the page.

window.history.pushState(data, "Title", "/new-url");

In order to support the back and forward buttons we must be notified when they are clicked. we can do that using thewindow.onpopstate event. This event gives access to the state data that passed to pushState earlier. Of course, we can manually go back and forward with the standard history functions.

Currently, pushState has support from the latest versions of Safari and Chrome, and Firefox 4 will be supporting it as well. It is worth noting that Flickr is already using the API in their new layout.
Libraries like jQuery BBQ start to support this feature with fallback to the old hash trick.

The hard part is that support for history.pushState in Internet Explorer does not appear to be forthcoming. That makes the argument that browsers are quickly adopting that feature pretty dubious since IE accounts for a good 30-40% of traffic.

Found a very nice case study in this. Here you can understand how hashbang impact on page routing and whats are basic pitfalls.

Tuesday, June 12, 2012

open source JS files loaders: LabJS review

It's heated topic and people always do some differently (http://www.phpied.com/preload-cssjavascript-without-execution/) for loading HTML resources without blocking.

I have a several thoughts. Actually i spent some time and reviewed LabJS codebase and found few conclusions.

LabJs is playing with ready event with XHR technique to load files ( see how many ways we can load js files without blocking .... http://www.stevesouders.com/blog/2009/04/27/loading-scripts-without-blocking/).

The ready event occurs after the HTML document has been loaded, while the onload event occurs later, when all content (e.g. images etc) also has been loaded.

The onload event is a standard event in the DOM, while the ready event is specific to browser(so
it required various browser checks).

The purpose of the ready event is that it should occur as early as possible after the document has loaded, so that code that adds functionality to the elements in
the page doesn't have to wait for all content to load.

As i said ready event is not standard event so it need different cross browser checks and it's not necessary that its always return correct result.

On time by time people tried to get ready event but it's not full proof.
---------------------------------------------------------------------
Let's check how much reliable is Ready event
---------------------------------------------------------------------

------------------------------
LAB JS History
------------------------------


We have seen different script loaders but i think LABjs’s goal is a bit different from others.
It enable parallel downloading of JavaScript files while maintaining execution order.


To do so, LABjs needs to know which browsers allow parallel downloads by default and then provide
other solutions for the browsers that don’t.

All loaders are using various browser detection techniques to determine the correct action
to optimize script loading.

BUT Browser detection is still not full proof in JS.

http://www.nczonline.net/blog/2009/12/29/feature-detection-is-not-browser-detection/


Unfortunately LABJs was failed in past to maintain execution order. See below links.

https://twitter.com/getify/status/26109887817 [ by Kyle]

Blog post of Kyle ( http://blog.getify.com/ff4-script-loaders-and-order-preservation/comment-page-1/)
and See Guy's comment who wrote Firefox Gecko engine code.
(http://blog.getify.com/ff4-script-loaders-and-order-preservation/comment-page-1/#comment-748)

Finally Kyle have wiki website ( http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order) where he maintain list of issues ( due to different behavior of browsers like Mozilla Gecko and Web-kit) so that browser vendors internalize these issues and come up with ways to solve them.

----------------------------
negative side effects
----------------------------
In below links Kyle mentioned that LABjs will not work properly :

  • if page is used document.write
  • if codebase is used ready event poorly
  • Other negative effects which are mentioned, BTW nice abbreviated by Kyle: "FUBC" (flash of un-behaviored content)
http://labjs.com/description.php#whennottouse

http://blog.getify.com/labjs-new-hotness-for-script-loading/#ux-labjs

-----------------------------
Why we need LoadJs ?
-----------------------------

First, all loader scripts are trying to enable parallel downloading of JavaScript resources. That’s a worthy goal but one that’s already being handled by newer browsers.

see below link where i load 19 HTML resources in normal manner but still JS files are loaded parallel.

http://172.16.3.228/public/test.html



Second, LABjs is very focused on maintaining script execution order.
With this comes an assumption that we want to download multiple JavaScript files that have
dependencies on one another. This is something that don’t recommend but I think that some people  feel it’s important.



Third, other loaders are focused on separation of download and execution of JavaScript. It is the
idea that download a JavaScript file and not execute it until a point in time determined by
us(requirejs did same job in very decent manner)
. The assumption here is that page is progressively
enhanced such that JavaScript isn’t immediately needed. LABjs doesn’t address this problem. Browsers are also not helping with this.

So all these loaders require constant monitoring and updating as new browser versions come
out. Maintenance is important in JS based websites and these libraries add maintenance
overhead that isn’t necessary.

----------------------------------------------------
Then What Lazyload does actually do ?
---------------------------------------------------

In shiksha.com we use loadscript & upLoadJsOnDemand function for parallel downloading.

We can easily GREP codebase with "loadScript" or "
upLoadJsOnDemand".

Actually Lazyload was introduced for different purpose. It servers files which are
not required in main page rendering.
 Some features are listed below.

1. load file only once
2. load file after on load event ( before lazyload API, it was unable to load js files in javascript code )
3. callback Fn execution
4. pass objects to callback Fn in global scope
5. callback Fn execution even files are loaded




Sunday, June 10, 2012

PHP's future: PHP unframework

PEAR,PECL these are well known bundle of libraries of PHP. There is one more Ez Components
which was designed for enterprise applications.

Recently i got chance to see few more packages which are same as RAIL, CPAN or NMP(Nodejs packages).

This is called "PHP unframework" a general-purpose, object-oriented libraries. It has a modular architecture, meaning it isn’t strictly MVC. It focuses on being secure, well documented and easy to use, while solving problems intrinsic to web development.

Few good examples are:

  • Flourish
  • Spoon http://www.spoon-library.com/
  • http://getcomposer.org/

I read a good article that Symfony2(latest version) isn't an "MVC framework", it's just a bunch of loosely coupled components working nicely together. Article was written by lead Symfony developer.

http://fabien.potencier.org/article/49/what-is-symfony2

So much is awaiting for final shape, so keep waiting and ready to use these awesome libraries.

Happy Coding !!!

storing secure encrypted passwords

We recently got news that linkedin password hashes are hacked. Generally common practice in web development is to hash the user password and store the resulted hash string believing that chance of two distinct strings having the same hash string is so low that it’s deemed mathematically impossible but now computers are become so smart and SKYNET type computing power can change the story.



rainbow tables (http://en.wikipedia.org/wiki/Rainbow_table), the mapping function from hash strings to any possible combinations of keyboard characters. With trillions of records in rainbow tables, it takes only 160 seconds to crack the password “Fgpyyih804423” which we presume fairly  safe (http://www.codinghorror.com/blog/2007/09/rainbow-hash-cracking.html).




Finally What should we do ?


1. Avoide storing plain text password always use encrypted hashes.Storing text password is bad practice, infact "bad practice" is an understatement. "Irresponsible" might be more accurate.
Storing passwords in plain text is an embarrassing security breach waiting to happen. 
Reasonable efforts must be made to keep sensitive data secure. Storing passwords in plain-text will clearly violate this, and in turn potentially null any indemnity insurance you have in the event of a breach of security.



  1. So create SALT randomly for each HASH string and store it into DB.
  2. Avoid MD5 use SHA256 or blowfish algorithms.
  3. Use strong algo to generate random key.
  4. If you are using private key or something then store it in ENV or in file where no one can access it.




$salt = generate_random_salt()


$my_hash = sha1($salt.$secret);


cracker has no idea what the salt is, there’s no way he can create the right rainbow table to
perform the crack. Even if he does, he would have to specifically build a rainbow table to crack your database which can be time-consuming. Subsequently, to make this even more difficult for the cracker, you can use different salts for each of the password entries in the database.


2. At last, it is recommended (http://chargen.matasano.com/chargen/2007/9/7/enough-with-the-rainbow-tables-what-you-need-to-know-about-s.html) that generate the initial hash string (the one to be stored in database) by running 1000 iterations of hashing instead of just 1. The extra computing burden on your server is negligible while it will increase the time needed to crack a single password by 1000 times at the cracker’s end. The point is to make the hashing process as slow as possible rather than the other way around. As the cracking usually makes password guesses and trial logins at a much higher paced speed, the slowness will have a much more detrimental effect on the cracker than on your website.

Main Key Areas:


Data storage - Store the passwords far away from where an attacker can get in. 


Encryption - Any encryption technique is a delaying tactic - one the attacker has your data, they will eventually crack your encryption given an infinite amount of time. So mostly you're aiming to slow them down long enough for the rest of the system to discover you've been hacked, alert your users, and give the users time to change passwords or disable accounts.


Key storage - Encryption is only as good as your key storage. If the key is sitting right next
to the encrypted data, then it stands to reason that the attacker doesn't need to break your crypto, they just use the key. 


Intrusion detection - Have a good system in place that has a good chance of raising alarms if you should get hacked. If your password data is compromised, you want to get the word to your users well ahead of any threat.


Audit logging - Have really good records of who did what on the system - particularly in the
vicinity of your passwords. 

Tuesday, April 17, 2012

Ecommerce Website Features list


E-commerce is the simple way to buy and sell of the products, services by businesses and consumers over the Internet. People use the term called "ecommerce" to describe encrypted payments on the Internet.
I noticed so many B2C eCommerce web portals, mostly are start-ups. I had worked on many website based on os commerce open source and i have seen big and complexly magento too.

Finally 
I create a features list that i want to see in eCommerce website.



Here is the list.

  1. Ability to create a new SKU for combo deals - virtual product
  2. Multiple language support specially in search, display
  3. Sales Rank by Category, sub-cat, and so on upto 5 levels
  4. "Review" features (refer amazon)
  5. Discussion forum overall, which will be linked to categories and product pages
  6. Support for multiple categories, sub-categories and sub-sub-categories
  7. Special offers on products, category, sub-cat
  8. On Sale section
  9. Deal of the day/week
  10. Shopping Cart
  11. Support for Multiple Payment Gateways (CC Avenue, Bank PG, mChek/PayMate, etc
  12. Search by category.Search results sorting by sale #s?
  13. Ability to identify tags of incoming users for source id
  14. Customer reviews
  15. Indian item/foreign item
  16. Pricing currency -Multi currrency support
  17. Customized shipping messages (in terms of days)
  18. Customer Order History
  19. Tell a friend
  20. Wish List (add to cart feature) will be useful in social media
  21. Gift Voucher/Certificate and Store Credits, Rewards Points, 
  22. Discount coupons (global & local)
  23. Ability to use different fonts, colors next to product image and in descriptions
  24. Tags for items
  25. Widgets for best sellers, new releases,  recently sold items
  26. Contact Us form
  27. Recommendation engine
  28. Ability to create special pages for manufactures
  29. Blog
  30. Option to add an amount at checkout for donation to a specific charity (sankara, blind school, etc)
  31. Pre-order item
  32. Notify me when available feature
  33. All user browsing & activity data to be stored
  34. Ability to add RSS (blog, deal, new additions)
  35. Ability to create a light version & mobile version of the website
  36. Different shipping messages for different items
  37. Display List Price, Our Price, Sale Price. Discount amount & %age for each item
  38. Customer profile & account with history
  39. Invoicing/billing
  40. Receipt generation
  41. News feeds from other sites on detail pages and/or news section
  42. Affiliate program
  43. Let us know if you are not able to find the item you are looking for
  44. Require age verification for adult things if any
  45. In future provide it as a service to other players
  46. SMS order/shipping confirmations
  47. SUMS section(MIS) reports
  48. SEO

I think i did great Job :-) but guys feel free add if you feel anything missing.











Friday, March 23, 2012

Basics of PHP strings manupulations


I feel that people should know how PHP act on strings manupulations and what are major superfine things that we know.


1. switch vs if vs if-else

$var=rand(0,1000000);
if ($var==0)
{
  echo "found 0";
}
elseif ($var==1)
{
  echo "found 1";
}
elseif ($var==2)
{
  echo "found 2";
}

....

$var=rand(0,1000000);
if ($var==1)
{
  echo "found 1";
}
if ($var==2)
{
  echo "found 2";
}
if ($var==3)
{
  echo "found 3";
}
....

$var=rand(0,1000000);
switch ($var)
{
  case 1:
    echo "found 1";
    break;
  case 2:
    echo "found 2";
    break;
  case 3:
    echo "found 3";
    break;
    ....
    However, in this case, many switch statements still performed faster (around 25% more) than when using many if-else or if,if conditionals instead. This was tested with 100,000 iterations of 10 conditions as opposed to a 1 iteration of 1,000,000 conditions.

2. isset() vs array_key_exists()

$arr = array(); $fp = fopen("/usr/share/dict/words", "r"); while ($i < 5000 && ($w = fgets($fp))) {
$arr[trim($w)] = ++$i; } $s = microtime(1); for ($i = 0; $i < 100000; $i++) {     isset($arr['abracadabra']); } $e = microtime(1); echo "Isset: ".($e - $s)."\n"; $s = microtime(1); for ($i = 0; $i < 100000; $i++) { array_key_exists('abracadabra', $arr); } $e = microtime(1); echo "array_key_exists: ".($e - $s)."\n";

shows that while isset() is 2.5 times faster taking a mere 0.0219 seconds vs 0.0549 seconds taken by array_key_exists(), both operations are extremely quick and take a fraction of a second even when doing 100k operations. Any "optimization" between the calls is purely within the super-micro-micro optimization realm and is not going to make any application  measurably faster.

3. in_array vs isset

foreach($arr1 as $key=>$i){
  if(in_array($i, $arr2)){
    unset($arr1[$key]);
  }}
  That was running for hours with about 400k items.

  foreach($arr1 as $key=>$i){
    if(isset($arr2[$i])){
    unset($arr1[$key]); 
    }
  }

  Yeah, that runs in .8 seconds.  Much better. FWIW,  I tried array_diff() as well.  It took 25 seconds.

  4. Null vs. isset()

  Most intresting and most confusing ... lets start from begniing ..
  $a = "0"; // set zero as string value

  if(isset($a)) // it will return TRUE BUT
  if($a) // it will return FALSE

  $null = null;
  if($null == null){   
    echo "Yes, it is equivilent to null\n";
  }
  if($null === null){
    echo "Yes, it is null\n";
  }
  if(isset($null)){
    echo "Yes, it is set\n";
  }
  if(empty($null)){
    echo "Yes, it is empty\n";
  }

  However some people can ask Why not using is_null? http://www.php.net/is_null
 
  Keeping track of the different comparison operators can be confusing.
  I often find myself referring to this chart :
  http://www.php.net/manual/en/types.comparisons.php

To check if the variable doesn't exist and to not be confused with null, you may use :-

- for key of array : array_key_exists($key, $array)
- for property of object : property_exists($property)
- for global variable : array_key_exists('variable', $GLOBALS)
- for local variable : you could test against the array returned by get_defined_vars() function like this:
array_key_exists('foo', get_defined_vars());

5. Semicolon error keep your eyes open !!!

$i = 0;
while($i < 20); {
  //some code here
  $i++;
}

See that semicolon there? This will cause PHP to silently fall into an infinite loop. You will not get any errors even with E_ALL|E_STRICT error levels – beware of this mistake. The missing semicolon after the break in the inner loop will cause the code to only output “0″ and then exit.

Hope you enjoy post. Good luck. Happy coding...



Wednesday, February 29, 2012

codeigniter session memcache anti Bots and timestamped cache

Here you can see three different hacks that we can use in CI to make our life easier. However all these are based on my local box implementation and still these patches need to push live.

1. Memcache session handling available with CodeIgniter, So first thing to do was to filter bots that frequently visit my site and deny them sessions, instead a cookie will do them just fine.



function __detectVisit() {
       $this->CI->load->library('user_agent');
       $agent = strtolower($this->CI->input->user_agent());

       $bot_strings = array(
           "google", "bot", "yahoo", "spider", "archiver", "curl",
           "python", "nambu", "twitt", "perl", "sphere", "PEAR",
           "java", "wordpress", "radian", "crawl", "yandex", "eventbox",
           "monitor", "mechanize", "facebookexternal", "bingbot"
       );

       foreach($bot_strings as $bot) {
               if(strpos($agent, $bot) !== false) {
                       return "bot";
               }
       }

       return "normal";
}

The next step was to build namespaces adjusted with some of CodeIgniter’s built in Session handling mechanisms.


function __build_namespace($sess_id, $ip_addr = 0, $user_agent = '') {
$this->namespace .= $sess_id;
if($this->sess_match_ip == TRUE && $ip_addr > 0)
$this->namespace .= '#'.ip2long($ip_addr);
if($this->sess_match_useragent == TRUE && $user_agent != '')
$this->namespace .= '#'.md5($user_agent);
}


2. Second hack is bypass CI to server HTML cached pages. Here is code and its very easy to understand. 



<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');


class MY_Output extends CI_Output {


function _display($output = '') {
$elapsed = $BM->elapsed_time('total_execution_time_start', 'total_execution_time_end');
$output = str_replace('{elapsed_time}', $elapsed, $output);


$memory = ( ! function_exists('memory_get_usage')) ? '0' : round(memory_get_usage()/1024/1024, 2).'MB';
$output = str_replace('{memory_usage}', $memory, $output);


// Grab the super object.  We'll need it in a moment...
$CI =& get_instance();


// TRAP OUTPUT
if(!empty($output) && ! $CI->access->logged_in() && class_exists('Memcache')) {
$output .= '<!-- DYNAMICALLY GENERATED -->';
$ns = "outputcachememc#".$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$m = new Memcache;
$m->addServer('127.0.0.1', '11211', 1);
$m->set($ns, $output, MEMCACHE_COMPRESSED, 60*5);


$output = str_replace('{elapsed_time_cc}', $elapsed, $output);
}
$output = str_replace('{elapsed_time_cc}', $elapsed, $output);


if (method_exists($CI, '_output')) {
$CI->_output($output);
} else {
echo $output;
}


log_message('debug', "Final output sent to browser");
log_message('debug', "Total execution time: ".$elapsed);
}


}


/* End of file Output.php */
/* Location: ./system/libraries/Output.php */


3.  Third and last hack is about get API that pull content from memcached.



public function get($key)
    {
        //How long do we allow for requests to hold for a cache miss. Just in case
        //a request thread dies because mysql went away or something
        $maxWait = 10;
        //How many times should a request poll for the key. CPU/response time tradeoff.
        $iterations = 50;

        $sleeptime = ($maxWait / $iterations) * 1000000;
        $v = $this->_cache->get($key);
        if (!$this->isSuccess()) {
            $lockKey = "::lock::$key";
            //Of all the requests slipping through varnish, only one may pass from here ...
            if (!$this->_cache->add($lockKey,  1, $maxWait)) {
                $i = 0;
                //... The rest will block here, polling until the key is removed ...
                while(true) {
                    usleep($sleeptime);
                    $i++;
                    if (!$this->_cache->get($lockKey) || $i == $iterations) {
                        break;
                    }
                }
                // ... then hopefully get a cache hit here. Technically, one could change
                //this to $this->get($key), which would recursively repeat the process.
                //In my case, I considered this unsafe as this should never happen except
                //if an E_FATAL_ERROR occurred or something similar.
                $v = $this->_cache->get($key);
            }
        }
        return $v;
    }


Let me know if you guys have any query or concern.


Happy Coding !!!



Monday, February 27, 2012

PHP APC locking mechanism

The locking mechanisms that APC can currently use are:
  1. pthread locks
  2. pthread mutexes
  3. pthread locks
  4. pthread mutexes
  5. Slim reader/writer locks (Windows only)
  6. spinlocks
Stick to the default locking mechanism unless APC won't compile. Brian Shire at Facebook tested locking mechanism performance and presented the results.

As of APC 3.1.9, the PECL installer ask about enabling three additional options: memory protection, pthread read/write locks and pthread mutexes, which correspond to --enable-apc-memprotect, --enable-apc-pthreadrwlocks and --enable-apc-pthreadmutex. The first two are labeled experimental and disabled by default; the latter is enabled.
There are another two options.

1. enable-apc-filehits
2. enable-apc-spinlocks
The first option (--enable-apc-filehits) enables gathering information for the "filehits" option of apc_cache_info. Basically, you can use it to figure out which files are pulled from the cache for each request if you're debugging cache-related problems. If cache_type is "filehits", information about which files have been served from the bytecode cache for the current request will be returned. This feature must be enabled at compile time using --enable-filehits.
The second option (--enable-apc-spinlocks), spinlocks are a processor-cycle inefficient way of ensuring only one process accesses a resource at any given time. APC uses locks when dealing with shared memory. APC places the cache in shared memory so that all the PHP processes can, well, share the cache, and locks ensure that the processes don't trip over each other while doing it.

Another important setting is apc.shm_segments APC allows you to create multiple shared memory segments using the apc.shm_segments setting to get around shared memory segment size limits.The default is 1 segment, 32MB in size.
You should check the kernel max size for shared memory.

sysctl -a | grep shmmax

This could explain apache crash when you set a too big number (but you should have something about it in error.log). If you've configured APC to use memory mapped files (with the --enable-mmap option), the shm_segments setting is ignored unless you specify a file mask via the mmap_file_mask setting. Which could be fixed by giving a value to apc.mmap_file_mask configuration setting.
some versions of APC (3.0.14) seems to ignore the value of apc.shm_segments and go with the apc.shm_size, and also it accepts values larger than the maximum allowed size for each segment.
When you allocate more the 32M apache should hang. Below is some standard APC settings which will be useful.
  • apc.enabled=1
  • apc.shm_segments=3
  • apc.shm_size=32
  • apc.ttl=7200
  • apc.user_ttl=7200
  • apc.num_files_hint=2048
  • apc.mmap_file_mask=/tmp/apc.XXXXXX
  • apc.enable_cli=1
  • apc.max_file_size=10M

XDebug is not suitable for production environments


XDebug PHP extension, is a great, open-source debugger and profiler for PHP. It is a good alternative to the commercial Zend server. XDebug besides its profiling capabilities, it adds full stack traces to PHP error messages when enabled.These include Fatal Errors and Warnings.


however it is not suitable for production environments as Zend server is. 


Few people recommend that using XDebug on demand (remote debugging) does not harm server performance but there are major flaws here.


1. Basically  Xdebug comes with simple command line client for the DBGP protocol. We append  XDEBUG_SESSION_START in url and php script get that query string and xdebug start debugging and print output.


2. XDebug keeps traces in memory, which can lead to “out-of-memory” errors in
PHP

3. Imagine if php had to create a 100MB file for every request. By turning on xdebug.profiler_enable_trigger, you can at least selectively run the profiler.

4. Even when the profiler is off, the other primary function of xdebug (detailed stack traces on errors) causes your php instance to track lots of extra information slowing down execution. On a recent real world example where I turned on xdebug temporarily (with profiler off) and then shut it off, xdebug caused average response time to go from 400ms to 700ms.

5. There is still a bit (of overhead), about 10%. Xdebug 2.2 (currently SVN-only) have some improvements for this with (xdebug.coverage_enable=0) checkout this https://twitter.com/xdebug/status/50262398933798912

Friday, February 3, 2012

FAMOUS PERSONALITIES From Unnao U.P.


FAMOUS PERSONALITIES From Unnao U.P.

RAO RAM BUX SINGH
Also known as Babu Rao Ram Bux Singh was a great freedom fighter of Biaswara, Unnao. He was talukdar of Daundia Khera, and fought for the freedom of the country against the British. But ultimately his forces were defeated and he was cought at Varanasi and hanged to death in Daundia Khera on 28th of December 1858.
dd
CHANDRIKA BUX SINGH
Born in 1923, son of the King of Bethar State, Ajit Singh, Chandrika Bux Singh came to the thrown after the untimely death of his father. He gave a tough fight to the British during the First war of Independence in 1857. Afterwards also he kept on his struggle. He killed the British Commander Murray and his wife and as a consequence he was arrested alongwith his family. The British decided to kill him in the most cruel way. He alongwith his family and associated was sentenced 'Kalapani ki Saja' as per the judgement on 28th Dec.1859. On 29th Dec,1859, it was ordered that his entire property be auctioned alongwith the above punishment. On his way to Kalapani, he was killed by the British on 30th Dec.1859.
Shams-ul-ulema mohd.abdul jalil usmani (born 1862 at Neotani, Unnao)
Shams-ul-ulema mohammad abdul jalil usmani was bron in neotani and he was the professor of persian in college benaras persentely called it benaras hindu university.he was a versatile scholar in arabic, persian and urdu.he was among the six shams-ul-ulmas(grand scholar) in India.This honor was conferred upon him by the britsh governor lord elgin on the dated 22th june 1897 for his educationist views and intellectualities.He was a true scholar and patriot and had a deep vision to education for all classes. He got constructed two palatial building in neotani which are still intact and loan reminder of his love to native place. His grandsons are still living in nyotini.
 
MAULANA HASRAT MOHANI (born 1881 at Mohan, Unnao)
Was a freedom fighter and Urdu Poet. After his graduation in 1903, inspired by Rao Ram Bux Singh, he threw himself into the freedom struggle. He took up the Editing of the newspaper 'Urdu-A-Muallah' in 1913 and continued his struggle through his articles. As a consequence he was kept in imprisonment from 1914 to 1918 but he continued his writing work in jail. He was nominated the member of the State Assembly in 1946. On 15th May 1951, this patriot breathed his last at Lucknow and left a void which is difficult to fill.                                                                                                       
 
CHANDRA SHEKHAR AZAD
A great freedom fighter and revolutionary, he belonged to village Badarqa where his parental house still exists. He had vowed that he would not be caught alive by British forces. On 27th Feb. 1931, he was rounded up by British forces at Alfred Park Allahabad. When he realised that it would not be possible for him to escape, he shot himself by his Mauser pistol and fulfilled his vow. February 27th. The significance of this date lies in the fact that today in the year 1931 a valiant patriot by the name of Chandrashekhar Azad attained martyrdom while fighting the British so that we Indians could rejoice in freedom. He joined Gandhi’s Non-Cooperation Movement but the violence perpetrated by the British infuriated him to such an extent that he turned a revolutionary. He joined the Hindustan Socialist Republican Association (HSRA) as a freedom fighter and later became its leader.Azad was involved in the Kakori train robbery, the Central Legislative Assembly bomb incident, the Delhi conspiracy and the shooting of British Police Superintendent Saunders at Lahore (1928) to avenge the killing of Lala Lajpat Rai. On February 27, 1931 he shot himself dead while bravely fighting the British. He was betrayed by an Indian. He lived upto his self-pride in not surrendering and in not succumbing to the enemy’s bullets. His fearlessness is signified by the fact that he continued fighting an army of British soldiers for several hours before sacrificing his own life when there was no way out, thus setting a rare example of courage and devotion to the country. He was truly a One-Man Army. The question that we all need to ask ourselves today is whether or not we are protecting the freedom that is soaked with the blood of revolutionaries like Chandrashekhar Azad, Bhagat Singh, Rajguru, Sukhdev and the list goes on an on. How easily do we take this independence for granted and become happily oblivious to the fact that we would still have been slaves had it not been for brave young men like Azad. It is different that we are still besieged by evils like poverty, population, prostitution etc.
 
VISHAMBHAR DAYAL TRIPATHI (5.10.1899 - 18.11.1959)
Born at Bangarmau, Unnao , he was a great man in all aspects of life. He was a brilliant scholar, being a Gold Medallist from Banaras Hindu University. His enormous sacrifices for the country can be compared with any great leader or freedom fighter of the Nation. He was a close associate of Subash Chandra Bose
He was several times sent to jail during the freedom struggle.He was jailed for 6 months during the 'Namak Satyagrah Aandolan' in 1930. He was fined Rs. 450 and sent to jail for 4 months in 1931 in connection with the 'Pipri Kand'.He was again jailed for 6 months for his participation in 'Lagan bandi Aandolan' in 1932.He was jailed for 6 months in 1933 during the 'Savinay Awagya Aandolan'.He was jailed from 1942 - 1945 during the 'Krips Mission'.
He was-
The Chairman of the Committee which was sent to Andman Nicobar to assess the possibility of development over there.
The Chairman of the Zamindari Abolition Committee.
The Chairman of the recognition Committee of High School & Intermediate Board U.P.
The founder of D.S.N. College, Unnao and opened many other educational institutions in the District.
In 1946 Vishambhar Dayal Tripathi was elected to the Legislative Assembly and was the Member of Parliament from 1952 to 1959 till his death (18th Nov.1959)
 
Padma Vibhushan Pt. UMA SHANKER DIXIT
Born on 12th January 1901 at village Ugu of Unnao district, he got his education from Kanpur. Since his student life he joined the freedom movement and was the Secretary of the District Congress Committee Kanpur during the period when Sh. Ganesh SDhanker Vidyarthi was the President of the Committee.

 He served the Country as the Home Minister, Health Minister and Governor of Karnatak & West Bengal. He also served as treasurer of All India Congress Committee, and Managing Director of Associated Journals at Lucknow. He founded a Girls Intermediate College at his village Ugu in the memory of his mother.
 
Pt. DWARIKA PRASAD MISRA
A great freedom fighter & diplomat, he belonged to village Padari in Unnao. As a poet he composed Mahakavya- 'Krishnair'. He became the Chief Minister of M.P. after Ravi Shanker Shukla.
 
SURYA KANT TRIPATHI 'NIRALA' (21.2.1897 - 15.10.1961)
'Nirala', a 'Chhayawadi' Poet, was born in Madinipur district of West Bengal. Thereon he shifted to Lucknow and then to Village Gadhakola of District Unnao, to which his father originally belonged.
He was well versed in Hindi, Bangla, English & Sanskrit and was greatly inspired by Ram Krishna Paramhans, Swami Vivekanand & Ravindra Nath Tagore. His wrote strongly against social injustice & exploitation in the society. It will not be wrong to say that he was well ahead of his time in his work.
There is a Park(Nirala Uddyan), an Auditorium (Nirala Prekshagrah) and a Degree College (Mahapran Nirala Degree College) in the district after his name.
'Janmbhumi', 'Parimal', 'Geetika', 'Anamika' , 'Tulsidas', 'Kukurmutta', 'Adima', 'Bela', 'Nai Pattey', 'Archana', 'Aradhana', 'Geet Gunj', 'Sandya Kakli' ( All Poetry)
'Apsara', 'Alka', 'Prabhawati', 'Nirupama', 'Kulli Bhat', 'Billesur Bakriha', 'Choti ki Pakar', 'Kale Karname' (All Novels)
'Lily', 'Sakhi', 'Sukul ki Bibi', 'Devi', 'Chaturi Chamaar' (All Story books)
'Bangbhasha ka Uchcharan', 'Ravindra-Kavita-Kannan', 'Prabandh-Padya', 'Prabandh-Pratima', 'Chabuk', 'Chayan', 'Sangrah' (All Essays)
'Mahabharat' (Epic Katha)
'Anand Math', 'Vish-Vriksh', 'Krishna kant ka Vil', 'Kapal Kundala', 'Durgesh Nandini', 'Raj Singh', 'Raj Rani', 'Devi Chaudharani', 'Yuglanguliya', 'Chandrasekhar', 'Rajni', 'Sri Ramkrishna Vachnamrit','Bhatrat Main Vivekanand', 'Rajyog' (All Translations)
 
BHAGWATI CHARAN VERMA (30.8.1903 - 5.10.1980)
A great writer,Born at Safipur, Unnao, Was Hindi Advisor at Akashwani, Lucknow in 1950
He was the member of Rajya Sabha in 1978
 Awards 'Sahitya Akademy Award' in 1961 for his book 'Bhule Bisre Chitra'.
'Sahitya Vachaspati Upadhi' in 1969
'Padma Bhushan' in 1971.
 Publication 'Bhule Bisre Chitra'
'Chitralekha' (The Film 'Chitrlekha' was based on this novel.)
'Prashan Aur Marichika'
'Chanakaya'
'Seedhi Sachchi Baten'
 
NAND DULARE BAJPAYEE (27.8.1906 - 21.8.1967)
Born at Magrayer, Unnao, was a famous Critic.Was Vice Chancellor at Vikram University, Ujjain.
Was Editor of :-'Bharat' during 1930-33 'Soor Sagar' during 1933-36'Ram Charit Manas' during 1937-39
Was Head of Hindi Deptt. at Kashi Hindu Vishwavidhalaya from 1941-1947.
Publication  'Hindi Sahitya' 'Biiswin Shatabdi'  Aadhunik Sahitya' 'Naya Sahitya Naye Prashna' 'Kavi Nirala''Kavi Prasad''Maha Kavi Tulsidas'                                                                     Top
 
RAM VILAS SHARMA (born 10.10.1912 at Unchagaon Sani, Unnao)
Hindi Scholar, MA English Literature, PhD.
Retd.Prof.& Head Dept. of English, Balwant Rajput College,Agra
Former Director K.M.Munshi Hindi Vidyapeeth, Agra
Former Gen.Secy. 'Akhil Bhartiya Pragatisheel Lekhak Sangh' (1949-53)
Editor of 'Samalochak' (1958-89)
 Awards      Reciepient of 'Sahitya Akademy Award' in 1970.
'Vyas Samman' from K.K. Birla Foundation in 1991.
'Bharat Bharti Samman' from U.P. Govt.
'Shalaka Samman' from Hindi Academy, Delhi
& and many other awards.
But as a noble gesture he refused the prize money of many awards with a request that it may be utilised in the promotion of literacy.
Publications    More than 30 Hindi Publications.
'Prem Chand Aur Unka Yug' in 1952. 'Pragatisheel Sahitya Ki Samasyayen' in 1955
'Nirala Ki Sahitya Sadhana' ( 3 Vol.) during 1969-76
'Acharya Ram Chand Shukla Aur Hindi Aalochana' in 1973
'Bharat Mein Angareji Raj Aur Marxvad' in 1982
'Roop Tarang Aur Pragatisheel Kavita Ki Vaycharik Prishthbhoomi' in 1990
'Bhartiya Sahitya Ki Bhoomika in 1996.
'Itihas Darshan' in 1997.
(The above are all critics & history of literature.)
'Pragati Aur Parampara' in 1953
'Aastha Aur Saundarya' in 1960
'Bhasha Aur Samaj' in 1961
'Bharat Ki Prachin Bhasha Parivar Aur Hindi' in 1979
(The above are all essays)
'Apni Dharti Apne Log' (Autobiography : 3 Vol.) in 1996
'Swadhinta Sangram - Badelte Pariprekshya' in 1992.
 
SHIV MANGAL SINGH SUMAN (born 5.8.1915 at Jhagarpur, Unnao)
Hindi Poet, M.A.,PhD in Hindi (both from B.H.U.)
Presently Exec. President Kalidas Academy, Ujjain.
Career    V.C., Vikram University, Ujjain during 1968-78.
Vice-President U.P. Hindi Sansthan, Lucknow , Press & Cultural Attache, Indian Embassy, Kathmandu Nepal during 1956-61
President, Association of Indian Universities, New Delhi during 1977-78
Visited Nairobi (Kenya), Mauritius, Nepal, Afganistan, erstwhile USSR, France, England, Mangolia, Australia and Several other Countries.
Awards  'Deva Puraskar' in 1958   'Soviet Land Nehru Award' in 1974  'Sahitya Akademy Award' in       1974'Shikhar Samman' in 1993 from M.P. Govt.'Bharat Bharti' Award in 1993 and several others.
Hons.    Conferred 'Padam Shri' by the Govt. of India in 1974
               D.Litt. by Bhagalpur University in 1973 & by Jabalpur University in 1983.
Publications 'Hillol' in 1939 'Jeevan ke Gaan' in 1942 'Yug ka Mol' in 1945
'Pralay Srajan' in 1950 'Vishwas Badalta hi Gaya' in 1948 'Vidhya Himalaya' in 1960
'Mitti Ki Baarat' in 1972'Vani ki Vyatha' in 1980'Kate Anguthon ki Vandanvaren' in 1991
The above are all Poetry.
'Mahadevi ki Kavya Sadhana' in 1951'Geeti Kavya : Udyam Aur Vikas' 1995' (Both Critic)
'Prakriti Purush Kalidas' in 1961 (Play)
 
BHUPENDRA NATH SHUKLA (born 16.5.1918 at Hafizabad , Unnao)
Hindi Writer, BA,LLB
Participated in 1942 movement and imprisoned.
Former Secretary & President, City Congress Committee, Unnao
Member UP Congress Committee for 20 years.
Former President Bar Association, Unnao & Trustee of a number of Educational and social organisations.
Former President Zila Parishad Unnao.
Founder Member of V.D.Tripathi Hindi Vidyapeeth Unnao.
Awards Reciepient of 'Bhartendu Harishchandra Award' for Drama.(thrice)
'Sahitya Bhushan Award' by U.P. Hindi Sansthan. 'Sahitya Manishi Award' by Nirala Mahavidyalaya Unnao.'Sahityashree', 'Nirala Samman', 'Naveen Samman'.
Publications  'Brah Ke Geet' in 1943  'Killol', in 1988, 'Madhvi' in1986 (both Poetry)
'Gaon ka Aadmi' in 1988, 'Dhanpati' 1989, 'Shripati', 1991 (all novels)'Yug Seemayen' in 1987,  'Pryambada' 1991, 'Shaktibodh' 1988 (all plays)'Yug Nirmata Nehru' in 1989 (Biography)
'Bahadur Shah Zafar' in 1981 'Valley of Death' (an English Novel based on Ayodhya) in 1994
'Vaidehi Parinaya', Yugantar''Lashon Ka Maqbara' (a Hindi Novel based on Ayodhya) in 1991
'Siyaar Daroga' (Short story for children) in 1994
 
MAIRAJ ZAIDI (born 22.11.1949 at Chaudhrana, Unnao)
Stage Plays  'Agra Baazar' directed by Habib Tanveer (68 shows ).
'Charan Das Choor' directed by Habib Tanveer (8 shows).
Contribution : He acted in these Plays.
'Curfew' adopted from Novel 'Shahar Mein Curfew' written by Vibhuti Narain Rao 'Tamacha'
'Raj Darshan'
Contribution : Direction, Screen Play, Acting & Dialogue Writing.
T.V. Serials :'Raja Ka Baaja' directed by Sayeed Mirza (27 episodes have been telecast on DD-I)
'Farz' : Nimbus Productions (17 episodes.)'Chamatkaar' directed by Partho Ghosh. (6 episodes)
'Rishtey' (Telecast on Sony) Contribution: Dialogue Writing.
'Ghadar - 1857' based on The First war of Independence directed by Sanjay Khan.
Contribution: Research Story, Screen Play & Dialogue Writing.
Documentary Films'Pehli Baar' directed by Sayeed Mirza (Telecast on Bhopal Doordarshan)
Contribution: Dialogue Writing.
 
Pd. PRATAP NARAIN MISHRA ( 1856 - 1894 )
Born at Baijegaon, Unnao, a renowned Poet and Writer of 'Bhartendu Mandal', he has more that 50 books under his name. He was the editor of 'Brahmin', a mothly magazine. All his publications have been compiled into 'Pratap Narain Mishra Granthawali' by 'Nagri Pracharini Sabha', Kashi. He was well versed in Sanskrit, Urdu, Farsi, English and Bangla. He was a humourous person and had a lifestyle of his own. Publications :'Prem Pushpawali', 'Man ki Lehar', 'Trapyantaam', 'Vraidla-swagat', 'Shaiv Sarwasva', 'Kavita Lehari' 'Hathi Hameer', 'Kali Kautuk', 'Bharat-Durdasha' (All Plays)
 
JAGDAMBIKA Pd. MISHRA 'Hitaishi' ( 1895 - 1956 )
'Shahidon ki chitaon par judenge har baras mele.'
'Watan par marne walon ka yahi baki nishan hoga..'

Above are the popular lines of his poem 'Matra Geeta' which was banned by the British Government.
Born at Ganj Moradabad, Unnao he was popular for applying 'Savaiya - Chhand' in 'Khari boli' for which he got appreciation from great personalities of his time namely Acharya Mahavir Pd. Dwivedi and Acharya Ram Chandra Shulka. He had a strong hold of Sanskrit, Bangla and Farsi.
Publications: 'Kallolini' 'Matra Geeta' 'Baikali' 'Darshana'
 
RAMAI KAKA ( 2.2.1915 - 18.4.1982 )
Born at Rawatpur village of Unnao in a ordinary agriculturist family, Ramai Kaka was a Comedy Poet and an Artist. After passing his matriculation, he worked as Inspector in Planning department. Due to his illness he took early retirement from service in 1938. He was offered to perform on 'Aakashvani' in 1940. His performance as an actor in the programme 'Bahire Baba' on Aakashvani Lucknow earned his great fame. His programmes were also broadcasted on BBC London. During his 35 years of service in Aakashvani, he wrote Plays, comedy plays, 'Nautanki', and a number of Poems. He was a simple person who held high moral standards
Publications: 'Bauchhar''Bhinsar''Netaji''Fuhar''Harpati Tarwar''Gulchharra'
'Hasya ke chhente' 'Mati ke bol'
Awards: He was honoured with a special award of Rs.5000/- by 'Rajya Hindi Sansthan' for his contribution to Hindi literature.
 
Suhail Zaidi (born 31.12.1974 at Chaudhrana, Unnao)
Born at Chaudhrana, Unnao in a Talukedar family, a simple person who held high moral standards.
Producer, Project Head & Executive Producer.
T.V. Serials As Project Head
Jhansi Ki Rani” ( ZEE tv)
Chand Ke Paar Chalo” ( NDTV Imagine)
Kumkum” ( Star Plus)
T.V. Serials As Producer 
'Maryada' (395 episodes have been telecast on DD-I)
'Talaash' : (52 episodes have been telecast on DD-1.)
'Hairat' (13 episodes have been telecast on DD-1)
T.V. Serials As Executive Producer
“Zameer” (52 episodes have been telecast on DD-1)
“Safar” ( 39 episodes have been telecast on DD-1)
Production:   “Aaj Tak News” (India Today Group)
“Metro Club” (a daily youth magazine have been telecast on DD-2)