This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def _reset(self): | |
| """Internal method; reopen the internal file handle (probably | |
| because the log file got rotated/truncated).""" | |
| self.f.close() | |
| # modified by sarbajit | |
| localtime1 = localtime(time()) | |
| year = str(localtime1[0]) | |
| if localtime1[1] < 9: | |
| month = "0"+str(localtime1[1]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="login_div" title="Login" style="display:none;"> | |
| <form id="login_form" name="login_form" action="LoginServlet?action=login" method="post"> | |
| <table> | |
| <tbody> | |
| <tr> | |
| <td>Username: </td> | |
| <td><input type="text" name="username" id="username" size="20"></td> | |
| </tr> | |
| <tr> | |
| <td >Password:</td> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $( "#login_div" ).dialog({ | |
| autoOpen: false, | |
| height: 'auto', | |
| width: 400, | |
| modal: true, | |
| buttons: { | |
| "Submit": function() { | |
| // form submission code goes here | |
| }, | |
| "close": function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cherrypy | |
| class HelloWorld: | |
| """ Sample request handler class. """ | |
| def index(self, **params): | |
| # CherryPy will call this method for the root URI ("/") and send | |
| # its return value to the client. | |
| for key in params: | |
| print key, '=', params[key] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //add block | |
| g.block.className = 'gBlock'; | |
| var gh = $(g.bDiv).height(); | |
| var gtop = g.bDiv.offsetTop; | |
| $(g.block).css( | |
| { | |
| width: g.bDiv.style.width, | |
| height: gh, | |
| background: 'white', | |
| position: 'relative', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // unblock flexigrid | |
| $("div .gBlock").css("zIndex", 0); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <property name="c3p0.min_size">5</property> | |
| <property name="c3p0.max_size">20</property> | |
| <property name="c3p0.timeout">1800</property> | |
| <property name="c3p0.max_statements">50</property> | |
| <property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.ws.rs.GET; | |
| import javax.ws.rs.Path; | |
| import javax.ws.rs.Produces; | |
| import javax.ws.rs.core.MediaType; | |
| @Path("/hello") | |
| public class HelloRest { | |
| @GET @Produces(MediaType.TEXT_PLAIN) | |
| public String helloText() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.ws.rs.GET; | |
| import javax.ws.rs.Path; | |
| @Path("/hellowithpath") | |
| public class HelloRestWithPath { | |
| @GET @Path("/text") | |
| public String helloText() | |
| { | |
| return "Hello world"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <servlet> | |
| <description></description> | |
| <display-name>ServletContainer</display-name> | |
| <servlet-name>ServletContainer</servlet-name> | |
| <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class> | |
| </servlet> | |
| <servlet-mapping> | |
| <servlet-name>ServletContainer</servlet-name> | |
| <url-pattern>/rest/*</url-pattern> | |
| </servlet-mapping> |