import java.text.DateFormat;import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Date;
public class CheckDateFormat {
public static void main(String... args) {
Date date = checkDates("2016-01-01"); System.out.println(date); date = checkDates("2016-13-01"); System.out.println(date); //returns null date...
Wednesday, 6 July 2016
Tuesday, 21 June 2016
Geocoding JSon Parse
Some good point in parsing
http://stackoverflow.com/questions/9058300/how-to-parse-json-reponse-received-from-geocoding-api-v3-in-android-applica...
Thursday, 9 June 2016
Bitbucket or Git Commands Sequence
HOW TO REBASE USING COMMAND LINE
In this example you want to copy all the changes from branch release/v1.0.0 into your branch.
go to your branch then type this commands
git pull
git pull --rebase origin release/v1.0.0
HOW TO COMMIT SOME CODE
git pull
git add -A
git commit -m "your remarks"
git push
Removing a file
git rm "Filename.txt"
Conflicts tools
git merget...
Tuesday, 31 May 2016
Monday, 30 May 2016
Save A File Opened in VI As The Wrong User
This happens to me all the time. I login as a normal user and start editing a file using vim. After editing is done, when I try to save the file, I don't have enough permission to save the file. I have to close the file, login as root and start editing again. Below is the given error in vim:
Try the below command
:w !sudo tee %
Explanation
:w – write
!sudo – call shell sudo command
tee – the...
Unix Command To Run .sh File
chmod Command: Run Shell Script In Linux
Another recommend option is to set an executable permission using the chmod command as follows:
chmod +x file.sh
Now your can run your .sh file as follows
./file.sh
cyberciti.biz/faq/run-execute-sh-shell-scri...
Unix Deleting Folder and Files
Deleting folder and files under it.
Go to the folder you want to delete then issue this command.
sudo rm -r deletingdir
sudo - changing the access as root owner or admin.
deletingdir must be in the list when you issues this...
Saturday, 28 May 2016
JQuery Code To Delete A Row
JQuery Code to delete a row
![CDATA[
<script type="javascript">
function deleteRow(id,myButton) {
$(myButton).parent().parent().remove();
}
</script>
]]>
JSP Code
![CDATA[
<table>
<c:forEach var=“listvar" items=“${myList}" varStatus="status">
<tr>
<td>
${listvar.description}
...
How To Use Syntax Highlighter
Put this code before the </header> tag
![CDATA[
<link href='http://alexgorbatchev.com/pub/sh/2.1.364/styles/shCore.css' rel='stylesheet' type='text/css'/>
<link href='http://alexgorbatchev.com/pub/sh/2.1.364/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/>
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shCore.js' type='text/javascript'></script>
<script...
Friday, 27 May 2016
Testing Syntaxhighlighter
![CDATA[
import java.util.Iterator;
import java.util.List;
import java.util.ArrayList;
public class IterateAList {
public static void main(String[] argv) {
ArrayList arrJavaTechnologies = new ArrayList();
arrJavaTechnologies.add("JSP");
arrJavaTechnologies.add("Servlets");
arrJavaTechnologies.add("EJB");
arrJavaTechnologies.add("JDBC");
arrJavaTechnologies.add("JPA");
arrJavaTechnologies.add("JSF");
//Iterate...