tech.lalitbhatt.net
Technology: Hooking javascript function before navigating to a link
http://tech.lalitbhatt.net/2015/05/hooking-javascript-function-before.html
Friday, May 29, 2015. Hooking javascript function before navigating to a link. Links are very common navigation elements in a HTML page. As most of us know a link looks like. This will give us a link as follows and clicking on that will navigate to a new page. To achieve that, hook a javascript function on the link. A onclick="cleanupBeforeLogut()" Log out /a. The javascript function is as follows. Location.href = "http:/ lalitbhatt.net/logout" ;. Subscribe to: Post Comments (Atom).
tech.lalitbhatt.net
Technology: Finding Latitude and Longitude of a location
http://tech.lalitbhatt.net/2015/06/finding-latitude-and-longitude-of.html
Monday, June 1, 2015. Finding Latitude and Longitude of a location. HTML5 supports geolocation which helps in finding current longitude and latitude. As this affects privacy, browser ask user if they want to allow the application to read the current location of user. The javascript code to get the current position is as follows:. Var success = function(position){. Var error = function(error){. Var option = {. Navigator.geolocation.getCurrentPosition(success,error,option);. View my complete profile. Encry...
tech.lalitbhatt.net
Technology: Cors Filter in Tomcat
http://tech.lalitbhatt.net/2015/07/cors-filter-in-tomcat.html
Thursday, July 23, 2015. Cors Filter in Tomcat. CORS stands for Cross Origin Resource Sharing. This is a way to handle Cross domain requests. CORS as a concept is supported by W3C consortium. It is enabled on server side by putting Access-Control-* headers. The origin header is put by clients side browsers and by enabling CORS we can ask the server to honour the request. Tomcat supports CORS filter which can be enabled by hooking the filter in web.xml. A minimalist configuration is. Java Simple Serial Co...
tech.lalitbhatt.net
Technology: Big Data
http://tech.lalitbhatt.net/p/big-data.html
Map Reduce in simple terms. Version 2.3.0. SQL vs No SQL. Subscribe to: Posts (Atom). View my complete profile. Aspect Oriented Programming (AOP). Business Process Analysis (BPA). Cascading Style Sheet (CSS). Airflow - Beginners Tutorial. Encrypting and Decrypting using Public Private Key in Java. Object Relationship Mapping (ORM). Java Simple Serial Connector (jSSC). JAXB Generating Java Classes From XML. Hibernate Persistent Context and Session. Mapping Inheritance in Hibernate.
tech.lalitbhatt.net
Technology: Finding address in a browser using reverse geocoding
http://tech.lalitbhatt.net/2015/06/finding-address-in-browser-using.html
Monday, June 1, 2015. Finding address in a browser using reverse geocoding. To find the address of a location, first you need to find our latitude and longitude. This can be done my following the blog about finding latitude and longitude. Once the latitude and longitude are in place, they can be passed to Google reverse geocoding api to find the details of the location. Please read the terms and conditions of Google geocoding api also. Var request = new XMLHttpRequest();. Var method = 'GET';. State = dat...
tech.lalitbhatt.net
Technology: Bugs that should not be fixed
http://tech.lalitbhatt.net/2014/07/bugs-that-should-not-be-fixed.html
Friday, July 25, 2014. Bugs that should not be fixed. Of course, we want to fix everything. It's extremely difficult to justify sometimes why we should not be fixing some bugs. There is always an angle to more security, better usability, better look and feel, a new feature which could be a killer. The points I am mentioning are more valid near the release and hold less water in the beginning of release so take your judgement. Subscribe to: Post Comments (Atom). View my complete profile. Hibernate Persist...
tech.lalitbhatt.net
Technology: Modeling Business Processes
http://tech.lalitbhatt.net/2014/08/modeling-business-processes.html
Thursday, August 14, 2014. Once the business processes are identified, the next step is to detail the business processes. The detailing of business processes helps in getting better insight into how the things work in the organization. The techniques of modeling employed can be used in understanding the current business processes and can also be used for depicting the changed/reengineered processes. Circle - Start/End of process. Rectangle - Step in a process. Rhombus - Decision points. Encrypting and De...
tech.lalitbhatt.net
Technology: Invoking web services using Restlet
http://tech.lalitbhatt.net/2015/05/invoking-web-services-using-restlet.html
Sunday, May 3, 2015. Invoking web services using Restlet. Restslet is a good framework to invoke rest based web services. Let's see through a simple program how to write a client to invoke Rest based webservices. Name Restlet repository /name. Url http:/ maven.restlet.com /url. Restlet-version 2.3.1 /restlet-version. GroupId org.restlet.jse /groupId. ArtifactId org.restlet /artifactId. GroupId org.restlet.jse /groupId. ArtifactId org.restlet.ext.jackson /artifactId. Let's say the json request is. If (rep...
tech.lalitbhatt.net
Technology: Object Relationship Mapping (ORM)
http://tech.lalitbhatt.net/2014/07/object-relationship-mapping-orm.html
Sunday, July 27, 2014. Object Relationship Mapping (ORM). To interact with the database, Standard Query Language(SQL) has emerged as the standard way. The SQL standards are controlled by ANSI. However there are still proprietary variations to it. SQL provides two types of mechanism:. Data Definition Language (DDL) : Provides ways to create and alter tables. Data Manipulation Language (DML) : Provides ways to manipulate and retrieve data. It includes inserting, updating and deleting data. The granularity ...
tech.lalitbhatt.net
Technology: Hibernate Persistent Context and Session
http://tech.lalitbhatt.net/2014/07/hibernate-persistent-context-and-session.html
Monday, July 28, 2014. Hibernate Persistent Context and Session. The concept of Persistent Context and Session are central to the runtime behavior of Hibernate. Persistent Context is a run time memory area where Hibernate holds the references of objects and Session provides API to interact with the objects. Let's look them into one by one. Cache Only one object instance representing a particular database row exists in the cache. Hibernate can extend the persistence context to span a whole conversation.