loading menu...
September 4, 2015

Ubuntu – “node: No such file or directory” error on using express-generator

Issue: After you install express-generator on your Ubuntu machine and try to run it like express -h You may encounter an error saying "/usr/bin/env: node: No such file or directory" Solution: The issue is that the Node executable for Ubuntu is […]
May 28, 2013

PHP PHAR Package

The phar extension is used to put entire PHP applications into a single file called a "phar" (PHP Archive) for easy distribution and installation. It provides the means for distributing code as a single archive, that does not have to […]
November 28, 2012

Toggle WiFi Method in Android

First you need to have user permissions to access WiFi state and change it. To do so add following XML nodes in your app’s Manifest XML file under root node. <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission> Next we need to […]
November 28, 2012

Verify HTTP URL with PHP

Developers often require verifying the URLs of external sites in various situations like for Affiliate Program, Link Building and many more. We can create a simple function named verifyURL()  which accepts the URL as string parameter and return Boolean if […]
April 23, 2012

Code to make android phone silent

You can use the setRingerMode() method of AudioManager class.  AudioManager audiomanage = (AudioManager)getSystemService(Context.AUDIO_SERVICE); audiomanage.setRingerMode(AudioManager.RINGER_MODE_SILENT);  The value that you pass to the method should be one of RINGER_MODE_NORMAL, RINGER_MODE_SILENT, or RINGER_MODE_VIBRATE Also note that you have to add following permission to […]
November 18, 2011

Protect Magento Product Images from getting Stolen

It is good that magneto offers watermarking for securing the catalog/product images but this security is not sufficient for advance internet users. Suppose, following is the link for your watermarked image http://www.yourwebsite.com/media/catalog/product/cache/1/image/de684549e4151748e56ee0dd7902c19f/m/y/my-first-image.jpg But if anyone removes the cache/1/image/de684549e4151748e56ee0dd7902c19f part of […]
May 15, 2011

Upgrade Redmine

Login to your server using putty Go to RubyForge and copy the URL of Redmine version you want to upgrade to. Download it to your server using wget command. Go to Redmine Site to check the requirements. Make sure you […]
May 12, 2011

Constructor Overloading in PHP

There is no simple method of overloading constructors in PHP. There are few workarounds to achieve this. I use the following technique. class UserIdentity extends CUserIdentity { public function __construct() { $arg_list = func_get_args(); switch(func_num_args()) { case 1: // calling […]
April 26, 2011

Yii’s default validator Aliases

Below is the complete list of predefined validator aliases: boolean: alias of CBooleanValidator, ensuring the attribute has a value that is either CBooleanValidator::trueValue or CBooleanValidator::falseValue. captcha: alias of CCaptchaValidator, ensuring the attribute is equal to the verification code displayed in […]
February 14, 2011

Installing Self-Signed SSL Certificate on WAMP Server

 Part I: Creating SSL Certificate 1- download windows executable file for openssl from http://slproweb.com/products/Win32OpenSSL.html and install it 2- open cmd window  3- cd to [openssl installation directory]/bin e.g if your installation directory is C:Program FilesOpenSSl, then cd to C:Program FilesOpenSSlbin 3- type […]
February 7, 2011

Customize CKEditor

 To add a new font in CKEditor’s font drop down list, add the following lines of code in your config.js   CKEDITOR.editorConfig = function( config ) { config.font_names ="Futura;" + config.font_names; }; CKEDITOR.on( 'instanceCreated', function( e ){ e.editor.addCss("@font-face{font-family:'Futura'; src:url('http://www.your-url.com/font/Futura_Medium.ttf');" ); […]
November 28, 2010

iFrame in jQuery UI Dialog

To display iFrame in jQuery UI Dialog, use the following code. <html> <head> <link rel="stylesheet" href="./styles/smoothness/jquery-ui-1.7.2.custom.css" type="text/css" media="screen" /> <script type="text/javascript" src="./scripts/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="./scripts/jquery-ui-1.7.2.custom.min.js"></script> <script type="text/javascript"> $(function() { $('a').click(function(e) { e.preventDefault(); var $this = $(this); var horizontalPadding = 30; […]
October 6, 2010

Upload and resize image using YII

Download and extract this file in protected/extensions directory.   In config/main.php file, add the following element to components array  'image'=>array( 'class'=>'application.extensions.image.CImageComponent', 'driver'=>'GD', )   Now in action, insert the following code and modify paths $model->Picture = CUploadedFile::getInstance($model,'Picture'); if( is_object($model->Picture) ) […]
October 4, 2010

Ajax button in CGridView

To add an ajax button to CGridView modify the buttons column  as   'columns' => array( 'id', 'name', array( 'class'=>'CButtonColumn', 'template' => '{view} {update} {delete}', 'buttons'=>array( 'view' => array( 'url'=>'"index.php?r=admin/view&id=".$data->user_id."&m=users"', 'click' => "function (){ $('#viewTab').load($(this).attr('href'));return false; }" ) ), ), […]
October 4, 2010

Display loading div when executing ajax requests

In html add the following div right before closing body tag <div class="ajax-loading"><div></div></div>   Add the following CSS code to stylesheet. (Download loading-bgr.gif and loading.gif) div.ajax-loading{ position: fixed; top: 0; left: 0; height:100%; width:100%; z-index: 9999999; background-image: url('../../images/loading-bgr.gif'); opacity: 0.7; […]
September 27, 2010

Exception with Twitter Library "twitter-async" when hosted on Media Temple

Issue: Twitter Library developed by "Jaisen Mathai" throws an exception when uploaded on Media Temple Servers. EpiOAuthException::raise(Object(EpiCurlManager), false) #1 /nfs/c07/h03/mnt/12345/domains/abcde.com/html/protected/components/twitter/EpiOAuth.php(367): EpiOAuthResponse->__get('_resp')  
September 21, 2010

Installing Zend 5 on Windows 7

Here’s how I installed it, taken from zend forums (http://www.zend.com/forums/index.php?t=msg&th=7855). This worked for me in Windows 7. Modify the paths below as needed for your installation of Windows 7. Download and install the latest JRE for Windows: http://java.com/en/download/manual.jsp Download and […]

  • Cost Efficient Solutions.
  • Minimal Timelines.
  • Effective Communication.
  • High Quality Standards.
  • Lifetime Support.
  • Transparent Execution.
  • 24/7 Availability.
  • Scalable Teams.

Join Our 200+ Happy Clients Accross Globe


Free Consultation.

    Do you need help in strategy, innovation or growth of your startup/business? Experts from our team will get in touch with you.

    Configuration error when starting up NSU
    This website uses cookies to provide necessary website functionality, improve your experience and analyze our traffic. By using our website, you agree to our Privacy Policy and our cookies usage.
    More About Privacy