codesandscripts.com
Balanced parenthesis check
http://www.codesandscripts.com/2014/06/balanced-parenthesis-check.html
Tuesday, 24 June 2014. Balanced parenthesis check for expression using javascript. Given an expression with series of braces,curly braces and big brackets " () {} [] ", you have to determine that whether these parenthesis are balanced or not. If given a string " ({}) ", by looking at it we can clearly say that parenthesis are balanced. Today we are going to implement this using javascript. We will be using data structure stack. 14 October 2015 at 03:03. This comment has been removed by the author. Enable...
codesandscripts.com
Merchant guide to galaxy
http://www.codesandscripts.com/2014/06/merchant-guide-to-galaxy.html
Wednesday, 25 June 2014. Merchant guide to galaxy. To your program consists of lines of text detailing your notes on the conversion between intergalactic units and roman numerals. You are expected to handle invalid queries appropriately. Test input:. Glob glob Silver is 34 Credits. Glob prok Gold is 57800 Credits. Pish pish Iron is 3910 Credits. How much is pish tegj glob glob? How many Credits is glob prok Silver? How many Credits is glob prok Gold? How many Credits is glob prok Iron?
codesandscripts.com
How to speed up your website
http://www.codesandscripts.com/2014/07/speed-up-your-website.html
Tuesday, 1 July 2014. How to speed up your website. One of the major concern of today's web developers is how to speed up their website. No one wants to wait for page download neither your user's too. Having fast website is very crucial in today's world, their is no place for slower websites. Below are some tips that you can follow to make your website blazing fast with minimal network load and fast rendering. To overcome this you can combine multiple css. Make JavaScript and CSS External. Remove the unn...
codesandscripts.com
How to detect width of text inside text box
http://www.codesandscripts.com/2014/09/detect-width-of-text-inside-html-text-input-box.html
Tuesday, 30 September 2014. How to detect width of text inside text box. In this tutorial we are going to see how to calculate the width of text inside the text box. First of all we need to know why we are trying to achieve this. This is useful when you want to position some text suggestion just beneath the user cursor inside the text box. The image given below will provide better understanding of the scenario. The trick is simple. Create an HTML element on the fly ( with the help of javascript. Its sake...
codesandscripts.com
About us
http://www.codesandscripts.com/p/about-us.html
Codes and scripts is dedicated to java/J2EE and web developers. We publish useful codes for web development. Our contents are free and available to all users without any registration required. Our Mission is to make learning simple. Our goal is to provide smart and efficient solutions to the problem. We encourage and motivate developers. With BS degree in Information Science and 2 years of experience in Application development, i try to enlighten the solution to some major problems caused in this industry.
codesandscripts.com
Java program to execute shell scripts on remote server
http://www.codesandscripts.com/2014/10/java-program-to-execute-shell-scripts-on-remote-server.html
Thursday, 9 October 2014. Java program to execute shell scripts on remote server. If you want to execute shell scripts on remote server and get output with the help of your java program then you are at right place. In this tutorial we will be using Java secure channel ( Jsch ). To log on to remote server, execute the shell script and capture the output. JSch is a pure Java implementation of SSH2. ( download jSch. Else if(exitStatus 0){ / System.out.println("Done, but with error! 8 April 2015 at 06:16.
codesandscripts.com
Enable caching in tomcat 6
http://www.codesandscripts.com/2014/07/enable-caching-in-tomcat-6.html
Monday, 21 July 2014. Enable caching in tomcat 6. In previous tutorial we learnt how to enable caching in tomcat 7. In this tutorial we will learn how to enable caching in tomcat 6. Tomcat 6 doesn't comes with inbuilt ExpiresFilters like in tomcat 7, but we can write our own filter to achieve caching. Two headers "Cache-control" and "Expires" are needed to be set so that browser can determine when to load resource from server or cache. Java program to execute shell scripts on remote server. Codes and scr...
codesandscripts.com
Javascript and garbage collection
http://www.codesandscripts.com/2014/06/javascript-and-garbage-collection.html
Tuesday, 24 June 2014. Javascript and garbage collection. Javascript doesn't have explicit memory mangament, it's the browser which decides when to clean it up. Sometimes it may happen that you experience unsmooth rendering of JavaScript due to a garbage collection pause. By using simple procedures:. This is well know that new keyword indicates allocation. Wherever possible you can try to reuse the same object by each time by adding or modifying properties. This is also called recycling of object. Someti...
codesandscripts.com
Life cycle of the servlet
http://www.codesandscripts.com/2014/10/life-cycle-of-the-servlet.html
Thursday, 9 October 2014. Life cycle of the servlet. A servlet is a Java programming language class that is used to extend the capabilities of servers that host applications accessed by means of a request-response programming model. Although servlets can respond to any type of request, they are commonly used to extend the applications hosted by web servers . ( more reference. Create Instance of Servlet. Call the servlets init(). Call the servlets service(). Call the servlets destroy(). The init() method :.
codesandscripts.com
Call a method just before a session expires
http://www.codesandscripts.com/2014/10/call-a-method-before-session-expires-in-java.html
Thursday, 9 October 2014. Call a method just before a session expires. In this tutorial we gonna learn that how to call a specific method when a session is going to be destroyed or invalidated by the application container. First of all we need to know why we are doing this. Well it may have many applications but typically we use it for updating user counts, releasing resources etc. We could use HttpSessionListener and do the job in sessionDestroyed() method. How to implement HttpSessionListener? Package ...