• Web Design
  • UX
  • Development
  • Others
    • Softwares
    • Operating System
  • About

Help Me Code

Improve Programming Skills and User Experience

Development

Posts related to programming in Java/PHP and related frameworks and problems faced while developing applications/websites.

How to show time in client/browser timezone in ADF

January 23, 2015 by Ankur Gupta Leave a Comment

We can get the client timezone using javascript. First we can get the time offset from client browser, and set it in a cookie. Than we will access that cookie in our java code, and get the timezone based on that offset. We will use this timezone in trininad-config.xml trininad-config.xml settings for getting timezone Than … [Read more…]

Posted in: Development Tagged: ADF, Java

Category Navigation Links in Magento

September 18, 2011 by Avinash Singhal Leave a Comment

Sometimes new Megento users keep wondering how to add Category Navigation Links/Tree on the homepage. For this you have to add atleast one subcategory in “default root category” Select Catalog->Manage Categories Click on “default category” Select Add Subcategory button on top Make sure to select “Yes” for isActive and “Include in Navigation Menu”

Posted in: Development Tagged: ecommerce, magento

Php: Fatal error: Allowed memory size of 134217728 bytes exhausted

September 12, 2011 by Avinash Singhal Leave a Comment

You might notice these errors often if you are working with large size objects:- Fatal error: Allowed memory size of 33554432 bytes exhausted Fatal error: Allowed memory size of 134217728 bytes exhausted You can try to increase the memory_limit by adding this statement in your php.ini file:- ini_set(“memory_limit”, “256M”); However you can still get the … [Read more…]

Posted in: Development Tagged: memory leak, memory_limit, php, php.ini

Php: Fatal error: Call to undefined function mb_detect_encoding()

September 12, 2011 by Avinash Singhal 1 Comment

To Fix this error you most probably have to install mbstring extension for php. From your server command line as root: yum install php-mbstring And restart apache: service httpd restart Things should be fine then, if it still does not work then you might need to enable mbstring extension in your php.ini file(generally found in … [Read more…]

Posted in: Development Tagged: mbstring, mb_detect_encoding, php

PHP Warning: preg_match_all(): Compilation failed: unrecognized character after (?< at offset

September 6, 2011 by Avinash Singhal 1 Comment

While using preg_match_all function in php, i came across this issue of Compilation Failed. On executing preg_match_all(‘/<div>(?<product>.*)</li>/sU’, $body, $matches) I got the following error: PHP Warning:  preg_match_all(): Compilation failed: unrecognized character after (?< at offset 32 in … This is probably you are having old version of pcre (for me it was 6.6-6) which needs … [Read more…]

Posted in: Development Tagged: pcre, php, preg_match

PHP: Double quotes vs Single quotes

August 30, 2011 by Avinash Singhal Leave a Comment

A famous interview question for php:- What to use to initialize a string in php ? Single quotes(‘) or Double quotes(“) ? You should know the difference between these two, for e.g. $website = “http://www.ankurgupta.com/blog”; $doubleQuoteStr = “I love $website”; $singleQuoteStr = ‘I love $website’; echo $doubleQuoteStr; echo $singleQuoteStr; Output to above php script will … [Read more…]

Posted in: Development Tagged: php

Nice FreeMarker (FTL) Editor for Eclipse

June 6, 2011 by Ankur Gupta 2 Comments

If you are working on a java project, and are using freemarker template language (FTL) for front end, you would have noticed the default editor doesn’t show any ftl tags in different colors, or autocomplete them. If you are looking for a good editor for eclipse with FTL support, JBoss Tools may be of some … [Read more…]

Posted in: Development Tagged: editors, freemarker, tools

Using FreeMarker (FTL) – JspTaglib not working with struts?

June 6, 2011 by Ankur Gupta 1 Comment

I was trying to use free marker template language with struts. I was using struts 2.2.3 version, FTL was working fine when i was not using any assignment directive to use struts tags lib. But when i added the following line to my FTL file <#assign s=JspTaglibs[“/WEB-INF/struts-tags.tld”]> i got the exception ClassNotFoundException: org.apache.struts2.views.jsp.ui.AutocompleterTag When i … [Read more…]

Posted in: Development Tagged: freemarker, struts2

OutOfMemoryError: PermGen space problem [Maven Build]

April 27, 2011 by Ankur Gupta 3 Comments

I was trying to build a project using maven. In middle of the build i got this error java.lang.OutOfMemoryError: PermGen space   To solve this problem, just set your maven_opts to raise the memory for this process. for e.g. export MAVEN_OPTS=”-Xmx512M -XX:MaxPermSize=512M” and the problem will be solved. 🙂

Posted in: Development Tagged: maven

Configure Apache Server for SSI (Server Side Include) – .shtml files

May 28, 2010 by Ankur Gupta Leave a Comment

Edit the httpd.conf file residing in <Apache Installation location>/conf folder, and add a directive for SSI include. Add the code below in httpd.conf file with correct directory path <Directory C:Apache2.2htdocsinclude> Options +Includes AddType text/html .shtml AddHandler server-parsed .shtml </Directory> All files in the C:Apache2.2htdocsinclude directory that contain a .shtml extension get parsed by Apache before … [Read more…]

Posted in: Development Tagged: apache2
1 2 Next »

Popular Topics

  • Poker Hands Ranking Order
  • Expression Language Not Working In JSP - Solution
  • PHP Warning: preg_match_all(): Compilation failed: unrecognized character after (?< at offset

Recent Posts

  • How to show time in client/browser timezone in ADF
  • What are Pseudo Class Selectors?
  • text-decoration – CSS Property
  • text-align – CSS Property
  • float – CSS Property

Copyright © 2022 Help Me Code.

Omega WordPress Theme by ThemeHall