Skip to content

Instantly share code, notes, and snippets.

View gauravpaliwal's full-sized avatar

Gaurav Paliwal gauravpaliwal

View GitHub Profile
@gauravpaliwal
gauravpaliwal / testing.java
Created July 28, 2011 16:43
For testing the Portlet in Spring (OpenMRS)
@Test
public void testpopulateModel() throws Exception {
System.out.println("poplulateModel");
SubmitFeedbackController instance = new SubmitFeedbackController();
Map<String, Object> reqmap = new HashMap<String, Object>();
instance.populateModel(request, reqmap) ;
/*to check wheather the data is sent or not binded into the key feedback*/
if (!reqmap.containsKey("predefinedsubjects") || !reqmap.containsKey("severities"))
{
Assert.fail("Do not contain the object predefined subjects and severities") ;
#!/usr/bin/perl
###############################################################################################
# source link : http://digitalpbk.com/2009/12/perl-script-send-free-sms-any-mobile-number-india-using-way2sms
# From CPAN : from CPAN link itself you can download the source for way2sms.
#
# Modified by : Arulalan.T (arulalant@gmail.com)
#
# Goal : send sms through way2sms.com with few easy options. So I modified this below code accordingly.
#
<form method="post" enctype="multipart/form-data">
Your Data.
</form>
@gauravpaliwal
gauravpaliwal / error.java
Created July 9, 2011 02:31
Error in JSP
org.springframework.web.servlet.mvc.AbstractFormControIIer.getCommand (AbstractFormCont roller. java:435)
org.springframework.web.servlet.mvc.AbstractFormControIIer.handIeRequestlnte rnal (Abst ractFo rmCont roller. java:265)
org.springframework.web.servlet.mvc.AbstractControIIer.handIeRequest (AbstractController. java: 1 53) Q
org.springframework.web.servlet.mvc.SimpIeControllerHandIe rAdapter.handIe (SimpIeControllerHandIerAdapter. java:4)
org.springframework.web.servlet.Dispatcherservlet.doDispatch (DispatcherServlet. java:771 )
org.springframework.web.servlet.Dispatcherservlet.doSe rvice (DispatcherServlet. java:716)
org.springframework.web.servlet.Frameworkservlet.processRequest (FrameworkServlet. java:644)
org.springframework.web.servlet.Frameworkservlet.doPost (FrameworkServlet. java: 560)
javax.servlet.http.Httpservlet.se rvice(HttpServlet. java:637)
javax.servlet.http.Httpservlet.se rvice(HttpServlet. java:717)
@gauravpaliwal
gauravpaliwal / wallpaper.xml
Created July 8, 2011 17:08
Debian XML wallpaper Chnager
<background>
<starttime>
<year>2009</year>
<month>08</month>
<day>04</day>
<hour>00</hour>
<minute>00</minute>
<second>00</second>
</starttime>
<!-- This animation will start at midnight. -->