Skip to main content

Posts

Recent posts

Converting String to a Executable line in JAVA

I've been searching for converting a string into a executable line so that I could process it... after searching for sometime, as usual I got a solution in the name of BeanShell scripting awesome one... This is another scripting language built with Java, which is powerful and was able to solve my need... This is the link for it : http://www.beanshell.org/manual/bshmanual.html#Download_and_Run_BeanShell Hope this helps you as well... If anyone requires any help on this, a basic one ;) ... sure post a comment, will help if I could...

Deregistering ResgisterStartupScript

Yesterday was bit tricky until I found my solution to deregister the Startup script; we used to bind from code behind in asp.net. I have added the script using sys.application.add_load(); to show a simple popup but the problem is when an asyn postback happens again and again those alerts pops out ;). After few mins of googling found a solution from Microsoft support link that we can remove the handler using sys.application.remove_load(); Though the solution is not exactly deregistering, it still solves the problem. If you have any other solution for this, please post the same in comments. I have done with scriptmanager since the postback was through updatepanel. Code:  ScriptManager.RegisterStartupScript(updatePanelID, this.GetType(), "key",                  "Sys.Application.remove_load(jsMethodName);", true);

Creating multi module project with maven

Creating my first multi module project with maven I got a superb step by step article for maven project creation in eclipse while googling. This article is good for beginners like me :) , no need do too many things, just follow the steps at the end you will see “Hello World” in the browser. Check the below link for the wonderful article. http://skillshared.blogspot.in/2012/11/how-to-create-multi-module-project-with.html Thanks Semika Loku Kaluge

HIBERNATE (WITH @NNOTATION) IN WEB APPLICATION

In this post, am going to cover the basic way to setup the hibernate environment in eclipse to do a simple insert operation in mysql database and this post is meant for beginners who doesn't know about hibernate configurations coz am similar kind. I can't post this in codeproject coz it requires some more documentation so if you want the project files m essage me in G+  I will post you the project files. Folder structure & Libraries required :  It gives clear details about file placement and libraries required. Application setup: ·         JDK 6 ·         Eclipse Juno ·         Tomcat 7.0 ·         MySQL 5.1 ·         Supporting libraries for hibernate. Steps: ·         Creating project in Eclipse. ·...

Unable to convert MySQL date/time value to System.DateTime - Solved

Few days back I got an exception like 'Unable to convert Mysql date/time value to system.datetime' but this happened only after deploying and locally everything was working fine. After googling for sometimes found the reason that, it was due to the formatting difference between Mysql and C# also empty date value is causing some issue. Later found the below solution to fix'em. Add an extra property(Convert Zero Datetime = true) to connectino string. e.g server=localhost;User Id=root;password=pwd;database=test; Convert Zero Datetime=true Solution obtained from StackOverflow :)