A self-motivated, multi-domain, hardworking, responsible and solutions-orientated JAVA, J2EE, Spring 4, HTML 5, CSS 3, JavaScript, ES6, Typescript, AngularJS 1.4, jQuery 1.8, PHP 5, Shell Script, PL SQL, MySQL, Google App Engine, Google Datastore, JPA, Cucumber BDD Professional with more then 8+ Years of IT experience in a various IT stages including Design, developing, Unit testing and enhancement and 24*7 support application.
Some time we need to change values of columns of same row of a table.
update table_name set column1 = column2
you can also put some arithmetic calculation and update table as well. the above query will take the value of column2 and will store it in the column1 of the same row of same table.
Json stands for JavaScript Object Notification. it represents data in object format so that javascript and understand it easily and manipulate it easily
keep in mind that, if you will find [] symbol it means it's a array of object. that means one or more then one json object may be there inside the space
you can also iterate this object by using jQuery.each() ot any normal javascript loop.
here variable mathTen contain a array of json. again inside mathTen there valuepaids node which contains a array of json object.
there are ways to manipulate these json object hierarchy inside in side javascript code (i am not mentioning here as we can do that , i think so :) )
Where we need json serialization:
We need json serialization where we want to pass json from one place to another. like from one environment to another. like while sending json data from java/php/asp.net codes to javascript code thorugh ajax call.
Or sending json data as parameter from a dynamically created javascript function
But in some situations we need to create dynamic html codes and pass as json as as parameters if we are creating dynamic javascript functions in that like below
var yuyu = [{"id":"83","text":"sales crescent"},{"id":"88","text":"sales grey bar"}];
indObj=[{"id":"83","text":"sales crescent"}];
there json variable (yuyu and indObj) will no more will be json in the called function if you will not serialize these function here. here the serialize concept come
what is json serialization:
Json serialization is nothing but it convert json object to string so that you can easily send that string from one environment to another or you can pass that string as parameter from a dynamically created javascript function.
Use of json serialization:
to serialize a json object we can use JSON.stringify() as we did in the above created dynamically created javascript function. this function will convert json object to string.
Again we have to deserialize the json object string in the called function (if we are calling in as parameter in dynamic javascript function) or if we are receiving it from other language like java/php/asp.net.
to deserilize json object string we need to call JSON.parse(); it will again convert josn object string to json object so that we can use json nodes in your program.
var indObj = $.parseJSON(jsonpassedvariablehere);
that it. now you can send json data from anywhere in your program and can use that anywhere in your program by serialize and deserialize the objects
visibility:hidden and display:none are not synonims. display:none means that the the tag in question will not appear on the page at all (although you can still interact with it through the dom). There will be no space allocated for it between the other tags. Visibility:hidden means that unlike display:none, the tag is not visible, but space is allocated for it on the page. so for example
This is a common problem while we are transferring data from one technology to other technology. Specially encoding and decoding are concern while different format of data is required in different environment.
In my current piece of work i was required to create a JSON string in java and pass it to view (jsp) page where with the help of JavaScript (jQuery) data render need to perform.
common problem face
How to create a json data string in core java classes.
how to transfer json data from java to jsp
How to convert normal java string to json object in javascript.
Java does not understand json so for creating json in java various library are available. I picked simplest way like, I created a java string as like as json data and pass that string to the javascript. In the javascript end i converted that java string in to javascript string (by adding a null string like;var newval = ""+strVariable). then with the help of jQuery.parseJSON() i converted it to the json object and renders. Below is the code which will describe in the details.
Ajax call from JSP:
$(document).ready(function () { $.ajax({ method:"GET", url: "user-struts action.action", //data: "variableifany="+$("#variableifany").val(), success: function(dataUser) { //converting java string to javascript sting //by adding null string ("") to the returned java string var yuyu = $.parseJSON(""+dataUser); //simple testing of json object by calling jquery each function $.each(yuyu, function(key, val) { alert(val["id"]+"-"+val["text"]); });
$("#divtoplace").select2({ multiple: true, query: function (query){ var data = {results: []}; $.each(yuyu, function(){ if(query.term.length == 0 || this.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0 ){ data.results.push({id: this.id, text: this.text }); } }); query.callback(data); }
}); }, error: function(XMLHttpRequest, textStatus, errorThrown){ alert("errorThrown="+errorThrown+ '----zipcodesuccessError=' + textStatus+"----response text = "+XMLHttpRequest.responseText); } });
Setting java, java_home path for all users in unix
first check if there
is a path set in /etc/profile
file...
other wise you can
set
Set JAVA_HOME / PATH for all user:
You need to setup global config in /etc/profile OR /etc/bash.bashrc file for all
users: # vi /etc/profile Next setup PATH / JAVA_PATH
variables as follows: export
PATH=$PATH:/usr/java/jdk1.5.0_07/bin export
PATH=$PATH:/usr/java/jdk1.5.0_07/bin Save and close the file. Once
again you need to type the following command to activate the path settings
immediately: # source /etc/profile
In product development, a scrum sprint is a set period of time during
which specific work has to be completed and made ready for review.
Each
sprint begins with a planning meeting. During the meeting, the product
owner (the person requesting the work) and the development team agree
upon exactly what work will be accomplished during the sprint. The
development team has the final say when it comes to determining how much
work can realistically be accomplished during the sprint, and the
product owner has the final say on what criteria needs to be met for the
work to be approved and accepted.
The duration of a sprint is determined by the scrum master or development team owner,
the team's facilitator. Once the team reaches a consensus for how many
days a sprint should last, all future sprints should be the same.
Traditionally, a sprint lasts 30 days.
After a sprint begins, the
product owner must step back and let the team do their work. During the
sprint, the team holds daily stand up meeting to discuss progress and
brainstorm solutions to challenges. The project owner may attend these
meetings as an observer but is not allowed to participate unless it is
to answer questions.
The project owner may not make requests for changes during a sprint and
only the scrum master has the power to interrupt or stop the sprint.
At
the end of the sprint, the team presents its completed work to the
project owner and the project owner uses the criteria established at the
sprint planning meeting to either accept or reject the work.