TO THE NEW Blog PAGES

AngularJSFront End Development

AngularJS : Getting started with Directives

In this post we will go through an important aspect of AngularJS i.e., Directives. Directives helps us do things in a better and cleaner way. Lets get into the code rather going into theoretical explanations, which will make it more clear what actually directives do. We have written a simple directive below which shows some HTML when […]

Grails

Using Ftp with Grails

In one of my Grails project I need to drop files over ftp server. Using JSch one can easily transfer files over sftp. Just follow the below steps. 1. Add the below dependency to Grails project “grails-app/conf/BuildConfig.groovy” file [sourcecode language=”groovy”] dependencies { compile ‘com.jcraft:jsch:0.1.49’ } [/sourcecode] 2. Create a class for adding ftp credentials information. e.g. “FtpCredentail” […]

Technology

How to Determine Average in MongoDB

MongoDB provides several ways of computing the average value of a group in a collection. One of the simplest ways of determining average is using the method db.collection.group(). The method db.collection.group() bunches the documents of a collection on the basis of the keys mentioned and executes aggregation functions on them. This method can be used […]

Grails

Groovy: Ways to represent String

Compared to Java we have a lot of  ways to represent strings : GString, single quote, double quotes, slashy and dollar slashy.   1.GString: A GString is just like a normal String, except that it evaluates expression that are embedded with in string in the form ${..}. [java] String demo="Brother" String doubleQuotes= "Hello ${demo}" println […]

Technology

Magento Sending Custom Email

By default magento sends emails on its certain events like customer registration, order creation etc. Also you can customize or change these email templates from admin > System > Transaction Email. What if you want add your own custom email template or if you want to add email feature in your custom module. This blog […]

amatya
amatya
Read

Technology

Enabling SSL for particular page in magento

To enable SSL for particular page in magento first open .htaccess file of your magento and include following code in it. [php] RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^your-page-url/?$ https://%{HTTP_HOST}/your-page-url [R,L] [/php] Now flush the cache and check. Regards, Amatya Trivedi amatya@intelligrape.com

amatya
amatya
Read

Technology

Shell script to control the brightness of display

The problem I was facing for sometime is setting brightness of my laptop that is running Ubuntu 12.10. Unfortunately this function is not  available in my laptop. So I started my investigation to get this functionality. Then I found the xrandr command. A similar is xbacklight command, but it’s not of much use. xrandr is […]

Grails

Groovy : tokenize() vs split()

In the Wild West of text manipulation, Groovy offers two gunslingers for splitting strings: tokenize() and split(). They might seem like two sides of the same coin, but choosing the right one can make your code smoother than a well-oiled six-shooter. Below are some of the significant differences between both tokenize() and split() Feature  tokenize()  […]

Vivek Garg
Vivek Garg
Read

AngularJSFront End Development

AngularJS: Sharing Data between two controllers through a service

The topic of this post is quite confusing for many developers as they face problems in identifying the best practice to share data between controllers in AngularJS. Some of the articles out there tell to use $rootScope but that’s not the correct approach to enable this functionality. A more cleaner and better way of doing so is […]

Technology

Magento Product Types

Product Types Magento CE offers a variety of product types Simple Products Grouped Product Configurable Product Virtual Product Bundle Product Downloadable Product Simple Product -As the name suggests,It is the most basic product type and it is suitable for all kinds of products for instance toys,DVDs etc Grouped Product – This product type is used […]

Technology

How to add dropdown attribute for category in magento

Adding attributes from admin is simple in magento. But this feature is only for products. Some times there is requirement to add custom attribute for category to customize magento. Following is the code to add dropdown attribute for category. [php] <?php $setup = new Mage_Eav_Model_Entity_Setup(‘core_setup’); $setup->addAttribute(‘catalog_category’, ‘category_color’, array( ‘group’ => ‘General’, ‘input’ => ‘select’, ‘type’ […]

amatya
amatya
Read

Technology

Magento date time picker in front end form

Some times there is requirement of date time picker in your frontend form. Mostly for this developers usually use jQuery. But it is not a right way to do this. Magento do have date time picker library which is for admin form only. But with some customization we can use it in our frontend form […]

shahid
shahid
Read