A day to think like a Sri Lankan and act like a Sri Lankan despite the race, religion and colour of you and me. This time we celebrate our independence with pride after defeating the LTTE on last year. LTTE was at that time an internationally organized terrorism outfit and Sri Lanka is the first and the only nation who was able to defeat such a strong separatist terrorist organization through a war.
Evidence from the history shows division among Sri Lankans have always brought bad consequences to the country. So let’s remember the lessons learned and play our role to build our motherland.
May our nation be blessed by the Noble Triple Gem.
Yesterday I was struggling a bit to install ASIO4ALL driver to my laptop Pavilion dv6 with Windows Vista Home premium installed.
Note on ASIO: ASIO Is a sound card driver which is used for processing sound through PC software while removing the low-latency of standard drivers and improving reliability for professional sound processing. ASIO4All is a generic driver which can be used with soundcards which does not have the native ASIO driver.
Installing is very easy as all you have to do is run the setup file. After installing you have to select the ASIO driver from the audio settings panel of your software.
No sound after selecting ASIO4All
There are couple of things to check.
From the advance panel select only the relevant device and the interface and disable the others. In my case I have disabled the "High Definition Audio Device" and enabled the IDT High Definition Audio CODEC and MuxedIn1 and Speaker1 interfaces.
Also the bit depth of the input and output interfaces should be set to 16bits. This can be done from Control Panel>Sound> and selecting Properties of the Interface and choosing the Advance tab.
Today I tried to do a small research to try and find out what language is best when it comes to web development and tools that supports it. I tried to compare the three most used languages for web frameworks namely PHP, Java and Ruby. All the details collected here are from my colleagues and not from a firm source. So if there is any mistake please feel free to highlight.
The comparison was split between following items.
1/ Speed 2/ Debugging (and profiling) 3/ IDEs and Tools 3/ Testing (Unit, functional, performance) 4/ Logging and Log file maintenance 5/ Security 6/ Application integration (Integrate legacy systems and ERP systems).
Speed component depends on what you really do and the actual framework you are using. But in general when the number of requests are low to medium PHP > Java > Ruby. When the number of requests are high Java > Ruby > PHP is the case.
Tools that supports Debugging. PHP - PHPEd, Expert Debugger Java - Any IDE, JMeter, JProfiler Ruby - ruby-debug,ruby-prof(Profiler)
List of popular IDEs for each language. PHP - PHPEd, PHP Designer, Zend Studio Professional, PHP Expert Editor Java - Eclips, JIdea, JBuilder (Note: JIdea is best) Ruby - Aptana RadRails http://www.radrails.org/, TextMate, Steel IDE (http://www.sapphiresteel.com/). NetBeans, JIdea Ruby plugin, CodeGear's 3rdRail (Note: NetBeans free and the best so far)
The security features of Java is unmatched when compared with PHP or Ruby or any other language. Actually Java was born with security. Starting from its Strong data typing, Automatic memory management, Bytecode verification, Secure class loading Java exposed a new dimension to the world of security.
When it comes to logging and application integration also Java leads the other languages for its versatility, available tools and frameworks.
Now the issue is if Java is such strong what is the catch. Why people use PHP for most of the sites. One reason is the cost. You need a dedicated server to host a Java site most of the time. Next you need a skilled staff from development to network administration to handle a heavy wait Java application server.Because of the above reasons PHP would be a better option to run small to moderate sites.
The main reason for porting the existing portal to Liferay was, to use the CMS capabilities it provides. On the evaluation on what CMS to use we found a hand full of Java Portal/CMS systems. Although the framework of each of them were attractive they lacked good portlets or plugins which can be used out of the box. Liferay on the other hand has many plugins available already. It has a Forum, Blog, RSS/Atom Module, A fine HTML templating module and a couple of simple frame works to write CRUD applications which were critical for our requirements.
The site we implemented had three full fledged ecommerce applications, landing sites for several affiliate products, promotion pages, forums, blogs, newsletters, testimonials, press releases and articles. There was a magazine and advertising campaign application that was meant to be used by the readers of the company magazine. This application had a poll, a survey, a competition and couple of other options aimed for the campaign.
From the side of implementation we used an agile development approach and our development team had 11 members. The time span for this project was only 2 months and the site had around 80 pages both dynamic and static. Although this was a tough deadline we had to accept it as the management already scheduled advertising campaigns that follows the delivery of the site.
Since the complexity of the user interface designs and for the flexibility we agreed not to use portlets for implementing the ecommerce modules. The architecture was to use AJAX/JSON to integrate functionality and keep the pages generating from the Liferay CMS.
Today we got a reward for completing the project on time with a lot of appreciation from our management. Being the project manager Im so pleased and like to thank the whole team for their dedication and hard work. Cheers Guys. Also now we are fully convinced that Liferay Portal is a better Java based CMS (or a WCM - Web content Management System) among the Java CMS family.
If you like to have a look on the site visit this link >>>Link Removed !<<<
The content in /var/www/html/ will not be served by appache.
RewriteRule is the way to solve this.
DocumentRoot /var/www/html/
RewriteEngine on rewriterule ^/blog - [L] rewriterule ^/(.*) ajp://10.231.40.6:8009/$1 [P,L]
When the configuration is changed as shown in the above example the content in the folder /var/www/html/blog will be accessible with a URL like http://domain/blog
I was working with the announcement portlet and wanted to make it a portlet plugin rather than editing it in the liferay ext environment. Initially I only wanted to change the appearance of it. For this while coping the jsp files and other required file to a newly created directories I have added the following jar files too. After few tries I got it to work.
When I tried to add my own set of tables using the service builder and deployed the portlet the server started to spit the following error.
Caused by: org.springframework.beans.factory.BeanCreationException: Error creati ng bean with name 'liferayTransactionManager' defined in ServletContext resource [/WEB-INF/classes/META-INF/hibernate-spring.xml]: Initialization of bean failed ; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.liferay.portal.spring.hibernate.PortletHibe rnateConfiguration] to required type [org.hibernate.SessionFactory] for property 'sessionFactory'; nested exception is java.lang.IllegalArgumentException: Canno t convert value of type [com.liferay.portal.spring.hibernate.PortletHibernateCon figuration] to required type [org.hibernate.SessionFactory] for property 'sessio nFactory': no matching editors or conversion strategy found at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480) at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb ject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr y.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe an(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:164)
10:09:49,297 INFO [STDOUT] 10:09:49,297 ERROR [PortletApplicationContext] org.s pringframework.beans.factory.parsing.BeanDefinitionParsingException: Configurati on problem: Class that bean class [com.liferay.portal.spring.annotation.BeanRefe renceAnnotationBeanPostProcessor] depends on not found Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/base-spri ng.xml] Bean 'beanReferenceAnnotationBeanPostProcessor'; nested exception is java.lang.N oClassDefFoundError: org/springframework/beans/factory/BeanFactoryAware org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Config uration problem: Class that bean class [com.liferay.portal.spring.annotation.Bea nReferenceAnnotationBeanPostProcessor] depends on not found Offending resource: ServletContext resource [/WEB-INF/classes/META-INF/base-spri ng.xml] Bean 'beanReferenceAnnotationBeanPostProcessor'; nested exception is java.lang.N oClassDefFoundError: org/springframework/beans/factory/BeanFactoryAware at org.springframework.beans.factory.parsing.FailFastProblemReporter.err or(FailFastProblemReporter.java:68) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderC ontext.java:85) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.er ror(BeanDefinitionParserDelegate.java:288) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.pa rseBeanDefinitionElement(BeanDefinitionParserDelegate.java:487) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.pa rseBeanDefinitionElement(BeanDefinitionParserDelegate.java:389) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.pa rseBeanDefinitionElement(BeanDefinitionParserDelegate.java:358) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe ader.processBeanDefinition(DefaultBeanDefinitionDocumentReader.java:239) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe ader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:153) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe ader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:132) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe ader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
And loads of other error !!!!!!!!!!!!!!!!!!!!!!!
After struggling for some time I got to know what was going on. I have added the spring.jar and portal-impl.jar initially for my testing and I didnt remove them from the project and that was the issue. After removing these two files the protlet started to deploy without any problem
Handling cookies in Javascript =================================
function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; }
function eraseCookie(name) { createCookie(name,"",-1); }
function delCookie(name) { document.cookie = name + "=; expires=Thu, 01-Jan-70 00:00:01 GMT" + "; path=/"; }
IT consultant specialized in CMS/WCM, B2B, e-commerce and Telco solutions. For all requests please feel free to contact me on Email: kishantha@gmail.com Skype: kishantha